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 <trini@konsulko.com>
This commit is contained in:
Tom Rini 2022-03-21 21:33:32 -04:00
parent 448dfb407f
commit 47267f8261
7 changed files with 25 additions and 25 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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" \

View File

@ -10,8 +10,6 @@
#include <linux/stringify.h>
#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" \

View File

@ -14,8 +14,6 @@
#include <asm/arch/imx-regs.h>
#include <asm/mach-imx/gpio.h>
#define CONFIG_BOARD_NAME "General Electric Bx50v3"
#include "mx6_common.h"
#include <linux/sizes.h>

View File

@ -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" \

View File

@ -13,7 +13,6 @@
#include <linux/stringify.h>
#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