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 IS_ENABLED(CONFIG_USB_ISP1362_HCD)
20 #include <linux/usb/isp1362.h>
22 #include <linux/ata_platform.h>
23 #include <linux/irq.h>
24 #include <linux/gpio.h>
26 #include <asm/bfin5xx_spi.h>
27 #include <asm/portmux.h>
29 #include <asm/bfin_sport.h>
32 * Name the Board for the /proc/cpuinfo
34 const char bfin_board_name
[] = "Bluetechnix CM BF537E";
36 #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
37 /* all SPI peripherals info goes here */
39 #if IS_ENABLED(CONFIG_MTD_M25P80)
40 static struct mtd_partition bfin_spi_flash_partitions
[] = {
42 .name
= "bootloader(spi)",
45 .mask_flags
= MTD_CAP_ROM
47 .name
= "linux kernel(spi)",
51 .name
= "file system(spi)",
57 static struct flash_platform_data bfin_spi_flash_data
= {
59 .parts
= bfin_spi_flash_partitions
,
60 .nr_parts
= ARRAY_SIZE(bfin_spi_flash_partitions
),
64 /* SPI flash chip (m25p64) */
65 static struct bfin5xx_spi_chip spi_flash_chip_info
= {
66 .enable_dma
= 0, /* use dma transfer with this chip*/
70 #if IS_ENABLED(CONFIG_MMC_SPI)
71 static struct bfin5xx_spi_chip mmc_spi_chip_info
= {
76 static struct spi_board_info bfin_spi_board_info
[] __initdata
= {
77 #if IS_ENABLED(CONFIG_MTD_M25P80)
79 /* the modalias must be the same as spi device driver name */
80 .modalias
= "m25p80", /* Name of spi_driver for this device */
81 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
82 .bus_num
= 0, /* Framework bus number */
83 .chip_select
= 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
84 .platform_data
= &bfin_spi_flash_data
,
85 .controller_data
= &spi_flash_chip_info
,
90 #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
93 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
99 #if IS_ENABLED(CONFIG_MMC_SPI)
101 .modalias
= "mmc_spi",
102 .max_speed_hz
= 20000000, /* max spi clock (SCK) speed in HZ */
105 .controller_data
= &mmc_spi_chip_info
,
112 static struct resource bfin_spi0_resource
[] = {
114 .start
= SPI0_REGBASE
,
115 .end
= SPI0_REGBASE
+ 0xFF,
116 .flags
= IORESOURCE_MEM
,
121 .flags
= IORESOURCE_DMA
,
126 .flags
= IORESOURCE_IRQ
,
130 /* SPI controller data */
131 static struct bfin5xx_spi_master bfin_spi0_info
= {
133 .enable_dma
= 1, /* master has the ability to do dma transfer */
134 .pin_req
= {P_SPI0_SCK
, P_SPI0_MISO
, P_SPI0_MOSI
, 0},
137 static struct platform_device bfin_spi0_device
= {
139 .id
= 0, /* Bus number */
140 .num_resources
= ARRAY_SIZE(bfin_spi0_resource
),
141 .resource
= bfin_spi0_resource
,
143 .platform_data
= &bfin_spi0_info
, /* Passed to driver */
146 #endif /* spi master and devices */
148 #if IS_ENABLED(CONFIG_SPI_BFIN_SPORT)
150 /* SPORT SPI controller data */
151 static struct bfin5xx_spi_master bfin_sport_spi0_info
= {
152 .num_chipselect
= MAX_BLACKFIN_GPIOS
,
153 .enable_dma
= 0, /* master don't support DMA */
154 .pin_req
= {P_SPORT0_DTPRI
, P_SPORT0_TSCLK
, P_SPORT0_DRPRI
,
155 P_SPORT0_RSCLK
, P_SPORT0_TFS
, P_SPORT0_RFS
, 0},
158 static struct resource bfin_sport_spi0_resource
[] = {
160 .start
= SPORT0_TCR1
,
161 .end
= SPORT0_TCR1
+ 0xFF,
162 .flags
= IORESOURCE_MEM
,
165 .start
= IRQ_SPORT0_ERROR
,
166 .end
= IRQ_SPORT0_ERROR
,
167 .flags
= IORESOURCE_IRQ
,
171 static struct platform_device bfin_sport_spi0_device
= {
172 .name
= "bfin-sport-spi",
173 .id
= 1, /* Bus number */
174 .num_resources
= ARRAY_SIZE(bfin_sport_spi0_resource
),
175 .resource
= bfin_sport_spi0_resource
,
177 .platform_data
= &bfin_sport_spi0_info
, /* Passed to driver */
181 static struct bfin5xx_spi_master bfin_sport_spi1_info
= {
182 .num_chipselect
= MAX_BLACKFIN_GPIOS
,
183 .enable_dma
= 0, /* master don't support DMA */
184 .pin_req
= {P_SPORT1_DTPRI
, P_SPORT1_TSCLK
, P_SPORT1_DRPRI
,
185 P_SPORT1_RSCLK
, P_SPORT1_TFS
, P_SPORT1_RFS
, 0},
188 static struct resource bfin_sport_spi1_resource
[] = {
190 .start
= SPORT1_TCR1
,
191 .end
= SPORT1_TCR1
+ 0xFF,
192 .flags
= IORESOURCE_MEM
,
195 .start
= IRQ_SPORT1_ERROR
,
196 .end
= IRQ_SPORT1_ERROR
,
197 .flags
= IORESOURCE_IRQ
,
201 static struct platform_device bfin_sport_spi1_device
= {
202 .name
= "bfin-sport-spi",
203 .id
= 2, /* Bus number */
204 .num_resources
= ARRAY_SIZE(bfin_sport_spi1_resource
),
205 .resource
= bfin_sport_spi1_resource
,
207 .platform_data
= &bfin_sport_spi1_info
, /* Passed to driver */
211 #endif /* sport spi master and devices */
213 #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
214 static struct platform_device rtc_device
= {
220 #if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
221 static struct platform_device hitachi_fb_device
= {
222 .name
= "hitachi-tx09",
226 #if IS_ENABLED(CONFIG_SMC91X)
227 #include <linux/smc91x.h>
229 static struct smc91x_platdata smc91x_info
= {
230 .flags
= SMC91X_USE_16BIT
| SMC91X_NOWAIT
,
231 .leda
= RPC_LED_100_10
,
232 .ledb
= RPC_LED_TX_RX
,
235 static struct resource smc91x_resources
[] = {
238 .end
= 0x20200300 + 16,
239 .flags
= IORESOURCE_MEM
,
243 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
247 static struct platform_device smc91x_device
= {
250 .num_resources
= ARRAY_SIZE(smc91x_resources
),
251 .resource
= smc91x_resources
,
253 .platform_data
= &smc91x_info
,
258 #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
259 static struct resource isp1362_hcd_resources
[] = {
263 .flags
= IORESOURCE_MEM
,
267 .flags
= IORESOURCE_MEM
,
271 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_LOWEDGE
,
275 static struct isp1362_platform_data isp1362_priv
= {
280 .int_edge_triggered
= 0,
281 .remote_wakeup_connected
= 0,
282 .no_power_switching
= 1,
283 .power_switching_mode
= 0,
286 static struct platform_device isp1362_hcd_device
= {
287 .name
= "isp1362-hcd",
290 .platform_data
= &isp1362_priv
,
292 .num_resources
= ARRAY_SIZE(isp1362_hcd_resources
),
293 .resource
= isp1362_hcd_resources
,
297 #if IS_ENABLED(CONFIG_USB_NET2272)
298 static struct resource net2272_bfin_resources
[] = {
301 .end
= 0x20300000 + 0x100,
302 .flags
= IORESOURCE_MEM
,
306 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
310 static struct platform_device net2272_bfin_device
= {
313 .num_resources
= ARRAY_SIZE(net2272_bfin_resources
),
314 .resource
= net2272_bfin_resources
,
318 #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
319 static struct mtd_partition cm_partitions
[] = {
321 .name
= "bootloader(nor)",
325 .name
= "linux kernel(nor)",
327 .offset
= MTDPART_OFS_APPEND
,
329 .name
= "file system(nor)",
330 .size
= MTDPART_SIZ_FULL
,
331 .offset
= MTDPART_OFS_APPEND
,
335 static struct physmap_flash_data cm_flash_data
= {
337 .parts
= cm_partitions
,
338 .nr_parts
= ARRAY_SIZE(cm_partitions
),
341 static unsigned cm_flash_gpios
[] = { GPIO_PF4
};
343 static struct resource cm_flash_resource
[] = {
348 .flags
= IORESOURCE_MEM
,
350 .start
= (unsigned long)cm_flash_gpios
,
351 .end
= ARRAY_SIZE(cm_flash_gpios
),
352 .flags
= IORESOURCE_IRQ
,
356 static struct platform_device cm_flash_device
= {
357 .name
= "gpio-addr-flash",
360 .platform_data
= &cm_flash_data
,
362 .num_resources
= ARRAY_SIZE(cm_flash_resource
),
363 .resource
= cm_flash_resource
,
367 #if IS_ENABLED(CONFIG_SERIAL_BFIN)
368 #ifdef CONFIG_SERIAL_BFIN_UART0
369 static struct resource bfin_uart0_resources
[] = {
373 .flags
= IORESOURCE_MEM
,
376 .start
= IRQ_UART0_TX
,
378 .flags
= IORESOURCE_IRQ
,
381 .start
= IRQ_UART0_RX
,
383 .flags
= IORESOURCE_IRQ
,
386 .start
= IRQ_UART0_ERROR
,
387 .end
= IRQ_UART0_ERROR
,
388 .flags
= IORESOURCE_IRQ
,
391 .start
= CH_UART0_TX
,
393 .flags
= IORESOURCE_DMA
,
396 .start
= CH_UART0_RX
,
398 .flags
= IORESOURCE_DMA
,
400 #ifdef CONFIG_BFIN_UART0_CTSRTS
403 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
407 .flags
= IORESOURCE_IO
,
411 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
415 .flags
= IORESOURCE_IO
,
420 static unsigned short bfin_uart0_peripherals
[] = {
421 P_UART0_TX
, P_UART0_RX
, 0
424 static struct platform_device bfin_uart0_device
= {
427 .num_resources
= ARRAY_SIZE(bfin_uart0_resources
),
428 .resource
= bfin_uart0_resources
,
430 .platform_data
= &bfin_uart0_peripherals
, /* Passed to driver */
434 #ifdef CONFIG_SERIAL_BFIN_UART1
435 static struct resource bfin_uart1_resources
[] = {
439 .flags
= IORESOURCE_MEM
,
442 .start
= IRQ_UART1_TX
,
444 .flags
= IORESOURCE_IRQ
,
447 .start
= IRQ_UART1_RX
,
449 .flags
= IORESOURCE_IRQ
,
452 .start
= IRQ_UART1_ERROR
,
453 .end
= IRQ_UART1_ERROR
,
454 .flags
= IORESOURCE_IRQ
,
457 .start
= CH_UART1_TX
,
459 .flags
= IORESOURCE_DMA
,
462 .start
= CH_UART1_RX
,
464 .flags
= IORESOURCE_DMA
,
466 #ifdef CONFIG_BFIN_UART1_CTSRTS
469 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
473 .flags
= IORESOURCE_IO
,
477 * Refer to arch/blackfin/mach-xxx/include/mach/gpio.h for the GPIO map.
481 .flags
= IORESOURCE_IO
,
486 static unsigned short bfin_uart1_peripherals
[] = {
487 P_UART1_TX
, P_UART1_RX
, 0
490 static struct platform_device bfin_uart1_device
= {
493 .num_resources
= ARRAY_SIZE(bfin_uart1_resources
),
494 .resource
= bfin_uart1_resources
,
496 .platform_data
= &bfin_uart1_peripherals
, /* Passed to driver */
502 #if IS_ENABLED(CONFIG_BFIN_SIR)
503 #ifdef CONFIG_BFIN_SIR0
504 static struct resource bfin_sir0_resources
[] = {
508 .flags
= IORESOURCE_MEM
,
511 .start
= IRQ_UART0_RX
,
512 .end
= IRQ_UART0_RX
+1,
513 .flags
= IORESOURCE_IRQ
,
516 .start
= CH_UART0_RX
,
517 .end
= CH_UART0_RX
+1,
518 .flags
= IORESOURCE_DMA
,
521 static struct platform_device bfin_sir0_device
= {
524 .num_resources
= ARRAY_SIZE(bfin_sir0_resources
),
525 .resource
= bfin_sir0_resources
,
528 #ifdef CONFIG_BFIN_SIR1
529 static struct resource bfin_sir1_resources
[] = {
533 .flags
= IORESOURCE_MEM
,
536 .start
= IRQ_UART1_RX
,
537 .end
= IRQ_UART1_RX
+1,
538 .flags
= IORESOURCE_IRQ
,
541 .start
= CH_UART1_RX
,
542 .end
= CH_UART1_RX
+1,
543 .flags
= IORESOURCE_DMA
,
546 static struct platform_device bfin_sir1_device
= {
549 .num_resources
= ARRAY_SIZE(bfin_sir1_resources
),
550 .resource
= bfin_sir1_resources
,
555 #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
556 static const u16 bfin_twi0_pins
[] = {P_TWI0_SCL
, P_TWI0_SDA
, 0};
558 static struct resource bfin_twi0_resource
[] = {
560 .start
= TWI0_REGBASE
,
562 .flags
= IORESOURCE_MEM
,
567 .flags
= IORESOURCE_IRQ
,
571 static struct platform_device i2c_bfin_twi_device
= {
572 .name
= "i2c-bfin-twi",
574 .num_resources
= ARRAY_SIZE(bfin_twi0_resource
),
575 .resource
= bfin_twi0_resource
,
577 .platform_data
= &bfin_twi0_pins
,
582 #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT) \
583 || IS_ENABLED(CONFIG_BFIN_SPORT)
584 unsigned short bfin_sport0_peripherals
[] = {
585 P_SPORT0_TFS
, P_SPORT0_DTPRI
, P_SPORT0_TSCLK
, P_SPORT0_RFS
,
586 P_SPORT0_DRPRI
, P_SPORT0_RSCLK
, P_SPORT0_DRSEC
, P_SPORT0_DTSEC
, 0
589 #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
590 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
591 static struct resource bfin_sport0_uart_resources
[] = {
593 .start
= SPORT0_TCR1
,
594 .end
= SPORT0_MRCS3
+4,
595 .flags
= IORESOURCE_MEM
,
598 .start
= IRQ_SPORT0_RX
,
599 .end
= IRQ_SPORT0_RX
+1,
600 .flags
= IORESOURCE_IRQ
,
603 .start
= IRQ_SPORT0_ERROR
,
604 .end
= IRQ_SPORT0_ERROR
,
605 .flags
= IORESOURCE_IRQ
,
609 static struct platform_device bfin_sport0_uart_device
= {
610 .name
= "bfin-sport-uart",
612 .num_resources
= ARRAY_SIZE(bfin_sport0_uart_resources
),
613 .resource
= bfin_sport0_uart_resources
,
615 .platform_data
= &bfin_sport0_peripherals
, /* Passed to driver */
619 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
620 static struct resource bfin_sport1_uart_resources
[] = {
622 .start
= SPORT1_TCR1
,
623 .end
= SPORT1_MRCS3
+4,
624 .flags
= IORESOURCE_MEM
,
627 .start
= IRQ_SPORT1_RX
,
628 .end
= IRQ_SPORT1_RX
+1,
629 .flags
= IORESOURCE_IRQ
,
632 .start
= IRQ_SPORT1_ERROR
,
633 .end
= IRQ_SPORT1_ERROR
,
634 .flags
= IORESOURCE_IRQ
,
638 static unsigned short bfin_sport1_peripherals
[] = {
639 P_SPORT1_TFS
, P_SPORT1_DTPRI
, P_SPORT1_TSCLK
, P_SPORT1_RFS
,
640 P_SPORT1_DRPRI
, P_SPORT1_RSCLK
, 0
643 static struct platform_device bfin_sport1_uart_device
= {
644 .name
= "bfin-sport-uart",
646 .num_resources
= ARRAY_SIZE(bfin_sport1_uart_resources
),
647 .resource
= bfin_sport1_uart_resources
,
649 .platform_data
= &bfin_sport1_peripherals
, /* Passed to driver */
654 #if IS_ENABLED(CONFIG_BFIN_SPORT)
655 static struct resource bfin_sport0_resources
[] = {
657 .start
= SPORT0_TCR1
,
658 .end
= SPORT0_MRCS3
+4,
659 .flags
= IORESOURCE_MEM
,
662 .start
= IRQ_SPORT0_RX
,
663 .end
= IRQ_SPORT0_RX
+1,
664 .flags
= IORESOURCE_IRQ
,
667 .start
= IRQ_SPORT0_TX
,
668 .end
= IRQ_SPORT0_TX
+1,
669 .flags
= IORESOURCE_IRQ
,
672 .start
= IRQ_SPORT0_ERROR
,
673 .end
= IRQ_SPORT0_ERROR
,
674 .flags
= IORESOURCE_IRQ
,
677 .start
= CH_SPORT0_TX
,
679 .flags
= IORESOURCE_DMA
,
682 .start
= CH_SPORT0_RX
,
684 .flags
= IORESOURCE_DMA
,
687 static struct platform_device bfin_sport0_device
= {
688 .name
= "bfin_sport_raw",
690 .num_resources
= ARRAY_SIZE(bfin_sport0_resources
),
691 .resource
= bfin_sport0_resources
,
693 .platform_data
= &bfin_sport0_peripherals
, /* Passed to driver */
698 #if IS_ENABLED(CONFIG_BFIN_MAC)
699 #include <linux/bfin_mac.h>
700 static const unsigned short bfin_mac_peripherals
[] = P_MII0
;
702 static struct bfin_phydev_platform_data bfin_phydev_data
[] = {
705 .irq
= IRQ_MAC_PHYINT
,
709 static struct bfin_mii_bus_platform_data bfin_mii_bus_data
= {
711 .phydev_data
= bfin_phydev_data
,
712 .phy_mode
= PHY_INTERFACE_MODE_MII
,
713 .mac_peripherals
= bfin_mac_peripherals
,
716 static struct platform_device bfin_mii_bus
= {
717 .name
= "bfin_mii_bus",
719 .platform_data
= &bfin_mii_bus_data
,
723 static struct platform_device bfin_mac_device
= {
726 .platform_data
= &bfin_mii_bus
,
731 #if IS_ENABLED(CONFIG_PATA_PLATFORM)
732 #define PATA_INT IRQ_PF14
734 static struct pata_platform_info bfin_pata_platform_data
= {
738 static struct resource bfin_pata_resources
[] = {
742 .flags
= IORESOURCE_MEM
,
747 .flags
= IORESOURCE_MEM
,
752 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
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 IS_ENABLED(CONFIG_BFIN_SPORT)
802 #if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
806 #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
810 #if IS_ENABLED(CONFIG_SERIAL_BFIN)
811 #ifdef CONFIG_SERIAL_BFIN_UART0
814 #ifdef CONFIG_SERIAL_BFIN_UART1
819 #if IS_ENABLED(CONFIG_BFIN_SIR)
820 #ifdef CONFIG_BFIN_SIR0
823 #ifdef CONFIG_BFIN_SIR1
828 #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
829 &i2c_bfin_twi_device
,
832 #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
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 IS_ENABLED(CONFIG_USB_ISP1362_HCD)
845 #if IS_ENABLED(CONFIG_SMC91X)
849 #if IS_ENABLED(CONFIG_BFIN_MAC)
854 #if IS_ENABLED(CONFIG_USB_NET2272)
855 &net2272_bfin_device
,
858 #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
862 #if IS_ENABLED(CONFIG_SPI_BFIN_SPORT)
863 &bfin_sport_spi0_device
,
864 &bfin_sport_spi1_device
,
867 #if IS_ENABLED(CONFIG_PATA_PLATFORM)
871 #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
876 static int __init
net2272_init(void)
878 #if IS_ENABLED(CONFIG_USB_NET2272)
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 IS_ENABLED(CONFIG_SPI_BFIN5XX)
899 spi_register_board_info(bfin_spi_board_info
, ARRAY_SIZE(bfin_spi_board_info
));
902 #if IS_ENABLED(CONFIG_PATA_PLATFORM)
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
);