diff options
| author | Bellido Nicolas <ml@acolin.be> | 2005-10-28 11:51:42 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-10-28 11:51:42 -0400 |
| commit | 4a91ca2eb6eff14bb23f709e6ebf189fdbcdaa22 (patch) | |
| tree | 6b4a49b970dcc2091eb4e536744a36559d50b441 | |
| parent | f0904e29369a940080487fece700e59295196d79 (diff) | |
[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 9be6c3213254..86c5149b1721 100644 --- a/arch/arm/mach-aaec2000/core.c +++ b/arch/arm/mach-aaec2000/core.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
| 14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
| 15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
| 16 | #include <linux/device.h> | ||
| 16 | #include <linux/list.h> | 17 | #include <linux/list.h> |
| 17 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
| 18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
| @@ -22,6 +23,7 @@ | |||
| 22 | #include <asm/hardware.h> | 23 | #include <asm/hardware.h> |
| 23 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
| 24 | 25 | ||
| 26 | #include <asm/mach/flash.h> | ||
| 25 | #include <asm/mach/irq.h> | 27 | #include <asm/mach/irq.h> |
| 26 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
| 27 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
| @@ -163,3 +165,32 @@ struct sys_timer aaec2000_timer = { | |||
| 163 | .offset = aaec2000_gettimeoffset, | 165 | .offset = aaec2000_gettimeoffset, |
| 164 | }; | 166 | }; |
| 165 | 167 | ||
| 168 | static struct flash_platform_data aaec2000_flash_data = { | ||
| 169 | .map_name = "cfi_probe", | ||
| 170 | .width = 4, | ||
| 171 | }; | ||
| 172 | |||
| 173 | static struct resource aaec2000_flash_resource = { | ||
| 174 | .start = AAEC_FLASH_BASE, | ||
| 175 | .end = AAEC_FLASH_BASE + AAEC_FLASH_SIZE, | ||
| 176 | .flags = IORESOURCE_MEM, | ||
| 177 | }; | ||
| 178 | |||
| 179 | static struct platform_device aaec2000_flash_device = { | ||
| 180 | .name = "armflash", | ||
| 181 | .id = 0, | ||
| 182 | .dev = { | ||
| 183 | .platform_data = &aaec2000_flash_data, | ||
| 184 | }, | ||
| 185 | .num_resources = 1, | ||
| 186 | .resource = &aaec2000_flash_resource, | ||
| 187 | }; | ||
| 188 | |||
| 189 | static int __init aaec2000_init(void) | ||
| 190 | { | ||
| 191 | platform_device_register(&aaec2000_flash_device); | ||
| 192 | |||
| 193 | return 0; | ||
| 194 | }; | ||
| 195 | arch_initcall(aaec2000_init); | ||
| 196 | |||
diff --git a/include/asm-arm/arch-aaec2000/aaec2000.h b/include/asm-arm/arch-aaec2000/aaec2000.h index 7472f9e5523f..dfb09389ebc1 100644 --- a/include/asm-arm/arch-aaec2000/aaec2000.h +++ b/include/asm-arm/arch-aaec2000/aaec2000.h | |||
| @@ -23,6 +23,9 @@ | |||
| 23 | #define AAEC_CS2 0x20000000 | 23 | #define AAEC_CS2 0x20000000 |
| 24 | #define AAEC_CS3 0x30000000 | 24 | #define AAEC_CS3 0x30000000 |
| 25 | 25 | ||
| 26 | /* Flash */ | ||
| 27 | #define AAEC_FLASH_BASE AAEC_CS0 | ||
| 28 | #define AAEC_FLASH_SIZE SZ_64M | ||
| 26 | 29 | ||
| 27 | /* Interrupt controller */ | 30 | /* Interrupt controller */ |
| 28 | #define IRQ_BASE __REG(0x80000500) | 31 | #define IRQ_BASE __REG(0x80000500) |
