diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-06-13 06:34:49 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-06-22 21:15:37 -0400 |
commit | 4d5e6fd42c137dad3b1aced073c6fcb494a8e507 (patch) | |
tree | c5ca664f49cd685abcda3a913fad209ac9c097f7 /arch/blackfin | |
parent | 2780cd64346782a6116e316c559d70a7655ab6e5 (diff) |
Blackfin: bf533-ezkit: add resources for FISP devices
The BF533-EZKIT has two Flash In-System Programming devices hooked up to
the async memory bus, so add resources for the primary flashes and the
SRAMs on the devices.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ezkit.c | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 89a5ec4ca048..4e3e511bf146 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/mtd/mtd.h> | 33 | #include <linux/mtd/mtd.h> |
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/mtd/plat-ram.h> | ||
35 | #include <linux/spi/spi.h> | 36 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 37 | #include <linux/spi/flash.h> |
37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 38 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
@@ -86,6 +87,101 @@ static struct platform_device smc91x_device = { | |||
86 | }; | 87 | }; |
87 | #endif | 88 | #endif |
88 | 89 | ||
90 | #if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE) | ||
91 | static const char *map_probes[] = { | ||
92 | "stm_flash", | ||
93 | NULL, | ||
94 | }; | ||
95 | |||
96 | static struct platdata_mtd_ram stm_pri_data_a = { | ||
97 | .mapname = "Flash A Primary", | ||
98 | .map_probes = map_probes, | ||
99 | .bankwidth = 2, | ||
100 | }; | ||
101 | |||
102 | static struct resource stm_pri_resource_a = { | ||
103 | .start = 0x20000000, | ||
104 | .end = 0x200fffff, | ||
105 | .flags = IORESOURCE_MEM, | ||
106 | }; | ||
107 | |||
108 | static struct platform_device stm_pri_device_a = { | ||
109 | .name = "mtd-ram", | ||
110 | .id = 0, | ||
111 | .dev = { | ||
112 | .platform_data = &stm_pri_data_a, | ||
113 | }, | ||
114 | .num_resources = 1, | ||
115 | .resource = &stm_pri_resource_a, | ||
116 | }; | ||
117 | |||
118 | static struct platdata_mtd_ram stm_pri_data_b = { | ||
119 | .mapname = "Flash B Primary", | ||
120 | .map_probes = map_probes, | ||
121 | .bankwidth = 2, | ||
122 | }; | ||
123 | |||
124 | static struct resource stm_pri_resource_b = { | ||
125 | .start = 0x20100000, | ||
126 | .end = 0x201fffff, | ||
127 | .flags = IORESOURCE_MEM, | ||
128 | }; | ||
129 | |||
130 | static struct platform_device stm_pri_device_b = { | ||
131 | .name = "mtd-ram", | ||
132 | .id = 4, | ||
133 | .dev = { | ||
134 | .platform_data = &stm_pri_data_b, | ||
135 | }, | ||
136 | .num_resources = 1, | ||
137 | .resource = &stm_pri_resource_b, | ||
138 | }; | ||
139 | #endif | ||
140 | |||
141 | #if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) | ||
142 | static struct platdata_mtd_ram sram_data_a = { | ||
143 | .mapname = "Flash A SRAM", | ||
144 | .bankwidth = 2, | ||
145 | }; | ||
146 | |||
147 | static struct resource sram_resource_a = { | ||
148 | .start = 0x20240000, | ||
149 | .end = 0x2024ffff, | ||
150 | .flags = IORESOURCE_MEM, | ||
151 | }; | ||
152 | |||
153 | static struct platform_device sram_device_a = { | ||
154 | .name = "mtd-ram", | ||
155 | .id = 8, | ||
156 | .dev = { | ||
157 | .platform_data = &sram_data_a, | ||
158 | }, | ||
159 | .num_resources = 1, | ||
160 | .resource = &sram_resource_a, | ||
161 | }; | ||
162 | |||
163 | static struct platdata_mtd_ram sram_data_b = { | ||
164 | .mapname = "Flash B SRAM", | ||
165 | .bankwidth = 2, | ||
166 | }; | ||
167 | |||
168 | static struct resource sram_resource_b = { | ||
169 | .start = 0x202c0000, | ||
170 | .end = 0x202cffff, | ||
171 | .flags = IORESOURCE_MEM, | ||
172 | }; | ||
173 | |||
174 | static struct platform_device sram_device_b = { | ||
175 | .name = "mtd-ram", | ||
176 | .id = 9, | ||
177 | .dev = { | ||
178 | .platform_data = &sram_data_b, | ||
179 | }, | ||
180 | .num_resources = 1, | ||
181 | .resource = &sram_resource_b, | ||
182 | }; | ||
183 | #endif | ||
184 | |||
89 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) | 185 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
90 | static struct mtd_partition bfin_spi_flash_partitions[] = { | 186 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
91 | { | 187 | { |
@@ -357,6 +453,16 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
357 | 453 | ||
358 | &bfin_dpmc, | 454 | &bfin_dpmc, |
359 | 455 | ||
456 | #if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE) | ||
457 | &stm_pri_device_a, | ||
458 | &stm_pri_device_b, | ||
459 | #endif | ||
460 | |||
461 | #if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) | ||
462 | &sram_device_a, | ||
463 | &sram_device_b, | ||
464 | #endif | ||
465 | |||
360 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 466 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
361 | &smc91x_device, | 467 | &smc91x_device, |
362 | #endif | 468 | #endif |