aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf527/boards/ezbrd.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf527/boards/ezbrd.c')
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c42
1 files changed, 16 insertions, 26 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 0314bd3355eb..7fe480e4ebe8 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -208,8 +208,13 @@ static struct platform_device rtc_device = {
208 208
209 209
210#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 210#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
211static struct platform_device bfin_mii_bus = {
212 .name = "bfin_mii_bus",
213};
214
211static struct platform_device bfin_mac_device = { 215static struct platform_device bfin_mac_device = {
212 .name = "bfin_mac", 216 .name = "bfin_mac",
217 .dev.platform_data = &bfin_mii_bus,
213}; 218};
214#endif 219#endif
215 220
@@ -251,9 +256,9 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
251}; 256};
252#endif 257#endif
253 258
254#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) 259#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
255static struct bfin5xx_spi_chip spi_mmc_chip_info = { 260static struct bfin5xx_spi_chip mmc_spi_chip_info = {
256 .enable_dma = 1, 261 .enable_dma = 0,
257 .bits_per_word = 8, 262 .bits_per_word = 8,
258}; 263};
259#endif 264#endif
@@ -361,23 +366,13 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
361 }, 366 },
362#endif 367#endif
363 368
364#if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) 369#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
365 { 370 {
366 .modalias = "spi_mmc_dummy", 371 .modalias = "mmc_spi",
367 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ 372 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
368 .bus_num = 0, 373 .bus_num = 0,
369 .chip_select = 0, 374 .chip_select = 5,
370 .platform_data = NULL, 375 .controller_data = &mmc_spi_chip_info,
371 .controller_data = &spi_mmc_chip_info,
372 .mode = SPI_MODE_3,
373 },
374 {
375 .modalias = "spi_mmc",
376 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
377 .bus_num = 0,
378 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
379 .platform_data = NULL,
380 .controller_data = &spi_mmc_chip_info,
381 .mode = SPI_MODE_3, 376 .mode = SPI_MODE_3,
382 }, 377 },
383#endif 378#endif
@@ -590,7 +585,6 @@ static struct platform_device i2c_bfin_twi_device = {
590}; 585};
591#endif 586#endif
592 587
593#ifdef CONFIG_I2C_BOARDINFO
594static struct i2c_board_info __initdata bfin_i2c_board_info[] = { 588static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
595#if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) 589#if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
596 { 590 {
@@ -604,7 +598,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
604 }, 598 },
605#endif 599#endif
606}; 600};
607#endif
608 601
609#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 602#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
610static struct platform_device bfin_sport0_uart_device = { 603static struct platform_device bfin_sport0_uart_device = {
@@ -720,6 +713,7 @@ static struct platform_device *stamp_devices[] __initdata = {
720#endif 713#endif
721 714
722#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 715#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
716 &bfin_mii_bus,
723 &bfin_mac_device, 717 &bfin_mac_device,
724#endif 718#endif
725 719
@@ -764,27 +758,23 @@ static struct platform_device *stamp_devices[] __initdata = {
764 &bfin_gpios_device, 758 &bfin_gpios_device,
765}; 759};
766 760
767static int __init stamp_init(void) 761static int __init ezbrd_init(void)
768{ 762{
769 printk(KERN_INFO "%s(): registering device resources\n", __func__); 763 printk(KERN_INFO "%s(): registering device resources\n", __func__);
770
771#ifdef CONFIG_I2C_BOARDINFO
772 i2c_register_board_info(0, bfin_i2c_board_info, 764 i2c_register_board_info(0, bfin_i2c_board_info,
773 ARRAY_SIZE(bfin_i2c_board_info)); 765 ARRAY_SIZE(bfin_i2c_board_info));
774#endif
775
776 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 766 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
777 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 767 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
778 return 0; 768 return 0;
779} 769}
780 770
781arch_initcall(stamp_init); 771arch_initcall(ezbrd_init);
782 772
783void native_machine_restart(char *cmd) 773void native_machine_restart(char *cmd)
784{ 774{
785 /* workaround reboot hang when booting from SPI */ 775 /* workaround reboot hang when booting from SPI */
786 if ((bfin_read_SYSCR() & 0x7) == 0x3) 776 if ((bfin_read_SYSCR() & 0x7) == 0x3)
787 bfin_gpio_reset_spi0_ssel1(); 777 bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
788} 778}
789 779
790void bfin_get_ether_addr(char *addr) 780void bfin_get_ether_addr(char *addr)