diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-09-22 22:23:04 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-10-08 00:58:07 -0400 |
commit | 7036c61fe043af6b701e10d6426ec22259bd1e3b (patch) | |
tree | e0ff93d556c1932575e935d7deed856b6b85d8f2 /arch/blackfin | |
parent | 50c4c0861a0a60cd4f414457fdbfc8d9a1eb1e31 (diff) |
Blackfin: bf533-ezkit: convert to physmap/jedec_probe
Now that the common jedec_probe supports the ST PSD4256G6V, no need to
use the custom stm_flash driver.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ezkit.c | 66 |
1 files changed, 41 insertions, 25 deletions
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 9ffcd63442f1..986fcdcf82d2 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/mtd/mtd.h> | 11 | #include <linux/mtd/mtd.h> |
12 | #include <linux/mtd/partitions.h> | 12 | #include <linux/mtd/partitions.h> |
13 | #include <linux/mtd/plat-ram.h> | 13 | #include <linux/mtd/plat-ram.h> |
14 | #include <linux/mtd/physmap.h> | ||
14 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
15 | #include <linux/spi/flash.h> | 16 | #include <linux/spi/flash.h> |
16 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 17 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
@@ -71,54 +72,69 @@ static struct platform_device smc91x_device = { | |||
71 | }; | 72 | }; |
72 | #endif | 73 | #endif |
73 | 74 | ||
74 | #if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE) | 75 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
75 | static const char *map_probes[] = { | 76 | static struct mtd_partition ezkit_partitions_a[] = { |
76 | "stm_flash", | 77 | { |
77 | NULL, | 78 | .name = "bootloader(nor a)", |
79 | .size = 0x40000, | ||
80 | .offset = 0, | ||
81 | }, { | ||
82 | .name = "linux kernel(nor a)", | ||
83 | .size = MTDPART_SIZ_FULL, | ||
84 | .offset = MTDPART_OFS_APPEND, | ||
85 | }, | ||
78 | }; | 86 | }; |
79 | 87 | ||
80 | static struct platdata_mtd_ram stm_pri_data_a = { | 88 | static struct physmap_flash_data ezkit_flash_data_a = { |
81 | .mapname = "Flash A Primary", | 89 | .width = 2, |
82 | .map_probes = map_probes, | 90 | .parts = ezkit_partitions_a, |
83 | .bankwidth = 2, | 91 | .nr_parts = ARRAY_SIZE(ezkit_partitions_a), |
84 | }; | 92 | }; |
85 | 93 | ||
86 | static struct resource stm_pri_resource_a = { | 94 | static struct resource ezkit_flash_resource_a = { |
87 | .start = 0x20000000, | 95 | .start = 0x20000000, |
88 | .end = 0x200fffff, | 96 | .end = 0x200fffff, |
89 | .flags = IORESOURCE_MEM, | 97 | .flags = IORESOURCE_MEM, |
90 | }; | 98 | }; |
91 | 99 | ||
92 | static struct platform_device stm_pri_device_a = { | 100 | static struct platform_device ezkit_flash_device_a = { |
93 | .name = "mtd-ram", | 101 | .name = "physmap-flash", |
94 | .id = 0, | 102 | .id = 0, |
95 | .dev = { | 103 | .dev = { |
96 | .platform_data = &stm_pri_data_a, | 104 | .platform_data = &ezkit_flash_data_a, |
97 | }, | 105 | }, |
98 | .num_resources = 1, | 106 | .num_resources = 1, |
99 | .resource = &stm_pri_resource_a, | 107 | .resource = &ezkit_flash_resource_a, |
108 | }; | ||
109 | |||
110 | static struct mtd_partition ezkit_partitions_b[] = { | ||
111 | { | ||
112 | .name = "file system(nor b)", | ||
113 | .size = MTDPART_SIZ_FULL, | ||
114 | .offset = MTDPART_OFS_APPEND, | ||
115 | }, | ||
100 | }; | 116 | }; |
101 | 117 | ||
102 | static struct platdata_mtd_ram stm_pri_data_b = { | 118 | static struct physmap_flash_data ezkit_flash_data_b = { |
103 | .mapname = "Flash B Primary", | 119 | .width = 2, |
104 | .map_probes = map_probes, | 120 | .parts = ezkit_partitions_b, |
105 | .bankwidth = 2, | 121 | .nr_parts = ARRAY_SIZE(ezkit_partitions_b), |
106 | }; | 122 | }; |
107 | 123 | ||
108 | static struct resource stm_pri_resource_b = { | 124 | static struct resource ezkit_flash_resource_b = { |
109 | .start = 0x20100000, | 125 | .start = 0x20100000, |
110 | .end = 0x201fffff, | 126 | .end = 0x201fffff, |
111 | .flags = IORESOURCE_MEM, | 127 | .flags = IORESOURCE_MEM, |
112 | }; | 128 | }; |
113 | 129 | ||
114 | static struct platform_device stm_pri_device_b = { | 130 | static struct platform_device ezkit_flash_device_b = { |
115 | .name = "mtd-ram", | 131 | .name = "physmap-flash", |
116 | .id = 4, | 132 | .id = 4, |
117 | .dev = { | 133 | .dev = { |
118 | .platform_data = &stm_pri_data_b, | 134 | .platform_data = &ezkit_flash_data_b, |
119 | }, | 135 | }, |
120 | .num_resources = 1, | 136 | .num_resources = 1, |
121 | .resource = &stm_pri_resource_b, | 137 | .resource = &ezkit_flash_resource_b, |
122 | }; | 138 | }; |
123 | #endif | 139 | #endif |
124 | 140 | ||
@@ -445,9 +461,9 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
445 | 461 | ||
446 | &bfin_dpmc, | 462 | &bfin_dpmc, |
447 | 463 | ||
448 | #if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE) | 464 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
449 | &stm_pri_device_a, | 465 | &ezkit_flash_device_a, |
450 | &stm_pri_device_b, | 466 | &ezkit_flash_device_b, |
451 | #endif | 467 | #endif |
452 | 468 | ||
453 | #if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) | 469 | #if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) |