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
= {
736 .irq_type
= IRQF_TRIGGER_HIGH
,
739 static struct resource bfin_pata_resources
[] = {
743 .flags
= IORESOURCE_MEM
,
748 .flags
= IORESOURCE_MEM
,
753 .flags
= IORESOURCE_IRQ
,
757 static struct platform_device bfin_pata_device
= {
758 .name
= "pata_platform",
760 .num_resources
= ARRAY_SIZE(bfin_pata_resources
),
761 .resource
= bfin_pata_resources
,
763 .platform_data
= &bfin_pata_platform_data
,
768 static const unsigned int cclk_vlev_datasheet
[] =
770 VRPAIR(VLEV_085
, 250000000),
771 VRPAIR(VLEV_090
, 376000000),
772 VRPAIR(VLEV_095
, 426000000),
773 VRPAIR(VLEV_100
, 426000000),
774 VRPAIR(VLEV_105
, 476000000),
775 VRPAIR(VLEV_110
, 476000000),
776 VRPAIR(VLEV_115
, 476000000),
777 VRPAIR(VLEV_120
, 500000000),
778 VRPAIR(VLEV_125
, 533000000),
779 VRPAIR(VLEV_130
, 600000000),
782 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data
= {
783 .tuple_tab
= cclk_vlev_datasheet
,
784 .tabsize
= ARRAY_SIZE(cclk_vlev_datasheet
),
785 .vr_settling_time
= 25 /* us */,
788 static struct platform_device bfin_dpmc
= {
791 .platform_data
= &bfin_dmpc_vreg_data
,
795 static struct platform_device
*cm_bf537e_devices
[] __initdata
= {
799 #if IS_ENABLED(CONFIG_BFIN_SPORT)
803 #if IS_ENABLED(CONFIG_FB_HITACHI_TX09)
807 #if IS_ENABLED(CONFIG_RTC_DRV_BFIN)
811 #if IS_ENABLED(CONFIG_SERIAL_BFIN)
812 #ifdef CONFIG_SERIAL_BFIN_UART0
815 #ifdef CONFIG_SERIAL_BFIN_UART1
820 #if IS_ENABLED(CONFIG_BFIN_SIR)
821 #ifdef CONFIG_BFIN_SIR0
824 #ifdef CONFIG_BFIN_SIR1
829 #if IS_ENABLED(CONFIG_I2C_BLACKFIN_TWI)
830 &i2c_bfin_twi_device
,
833 #if IS_ENABLED(CONFIG_SERIAL_BFIN_SPORT)
834 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
835 &bfin_sport0_uart_device
,
837 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
838 &bfin_sport1_uart_device
,
842 #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
846 #if IS_ENABLED(CONFIG_SMC91X)
850 #if IS_ENABLED(CONFIG_BFIN_MAC)
855 #if IS_ENABLED(CONFIG_USB_NET2272)
856 &net2272_bfin_device
,
859 #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
863 #if IS_ENABLED(CONFIG_SPI_BFIN_SPORT)
864 &bfin_sport_spi0_device
,
865 &bfin_sport_spi1_device
,
868 #if IS_ENABLED(CONFIG_PATA_PLATFORM)
872 #if IS_ENABLED(CONFIG_MTD_GPIO_ADDR)
877 static int __init
net2272_init(void)
879 #if IS_ENABLED(CONFIG_USB_NET2272)
882 ret
= gpio_request(GPIO_PG14
, "net2272");
886 /* Reset USB Chip, PG14 */
887 gpio_direction_output(GPIO_PG14
, 0);
889 gpio_set_value(GPIO_PG14
, 1);
895 static int __init
cm_bf537e_init(void)
897 printk(KERN_INFO
"%s(): registering device resources\n", __func__
);
898 platform_add_devices(cm_bf537e_devices
, ARRAY_SIZE(cm_bf537e_devices
));
899 #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
900 spi_register_board_info(bfin_spi_board_info
, ARRAY_SIZE(bfin_spi_board_info
));
903 #if IS_ENABLED(CONFIG_PATA_PLATFORM)
904 irq_set_status_flags(PATA_INT
, IRQ_NOAUTOEN
);
908 pr_warning("unable to configure net2272; it probably won't work\n");
913 arch_initcall(cm_bf537e_init
);
915 static struct platform_device
*cm_bf537e_early_devices
[] __initdata
= {
916 #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
917 #ifdef CONFIG_SERIAL_BFIN_UART0
920 #ifdef CONFIG_SERIAL_BFIN_UART1
925 #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
926 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
927 &bfin_sport0_uart_device
,
929 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
930 &bfin_sport1_uart_device
,
935 void __init
native_machine_early_platform_add_devices(void)
937 printk(KERN_INFO
"register early platform devices\n");
938 early_platform_add_devices(cm_bf537e_early_devices
,
939 ARRAY_SIZE(cm_bf537e_early_devices
));
942 int bfin_get_ether_addr(char *addr
)
946 EXPORT_SYMBOL(bfin_get_ether_addr
);