aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf561/boards/cm_bf561.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf561/boards/cm_bf561.c')
-rw-r--r--arch/blackfin/mach-bf561/boards/cm_bf561.c58
1 files changed, 22 insertions, 36 deletions
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 87595cd38afe..e4f397d1d65b 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -60,29 +60,6 @@ static struct flash_platform_data bfin_spi_flash_data = {
60/* SPI flash chip (m25p64) */ 60/* SPI flash chip (m25p64) */
61static struct bfin5xx_spi_chip spi_flash_chip_info = { 61static struct bfin5xx_spi_chip spi_flash_chip_info = {
62 .enable_dma = 0, /* use dma transfer with this chip*/ 62 .enable_dma = 0, /* use dma transfer with this chip*/
63 .bits_per_word = 8,
64};
65#endif
66
67#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
68/* SPI ADC chip */
69static struct bfin5xx_spi_chip spi_adc_chip_info = {
70 .enable_dma = 1, /* use dma transfer with this chip*/
71 .bits_per_word = 16,
72};
73#endif
74
75#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
76static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
77 .enable_dma = 0,
78 .bits_per_word = 16,
79};
80#endif
81
82#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
83static struct bfin5xx_spi_chip mmc_spi_chip_info = {
84 .enable_dma = 0,
85 .bits_per_word = 8,
86}; 63};
87#endif 64#endif
88 65
@@ -100,24 +77,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
100 }, 77 },
101#endif 78#endif
102 79
103#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
104 {
105 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
106 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
107 .bus_num = 0, /* Framework bus number */
108 .chip_select = 1, /* Framework chip select. */
109 .platform_data = NULL, /* No spi_driver specific config */
110 .controller_data = &spi_adc_chip_info,
111 },
112#endif
113
114#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 80#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
115 { 81 {
116 .modalias = "ad183x", 82 .modalias = "ad183x",
117 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 83 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
118 .bus_num = 0, 84 .bus_num = 0,
119 .chip_select = 4, 85 .chip_select = 4,
120 .controller_data = &ad1836_spi_chip_info,
121 }, 86 },
122#endif 87#endif
123#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 88#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
@@ -126,7 +91,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
126 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 91 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
127 .bus_num = 0, 92 .bus_num = 0,
128 .chip_select = 1, 93 .chip_select = 1,
129 .controller_data = &mmc_spi_chip_info,
130 .mode = SPI_MODE_3, 94 .mode = SPI_MODE_3,
131 }, 95 },
132#endif 96#endif
@@ -532,6 +496,24 @@ static struct platform_device *cm_bf561_devices[] __initdata = {
532#endif 496#endif
533}; 497};
534 498
499static int __init net2272_init(void)
500{
501#if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
502 int ret;
503
504 ret = gpio_request(GPIO_PF46, "net2272");
505 if (ret)
506 return ret;
507
508 /* Reset USB Chip, PF46 */
509 gpio_direction_output(GPIO_PF46, 0);
510 mdelay(2);
511 gpio_set_value(GPIO_PF46, 1);
512#endif
513
514 return 0;
515}
516
535static int __init cm_bf561_init(void) 517static int __init cm_bf561_init(void)
536{ 518{
537 printk(KERN_INFO "%s(): registering device resources\n", __func__); 519 printk(KERN_INFO "%s(): registering device resources\n", __func__);
@@ -543,6 +525,10 @@ static int __init cm_bf561_init(void)
543#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 525#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
544 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN); 526 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
545#endif 527#endif
528
529 if (net2272_init())
530 pr_warning("unable to configure net2272; it probably won't work\n");
531
546 return 0; 532 return 0;
547} 533}
548 534