From: Tom Rini Date: Tue, 22 Mar 2022 01:33:32 +0000 (-0400) Subject: Remove CONFIG_BOARDNAME and CONFIG_BOARD_NAME X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=47267f82612e71a69c88c180917dc77f7251dee8;p=u-boot.git 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 --- 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 19ece12296..b6f0d20426 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); diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c index ed700f4e1d..4e9d841fe2 100644 --- a/board/ge/bx50v3/bx50v3.c +++ b/board/ge/bx50v3/bx50v3.c @@ -547,7 +547,7 @@ int last_stage_init(void) int checkboard(void) { - printf("BOARD: %s\n", CONFIG_BOARD_NAME); + printf("BOARD: General Electric Bx50v3\n"); return 0; } diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h index 1fa1fc09aa..d9c72a8d2f 100644 --- a/include/configs/T102xRDB.h +++ b/include/configs/T102xRDB.h @@ -519,20 +519,21 @@ #define __USB_PHY_TYPE utmi #ifdef CONFIG_ARCH_T1024 -#define CONFIG_BOARDNAME t1024rdb -#define BANK_INTLV cs0_cs1 +#define ARCH_EXTRA_ENV_SETTINGS \ + "bank_intlv=cs0_cs1\0" \ + "ramdiskfile=t1024rdb/ramdisk.uboot\0" \ + "fdtfile=t1024rdb/t1024rdb.dtb\0" #else -#define CONFIG_BOARDNAME t1023rdb -#define BANK_INTLV null +#define ARCH_EXTRA_ENV_SETTINGS \ + "bank_intlv=null\0" \ + "ramdiskfile=t1023rdb/ramdisk.uboot\0" \ + "fdtfile=t1023rdb/t1023rdb.dtb\0" #endif #define CONFIG_EXTRA_ENV_SETTINGS \ + ARCH_EXTRA_ENV_SETTINGS \ "hwconfig=fsl_ddr:ctlr_intlv=cacheline," \ - "bank_intlv=" __stringify(BANK_INTLV) "\0" \ "usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0" \ - "ramdiskfile=" __stringify(CONFIG_BOARDNAME) "/ramdisk.uboot\0" \ - "fdtfile=" __stringify(CONFIG_BOARDNAME) "/" \ - __stringify(CONFIG_BOARDNAME) ".dtb\0" \ "uboot=" __stringify(CONFIG_UBOOTPATH) "\0" \ "ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0" \ "bootargs=root=/dev/ram rw console=ttyS0,115200\0" \ diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h index 4764d22520..bcd7b84cf3 100644 --- a/include/configs/el6x_common.h +++ b/include/configs/el6x_common.h @@ -10,8 +10,6 @@ #include -#define CONFIG_BOARD_NAME EL6Q - #include "mx6_common.h" #ifdef CONFIG_SPL @@ -30,10 +28,8 @@ #define CONFIG_MXC_UART_BASE UART2_BASE -#define CONFIG_BOARD_NAME EL6Q - #define CONFIG_EXTRA_ENV_SETTINGS \ - "board="__stringify(CONFIG_BOARD_NAME)"\0" \ + "board=EL6Q\0" \ "cma_size="__stringify(EL6Q_CMA_SIZE)"\0" \ "chp_size="__stringify(EL6Q_COHERENT_POOL_SIZE)"\0" \ "console=" CONSOLE_DEV "\0" \ diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h index 402c5bfacb..8d467e420f 100644 --- a/include/configs/ge_bx50v3.h +++ b/include/configs/ge_bx50v3.h @@ -14,8 +14,6 @@ #include #include -#define CONFIG_BOARD_NAME "General Electric Bx50v3" - #include "mx6_common.h" #include diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h index a27093fc95..1f2887105f 100644 --- a/include/configs/opos6uldev.h +++ b/include/configs/opos6uldev.h @@ -44,18 +44,17 @@ /* Environment is stored in the eMMC boot partition */ #define CONFIG_ENV_VERSION 100 -#define CONFIG_BOARD_NAME opos6ul #define ACFG_CONSOLE_DEV ttymxc0 #define CONFIG_SYS_AUTOLOAD "no" -#define CONFIG_ROOTPATH "/tftpboot/" __stringify(CONFIG_BOARD_NAME) "-root" +#define CONFIG_ROOTPATH "/tftpboot/opos6ul-root" #define CONFIG_EXTRA_ENV_SETTINGS \ "env_version=" __stringify(CONFIG_ENV_VERSION) "\0" \ "consoledev=" __stringify(ACFG_CONSOLE_DEV) "\0" \ - "board_name=" __stringify(CONFIG_BOARD_NAME) "\0" \ + "board_name=opos6ul\0" \ "fdt_addr=0x88000000\0" \ "fdt_high=0xffffffff\0" \ - "fdt_name=" __stringify(CONFIG_BOARD_NAME) "dev\0" \ + "fdt_name=opos6uldev\0" \ "initrd_high=0xffffffff\0" \ "ip_dyn=yes\0" \ "stdin=serial\0" \ @@ -65,7 +64,7 @@ "mmcpart=2\0" \ "mmcroot=/dev/mmcblk0p2 ro\0" \ "mmcrootfstype=ext4 rootwait\0" \ - "kernelimg=" __stringify(CONFIG_BOARD_NAME) "-linux.bin\0" \ + "kernelimg=opos6ul-linux.bin\0" \ "splashpos=0,0\0" \ "splashimage=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ "videomode=video=ctfb:x:800,y:480,depth:18,pclk:33033,le:96,ri:96,up:20,lo:21,hs:64,vs:4,sync:0,vmode:0\0" \ diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index 64a5269076..a6523753d5 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -13,7 +13,6 @@ #include #if defined(CONFIG_TARGET_P1020RDB_PC) -#define CONFIG_BOARDNAME "P1020RDB-PC" #define CONFIG_VSC7385_ENET #define CONFIG_SLIC #define __SW_BOOT_MASK 0x03 @@ -39,7 +38,6 @@ * 011101 800 800 400 667 PCIe-2 Core0 boot; Core1 hold-off */ #if defined(CONFIG_TARGET_P1020RDB_PD) -#define CONFIG_BOARDNAME "P1020RDB-PD" #define CONFIG_VSC7385_ENET #define CONFIG_SLIC #define __SW_BOOT_MASK 0x03 @@ -55,7 +53,6 @@ #endif #if defined(CONFIG_TARGET_P2020RDB) -#define CONFIG_BOARDNAME "P2020RDB-PC" #define CONFIG_VSC7385_ENET #define __SW_BOOT_MASK 0x03 #define __SW_BOOT_NOR 0xc8