diff options
author | Alexey Zaytsev <alexey.zaytsev@gmail.com> | 2010-12-11 08:18:49 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-12-12 09:26:50 +0100 |
commit | adcebd48f6a4387354a099a3c20daac560e635dd (patch) | |
tree | d18d53f0519b86ba8e040bf93b286d4c112cc596 /arch/arm/boards/versatile | |
parent | cebd35e4e89f35bd79409d68fdc92c53d6ea23e1 (diff) | |
download | barebox-adcebd48f6a4387354a099a3c20daac560e635dd.tar.gz barebox-adcebd48f6a4387354a099a3c20daac560e635dd.tar.xz |
Add basic support from ARM Versatile/PB
tested with qemu only
qemu-system-arm -M versatilepb -monitor null -kernel barebox -net nic -net user -tftp "<uImage-path>/" -serial stdio
add -nographic if you do not want the lcd via sdl
Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
update:
- use default env
- move arm_timer.h as in the kernel
- add nor flash support
- udpate defconfig
- fix copyright copy from linux
- fix ARCH_TEXT_BASE
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/versatile')
-rw-r--r-- | arch/arm/boards/versatile/Kconfig | 10 | ||||
-rw-r--r-- | arch/arm/boards/versatile/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/boards/versatile/config.h | 5 | ||||
-rw-r--r-- | arch/arm/boards/versatile/versatilepb.c | 72 |
4 files changed, 89 insertions, 0 deletions
diff --git a/arch/arm/boards/versatile/Kconfig b/arch/arm/boards/versatile/Kconfig new file mode 100644 index 0000000000..24289014cb --- /dev/null +++ b/arch/arm/boards/versatile/Kconfig @@ -0,0 +1,10 @@ + +if MACH_VERSATILEPB + +config ARCH_TEXT_BASE + hex + default 0x01000000 + +config BOARDINFO + default "ARM Versatile/PB (ARM926EJ-S)" +endif diff --git a/arch/arm/boards/versatile/Makefile b/arch/arm/boards/versatile/Makefile new file mode 100644 index 0000000000..a17aed316d --- /dev/null +++ b/arch/arm/boards/versatile/Makefile @@ -0,0 +1,2 @@ + +obj-$(CONFIG_MACH_VERSATILEPB) += versatilepb.o diff --git a/arch/arm/boards/versatile/config.h b/arch/arm/boards/versatile/config.h new file mode 100644 index 0000000000..25bb18f787 --- /dev/null +++ b/arch/arm/boards/versatile/config.h @@ -0,0 +1,5 @@ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#endif /* __CONFIG_H */ diff --git a/arch/arm/boards/versatile/versatilepb.c b/arch/arm/boards/versatile/versatilepb.c new file mode 100644 index 0000000000..5568f216e4 --- /dev/null +++ b/arch/arm/boards/versatile/versatilepb.c @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2010 B Labs Ltd, + * http://l4dev.org + * Author: Alexey Zaytsev <alexey.zaytsev@gmail.com> + * + * Based on mach-nomadik + * Copyright (C) 2009-2010 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; version 2 of + * the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + */ + +#include <common.h> +#include <init.h> +#include <asm/armlinux.h> +#include <generated/mach-types.h> +#include <mach/init.h> +#include <mach/platform.h> +#include <environment.h> +#include <partition.h> +#include <sizes.h> + +static struct device_d cfi_dev = { + .id = -1, + .name = "cfi_flash", + .map_base = VERSATILE_FLASH_BASE, + .size = VERSATILE_FLASH_SIZE, +}; + +static int vpb_console_init(void) +{ + versatile_register_uart(0); + return 0; +} +console_initcall(vpb_console_init); + +static struct device_d smc911x_dev = { + .id = -1, + .name = "smc91c111", + .map_base = VERSATILE_ETH_BASE, + .size = 64 * 1024, +}; + +static int vpb_devices_init(void) +{ + versatile_add_sdram(64 * 1024 *1024); + + register_device(&cfi_dev); + devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self"); + devfs_add_partition("nor0", 0x40000, 0x20000, PARTITION_FIXED, "env0"); + + register_device(&smc911x_dev); + + armlinux_set_architecture(MACH_TYPE_VERSATILE_PB); + armlinux_set_bootparams((void *)(0x00000100)); + + return 0; +} +device_initcall(vpb_devices_init); |