diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-02-13 11:06:42 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-02-14 13:09:09 +0100 |
commit | f6b23059c9be5cfb4731d03ee150e89058f10b60 (patch) | |
tree | 90e48a010663fb00acdfe7b9a7c91088b19044fb /arch/arm/boards/highbank | |
parent | 59cfe5905b9b45decffbb77a272e86b9b7d1e667 (diff) | |
download | barebox-f6b23059c9be5cfb4731d03ee150e89058f10b60.tar.gz barebox-f6b23059c9be5cfb4731d03ee150e89058f10b60.tar.xz |
arm: add highbank support
currently only tested under qemu
qemu-system-arm -M highbank -nographic -m 4089 -kernel build/highbank/arch/arm/pbl/zbarebox -tftp "." -drive id=disk,if=ide,file=disk.img -device ide-drive,drive=disk,bus=ide.0
with:
- timer (AMBA SP804)
- uart (AMBA PL011)
- gpio (AMBA PL061)
- ahci
- net (XGMAC)
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/highbank')
-rw-r--r-- | arch/arm/boards/highbank/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/boards/highbank/config.h | 5 | ||||
-rw-r--r-- | arch/arm/boards/highbank/env/config | 33 | ||||
-rw-r--r-- | arch/arm/boards/highbank/init.c | 50 | ||||
-rw-r--r-- | arch/arm/boards/highbank/lowlevel.c | 17 |
5 files changed, 109 insertions, 0 deletions
diff --git a/arch/arm/boards/highbank/Makefile b/arch/arm/boards/highbank/Makefile new file mode 100644 index 0000000000..98921a48b4 --- /dev/null +++ b/arch/arm/boards/highbank/Makefile @@ -0,0 +1,4 @@ +obj-y += init.o + +obj-y += lowlevel.o +pbl-y += lowlevel.o diff --git a/arch/arm/boards/highbank/config.h b/arch/arm/boards/highbank/config.h new file mode 100644 index 0000000000..25bb18f787 --- /dev/null +++ b/arch/arm/boards/highbank/config.h @@ -0,0 +1,5 @@ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#endif /* __CONFIG_H */ diff --git a/arch/arm/boards/highbank/env/config b/arch/arm/boards/highbank/env/config new file mode 100644 index 0000000000..1bb2c493b2 --- /dev/null +++ b/arch/arm/boards/highbank/env/config @@ -0,0 +1,33 @@ +#!/bin/sh + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp +global.dhcp.vendor_id=barebox-highbank + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp' or 'nor' +kernel_loc=tftp +# can be either 'net', 'nor' or 'initrd' +rootfs_loc=initrd + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root.$rootfs_type + +kernelimage=zImage +#kernelimage=uImage +#kernelimage=Image +#kernelimage=Image.lzo + +autoboot_timeout=3 + +bootargs="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# " diff --git a/arch/arm/boards/highbank/init.c b/arch/arm/boards/highbank/init.c new file mode 100644 index 0000000000..b7936428dc --- /dev/null +++ b/arch/arm/boards/highbank/init.c @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com> + * + * GPLv2 only + */ + +#include <common.h> +#include <init.h> +#include <asm/armlinux.h> +#include <asm/system_info.h> +#include <generated/mach-types.h> +#include <mach/devices.h> +#include <environment.h> +#include <partition.h> +#include <sizes.h> +#include <io.h> + +static int highbank_mem_init(void) +{ + highbank_add_ddram(4089 << 20); + + return 0; +} +mem_initcall(highbank_mem_init); + +static int highbank_devices_init(void) +{ + highbank_register_gpio(0); + highbank_register_gpio(1); + highbank_register_gpio(2); + highbank_register_gpio(3); + highbank_register_ahci(); + highbank_register_xgmac(0); + highbank_register_xgmac(1); + + armlinux_set_bootparams((void *)(0x00000100)); + + devfs_add_partition("nvram", 0x00000, SZ_16K, DEVFS_PARTITION_FIXED, "env0"); + + return 0; +} +device_initcall(highbank_devices_init); + +static int highbank_console_init(void) +{ + highbank_register_uart(); + + return 0; +} +console_initcall(highbank_console_init); diff --git a/arch/arm/boards/highbank/lowlevel.c b/arch/arm/boards/highbank/lowlevel.c new file mode 100644 index 0000000000..b862a1f857 --- /dev/null +++ b/arch/arm/boards/highbank/lowlevel.c @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com> + * + * GPLv2 only + */ + +#include <common.h> +#include <sizes.h> +#include <asm/barebox-arm-head.h> +#include <asm/barebox-arm.h> +#include <asm/system_info.h> + +void __naked barebox_arm_reset_vector(void) +{ + arm_cpu_lowlevel_init(); + barebox_arm_entry(0x00000000, SZ_512M, 0); +} |