diff options
author | Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at> | 2009-09-10 11:30:03 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-09-16 22:10:46 -0400 |
commit | 9c21453e376c03bcba9c6d89dc5735b40a35b098 (patch) | |
tree | a1261a4f3af75558e44f8bcb31ed57dd34093eb6 /arch/blackfin/mach-bf561/boards/cm_bf561.c | |
parent | 6058434468daa16580a77922661b31b880d60db5 (diff) |
Blackfin: update cm board resources
Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf561/boards/cm_bf561.c')
-rw-r--r-- | arch/blackfin/mach-bf561/boards/cm_bf561.c | 113 |
1 files changed, 111 insertions, 2 deletions
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c index 5721620cfae8..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 |
@@ -142,9 +143,9 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
142 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 143 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
143 | { | 144 | { |
144 | .modalias = "mmc_spi", | 145 | .modalias = "mmc_spi", |
145 | .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ | 146 | .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ |
146 | .bus_num = 0, | 147 | .bus_num = 0, |
147 | .chip_select = 5, | 148 | .chip_select = 1, |
148 | .controller_data = &mmc_spi_chip_info, | 149 | .controller_data = &mmc_spi_chip_info, |
149 | .mode = SPI_MODE_3, | 150 | .mode = SPI_MODE_3, |
150 | }, | 151 | }, |
@@ -228,6 +229,62 @@ static struct platform_device smc91x_device = { | |||
228 | }; | 229 | }; |
229 | #endif | 230 | #endif |
230 | 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, | ||
285 | }; | ||
286 | #endif | ||
287 | |||
231 | static struct resource bfin_gpios_resources = { | 288 | static struct resource bfin_gpios_resources = { |
232 | .start = 0, | 289 | .start = 0, |
233 | .end = MAX_BLACKFIN_GPIOS - 1, | 290 | .end = MAX_BLACKFIN_GPIOS - 1, |
@@ -363,6 +420,46 @@ static struct platform_device bfin_pata_device = { | |||
363 | }; | 420 | }; |
364 | #endif | 421 | #endif |
365 | 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 | |||
366 | static const unsigned int cclk_vlev_datasheet[] = | 463 | static const unsigned int cclk_vlev_datasheet[] = |
367 | { | 464 | { |
368 | VRPAIR(VLEV_085, 250000000), | 465 | VRPAIR(VLEV_085, 250000000), |
@@ -416,6 +513,14 @@ static struct platform_device *cm_bf561_devices[] __initdata = { | |||
416 | &smc91x_device, | 513 | &smc91x_device, |
417 | #endif | 514 | #endif |
418 | 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 | |||
419 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 524 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
420 | &bfin_spi0_device, | 525 | &bfin_spi0_device, |
421 | #endif | 526 | #endif |
@@ -424,6 +529,10 @@ static struct platform_device *cm_bf561_devices[] __initdata = { | |||
424 | &bfin_pata_device, | 529 | &bfin_pata_device, |
425 | #endif | 530 | #endif |
426 | 531 | ||
532 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
533 | ¶_flash_device, | ||
534 | #endif | ||
535 | |||
427 | &bfin_gpios_device, | 536 | &bfin_gpios_device, |
428 | }; | 537 | }; |
429 | 538 | ||