mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 17:22:22 +02:00
wandboard: Print the board version in board_late_init()
Since CONFIG_DISPLAY_BOARDINFO_LATE is no longer used, the checkboard() function is no longer called. As it is useful to print the board revision, print it inside board_late_init() instead. Also, to avoid GPIO errors related to using a GPIO without requesting it, move the gpio_request(REV_DETECTION, "REV_DETECT") call prior to its usage. Signed-off-by: Fabio Estevam <festevam@gmail.com> Tested-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
committed by
Stefano Babic
parent
06f35583c5
commit
fe2f432c1c
@@ -404,6 +404,7 @@ static const struct boot_mode board_boot_modes[] = {
|
|||||||
static bool is_revc1(void)
|
static bool is_revc1(void)
|
||||||
{
|
{
|
||||||
SETUP_IOMUX_PADS(rev_detection_pad);
|
SETUP_IOMUX_PADS(rev_detection_pad);
|
||||||
|
gpio_request(REV_DETECTION, "REV_DETECT");
|
||||||
gpio_direction_input(REV_DETECTION);
|
gpio_direction_input(REV_DETECTION);
|
||||||
|
|
||||||
if (gpio_get_value(REV_DETECTION))
|
if (gpio_get_value(REV_DETECTION))
|
||||||
@@ -442,6 +443,14 @@ int board_late_init(void)
|
|||||||
env_set("board_name", "B1");
|
env_set("board_name", "B1");
|
||||||
#endif
|
#endif
|
||||||
setup_iomux_enet();
|
setup_iomux_enet();
|
||||||
|
|
||||||
|
if (is_revd1())
|
||||||
|
puts("Board: Wandboard rev D1\n");
|
||||||
|
else if (is_revc1())
|
||||||
|
puts("Board: Wandboard rev C1\n");
|
||||||
|
else
|
||||||
|
puts("Board: Wandboard rev B1\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -466,20 +475,6 @@ int board_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int checkboard(void)
|
|
||||||
{
|
|
||||||
gpio_request(REV_DETECTION, "REV_DETECT");
|
|
||||||
|
|
||||||
if (is_revd1())
|
|
||||||
puts("Board: Wandboard rev D1\n");
|
|
||||||
else if (is_revc1())
|
|
||||||
puts("Board: Wandboard rev C1\n");
|
|
||||||
else
|
|
||||||
puts("Board: Wandboard rev B1\n");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_SPL_LOAD_FIT
|
#ifdef CONFIG_SPL_LOAD_FIT
|
||||||
int board_fit_config_name_match(const char *name)
|
int board_fit_config_name_match(const char *name)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user