diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-19 08:47:57 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-19 08:47:57 -0400 |
commit | 40d743b8c16a8cf6e30c1d941aa6147f9550ea75 (patch) | |
tree | 9fcdf9a06b18a275253048d1ea7c9803cec38845 /arch/blackfin/mach-bf538/boards | |
parent | 7da18afa423f167e7ef3c9728e584d8bf05bd55a (diff) | |
parent | 83e686ea0291ee93b87dcdc00b96443b80de56c9 (diff) |
Merge branch 'for-rmk' of git://linux-arm.org/linux-2.6
Diffstat (limited to 'arch/blackfin/mach-bf538/boards')
-rw-r--r-- | arch/blackfin/mach-bf538/boards/ezkit.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c index 57695b4c3c09..f2ac3b0ebf24 100644 --- a/arch/blackfin/mach-bf538/boards/ezkit.c +++ b/arch/blackfin/mach-bf538/boards/ezkit.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/device.h> | 31 | #include <linux/device.h> |
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/physmap.h> | ||
34 | #include <linux/mtd/partitions.h> | 35 | #include <linux/mtd/partitions.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> |
@@ -177,6 +178,14 @@ static struct platform_device bfin_sir2_device = { | |||
177 | * Driver needs to know address, irq and flag pin. | 178 | * Driver needs to know address, irq and flag pin. |
178 | */ | 179 | */ |
179 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 180 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
181 | #include <linux/smc91x.h> | ||
182 | |||
183 | static struct smc91x_platdata smc91x_info = { | ||
184 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | ||
185 | .leda = RPC_LED_100_10, | ||
186 | .ledb = RPC_LED_TX_RX, | ||
187 | }; | ||
188 | |||
180 | static struct resource smc91x_resources[] = { | 189 | static struct resource smc91x_resources[] = { |
181 | { | 190 | { |
182 | .name = "smc91x-regs", | 191 | .name = "smc91x-regs", |
@@ -194,6 +203,9 @@ static struct platform_device smc91x_device = { | |||
194 | .id = 0, | 203 | .id = 0, |
195 | .num_resources = ARRAY_SIZE(smc91x_resources), | 204 | .num_resources = ARRAY_SIZE(smc91x_resources), |
196 | .resource = smc91x_resources, | 205 | .resource = smc91x_resources, |
206 | .dev = { | ||
207 | .platform_data = &smc91x_info, | ||
208 | }, | ||
197 | }; | 209 | }; |
198 | #endif | 210 | #endif |
199 | 211 | ||
@@ -390,6 +402,11 @@ static struct resource bfin_spi2_resource[] = { | |||
390 | [1] = { | 402 | [1] = { |
391 | .start = CH_SPI2, | 403 | .start = CH_SPI2, |
392 | .end = CH_SPI2, | 404 | .end = CH_SPI2, |
405 | .flags = IORESOURCE_DMA, | ||
406 | }, | ||
407 | [2] = { | ||
408 | .start = IRQ_SPI2, | ||
409 | .end = IRQ_SPI2, | ||
393 | .flags = IORESOURCE_IRQ, | 410 | .flags = IORESOURCE_IRQ, |
394 | } | 411 | } |
395 | }; | 412 | }; |
@@ -550,6 +567,50 @@ static struct platform_device bfin_dpmc = { | |||
550 | }, | 567 | }, |
551 | }; | 568 | }; |
552 | 569 | ||
570 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
571 | static struct mtd_partition ezkit_partitions[] = { | ||
572 | { | ||
573 | .name = "bootloader(nor)", | ||
574 | .size = 0x40000, | ||
575 | .offset = 0, | ||
576 | }, { | ||
577 | .name = "linux kernel(nor)", | ||
578 | .size = 0x180000, | ||
579 | .offset = MTDPART_OFS_APPEND, | ||
580 | }, { | ||
581 | .name = "file system(nor)", | ||
582 | .size = MTDPART_SIZ_FULL, | ||
583 | .offset = MTDPART_OFS_APPEND, | ||
584 | } | ||
585 | }; | ||
586 | |||
587 | static struct physmap_flash_data ezkit_flash_data = { | ||
588 | .width = 2, | ||
589 | .parts = ezkit_partitions, | ||
590 | .nr_parts = ARRAY_SIZE(ezkit_partitions), | ||
591 | }; | ||
592 | |||
593 | static struct resource ezkit_flash_resource = { | ||
594 | .start = 0x20000000, | ||
595 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||
596 | .end = 0x202fffff, | ||
597 | #else | ||
598 | .end = 0x203fffff, | ||
599 | #endif | ||
600 | .flags = IORESOURCE_MEM, | ||
601 | }; | ||
602 | |||
603 | static struct platform_device ezkit_flash_device = { | ||
604 | .name = "physmap-flash", | ||
605 | .id = 0, | ||
606 | .dev = { | ||
607 | .platform_data = &ezkit_flash_data, | ||
608 | }, | ||
609 | .num_resources = 1, | ||
610 | .resource = &ezkit_flash_resource, | ||
611 | }; | ||
612 | #endif | ||
613 | |||
553 | static struct platform_device *cm_bf538_devices[] __initdata = { | 614 | static struct platform_device *cm_bf538_devices[] __initdata = { |
554 | 615 | ||
555 | &bfin_dpmc, | 616 | &bfin_dpmc, |
@@ -598,6 +659,10 @@ static struct platform_device *cm_bf538_devices[] __initdata = { | |||
598 | #endif | 659 | #endif |
599 | 660 | ||
600 | &bfin_gpios_device, | 661 | &bfin_gpios_device, |
662 | |||
663 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
664 | &ezkit_flash_device, | ||
665 | #endif | ||
601 | }; | 666 | }; |
602 | 667 | ||
603 | static int __init ezkit_init(void) | 668 | static int __init ezkit_init(void) |