diff options
author | Tom Rini | 2022-03-21 21:33:32 -0400 |
---|---|---|
committer | Tom Rini | 2022-04-01 10:28:46 -0400 |
commit | 47267f82612e71a69c88c180917dc77f7251dee8 (patch) | |
tree | 349086a5ec6172aab42c481f9da5b9720df0063a /board/freescale | |
parent | 448dfb407f7af23b3d85d8ce9039e1e2bd287245 (diff) |
Remove CONFIG_BOARDNAME and CONFIG_BOARD_NAME
Both of these variables are used in a few hard-coded ways to set some
string values or print something to the user. In almost all cases, it's
just as useful to hard-code the value used. The exception here is
printing something closer to correct board name for p1_p2_rdb machines.
This can be done using something from the device tree, but for now
hard-code a non-CONFIG based value instead.
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c index 19ece122963..b6f0d204267 100644 --- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c +++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c @@ -160,6 +160,14 @@ int board_early_init_f(void) return 0; } +#if defined(CONFIG_TARGET_P1020RDB_PC) +#define BOARD_NAME "P1020RDB-PC" +#elif defined(CONFIG_TARGET_P1020RDB_PD) +#define BOARD_NAME "P1020RDB-PD" +#elif defined(CONFIG_TARGET_P2020RDB) +#define BOARD_NAME "P2020RDB-PC" +#endif + int checkboard(void) { struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE); @@ -167,7 +175,8 @@ int checkboard(void) u8 in, out, io_config, val; int bus_num = CONFIG_SYS_SPD_BUS_NUM; - printf("Board: %s CPLD: V%d.%d PCBA: V%d.0\n", CONFIG_BOARDNAME, + /* FIXME: This should just use the model from the device tree or similar */ + printf("Board: %s CPLD: V%d.%d PCBA: V%d.0\n", BOARD_NAME, in_8(&cpld_data->cpld_rev_major) & 0x0F, in_8(&cpld_data->cpld_rev_minor) & 0x0F, in_8(&cpld_data->pcba_rev) & 0x0F); |