diff options
author | Bellido Nicolas <ml@acolin.be> | 2005-10-28 16:51:42 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-10-28 16:51:42 +0100 |
commit | 4a91ca2eb6eff14bb23f709e6ebf189fdbcdaa22 (patch) | |
tree | 6b4a49b970dcc2091eb4e536744a36559d50b441 | |
parent | f0904e29369a940080487fece700e59295196d79 (diff) | |
download | kernel-crypto-4a91ca2eb6eff14bb23f709e6ebf189fdbcdaa22.tar.gz kernel-crypto-4a91ca2eb6eff14bb23f709e6ebf189fdbcdaa22.tar.xz kernel-crypto-4a91ca2eb6eff14bb23f709e6ebf189fdbcdaa22.zip |
[ARM] 3039/1: AAEC-2000 - Add MTD support
Patch from Bellido Nicolas
This adds platform code for MTD devices on AAEC-2000.
Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-aaec2000/core.c | 31 | ||||
-rw-r--r-- | include/asm-arm/arch-aaec2000/aaec2000.h | 3 |
2 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c index 9be6c321325..86c5149b172 100644 --- a/arch/arm/mach-aaec2000/core.c +++ b/arch/arm/mach-aaec2000/core.c @@ -13,6 +13,7 @@ #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> +#include <linux/device.h> #include <linux/list.h> #include <linux/errno.h> #include <linux/interrupt.h> @@ -22,6 +23,7 @@ #include <asm/hardware.h> #include <asm/irq.h> +#include <asm/mach/flash.h> #include <asm/mach/irq.h> #include <asm/mach/time.h> #include <asm/mach/map.h> @@ -163,3 +165,32 @@ struct sys_timer aaec2000_timer = { .offset = aaec2000_gettimeoffset, }; +static struct flash_platform_data aaec2000_flash_data = { + .map_name = "cfi_probe", + .width = 4, +}; + +static struct resource aaec2000_flash_resource = { + .start = AAEC_FLASH_BASE, + .end = AAEC_FLASH_BASE + AAEC_FLASH_SIZE, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device aaec2000_flash_device = { + .name = "armflash", + .id = 0, + .dev = { + .platform_data = &aaec2000_flash_data, + }, + .num_resources = 1, + .resource = &aaec2000_flash_resource, +}; + +static int __init aaec2000_init(void) +{ + platform_device_register(&aaec2000_flash_device); + + return 0; +}; +arch_initcall(aaec2000_init); + diff --git a/include/asm-arm/arch-aaec2000/aaec2000.h b/include/asm-arm/arch-aaec2000/aaec2000.h index 7472f9e5523..dfb09389ebc 100644 --- a/include/asm-arm/arch-aaec2000/aaec2000.h +++ b/include/asm-arm/arch-aaec2000/aaec2000.h @@ -23,6 +23,9 @@ #define AAEC_CS2 0x20000000 #define AAEC_CS3 0x30000000 +/* Flash */ +#define AAEC_FLASH_BASE AAEC_CS0 +#define AAEC_FLASH_SIZE SZ_64M /* Interrupt controller */ #define IRQ_BASE __REG(0x80000500) |