From 4a91ca2eb6eff14bb23f709e6ebf189fdbcdaa22 Mon Sep 17 00:00:00 2001 From: Bellido Nicolas Date: Fri, 28 Oct 2005 16:51:42 +0100 Subject: [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 Signed-off-by: Russell King --- arch/arm/mach-aaec2000/core.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'arch/arm/mach-aaec2000') 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 #include #include +#include #include #include #include @@ -22,6 +23,7 @@ #include #include +#include #include #include #include @@ -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); + -- cgit v1.2.3