From b06a0b4781a87f61ccd4dc70cc9deab40c9ee456 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Fri, 19 Jul 2024 17:33:10 -0300 Subject: [PATCH] udoo-neo: Do not print devicetree model The udoo_neo_defconfig target supports several board variants. All of these variants use the imx6sx-udoo-neo-basic devicetree in U-Boot. Currently, the devicetree model as well as the board variant name are shown: ... Model: UDOO Neo Basic Board: UDOO Neo FULL ... Printing the devicetree model that is used internally by U-Boot may confuse users. Unselect the CONFIG_DISPLAY_BOARDINFO option and move the board printing inside board_init() so that only the real board name that is detected in run-time is printed. Signed-off-by: Fabio Estevam --- board/udoo/neo/neo.c | 43 +++++++++++++++++--------------------- configs/udoo_neo_defconfig | 1 + 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c index 1a0aaecc33..4cf214bf17 100644 --- a/board/udoo/neo/neo.c +++ b/board/udoo/neo/neo.c @@ -136,8 +136,25 @@ static int setup_fec(void) return enable_fec_anatop_clock(0, ENET_25MHZ); } +static char *board_string(int type) +{ + switch (type) { + case UDOO_NEO_TYPE_BASIC: + return "BASIC"; + case UDOO_NEO_TYPE_BASIC_KS: + return "BASICKS"; + case UDOO_NEO_TYPE_FULL: + return "FULL"; + case UDOO_NEO_TYPE_EXTENDED: + return "EXTENDED"; + } + return "UNDEFINED"; +} + int board_init(void) { + int *board_type = (int *)OCRAM_START; + /* Address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; @@ -149,6 +166,8 @@ int board_init(void) gpio_request(IMX_GPIO_NR(4, 16), "ncp692"); gpio_direction_output(IMX_GPIO_NR(4, 16) , 1); + printf("Board: UDOO Neo %s\n", board_string(*board_type)); + setup_fec(); return 0; @@ -179,30 +198,6 @@ int board_mmc_init(struct bd_info *bis) return fsl_esdhc_initialize(bis, &usdhc_cfg[0]); } -static char *board_string(int type) -{ - switch (type) { - case UDOO_NEO_TYPE_BASIC: - return "BASIC"; - case UDOO_NEO_TYPE_BASIC_KS: - return "BASICKS"; - case UDOO_NEO_TYPE_FULL: - return "FULL"; - case UDOO_NEO_TYPE_EXTENDED: - return "EXTENDED"; - } - return "UNDEFINED"; -} - -/* Override the default implementation, DT model is not accurate */ -int checkboard(void) -{ - int *board_type = (int *)OCRAM_START; - - printf("Board: UDOO Neo %s\n", board_string(*board_type)); - return 0; -} - int board_late_init(void) { int *board_type = (int *)OCRAM_START; diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig index 97e3b37983..826d5a1150 100644 --- a/configs/udoo_neo_defconfig +++ b/configs/udoo_neo_defconfig @@ -25,6 +25,7 @@ CONFIG_BOARD_SIZE_LIMIT=523264 CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd" CONFIG_SYS_PBSIZE=532 +# CONFIG_DISPLAY_BOARDINFO is not set CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_ENV_SUPPORT=y CONFIG_SPL_FS_EXT4=y -- 2.39.5