2 * Copyright 2004-2009 Analog Devices Inc.
3 * 2008-2009 Bluetechnix
4 * 2005 National ICT Australia (NICTA)
5 * Aidan Williams <aidan@nicta.com.au>
7 * Licensed under the GPL-2 or later.
10 #include <linux/device.h>
11 #include <linux/export.h>
12 #include <linux/etherdevice.h>
13 #include <linux/platform_device.h>
14 #include <linux/mtd/mtd.h>
15 #include <linux/mtd/partitions.h>
16 #include <linux/mtd/physmap.h>
17 #include <linux/spi/spi.h>
18 #include <linux/spi/flash.h>
19 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
20 #include <linux/usb/isp1362.h>
22 #include <linux/ata_platform.h>
23 #include <linux/irq.h>
25 #include <asm/bfin5xx_spi.h>
26 #include <asm/portmux.h>
28 #include <asm/bfin_sport.h>
31 * Name the Board for the /proc/cpuinfo
33 const char bfin_board_name[] = "Bluetechnix CM BF537E";
35 #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
36 /* all SPI peripherals info goes here */
38 #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
39 static struct mtd_partition bfin_spi_flash_partitions[] = {
41 .name = "bootloader(spi)",
44 .mask_flags = MTD_CAP_ROM
46 .name = "linux kernel(spi)",
50 .name = "file system(spi)",
56 static struct flash_platform_data bfin_spi_flash_data = {
58 .parts = bfin_spi_flash_partitions,
59 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
63 /* SPI flash chip (m25p64) */
64 static struct bfin5xx_spi_chip spi_flash_chip_info = {
65 .enable_dma = 0, /* use dma transfer with this chip*/
69 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
70 static struct bfin5xx_spi_chip mmc_spi_chip_info = {
75 static struct spi_board_info bfin_spi_board_info[] __initdata = {
76 #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
78 /* the modalias must be the same as spi device driver name */
79 .modalias = "m25p80", /* Name of spi_driver for this device */
80 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
81 .bus_num = 0, /* Framework bus number */
82 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
83 .platform_data = &bfin_spi_flash_data,
84 .controller_data = &spi_flash_chip_info,
89 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
92 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
98 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
100 .modalias = "mmc_spi",
101 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
104 .controller_data = &mmc_spi_chip_info,
111 static struct resource bfin_spi0_resource[] = {
113 .start = SPI0_REGBASE,
114 .end = SPI0_REGBASE + 0xFF,
115 .flags = IORESOURCE_MEM,
120 .flags = IORESOURCE_DMA,
125 .flags = IORESOURCE_IRQ,
129 /* SPI controller data */
130 static struct bfin5xx_spi_master bfin_spi0_info = {
132 .enable_dma = 1, /* master has the ability to do dma transfer */
133 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
136 static struct platform_device bfin_spi0_device = {
138 .id = 0, /* Bus number */
139 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
140 .resource = bfin_spi0_resource,
142 .platform_data = &bfin_spi0_info, /* Passed to driver */
145 #endif /* spi master and devices */
147 #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE)
149 /* SPORT SPI controller data */
150 static struct bfin5xx_spi_master bfin_sport_spi0_info = {
151 .num_chipselect = MAX_BLACKFIN_GPIOS,
152 .enable_dma = 0, /* master don't support DMA */
153 .pin_req = {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_DRPRI,
154 P_SPORT0_RSCLK, P_SPORT0_TFS, P_SPORT0_RFS, 0},
157 static struct resource bfin_sport_spi0_resource[] = {
159 .start = SPORT0_TCR1,
160 .end = SPORT0_TCR1 + 0xFF,
161 .flags = IORESOURCE_MEM,
164 .start = IRQ_SPORT0_ERROR,
165 .end = IRQ_SPORT0_ERROR,
166 .flags = IORESOURCE_IRQ,
170 static struct platform_device bfin_sport_spi0_device = {
171 .name = "bfin-sport-spi",
172 .id = 1, /* Bus number */
173 .num_resources = ARRAY_SIZE(bfin_sport_spi0_resource),
174 .resource = bfin_sport_spi0_resource,
176 .platform_data = &bfin_sport_spi0_info, /* Passed to driver */
180 static struct bfin5xx_spi_master bfin_sport_spi1_info = {
181 .num_chipselect = MAX_BLACKFIN_GPIOS,
182 .enable_dma = 0, /* master don't support DMA */
183 .pin_req = {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_DRPRI,
184 P_SPORT1_RSCLK, P_SPORT1_TFS, P_SPORT1_RFS, 0},
187 static struct resource bfin_sport_spi1_resource[] = {
189 .start = SPORT1_TCR1,
190 .end = SPORT1_TCR1 + 0xFF,
191 .flags = IORESOURCE_MEM,
194 .start = IRQ_SPORT1_ERROR,
195 .end = IRQ_SPORT1_ERROR,
196 .flags = IORESOURCE_IRQ,
200 static struct platform_device bfin_sport_spi1_device = {
201 .name = "bfin-sport-spi",
202 .id = 2, /* Bus number */
203 .num_resources = ARRAY_SIZE(bfin_sport_spi1_resource),
204 .resource = bfin_sport_spi1_resource,
206 .platform_data = &bfin_sport_spi1_info, /* Passed to driver */
210 #endif /* sport spi master and devices */
212 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
213 static struct platform_device rtc_device = {
219 #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE)
220 static struct platform_device hitachi_fb_device = {
221 .name = "hitachi-tx09",
225 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
226 #include <linux/smc91x.h>
228 static struct smc91x_platdata smc91x_info = {
229 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
230 .leda = RPC_LED_100_10,
231 .ledb = RPC_LED_TX_RX,
234 static struct resource smc91x_resources[] = {
237 .end = 0x20200300 + 16,
238 .flags = IORESOURCE_MEM,
242 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
246 static struct platform_device smc91x_device = {
249 .num_resources = ARRAY_SIZE(smc91x_resources),
250 .resource = smc91x_resources,
252 .platform_data = &smc91x_info,
257 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
258 static struct resource isp1362_hcd_resources[] = {
262 .flags = IORESOURCE_MEM,
266 .flags = IORESOURCE_MEM,
270 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
274 static struct isp1362_platform_data isp1362_priv = {
279 .int_edge_triggered = 0,
280 .remote_wakeup_connected = 0,
281 .no_power_switching = 1,
282 .power_switching_mode = 0,
285 static struct platform_device isp1362_hcd_device = {
286 .name = "isp1362-hcd",
289 .platform_data = &isp1362_priv,
291 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
292 .resource = isp1362_hcd_resources,
296 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
297 static struct resource net2272_bfin_resources[] = {
300 .end = 0x20300000 + 0x100,
301 .flags = IORESOURCE_MEM,
305 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
309 static struct platform_device net2272_bfin_device = {
312 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
313 .resource = net2272_bfin_resources,
317 #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
318 static struct mtd_partition cm_partitions[] = {
320 .name = "bootloader(nor)",
324 .name = "linux kernel(nor)",
326 .offset = MTDPART_OFS_APPEND,
328 .name = "file system(nor)",
329 .size = MTDPART_SIZ_FULL,
330 .offset = MTDPART_OFS_APPEND,
334 static struct physmap_flash_data cm_flash_data = {
336 .parts = cm_partitions,
337 .nr_parts = ARRAY_SIZE(cm_partitions),
340 static unsigned cm_flash_gpios[] = { GPIO_PF4 };
342 static struct resource cm_flash_resource[] = {
347 .flags = IORESOURCE_MEM,
349 .start = (unsigned long)cm_flash_gpios,
350 .end = ARRAY_SIZE(cm_flash_gpios),
351 .flags = IORESOURCE_IRQ,
355 static struct platform_device cm_flash_device = {
356 .name = "gpio-addr-flash",
359 .platform_data = &cm_flash_data,
361 .num_resources = ARRAY_SIZE(cm_flash_resource),
362 .resource = cm_flash_resource,
366 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
367 #ifdef CONFIG_SERIAL_BFIN_UART0
368 static struct resource bfin_uart0_resources[] = {
372 .flags = IORESOURCE_MEM,
375 .start = IRQ_UART0_TX,
377 .flags = IORESOURCE_IRQ,
380 .start = IRQ_UART0_RX,
382 .flags = IORESOURCE_IRQ,
385 .start = IRQ_UART0_ERROR,
386 .end = IRQ_UART0_ERROR,
387 .flags = IORESOURCE_IRQ,
390 .start = CH_UART0_TX,
392 .flags = IORESOURCE_DMA,
395 .start = CH_UART0_RX,
397 .flags = IORESOURCE_DMA,
399 #ifdef CONFIG_BFIN_UART0_CTSRTS
402 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
406 .flags = IORESOURCE_IO,
410 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
414 .flags = IORESOURCE_IO,
419 static unsigned short bfin_uart0_peripherals[] = {
420 P_UART0_TX, P_UART0_RX, 0
423 static struct platform_device bfin_uart0_device = {
426 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
427 .resource = bfin_uart0_resources,
429 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
433 #ifdef CONFIG_SERIAL_BFIN_UART1
434 static struct resource bfin_uart1_resources[] = {
438 .flags = IORESOURCE_MEM,
441 .start = IRQ_UART1_TX,
443 .flags = IORESOURCE_IRQ,
446 .start = IRQ_UART1_RX,
448 .flags = IORESOURCE_IRQ,
451 .start = IRQ_UART1_ERROR,
452 .end = IRQ_UART1_ERROR,
453 .flags = IORESOURCE_IRQ,
456 .start = CH_UART1_TX,
458 .flags = IORESOURCE_DMA,
461 .start = CH_UART1_RX,
463 .flags = IORESOURCE_DMA,
465 #ifdef CONFIG_BFIN_UART1_CTSRTS
468 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
472 .flags = IORESOURCE_IO,
476 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
480 .flags = IORESOURCE_IO,
485 static unsigned short bfin_uart1_peripherals[] = {
486 P_UART1_TX, P_UART1_RX, 0
489 static struct platform_device bfin_uart1_device = {
492 .num_resources = ARRAY_SIZE(bfin_uart1_resources),
493 .resource = bfin_uart1_resources,
495 .platform_data = &bfin_uart1_peripherals, /* Passed to driver */
501 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
502 #ifdef CONFIG_BFIN_SIR0
503 static struct resource bfin_sir0_resources[] = {
507 .flags = IORESOURCE_MEM,
510 .start = IRQ_UART0_RX,
511 .end = IRQ_UART0_RX+1,
512 .flags = IORESOURCE_IRQ,
515 .start = CH_UART0_RX,
516 .end = CH_UART0_RX+1,
517 .flags = IORESOURCE_DMA,
520 static struct platform_device bfin_sir0_device = {
523 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
524 .resource = bfin_sir0_resources,
527 #ifdef CONFIG_BFIN_SIR1
528 static struct resource bfin_sir1_resources[] = {
532 .flags = IORESOURCE_MEM,
535 .start = IRQ_UART1_RX,
536 .end = IRQ_UART1_RX+1,
537 .flags = IORESOURCE_IRQ,
540 .start = CH_UART1_RX,
541 .end = CH_UART1_RX+1,
542 .flags = IORESOURCE_DMA,
545 static struct platform_device bfin_sir1_device = {
548 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
549 .resource = bfin_sir1_resources,
554 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
555 static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
557 static struct resource bfin_twi0_resource[] = {
559 .start = TWI0_REGBASE,
561 .flags = IORESOURCE_MEM,
566 .flags = IORESOURCE_IRQ,
570 static struct platform_device i2c_bfin_twi_device = {
571 .name = "i2c-bfin-twi",
573 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
574 .resource = bfin_twi0_resource,
576 .platform_data = &bfin_twi0_pins,
581 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) \
582 || defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE)
583 unsigned short bfin_sport0_peripherals[] = {
584 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
585 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
588 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
589 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
590 static struct resource bfin_sport0_uart_resources[] = {
592 .start = SPORT0_TCR1,
593 .end = SPORT0_MRCS3+4,
594 .flags = IORESOURCE_MEM,
597 .start = IRQ_SPORT0_RX,
598 .end = IRQ_SPORT0_RX+1,
599 .flags = IORESOURCE_IRQ,
602 .start = IRQ_SPORT0_ERROR,
603 .end = IRQ_SPORT0_ERROR,
604 .flags = IORESOURCE_IRQ,
608 static struct platform_device bfin_sport0_uart_device = {
609 .name = "bfin-sport-uart",
611 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
612 .resource = bfin_sport0_uart_resources,
614 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
618 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
619 static struct resource bfin_sport1_uart_resources[] = {
621 .start = SPORT1_TCR1,
622 .end = SPORT1_MRCS3+4,
623 .flags = IORESOURCE_MEM,
626 .start = IRQ_SPORT1_RX,
627 .end = IRQ_SPORT1_RX+1,
628 .flags = IORESOURCE_IRQ,
631 .start = IRQ_SPORT1_ERROR,
632 .end = IRQ_SPORT1_ERROR,
633 .flags = IORESOURCE_IRQ,
637 static unsigned short bfin_sport1_peripherals[] = {
638 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
639 P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0
642 static struct platform_device bfin_sport1_uart_device = {
643 .name = "bfin-sport-uart",
645 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
646 .resource = bfin_sport1_uart_resources,
648 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
653 #if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE)
654 static struct resource bfin_sport0_resources[] = {
656 .start = SPORT0_TCR1,
657 .end = SPORT0_MRCS3+4,
658 .flags = IORESOURCE_MEM,
661 .start = IRQ_SPORT0_RX,
662 .end = IRQ_SPORT0_RX+1,
663 .flags = IORESOURCE_IRQ,
666 .start = IRQ_SPORT0_TX,
667 .end = IRQ_SPORT0_TX+1,
668 .flags = IORESOURCE_IRQ,
671 .start = IRQ_SPORT0_ERROR,
672 .end = IRQ_SPORT0_ERROR,
673 .flags = IORESOURCE_IRQ,
676 .start = CH_SPORT0_TX,
678 .flags = IORESOURCE_DMA,
681 .start = CH_SPORT0_RX,
683 .flags = IORESOURCE_DMA,
686 static struct platform_device bfin_sport0_device = {
687 .name = "bfin_sport_raw",
689 .num_resources = ARRAY_SIZE(bfin_sport0_resources),
690 .resource = bfin_sport0_resources,
692 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
697 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
698 #include <linux/bfin_mac.h>
699 static const unsigned short bfin_mac_peripherals[] = P_MII0;
701 static struct bfin_phydev_platform_data bfin_phydev_data[] = {
704 .irq = IRQ_MAC_PHYINT,
708 static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
710 .phydev_data = bfin_phydev_data,
711 .phy_mode = PHY_INTERFACE_MODE_MII,
712 .mac_peripherals = bfin_mac_peripherals,
715 static struct platform_device bfin_mii_bus = {
716 .name = "bfin_mii_bus",
718 .platform_data = &bfin_mii_bus_data,
722 static struct platform_device bfin_mac_device = {
725 .platform_data = &bfin_mii_bus,
730 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
731 #define PATA_INT IRQ_PF14
733 static struct pata_platform_info bfin_pata_platform_data = {
735 .irq_type = IRQF_TRIGGER_HIGH,
738 static struct resource bfin_pata_resources[] = {
742 .flags = IORESOURCE_MEM,
747 .flags = IORESOURCE_MEM,
752 .flags = IORESOURCE_IRQ,
756 static struct platform_device bfin_pata_device = {
757 .name = "pata_platform",
759 .num_resources = ARRAY_SIZE(bfin_pata_resources),
760 .resource = bfin_pata_resources,
762 .platform_data = &bfin_pata_platform_data,
767 static const unsigned int cclk_vlev_datasheet[] =
769 VRPAIR(VLEV_085, 250000000),
770 VRPAIR(VLEV_090, 376000000),
771 VRPAIR(VLEV_095, 426000000),
772 VRPAIR(VLEV_100, 426000000),
773 VRPAIR(VLEV_105, 476000000),
774 VRPAIR(VLEV_110, 476000000),
775 VRPAIR(VLEV_115, 476000000),
776 VRPAIR(VLEV_120, 500000000),
777 VRPAIR(VLEV_125, 533000000),
778 VRPAIR(VLEV_130, 600000000),
781 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
782 .tuple_tab = cclk_vlev_datasheet,
783 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
784 .vr_settling_time = 25 /* us */,
787 static struct platform_device bfin_dpmc = {
790 .platform_data = &bfin_dmpc_vreg_data,
794 static struct platform_device *cm_bf537e_devices[] __initdata = {
798 #if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE)
802 #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE)
806 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
810 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
811 #ifdef CONFIG_SERIAL_BFIN_UART0
814 #ifdef CONFIG_SERIAL_BFIN_UART1
819 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
820 #ifdef CONFIG_BFIN_SIR0
823 #ifdef CONFIG_BFIN_SIR1
828 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
829 &i2c_bfin_twi_device,
832 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
833 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
834 &bfin_sport0_uart_device,
836 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
837 &bfin_sport1_uart_device,
841 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
845 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
849 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
854 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
855 &net2272_bfin_device,
858 #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
862 #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE)
863 &bfin_sport_spi0_device,
864 &bfin_sport_spi1_device,
867 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
871 #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
876 static int __init net2272_init(void)
878 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
881 ret = gpio_request(GPIO_PG14, "net2272");
885 /* Reset USB Chip, PG14 */
886 gpio_direction_output(GPIO_PG14, 0);
888 gpio_set_value(GPIO_PG14, 1);
894 static int __init cm_bf537e_init(void)
896 printk(KERN_INFO "%s(): registering device resources\n", __func__);
897 platform_add_devices(cm_bf537e_devices, ARRAY_SIZE(cm_bf537e_devices));
898 #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
899 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
902 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
903 irq_set_status_flags(PATA_INT, IRQ_NOAUTOEN);
907 pr_warning("unable to configure net2272; it probably won't work\n");
912 arch_initcall(cm_bf537e_init);
914 static struct platform_device *cm_bf537e_early_devices[] __initdata = {
915 #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
916 #ifdef CONFIG_SERIAL_BFIN_UART0
919 #ifdef CONFIG_SERIAL_BFIN_UART1
924 #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
925 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
926 &bfin_sport0_uart_device,
928 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
929 &bfin_sport1_uart_device,
934 void __init native_machine_early_platform_add_devices(void)
936 printk(KERN_INFO "register early platform devices\n");
937 early_platform_add_devices(cm_bf537e_early_devices,
938 ARRAY_SIZE(cm_bf537e_early_devices));
941 int bfin_get_ether_addr(char *addr)
945 EXPORT_SYMBOL(bfin_get_ether_addr);