diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-08-15 09:02:17 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-08-16 08:40:55 +0200 |
commit | 068bed22a6154aec1fe689603b8a8eaa27c0f350 (patch) | |
tree | 5cebcbbbcd486ee49552253d27d079b7f6703fd4 /arch/arm/boards/edb93xx | |
parent | 774580c2bde4c8b126eed0a80d00cb22cbfb3193 (diff) | |
download | barebox-068bed22a6154aec1fe689603b8a8eaa27c0f350.tar.gz barebox-068bed22a6154aec1fe689603b8a8eaa27c0f350.tar.xz |
Set model and hostname at boardlevel
With multiboard support the compiletime generated BOARDINFO string
gets more and more meaningless. This removes it from Kconfig and
replaces it with a variable that can be set at boardlevel.
Also many boards have a standard setting for the hostname in the
environment. This patch also moves the standard to C code by calling
barebox_set_hostname().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/edb93xx')
-rw-r--r-- | arch/arm/boards/edb93xx/edb93xx.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/boards/edb93xx/edb93xx.c b/arch/arm/boards/edb93xx/edb93xx.c index adfcc16e2d..27ba90abfd 100644 --- a/arch/arm/boards/edb93xx/edb93xx.c +++ b/arch/arm/boards/edb93xx/edb93xx.c @@ -83,6 +83,7 @@ device_initcall(ep93xx_devices_init); static int edb93xx_console_init(void) { struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE; + char *shortname, *board; /* * set UARTBAUD bit to drive UARTs with 14.7456MHz instead of @@ -98,6 +99,30 @@ static int edb93xx_console_init(void) writel(0xAA, &syscon->sysswlock); writel(value, &syscon->devicecfg); + if (IS_ENABLED(CONFIG_MACH_EDB9301)) + shortname = "EDB9301"; + else if (IS_ENABLED(CONFIG_MACH_EDB9302)) + shortname = "EDB9302"; + else if (IS_ENABLED(CONFIG_MACH_EDB9302)) + shortname = "EDB9302A"; + else if (IS_ENABLED(CONFIG_MACH_EDB9307)) + shortname = "EDB9307"; + else if (IS_ENABLED(CONFIG_MACH_EDB9307A)) + shortname = "EDB9307A"; + else if (IS_ENABLED(CONFIG_MACH_EDB9312)) + shortname = "EDB9312"; + else if (IS_ENABLED(CONFIG_MACH_EDB9315)) + shortname = "EDB9315"; + else if (IS_ENABLED(CONFIG_MACH_EDB9315A)) + shortname = "EDB9315A"; + else + shortname = "unknown"; + + board = asprintf("Cirrus Logic %s", shortname); + barebox_set_model(board); + free(board); + barebox_set_hostname(shortname); + add_generic_device("pl010_serial", DEVICE_ID_DYNAMIC, NULL, UART1_BASE, 4096, IORESOURCE_MEM, NULL); |