summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/tny-a926x/init.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-08-15 09:02:17 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-08-16 08:40:55 +0200
commit068bed22a6154aec1fe689603b8a8eaa27c0f350 (patch)
tree5cebcbbbcd486ee49552253d27d079b7f6703fd4 /arch/arm/boards/tny-a926x/init.c
parent774580c2bde4c8b126eed0a80d00cb22cbfb3193 (diff)
downloadbarebox-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/tny-a926x/init.c')
-rw-r--r--arch/arm/boards/tny-a926x/init.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/boards/tny-a926x/init.c b/arch/arm/boards/tny-a926x/init.c
index cdfe046b27..55783e9153 100644
--- a/arch/arm/boards/tny-a926x/init.c
+++ b/arch/arm/boards/tny-a926x/init.c
@@ -246,6 +246,17 @@ device_initcall(tny_a9260_devices_init);
static int tny_a9260_console_init(void)
{
+ if (machine_is_tny_a9g20()) {
+ barebox_set_model("Calao TNY-A9G20");
+ barebox_set_hostname("tny-a9g20");
+ } else if (machine_is_tny_a9263()) {
+ barebox_set_model("Calao TNY-A9263");
+ barebox_set_hostname("tny-a9263");
+ } else {
+ barebox_set_model("Calao TNY-A9260");
+ barebox_set_hostname("tny-a9260");
+ }
+
at91_register_uart(0, 0);
if (IS_ENABLED(CONFIG_CALAO_MOB_TNY_MD2))
at91_register_uart(2, ATMEL_UART_CTS | ATMEL_UART_RTS);