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/platform_device.h>
12 #include <linux/mtd/mtd.h>
13 #include <linux/mtd/partitions.h>
14 #include <linux/mtd/physmap.h>
15 #include <linux/spi/spi.h>
16 #include <linux/spi/flash.h>
17 #include <linux/etherdevice.h>
18 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
19 #include <linux/usb/isp1362.h>
21 #include <linux/i2c.h>
22 #include <linux/irq.h>
23 #include <linux/interrupt.h>
24 #include <linux/usb/sl811.h>
25 #include <linux/usb/musb.h>
27 #include <asm/bfin5xx_spi.h>
28 #include <asm/reboot.h>
30 #include <asm/portmux.h>
32 #include <linux/spi/ad7877.h>
35 * Name the Board for the /proc/cpuinfo
37 const char bfin_board_name
[] = "Bluetechnix CM-BF527";
40 * Driver needs to know address, irq and flag pin.
43 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
44 #include <linux/usb/isp1760.h>
45 static struct resource bfin_isp1760_resources
[] = {
48 .end
= 0x203C0000 + 0x000fffff,
49 .flags
= IORESOURCE_MEM
,
54 .flags
= IORESOURCE_IRQ
,
58 static struct isp1760_platform_data isp1760_priv
= {
63 .dack_polarity_high
= 0,
64 .dreq_polarity_high
= 0,
67 static struct platform_device bfin_isp1760_device
= {
68 .name
= "isp1760-hcd",
71 .platform_data
= &isp1760_priv
,
73 .num_resources
= ARRAY_SIZE(bfin_isp1760_resources
),
74 .resource
= bfin_isp1760_resources
,
78 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
79 static struct resource musb_resources
[] = {
83 .flags
= IORESOURCE_MEM
,
85 [1] = { /* general IRQ */
86 .start
= IRQ_USB_INT0
,
88 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
93 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
97 static struct musb_hdrc_config musb_config
= {
104 .gpio_vrsel
= GPIO_PF11
,
107 static struct musb_hdrc_platform_data musb_plat
= {
108 #if defined(CONFIG_USB_MUSB_OTG)
110 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
112 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
113 .mode
= MUSB_PERIPHERAL
,
115 .config
= &musb_config
,
118 static u64 musb_dmamask
= ~(u32
)0;
120 static struct platform_device musb_device
= {
124 .dma_mask
= &musb_dmamask
,
125 .coherent_dma_mask
= 0xffffffff,
126 .platform_data
= &musb_plat
,
128 .num_resources
= ARRAY_SIZE(musb_resources
),
129 .resource
= musb_resources
,
133 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
134 static struct mtd_partition partition_info
[] = {
136 .name
= "linux kernel(nand)",
138 .size
= 4 * 1024 * 1024,
141 .name
= "file system(nand)",
142 .offset
= MTDPART_OFS_APPEND
,
143 .size
= MTDPART_SIZ_FULL
,
147 static struct bf5xx_nand_platform bf5xx_nand_platform
= {
148 .page_size
= NFC_PG_SIZE_256
,
149 .data_width
= NFC_NWIDTH_8
,
150 .partitions
= partition_info
,
151 .nr_partitions
= ARRAY_SIZE(partition_info
),
156 static struct resource bf5xx_nand_resources
[] = {
159 .end
= NFC_DATA_RD
+ 2,
160 .flags
= IORESOURCE_MEM
,
165 .flags
= IORESOURCE_IRQ
,
169 static struct platform_device bf5xx_nand_device
= {
170 .name
= "bf5xx-nand",
172 .num_resources
= ARRAY_SIZE(bf5xx_nand_resources
),
173 .resource
= bf5xx_nand_resources
,
175 .platform_data
= &bf5xx_nand_platform
,
180 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
181 static struct resource bfin_pcmcia_cf_resources
[] = {
183 .start
= 0x20310000, /* IO PORT */
185 .flags
= IORESOURCE_MEM
,
187 .start
= 0x20311000, /* Attribute Memory */
189 .flags
= IORESOURCE_MEM
,
193 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_LOWLEVEL
,
195 .start
= 6, /* Card Detect PF6 */
197 .flags
= IORESOURCE_IRQ
,
201 static struct platform_device bfin_pcmcia_cf_device
= {
202 .name
= "bfin_cf_pcmcia",
204 .num_resources
= ARRAY_SIZE(bfin_pcmcia_cf_resources
),
205 .resource
= bfin_pcmcia_cf_resources
,
209 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
210 static struct platform_device rtc_device
= {
216 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
217 #include <linux/smc91x.h>
219 static struct smc91x_platdata smc91x_info
= {
220 .flags
= SMC91X_USE_16BIT
| SMC91X_NOWAIT
,
221 .leda
= RPC_LED_100_10
,
222 .ledb
= RPC_LED_TX_RX
,
225 static struct resource smc91x_resources
[] = {
227 .name
= "smc91x-regs",
229 .end
= 0x20300300 + 16,
230 .flags
= IORESOURCE_MEM
,
235 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
238 static struct platform_device smc91x_device
= {
241 .num_resources
= ARRAY_SIZE(smc91x_resources
),
242 .resource
= smc91x_resources
,
244 .platform_data
= &smc91x_info
,
249 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
250 static struct resource dm9000_resources
[] = {
253 .end
= 0x203FB800 + 1,
254 .flags
= IORESOURCE_MEM
,
258 .end
= 0x203FB804 + 1,
259 .flags
= IORESOURCE_MEM
,
264 .flags
= (IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE
),
268 static struct platform_device dm9000_device
= {
271 .num_resources
= ARRAY_SIZE(dm9000_resources
),
272 .resource
= dm9000_resources
,
276 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
277 static struct resource sl811_hcd_resources
[] = {
281 .flags
= IORESOURCE_MEM
,
285 .flags
= IORESOURCE_MEM
,
287 .start
= CONFIG_USB_SL811_BFIN_IRQ
,
288 .end
= CONFIG_USB_SL811_BFIN_IRQ
,
289 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
293 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
294 void sl811_port_power(struct device
*dev
, int is_on
)
296 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS
, "usb:SL811_VBUS");
297 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS
, is_on
);
301 static struct sl811_platform_data sl811_priv
= {
303 .power
= 250, /* == 500mA */
304 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
305 .port_power
= &sl811_port_power
,
309 static struct platform_device sl811_hcd_device
= {
313 .platform_data
= &sl811_priv
,
315 .num_resources
= ARRAY_SIZE(sl811_hcd_resources
),
316 .resource
= sl811_hcd_resources
,
320 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
321 static struct resource isp1362_hcd_resources
[] = {
325 .flags
= IORESOURCE_MEM
,
329 .flags
= IORESOURCE_MEM
,
331 .start
= CONFIG_USB_ISP1362_BFIN_GPIO_IRQ
,
332 .end
= CONFIG_USB_ISP1362_BFIN_GPIO_IRQ
,
333 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
337 static struct isp1362_platform_data isp1362_priv
= {
342 .int_edge_triggered
= 0,
343 .remote_wakeup_connected
= 0,
344 .no_power_switching
= 1,
345 .power_switching_mode
= 0,
348 static struct platform_device isp1362_hcd_device
= {
349 .name
= "isp1362-hcd",
352 .platform_data
= &isp1362_priv
,
354 .num_resources
= ARRAY_SIZE(isp1362_hcd_resources
),
355 .resource
= isp1362_hcd_resources
,
359 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
360 static struct platform_device bfin_mii_bus
= {
361 .name
= "bfin_mii_bus",
364 static struct platform_device bfin_mac_device
= {
366 .dev
.platform_data
= &bfin_mii_bus
,
370 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
371 static struct resource net2272_bfin_resources
[] = {
374 .end
= 0x20300000 + 0x100,
375 .flags
= IORESOURCE_MEM
,
379 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
383 static struct platform_device net2272_bfin_device
= {
386 .num_resources
= ARRAY_SIZE(net2272_bfin_resources
),
387 .resource
= net2272_bfin_resources
,
391 #if defined(CONFIG_MTD_M25P80) \
392 || defined(CONFIG_MTD_M25P80_MODULE)
393 static struct mtd_partition bfin_spi_flash_partitions
[] = {
395 .name
= "bootloader(spi)",
398 .mask_flags
= MTD_CAP_ROM
400 .name
= "linux kernel(spi)",
401 .size
= MTDPART_SIZ_FULL
,
402 .offset
= MTDPART_OFS_APPEND
,
406 static struct flash_platform_data bfin_spi_flash_data
= {
408 .parts
= bfin_spi_flash_partitions
,
409 .nr_parts
= ARRAY_SIZE(bfin_spi_flash_partitions
),
413 /* SPI flash chip (m25p64) */
414 static struct bfin5xx_spi_chip spi_flash_chip_info
= {
415 .enable_dma
= 0, /* use dma transfer with this chip*/
420 #if defined(CONFIG_BFIN_SPI_ADC) \
421 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
423 static struct bfin5xx_spi_chip spi_adc_chip_info
= {
424 .enable_dma
= 1, /* use dma transfer with this chip*/
429 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
430 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
431 static struct bfin5xx_spi_chip ad1836_spi_chip_info
= {
437 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
438 static struct bfin5xx_spi_chip mmc_spi_chip_info
= {
444 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
445 static struct bfin5xx_spi_chip spi_ad7877_chip_info
= {
450 static const struct ad7877_platform_data bfin_ad7877_ts_info
= {
452 .vref_delay_usecs
= 50, /* internal, no capacitor */
455 .pressure_max
= 1000,
457 .stopacq_polarity
= 1,
458 .first_conversion_delay
= 3,
459 .acquisition_time
= 1,
461 .pen_down_acc_interval
= 1,
465 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
466 && defined(CONFIG_SND_SOC_WM8731_SPI)
467 static struct bfin5xx_spi_chip spi_wm8731_chip_info
= {
473 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
474 static struct bfin5xx_spi_chip spidev_chip_info
= {
480 static struct spi_board_info bfin_spi_board_info
[] __initdata
= {
481 #if defined(CONFIG_MTD_M25P80) \
482 || defined(CONFIG_MTD_M25P80_MODULE)
484 /* the modalias must be the same as spi device driver name */
485 .modalias
= "m25p80", /* Name of spi_driver for this device */
486 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
487 .bus_num
= 0, /* Framework bus number */
488 .chip_select
= 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
489 .platform_data
= &bfin_spi_flash_data
,
490 .controller_data
= &spi_flash_chip_info
,
495 #if defined(CONFIG_BFIN_SPI_ADC) \
496 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
498 .modalias
= "bfin_spi_adc", /* Name of spi_driver for this device */
499 .max_speed_hz
= 6250000, /* max spi clock (SCK) speed in HZ */
500 .bus_num
= 0, /* Framework bus number */
501 .chip_select
= 1, /* Framework chip select. */
502 .platform_data
= NULL
, /* No spi_driver specific config */
503 .controller_data
= &spi_adc_chip_info
,
507 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
508 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
510 .modalias
= "ad1836",
511 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
513 .chip_select
= CONFIG_SND_BLACKFIN_SPI_PFBIT
,
514 .controller_data
= &ad1836_spi_chip_info
,
517 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
519 .modalias
= "mmc_spi",
520 .max_speed_hz
= 20000000, /* max spi clock (SCK) speed in HZ */
523 .controller_data
= &mmc_spi_chip_info
,
527 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
529 .modalias
= "ad7877",
530 .platform_data
= &bfin_ad7877_ts_info
,
532 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
535 .controller_data
= &spi_ad7877_chip_info
,
538 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
539 && defined(CONFIG_SND_SOC_WM8731_SPI)
541 .modalias
= "wm8731",
542 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
545 .controller_data
= &spi_wm8731_chip_info
,
549 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
551 .modalias
= "spidev",
552 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
555 .controller_data
= &spidev_chip_info
,
560 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
561 /* SPI controller data */
562 static struct bfin5xx_spi_master bfin_spi0_info
= {
564 .enable_dma
= 1, /* master has the ability to do dma transfer */
565 .pin_req
= {P_SPI0_SCK
, P_SPI0_MISO
, P_SPI0_MOSI
, 0},
569 static struct resource bfin_spi0_resource
[] = {
571 .start
= SPI0_REGBASE
,
572 .end
= SPI0_REGBASE
+ 0xFF,
573 .flags
= IORESOURCE_MEM
,
578 .flags
= IORESOURCE_DMA
,
583 .flags
= IORESOURCE_IRQ
,
587 static struct platform_device bfin_spi0_device
= {
589 .id
= 0, /* Bus number */
590 .num_resources
= ARRAY_SIZE(bfin_spi0_resource
),
591 .resource
= bfin_spi0_resource
,
593 .platform_data
= &bfin_spi0_info
, /* Passed to driver */
596 #endif /* spi master and devices */
598 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
599 static struct platform_device bfin_fb_adv7393_device
= {
600 .name
= "bfin-adv7393",
604 #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
605 static struct mtd_partition cm_partitions
[] = {
607 .name
= "bootloader(nor)",
611 .name
= "linux kernel(nor)",
613 .offset
= MTDPART_OFS_APPEND
,
615 .name
= "file system(nor)",
616 .size
= MTDPART_SIZ_FULL
,
617 .offset
= MTDPART_OFS_APPEND
,
621 static struct physmap_flash_data cm_flash_data
= {
623 .parts
= cm_partitions
,
624 .nr_parts
= ARRAY_SIZE(cm_partitions
),
627 static unsigned cm_flash_gpios
[] = { GPIO_PH9
, GPIO_PG11
};
629 static struct resource cm_flash_resource
[] = {
634 .flags
= IORESOURCE_MEM
,
636 .start
= (unsigned long)cm_flash_gpios
,
637 .end
= ARRAY_SIZE(cm_flash_gpios
),
638 .flags
= IORESOURCE_IRQ
,
642 static struct platform_device cm_flash_device
= {
643 .name
= "gpio-addr-flash",
646 .platform_data
= &cm_flash_data
,
648 .num_resources
= ARRAY_SIZE(cm_flash_resource
),
649 .resource
= cm_flash_resource
,
653 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
654 static struct resource bfin_uart_resources
[] = {
655 #ifdef CONFIG_SERIAL_BFIN_UART0
659 .flags
= IORESOURCE_MEM
,
662 #ifdef CONFIG_SERIAL_BFIN_UART1
666 .flags
= IORESOURCE_MEM
,
671 static struct platform_device bfin_uart_device
= {
674 .num_resources
= ARRAY_SIZE(bfin_uart_resources
),
675 .resource
= bfin_uart_resources
,
679 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
680 #ifdef CONFIG_BFIN_SIR0
681 static struct resource bfin_sir0_resources
[] = {
685 .flags
= IORESOURCE_MEM
,
688 .start
= IRQ_UART0_RX
,
689 .end
= IRQ_UART0_RX
+1,
690 .flags
= IORESOURCE_IRQ
,
693 .start
= CH_UART0_RX
,
694 .end
= CH_UART0_RX
+1,
695 .flags
= IORESOURCE_DMA
,
699 static struct platform_device bfin_sir0_device
= {
702 .num_resources
= ARRAY_SIZE(bfin_sir0_resources
),
703 .resource
= bfin_sir0_resources
,
706 #ifdef CONFIG_BFIN_SIR1
707 static struct resource bfin_sir1_resources
[] = {
711 .flags
= IORESOURCE_MEM
,
714 .start
= IRQ_UART1_RX
,
715 .end
= IRQ_UART1_RX
+1,
716 .flags
= IORESOURCE_IRQ
,
719 .start
= CH_UART1_RX
,
720 .end
= CH_UART1_RX
+1,
721 .flags
= IORESOURCE_DMA
,
725 static struct platform_device bfin_sir1_device
= {
728 .num_resources
= ARRAY_SIZE(bfin_sir1_resources
),
729 .resource
= bfin_sir1_resources
,
734 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
735 static struct resource bfin_twi0_resource
[] = {
737 .start
= TWI0_REGBASE
,
739 .flags
= IORESOURCE_MEM
,
744 .flags
= IORESOURCE_IRQ
,
748 static struct platform_device i2c_bfin_twi_device
= {
749 .name
= "i2c-bfin-twi",
751 .num_resources
= ARRAY_SIZE(bfin_twi0_resource
),
752 .resource
= bfin_twi0_resource
,
756 static struct i2c_board_info __initdata bfin_i2c_board_info
[] = {
757 #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
759 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
762 #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
764 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
770 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
771 static struct platform_device bfin_sport0_uart_device
= {
772 .name
= "bfin-sport-uart",
776 static struct platform_device bfin_sport1_uart_device
= {
777 .name
= "bfin-sport-uart",
782 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
783 #include <linux/input.h>
784 #include <linux/gpio_keys.h>
786 static struct gpio_keys_button bfin_gpio_keys_table
[] = {
787 {BTN_0
, GPIO_PF14
, 1, "gpio-keys: BTN0"},
790 static struct gpio_keys_platform_data bfin_gpio_keys_data
= {
791 .buttons
= bfin_gpio_keys_table
,
792 .nbuttons
= ARRAY_SIZE(bfin_gpio_keys_table
),
795 static struct platform_device bfin_device_gpiokeys
= {
798 .platform_data
= &bfin_gpio_keys_data
,
803 static struct resource bfin_gpios_resources
= {
805 .end
= MAX_BLACKFIN_GPIOS
- 1,
806 .flags
= IORESOURCE_IRQ
,
809 static struct platform_device bfin_gpios_device
= {
810 .name
= "simple-gpio",
813 .resource
= &bfin_gpios_resources
,
816 static const unsigned int cclk_vlev_datasheet
[] =
818 VRPAIR(VLEV_100
, 400000000),
819 VRPAIR(VLEV_105
, 426000000),
820 VRPAIR(VLEV_110
, 500000000),
821 VRPAIR(VLEV_115
, 533000000),
822 VRPAIR(VLEV_120
, 600000000),
825 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data
= {
826 .tuple_tab
= cclk_vlev_datasheet
,
827 .tabsize
= ARRAY_SIZE(cclk_vlev_datasheet
),
828 .vr_settling_time
= 25 /* us */,
831 static struct platform_device bfin_dpmc
= {
834 .platform_data
= &bfin_dmpc_vreg_data
,
838 static struct platform_device
*cmbf527_devices
[] __initdata
= {
842 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
846 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
847 &bfin_pcmcia_cf_device
,
850 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
854 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
858 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
862 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
863 &bfin_isp1760_device
,
866 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
870 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
874 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
878 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
883 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
884 &net2272_bfin_device
,
887 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
891 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
892 &bfin_fb_adv7393_device
,
895 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
899 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
900 #ifdef CONFIG_BFIN_SIR0
903 #ifdef CONFIG_BFIN_SIR1
908 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
909 &i2c_bfin_twi_device
,
912 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
913 &bfin_sport0_uart_device
,
914 &bfin_sport1_uart_device
,
917 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
918 &bfin_device_gpiokeys
,
921 #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE)
928 static int __init
cm_init(void)
930 printk(KERN_INFO
"%s(): registering device resources\n", __func__
);
931 i2c_register_board_info(0, bfin_i2c_board_info
,
932 ARRAY_SIZE(bfin_i2c_board_info
));
933 platform_add_devices(cmbf527_devices
, ARRAY_SIZE(cmbf527_devices
));
934 spi_register_board_info(bfin_spi_board_info
, ARRAY_SIZE(bfin_spi_board_info
));
938 arch_initcall(cm_init
);
940 void native_machine_restart(char *cmd
)
942 /* workaround reboot hang when booting from SPI */
943 if ((bfin_read_SYSCR() & 0x7) == 0x3)
944 bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS
);
947 void bfin_get_ether_addr(char *addr
)
949 random_ether_addr(addr
);
950 printk(KERN_WARNING
"%s:%s: Setting Ethernet MAC to a random one\n", __FILE__
, __func__
);
952 EXPORT_SYMBOL(bfin_get_ether_addr
);