mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
board: ti: use positive logic to detect idk boards
am57x_idk_lcd_detect() exits immediately if a known board not having an LCD is found, i.e. a non-IDK board. This is annoying as we have to remember to add an extra OR clause for every new non-IDK board. Add a board_is_ti_idk() macro so that the logic becomes positive (detect LCD on IDK boards instead of not-known-without-LCD boards). Even more important, add the macro just below the board_is_*_idk() macros, so it is easy to remember to update it when adding a new IDK. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
This commit is contained in:
parent
1c162722d7
commit
fedfa374ff
1 changed files with 5 additions and 1 deletions
|
@ -61,6 +61,10 @@ static int board_bootmode_has_emmc(void);
|
||||||
#define board_is_am571x_idk() board_ti_is("AM571IDK")
|
#define board_is_am571x_idk() board_ti_is("AM571IDK")
|
||||||
#define board_is_bbai() board_ti_is("BBONE-AI")
|
#define board_is_bbai() board_ti_is("BBONE-AI")
|
||||||
|
|
||||||
|
#define board_is_ti_idk() board_is_am574x_idk() || \
|
||||||
|
board_is_am572x_idk() || \
|
||||||
|
board_is_am571x_idk()
|
||||||
|
|
||||||
#ifdef CONFIG_DRIVER_TI_CPSW
|
#ifdef CONFIG_DRIVER_TI_CPSW
|
||||||
#include <cpsw.h>
|
#include <cpsw.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -666,7 +670,7 @@ void am57x_idk_lcd_detect(void)
|
||||||
struct udevice *dev;
|
struct udevice *dev;
|
||||||
|
|
||||||
/* Only valid for IDKs */
|
/* Only valid for IDKs */
|
||||||
if (board_is_x15() || board_is_am572x_evm() || board_is_bbai())
|
if (!board_is_ti_idk())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Only AM571x IDK has gpio control detect.. so check that */
|
/* Only AM571x IDK has gpio control detect.. so check that */
|
||||||
|
|
Loading…
Add table
Reference in a new issue