diff options
Diffstat (limited to 'arch/blackfin/mach-bf561/boards')
-rw-r--r-- | arch/blackfin/mach-bf561/boards/cm_bf561.c | 141 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/boards/ezkit.c | 13 |
2 files changed, 134 insertions, 20 deletions
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c index 0c9d72c5f5ba..6577ecfcf11e 100644 --- a/arch/blackfin/mach-bf561/boards/cm_bf561.c +++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/bfin5xx_spi.h> | 42 | #include <asm/bfin5xx_spi.h> |
43 | #include <asm/portmux.h> | 43 | #include <asm/portmux.h> |
44 | #include <asm/dpmc.h> | 44 | #include <asm/dpmc.h> |
45 | #include <linux/mtd/physmap.h> | ||
45 | 46 | ||
46 | /* | 47 | /* |
47 | * Name the Board for the /proc/cpuinfo | 48 | * Name the Board for the /proc/cpuinfo |
@@ -98,13 +99,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | |||
98 | }; | 99 | }; |
99 | #endif | 100 | #endif |
100 | 101 | ||
101 | #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) | ||
102 | static struct bfin5xx_spi_chip ad9960_spi_chip_info = { | ||
103 | .enable_dma = 0, | ||
104 | .bits_per_word = 16, | ||
105 | }; | ||
106 | #endif | ||
107 | |||
108 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 102 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
109 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 103 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
110 | .enable_dma = 0, | 104 | .enable_dma = 0, |
@@ -139,28 +133,19 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
139 | 133 | ||
140 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 134 | #if defined(CONFIG_SND_BLACKFIN_AD1836) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
141 | { | 135 | { |
142 | .modalias = "ad1836-spi", | 136 | .modalias = "ad1836", |
143 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 137 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
144 | .bus_num = 0, | 138 | .bus_num = 0, |
145 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, | 139 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, |
146 | .controller_data = &ad1836_spi_chip_info, | 140 | .controller_data = &ad1836_spi_chip_info, |
147 | }, | 141 | }, |
148 | #endif | 142 | #endif |
149 | #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) | ||
150 | { | ||
151 | .modalias = "ad9960-spi", | ||
152 | .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ | ||
153 | .bus_num = 0, | ||
154 | .chip_select = 1, | ||
155 | .controller_data = &ad9960_spi_chip_info, | ||
156 | }, | ||
157 | #endif | ||
158 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 143 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
159 | { | 144 | { |
160 | .modalias = "mmc_spi", | 145 | .modalias = "mmc_spi", |
161 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | 146 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
162 | .bus_num = 0, | 147 | .bus_num = 0, |
163 | .chip_select = 5, | 148 | .chip_select = 1, |
164 | .controller_data = &mmc_spi_chip_info, | 149 | .controller_data = &mmc_spi_chip_info, |
165 | .mode = SPI_MODE_3, | 150 | .mode = SPI_MODE_3, |
166 | }, | 151 | }, |
@@ -213,6 +198,13 @@ static struct platform_device hitachi_fb_device = { | |||
213 | 198 | ||
214 | 199 | ||
215 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 200 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
201 | #include <linux/smc91x.h> | ||
202 | |||
203 | static struct smc91x_platdata smc91x_info = { | ||
204 | .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT, | ||
205 | .leda = RPC_LED_100_10, | ||
206 | .ledb = RPC_LED_TX_RX, | ||
207 | }; | ||
216 | 208 | ||
217 | static struct resource smc91x_resources[] = { | 209 | static struct resource smc91x_resources[] = { |
218 | { | 210 | { |
@@ -231,6 +223,65 @@ static struct platform_device smc91x_device = { | |||
231 | .id = 0, | 223 | .id = 0, |
232 | .num_resources = ARRAY_SIZE(smc91x_resources), | 224 | .num_resources = ARRAY_SIZE(smc91x_resources), |
233 | .resource = smc91x_resources, | 225 | .resource = smc91x_resources, |
226 | .dev = { | ||
227 | .platform_data = &smc91x_info, | ||
228 | }, | ||
229 | }; | ||
230 | #endif | ||
231 | |||
232 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) | ||
233 | #include <linux/smsc911x.h> | ||
234 | |||
235 | static struct resource smsc911x_resources[] = { | ||
236 | { | ||
237 | .name = "smsc911x-memory", | ||
238 | .start = 0x24008000, | ||
239 | .end = 0x24008000 + 0xFF, | ||
240 | .flags = IORESOURCE_MEM, | ||
241 | }, | ||
242 | { | ||
243 | .start = IRQ_PF43, | ||
244 | .end = IRQ_PF43, | ||
245 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | ||
246 | }, | ||
247 | }; | ||
248 | |||
249 | static struct smsc911x_platform_config smsc911x_config = { | ||
250 | .flags = SMSC911X_USE_16BIT, | ||
251 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | ||
252 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | ||
253 | .phy_interface = PHY_INTERFACE_MODE_MII, | ||
254 | }; | ||
255 | |||
256 | static struct platform_device smsc911x_device = { | ||
257 | .name = "smsc911x", | ||
258 | .id = 0, | ||
259 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
260 | .resource = smsc911x_resources, | ||
261 | .dev = { | ||
262 | .platform_data = &smsc911x_config, | ||
263 | }, | ||
264 | }; | ||
265 | #endif | ||
266 | |||
267 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
268 | static struct resource net2272_bfin_resources[] = { | ||
269 | { | ||
270 | .start = 0x24000000, | ||
271 | .end = 0x24000000 + 0x100, | ||
272 | .flags = IORESOURCE_MEM, | ||
273 | }, { | ||
274 | .start = IRQ_PF45, | ||
275 | .end = IRQ_PF45, | ||
276 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | ||
277 | }, | ||
278 | }; | ||
279 | |||
280 | static struct platform_device net2272_bfin_device = { | ||
281 | .name = "net2272", | ||
282 | .id = -1, | ||
283 | .num_resources = ARRAY_SIZE(net2272_bfin_resources), | ||
284 | .resource = net2272_bfin_resources, | ||
234 | }; | 285 | }; |
235 | #endif | 286 | #endif |
236 | 287 | ||
@@ -369,6 +420,46 @@ static struct platform_device bfin_pata_device = { | |||
369 | }; | 420 | }; |
370 | #endif | 421 | #endif |
371 | 422 | ||
423 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
424 | static struct mtd_partition para_partitions[] = { | ||
425 | { | ||
426 | .name = "bootloader(nor)", | ||
427 | .size = 0x40000, | ||
428 | .offset = 0, | ||
429 | }, { | ||
430 | .name = "linux kernel(nor)", | ||
431 | .size = 0x100000, | ||
432 | .offset = MTDPART_OFS_APPEND, | ||
433 | }, { | ||
434 | .name = "file system(nor)", | ||
435 | .size = MTDPART_SIZ_FULL, | ||
436 | .offset = MTDPART_OFS_APPEND, | ||
437 | } | ||
438 | }; | ||
439 | |||
440 | static struct physmap_flash_data para_flash_data = { | ||
441 | .width = 2, | ||
442 | .parts = para_partitions, | ||
443 | .nr_parts = ARRAY_SIZE(para_partitions), | ||
444 | }; | ||
445 | |||
446 | static struct resource para_flash_resource = { | ||
447 | .start = 0x20000000, | ||
448 | .end = 0x207fffff, | ||
449 | .flags = IORESOURCE_MEM, | ||
450 | }; | ||
451 | |||
452 | static struct platform_device para_flash_device = { | ||
453 | .name = "physmap-flash", | ||
454 | .id = 0, | ||
455 | .dev = { | ||
456 | .platform_data = ¶_flash_data, | ||
457 | }, | ||
458 | .num_resources = 1, | ||
459 | .resource = ¶_flash_resource, | ||
460 | }; | ||
461 | #endif | ||
462 | |||
372 | static const unsigned int cclk_vlev_datasheet[] = | 463 | static const unsigned int cclk_vlev_datasheet[] = |
373 | { | 464 | { |
374 | VRPAIR(VLEV_085, 250000000), | 465 | VRPAIR(VLEV_085, 250000000), |
@@ -422,6 +513,14 @@ static struct platform_device *cm_bf561_devices[] __initdata = { | |||
422 | &smc91x_device, | 513 | &smc91x_device, |
423 | #endif | 514 | #endif |
424 | 515 | ||
516 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) | ||
517 | &smsc911x_device, | ||
518 | #endif | ||
519 | |||
520 | #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE) | ||
521 | &net2272_bfin_device, | ||
522 | #endif | ||
523 | |||
425 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 524 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
426 | &bfin_spi0_device, | 525 | &bfin_spi0_device, |
427 | #endif | 526 | #endif |
@@ -430,6 +529,10 @@ static struct platform_device *cm_bf561_devices[] __initdata = { | |||
430 | &bfin_pata_device, | 529 | &bfin_pata_device, |
431 | #endif | 530 | #endif |
432 | 531 | ||
532 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
533 | ¶_flash_device, | ||
534 | #endif | ||
535 | |||
433 | &bfin_gpios_device, | 536 | &bfin_gpios_device, |
434 | }; | 537 | }; |
435 | 538 | ||
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 4df904f9e90a..caed96bb957e 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -147,6 +147,14 @@ static struct platform_device net2272_bfin_device = { | |||
147 | * Driver needs to know address, irq and flag pin. | 147 | * Driver needs to know address, irq and flag pin. |
148 | */ | 148 | */ |
149 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 149 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
150 | #include <linux/smc91x.h> | ||
151 | |||
152 | static struct smc91x_platdata smc91x_info = { | ||
153 | .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT, | ||
154 | .leda = RPC_LED_100_10, | ||
155 | .ledb = RPC_LED_TX_RX, | ||
156 | }; | ||
157 | |||
150 | static struct resource smc91x_resources[] = { | 158 | static struct resource smc91x_resources[] = { |
151 | { | 159 | { |
152 | .name = "smc91x-regs", | 160 | .name = "smc91x-regs", |
@@ -166,6 +174,9 @@ static struct platform_device smc91x_device = { | |||
166 | .id = 0, | 174 | .id = 0, |
167 | .num_resources = ARRAY_SIZE(smc91x_resources), | 175 | .num_resources = ARRAY_SIZE(smc91x_resources), |
168 | .resource = smc91x_resources, | 176 | .resource = smc91x_resources, |
177 | .dev = { | ||
178 | .platform_data = &smc91x_info, | ||
179 | }, | ||
169 | }; | 180 | }; |
170 | #endif | 181 | #endif |
171 | 182 | ||
@@ -334,7 +345,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
334 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | 345 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ |
335 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 346 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
336 | { | 347 | { |
337 | .modalias = "ad1836-spi", | 348 | .modalias = "ad1836", |
338 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 349 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
339 | .bus_num = 0, | 350 | .bus_num = 0, |
340 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, | 351 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, |