diff options
Diffstat (limited to 'arch/blackfin/mach-bf527/boards/cm_bf527.c')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/cm_bf527.c | 164 |
1 files changed, 72 insertions, 92 deletions
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c index b09484f538f4..08a3f01c9886 100644 --- a/arch/blackfin/mach-bf527/boards/cm_bf527.c +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c | |||
@@ -151,46 +151,6 @@ static struct platform_device musb_device = { | |||
151 | }; | 151 | }; |
152 | #endif | 152 | #endif |
153 | 153 | ||
154 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
155 | static struct mtd_partition ezkit_partitions[] = { | ||
156 | { | ||
157 | .name = "bootloader(nor)", | ||
158 | .size = 0x40000, | ||
159 | .offset = 0, | ||
160 | }, { | ||
161 | .name = "linux kernel(nor)", | ||
162 | .size = 0x1C0000, | ||
163 | .offset = MTDPART_OFS_APPEND, | ||
164 | }, { | ||
165 | .name = "file system(nor)", | ||
166 | .size = MTDPART_SIZ_FULL, | ||
167 | .offset = MTDPART_OFS_APPEND, | ||
168 | } | ||
169 | }; | ||
170 | |||
171 | static struct physmap_flash_data ezkit_flash_data = { | ||
172 | .width = 2, | ||
173 | .parts = ezkit_partitions, | ||
174 | .nr_parts = ARRAY_SIZE(ezkit_partitions), | ||
175 | }; | ||
176 | |||
177 | static struct resource ezkit_flash_resource = { | ||
178 | .start = 0x20000000, | ||
179 | .end = 0x201fffff, | ||
180 | .flags = IORESOURCE_MEM, | ||
181 | }; | ||
182 | |||
183 | static struct platform_device ezkit_flash_device = { | ||
184 | .name = "physmap-flash", | ||
185 | .id = 0, | ||
186 | .dev = { | ||
187 | .platform_data = &ezkit_flash_data, | ||
188 | }, | ||
189 | .num_resources = 1, | ||
190 | .resource = &ezkit_flash_resource, | ||
191 | }; | ||
192 | #endif | ||
193 | |||
194 | #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) | 154 | #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE) |
195 | static struct mtd_partition partition_info[] = { | 155 | static struct mtd_partition partition_info[] = { |
196 | { | 156 | { |
@@ -275,6 +235,14 @@ static struct platform_device rtc_device = { | |||
275 | #endif | 235 | #endif |
276 | 236 | ||
277 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 237 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
238 | #include <linux/smc91x.h> | ||
239 | |||
240 | static struct smc91x_platdata smc91x_info = { | ||
241 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, | ||
242 | .leda = RPC_LED_100_10, | ||
243 | .ledb = RPC_LED_TX_RX, | ||
244 | }; | ||
245 | |||
278 | static struct resource smc91x_resources[] = { | 246 | static struct resource smc91x_resources[] = { |
279 | { | 247 | { |
280 | .name = "smc91x-regs", | 248 | .name = "smc91x-regs", |
@@ -293,6 +261,9 @@ static struct platform_device smc91x_device = { | |||
293 | .id = 0, | 261 | .id = 0, |
294 | .num_resources = ARRAY_SIZE(smc91x_resources), | 262 | .num_resources = ARRAY_SIZE(smc91x_resources), |
295 | .resource = smc91x_resources, | 263 | .resource = smc91x_resources, |
264 | .dev = { | ||
265 | .platform_data = &smc91x_info, | ||
266 | }, | ||
296 | }; | 267 | }; |
297 | #endif | 268 | #endif |
298 | 269 | ||
@@ -300,10 +271,15 @@ static struct platform_device smc91x_device = { | |||
300 | static struct resource dm9000_resources[] = { | 271 | static struct resource dm9000_resources[] = { |
301 | [0] = { | 272 | [0] = { |
302 | .start = 0x203FB800, | 273 | .start = 0x203FB800, |
303 | .end = 0x203FB800 + 8, | 274 | .end = 0x203FB800 + 1, |
304 | .flags = IORESOURCE_MEM, | 275 | .flags = IORESOURCE_MEM, |
305 | }, | 276 | }, |
306 | [1] = { | 277 | [1] = { |
278 | .start = 0x203FB804, | ||
279 | .end = 0x203FB804 + 1, | ||
280 | .flags = IORESOURCE_MEM, | ||
281 | }, | ||
282 | [2] = { | ||
307 | .start = IRQ_PF9, | 283 | .start = IRQ_PF9, |
308 | .end = IRQ_PF9, | 284 | .end = IRQ_PF9, |
309 | .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE), | 285 | .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE), |
@@ -479,13 +455,6 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | |||
479 | }; | 455 | }; |
480 | #endif | 456 | #endif |
481 | 457 | ||
482 | #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) | ||
483 | static struct bfin5xx_spi_chip ad9960_spi_chip_info = { | ||
484 | .enable_dma = 0, | ||
485 | .bits_per_word = 16, | ||
486 | }; | ||
487 | #endif | ||
488 | |||
489 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 458 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
490 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { | 459 | static struct bfin5xx_spi_chip mmc_spi_chip_info = { |
491 | .enable_dma = 0, | 460 | .enable_dma = 0, |
@@ -493,15 +462,6 @@ static struct bfin5xx_spi_chip mmc_spi_chip_info = { | |||
493 | }; | 462 | }; |
494 | #endif | 463 | #endif |
495 | 464 | ||
496 | #if defined(CONFIG_PBX) | ||
497 | static struct bfin5xx_spi_chip spi_si3xxx_chip_info = { | ||
498 | .ctl_reg = 0x4, /* send zero */ | ||
499 | .enable_dma = 0, | ||
500 | .bits_per_word = 8, | ||
501 | .cs_change_per_word = 1, | ||
502 | }; | ||
503 | #endif | ||
504 | |||
505 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 465 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
506 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | 466 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { |
507 | .enable_dma = 0, | 467 | .enable_dma = 0, |
@@ -568,22 +528,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
568 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ | 528 | #if defined(CONFIG_SND_BLACKFIN_AD1836) \ |
569 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) | 529 | || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) |
570 | { | 530 | { |
571 | .modalias = "ad1836-spi", | 531 | .modalias = "ad1836", |
572 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | 532 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ |
573 | .bus_num = 0, | 533 | .bus_num = 0, |
574 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, | 534 | .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT, |
575 | .controller_data = &ad1836_spi_chip_info, | 535 | .controller_data = &ad1836_spi_chip_info, |
576 | }, | 536 | }, |
577 | #endif | 537 | #endif |
578 | #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE) | ||
579 | { | ||
580 | .modalias = "ad9960-spi", | ||
581 | .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */ | ||
582 | .bus_num = 0, | ||
583 | .chip_select = 1, | ||
584 | .controller_data = &ad9960_spi_chip_info, | ||
585 | }, | ||
586 | #endif | ||
587 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) | 538 | #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) |
588 | { | 539 | { |
589 | .modalias = "mmc_spi", | 540 | .modalias = "mmc_spi", |
@@ -594,24 +545,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
594 | .mode = SPI_MODE_3, | 545 | .mode = SPI_MODE_3, |
595 | }, | 546 | }, |
596 | #endif | 547 | #endif |
597 | #if defined(CONFIG_PBX) | ||
598 | { | ||
599 | .modalias = "fxs-spi", | ||
600 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | ||
601 | .bus_num = 0, | ||
602 | .chip_select = 8 - CONFIG_J11_JUMPER, | ||
603 | .controller_data = &spi_si3xxx_chip_info, | ||
604 | .mode = SPI_MODE_3, | ||
605 | }, | ||
606 | { | ||
607 | .modalias = "fxo-spi", | ||
608 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | ||
609 | .bus_num = 0, | ||
610 | .chip_select = 8 - CONFIG_J19_JUMPER, | ||
611 | .controller_data = &spi_si3xxx_chip_info, | ||
612 | .mode = SPI_MODE_3, | ||
613 | }, | ||
614 | #endif | ||
615 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 548 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
616 | { | 549 | { |
617 | .modalias = "ad7877", | 550 | .modalias = "ad7877", |
@@ -689,6 +622,55 @@ static struct platform_device bfin_fb_adv7393_device = { | |||
689 | }; | 622 | }; |
690 | #endif | 623 | #endif |
691 | 624 | ||
625 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) | ||
626 | static struct mtd_partition cm_partitions[] = { | ||
627 | { | ||
628 | .name = "bootloader(nor)", | ||
629 | .size = 0x40000, | ||
630 | .offset = 0, | ||
631 | }, { | ||
632 | .name = "linux kernel(nor)", | ||
633 | .size = 0x100000, | ||
634 | .offset = MTDPART_OFS_APPEND, | ||
635 | }, { | ||
636 | .name = "file system(nor)", | ||
637 | .size = MTDPART_SIZ_FULL, | ||
638 | .offset = MTDPART_OFS_APPEND, | ||
639 | } | ||
640 | }; | ||
641 | |||
642 | static struct physmap_flash_data cm_flash_data = { | ||
643 | .width = 2, | ||
644 | .parts = cm_partitions, | ||
645 | .nr_parts = ARRAY_SIZE(cm_partitions), | ||
646 | }; | ||
647 | |||
648 | static unsigned cm_flash_gpios[] = { GPIO_PH9, GPIO_PG11 }; | ||
649 | |||
650 | static struct resource cm_flash_resource[] = { | ||
651 | { | ||
652 | .name = "cfi_probe", | ||
653 | .start = 0x20000000, | ||
654 | .end = 0x201fffff, | ||
655 | .flags = IORESOURCE_MEM, | ||
656 | }, { | ||
657 | .start = (unsigned long)cm_flash_gpios, | ||
658 | .end = ARRAY_SIZE(cm_flash_gpios), | ||
659 | .flags = IORESOURCE_IRQ, | ||
660 | } | ||
661 | }; | ||
662 | |||
663 | static struct platform_device cm_flash_device = { | ||
664 | .name = "gpio-addr-flash", | ||
665 | .id = 0, | ||
666 | .dev = { | ||
667 | .platform_data = &cm_flash_data, | ||
668 | }, | ||
669 | .num_resources = ARRAY_SIZE(cm_flash_resource), | ||
670 | .resource = cm_flash_resource, | ||
671 | }; | ||
672 | #endif | ||
673 | |||
692 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 674 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
693 | static struct resource bfin_uart_resources[] = { | 675 | static struct resource bfin_uart_resources[] = { |
694 | #ifdef CONFIG_SERIAL_BFIN_UART0 | 676 | #ifdef CONFIG_SERIAL_BFIN_UART0 |
@@ -796,13 +778,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
796 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) | 778 | #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE) |
797 | { | 779 | { |
798 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), | 780 | I2C_BOARD_INFO("pcf8574_lcd", 0x22), |
799 | .type = "pcf8574_lcd", | ||
800 | }, | 781 | }, |
801 | #endif | 782 | #endif |
802 | #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE) | 783 | #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE) |
803 | { | 784 | { |
804 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), | 785 | I2C_BOARD_INFO("pcf8574_keypad", 0x27), |
805 | .type = "pcf8574_keypad", | ||
806 | .irq = IRQ_PF8, | 786 | .irq = IRQ_PF8, |
807 | }, | 787 | }, |
808 | #endif | 788 | #endif |
@@ -876,7 +856,7 @@ static struct platform_device bfin_dpmc = { | |||
876 | }, | 856 | }, |
877 | }; | 857 | }; |
878 | 858 | ||
879 | static struct platform_device *stamp_devices[] __initdata = { | 859 | static struct platform_device *cmbf527_devices[] __initdata = { |
880 | 860 | ||
881 | &bfin_dpmc, | 861 | &bfin_dpmc, |
882 | 862 | ||
@@ -959,8 +939,8 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
959 | &bfin_device_gpiokeys, | 939 | &bfin_device_gpiokeys, |
960 | #endif | 940 | #endif |
961 | 941 | ||
962 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 942 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) |
963 | &ezkit_flash_device, | 943 | &cm_flash_device, |
964 | #endif | 944 | #endif |
965 | 945 | ||
966 | &bfin_gpios_device, | 946 | &bfin_gpios_device, |
@@ -971,7 +951,7 @@ static int __init cm_init(void) | |||
971 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 951 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
972 | i2c_register_board_info(0, bfin_i2c_board_info, | 952 | i2c_register_board_info(0, bfin_i2c_board_info, |
973 | ARRAY_SIZE(bfin_i2c_board_info)); | 953 | ARRAY_SIZE(bfin_i2c_board_info)); |
974 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 954 | platform_add_devices(cmbf527_devices, ARRAY_SIZE(cmbf527_devices)); |
975 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 955 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
976 | return 0; | 956 | return 0; |
977 | } | 957 | } |