Root/target/linux/pxa/patches/008-verdex_mtd_support.patch

1--- a/arch/arm/mach-pxa/gumstix-verdex.c
2+++ b/arch/arm/mach-pxa/gumstix-verdex.c
3@@ -51,6 +51,46 @@
4 
5 #include <linux/delay.h>
6 
7+static struct resource flash_resource = {
8+ .start = 0x00000000,
9+ .end = SZ_64M - 1,
10+ .flags = IORESOURCE_MEM,
11+};
12+
13+static struct mtd_partition gumstix_partitions[] = {
14+ {
15+ .name = "u-boot",
16+ .size = 0x00040000,
17+ .offset = 0,
18+ .mask_flags = MTD_WRITEABLE /* force read-only */
19+ } , {
20+ .name = "rootfs",
21+ .size = 0x01ec0000,
22+ .offset = 0x00040000
23+ } , {
24+ .name = "kernel",
25+ .size = 0x00100000,
26+ .offset = 0x01f00000
27+ }
28+};
29+
30+static struct flash_platform_data gumstix_flash_data = {
31+ .map_name = "cfi_probe",
32+ .parts = gumstix_partitions,
33+ .nr_parts = ARRAY_SIZE(gumstix_partitions),
34+ .width = 2,
35+};
36+
37+static struct platform_device gumstix_flash_device = {
38+ .name = "pxa2xx-flash",
39+ .id = 0,
40+ .dev = {
41+ .platform_data = &gumstix_flash_data,
42+ },
43+ .resource = &flash_resource,
44+ .num_resources = 1,
45+};
46+
47 
48 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) \
49     || defined(CONFIG_PCMCIA_PXA2XX) || defined(CONFIG_PCMCIA_PXA2XX_MODULE)
50@@ -540,6 +580,7 @@ static struct platform_device verdex_aud
51 };
52 
53 static struct platform_device *devices[] __initdata = {
54+ &gumstix_flash_device,
55     &verdex_audio_device,
56 };
57 
58

Archive Download this file



interactive