diff options
author | Cody Gray <cody@codygray.com> | 2021-06-27 08:15:22 +0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2021-07-10 19:14:25 +0300 |
commit | 55d46761a30f779dc82544bdc0de89f4c8c6e4ea (patch) | |
tree | 2dbca76f7635685fc352246f41b2f56be6dfd6ad /board | |
parent | a5ee05cf7180b411ffdf148ca8cb220c029f2e19 (diff) | |
download | u-boot-55d46761a30f779dc82544bdc0de89f4c8c6e4ea.tar.xz |
mx6sabresd: Make checkboard respect CONFIG_NXP_BOARD_REVISION
The default implementation of checkboard() calls the
nxp_board_rev_string() function
to retrieve a character representing the revision number of the board.
However, this
attempt to retrieve the revision number may fail in certain situations or be
otherwise undesirable.
There is already a configuration option to avoid retrieving the
revision number of
the board: CONFIG_NXP_BOARD_REVISION. In fact, if this option is enabled, the
nxp_board_rev_string() function's definition will be omitted entirely,
meaning that the previous implementation of checkboard() would result
in a linker error.
This changeset makes the default implementation of checkboard() respect the
CONFIG_NXP_BOARD_REVISION configuration option, only attempting to retrieve
the board revision number if that option is defined.
Signed-off-by: Cody Gray <cody@codygray.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/mx6sxsabresd/mx6sxsabresd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index 57fab23864..e7958df402 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -320,7 +320,10 @@ int board_late_init(void) int checkboard(void) { +#ifdef CONFIG_NXP_BOARD_REVISION printf("Board: MX6SX SABRE SDB rev%c\n", nxp_board_rev_string()); - +#else + puts("Board: MX6SX SABRE SDB"); +#endif return 0; } |