Message ID | CADU+0ML0UYOvdtr+pDdboQimiJc-hBEh6dOOBBfbFK2tbdDJHw@mail.gmail.com |
---|---|
State | Awaiting Upstream |
Delegated to: | Stefano Babic |
Headers | show |
Series | mx6sabresd: Make checkboard respect CONFIG_NXP_BOARD_REVISION | expand |
diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c index 57fab23864..e5d9d1f979 100644 --- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c +++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c @@ -320,7 +320,11 @@ 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; }
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> --- board/freescale/mx6sxsabresd/mx6sxsabresd.c | 4 ++++ 1 file changed, 4 insertions(+)