]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
udoo-neo: Do not print devicetree model
authorFabio Estevam <festevam@gmail.com>
Fri, 19 Jul 2024 20:33:10 +0000 (17:33 -0300)
committerFabio Estevam <festevam@gmail.com>
Mon, 22 Jul 2024 20:55:35 +0000 (17:55 -0300)
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 <festevam@gmail.com>
board/udoo/neo/neo.c
configs/udoo_neo_defconfig

index 1a0aaecc3328b822917b3cccc766b2958104ed01..4cf214bf17c6c530f78a058a9ec0d902583ce23e 100644 (file)
@@ -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;
index 97e3b379835fd4057f3d27f18e75b19a3eee0aad..826d5a11504390f24bb839c917109e788f84bb5d 100644 (file)
@@ -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