From af36a8f05c1695d659b5c9aa21b10e64f33dcf4a Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Tue, 21 Dec 2004 09:43:57 +0000 Subject: [PATCH] [ARM PATCH] 2320/1: SIMpad add Flash device depends on 2319/1 Patch from Holger Hans Peter Freyther This patch adds installation of flash devices and partition from within simpad.c . The information of extracted from the old sa1100 flash map. Signed-off-by: Holger Hans Peter Freyther Signed-off-by: Russell King --- arch/arm/mach-sa1100/simpad.c | 45 ++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c index f4d9fa535ede..8d113d629867 100644 --- a/arch/arm/mach-sa1100/simpad.c +++ b/arch/arm/mach-sa1100/simpad.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include @@ -18,6 +20,7 @@ #include #include +#include #include #include #include @@ -83,6 +86,45 @@ static struct sa1100_port_fns simpad_port_fns __initdata = { .pm = simpad_uart_pm, }; + +static struct mtd_partition simpad_partitions[] = { + { + .name = "SIMpad boot firmware", + .size = 0x00080000, + .offset = 0, + .mask_flags = MTD_WRITEABLE, + }, { + .name = "SIMpad kernel", + .size = 0x0010000, + .offset = MTDPART_OFS_APPEND, + }, { + .name = "SIMpad root jffs2", + .size = MTDPART_SIZ_FULL, + .offset = MTDPART_OFS_APPEND, + } +}; + +static struct flash_platform_data simpad_flash_data = { + .map_name = "cfi_probe", + .parts = simpad_partitions, + .nr_parts = ARRAY_SIZE(simpad_partitions), +}; + + +static struct resource simpad_flash_resources [] = { + { + .start = SA1100_CS0_PHYS, + .end = SA1100_CS0_PHYS + SZ_16M -1, + .flags = IORESOURCE_MEM, + }, { + .start = SA1100_CS1_PHYS, + .end = SA1100_CS1_PHYS + SZ_16M -1, + .flags = IORESOURCE_MEM, + } +}; + + + static void __init simpad_map_io(void) { sa1100_map_io(); @@ -113,7 +155,8 @@ static void __init simpad_map_io(void) PCFR = 0; PSDR = 0; - + sa11x0_set_flash_data(&simpad_flash_data, simpad_flash_resources, + ARRAY_SIZE(simpad_flash_resources)); } static void simpad_power_off(void) -- 2.39.5