10 #include <linux/device.h>
11 #include <linux/export.h>
19 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
35 #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
38 #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
41 .
name =
"bootloader(spi)",
46 .name =
"linux kernel(spi)",
50 .name =
"file system(spi)",
58 .parts = bfin_spi_flash_partitions,
59 .nr_parts =
ARRAY_SIZE(bfin_spi_flash_partitions),
69 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
76 #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
80 .max_speed_hz = 25000000,
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,
98 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
100 .modalias =
"mmc_spi",
101 .max_speed_hz = 20000000,
104 .controller_data = &mmc_spi_chip_info,
111 static struct resource bfin_spi0_resource[] = {
139 .num_resources =
ARRAY_SIZE(bfin_spi0_resource),
140 .resource = bfin_spi0_resource,
142 .platform_data = &bfin_spi0_info,
147 #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE)
157 static struct resource bfin_sport_spi0_resource[] = {
171 .
name =
"bfin-sport-spi",
173 .num_resources =
ARRAY_SIZE(bfin_sport_spi0_resource),
174 .resource = bfin_sport_spi0_resource,
176 .platform_data = &bfin_sport_spi0_info,
187 static struct resource bfin_sport_spi1_resource[] = {
201 .
name =
"bfin-sport-spi",
203 .num_resources =
ARRAY_SIZE(bfin_sport_spi1_resource),
204 .resource = bfin_sport_spi1_resource,
206 .platform_data = &bfin_sport_spi1_info,
212 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
219 #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE)
221 .
name =
"hitachi-tx09",
225 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
234 static struct resource smc91x_resources[] = {
237 .end = 0x20200300 + 16,
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[] = {
279 .int_edge_triggered = 0,
280 .remote_wakeup_connected = 0,
281 .no_power_switching = 1,
282 .power_switching_mode = 0,
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,
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)
320 .
name =
"bootloader(nor)",
324 .name =
"linux kernel(nor)",
328 .name =
"file system(nor)",
336 .parts = cm_partitions,
340 static unsigned cm_flash_gpios[] = {
GPIO_PF4 };
342 static struct resource cm_flash_resource[] = {
349 .start = (
unsigned long)cm_flash_gpios,
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[] = {
399 #ifdef CONFIG_BFIN_UART0_CTSRTS
419 static unsigned short bfin_uart0_peripherals[] = {
426 .num_resources =
ARRAY_SIZE(bfin_uart0_resources),
427 .resource = bfin_uart0_resources,
429 .platform_data = &bfin_uart0_peripherals,
433 #ifdef CONFIG_SERIAL_BFIN_UART1
434 static struct resource bfin_uart1_resources[] = {
465 #ifdef CONFIG_BFIN_UART1_CTSRTS
485 static unsigned short bfin_uart1_peripherals[] = {
492 .num_resources =
ARRAY_SIZE(bfin_uart1_resources),
493 .resource = bfin_uart1_resources,
495 .platform_data = &bfin_uart1_peripherals,
501 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
502 #ifdef CONFIG_BFIN_SIR0
503 static struct resource bfin_sir0_resources[] = {
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[] = {
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)
557 static struct resource bfin_twi0_resource[] = {
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[] = {
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[] = {
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,
618 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
619 static struct resource bfin_sport1_uart_resources[] = {
637 static unsigned short bfin_sport1_peripherals[] = {
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,
653 #if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE)
654 static struct resource bfin_sport0_resources[] = {
687 .
name =
"bfin_sport_raw",
689 .num_resources =
ARRAY_SIZE(bfin_sport0_resources),
690 .resource = bfin_sport0_resources,
692 .platform_data = &bfin_sport0_peripherals,
697 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
699 static const unsigned short bfin_mac_peripherals[] =
P_MII0;
710 .phydev_data = bfin_phydev_data,
712 .mac_peripherals = bfin_mac_peripherals,
716 .
name =
"bfin_mii_bus",
718 .platform_data = &bfin_mii_bus_data,
725 .platform_data = &bfin_mii_bus,
730 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
731 #define PATA_INT IRQ_PF14
738 static struct resource bfin_pata_resources[] = {
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[] =
782 .tuple_tab = cclk_vlev_datasheet,
784 .vr_settling_time = 25 ,
790 .platform_data = &bfin_dmpc_vreg_data,
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)
894 static int __init cm_bf537e_init(
void)
898 #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
902 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
907 pr_warning(
"unable to configure net2272; it probably won't work\n");
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,