2 * File: arch/blackfin/mach-bf527/boards/cm-bf527.c
3 * Based on: arch/blackfin/mach-bf537/boards/stamp.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2008 Analog Devices Inc.
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, see the file COPYING, or write
27 * to the Free Software Foundation, Inc.,
28 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 #include <linux/device.h>
32 #include <linux/platform_device.h>
33 #include <linux/mtd/mtd.h>
34 #include <linux/mtd/partitions.h>
35 #include <linux/mtd/physmap.h>
36 #include <linux/spi/spi.h>
37 #include <linux/spi/flash.h>
38 #include <linux/etherdevice.h>
39 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
40 #include <linux/usb/isp1362.h>
42 #include <linux/i2c.h>
43 #include <linux/irq.h>
44 #include <linux/interrupt.h>
45 #include <linux/usb/sl811.h>
46 #include <linux/usb/musb.h>
48 #include <asm/bfin5xx_spi.h>
49 #include <asm/reboot.h>
51 #include <asm/portmux.h>
53 #include <linux/spi/ad7877.h>
56 * Name the Board for the /proc/cpuinfo
58 const char bfin_board_name[] = "Bluetechnix CM-BF527";
61 * Driver needs to know address, irq and flag pin.
64 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
65 #include <linux/usb/isp1760.h>
66 static struct resource bfin_isp1760_resources[] = {
69 .end = 0x203C0000 + 0x000fffff,
70 .flags = IORESOURCE_MEM,
75 .flags = IORESOURCE_IRQ,
79 static struct isp1760_platform_data isp1760_priv = {
84 .dack_polarity_high = 0,
85 .dreq_polarity_high = 0,
88 static struct platform_device bfin_isp1760_device = {
89 .name = "isp1760-hcd",
92 .platform_data = &isp1760_priv,
94 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
95 .resource = bfin_isp1760_resources,
99 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
100 static struct resource musb_resources[] = {
104 .flags = IORESOURCE_MEM,
106 [1] = { /* general IRQ */
107 .start = IRQ_USB_INT0,
109 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
111 [2] = { /* DMA IRQ */
112 .start = IRQ_USB_DMA,
114 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
118 static struct musb_hdrc_config musb_config = {
125 .gpio_vrsel = GPIO_PF11,
128 static struct musb_hdrc_platform_data musb_plat = {
129 #if defined(CONFIG_USB_MUSB_OTG)
131 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
133 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
134 .mode = MUSB_PERIPHERAL,
136 .config = &musb_config,
139 static u64 musb_dmamask = ~(u32)0;
141 static struct platform_device musb_device = {
145 .dma_mask = &musb_dmamask,
146 .coherent_dma_mask = 0xffffffff,
147 .platform_data = &musb_plat,
149 .num_resources = ARRAY_SIZE(musb_resources),
150 .resource = musb_resources,
154 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
155 static struct mtd_partition ezkit_partitions[] = {
157 .name = "bootloader(nor)",
161 .name = "linux kernel(nor)",
163 .offset = MTDPART_OFS_APPEND,
165 .name = "file system(nor)",
166 .size = MTDPART_SIZ_FULL,
167 .offset = MTDPART_OFS_APPEND,
171 static struct physmap_flash_data ezkit_flash_data = {
173 .parts = ezkit_partitions,
174 .nr_parts = ARRAY_SIZE(ezkit_partitions),
177 static struct resource ezkit_flash_resource = {
180 .flags = IORESOURCE_MEM,
183 static struct platform_device ezkit_flash_device = {
184 .name = "physmap-flash",
187 .platform_data = &ezkit_flash_data,
190 .resource = &ezkit_flash_resource,
194 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
195 static struct mtd_partition partition_info[] = {
197 .name = "linux kernel(nand)",
199 .size = 4 * 1024 * 1024,
202 .name = "file system(nand)",
203 .offset = MTDPART_OFS_APPEND,
204 .size = MTDPART_SIZ_FULL,
208 static struct bf5xx_nand_platform bf5xx_nand_platform = {
209 .page_size = NFC_PG_SIZE_256,
210 .data_width = NFC_NWIDTH_8,
211 .partitions = partition_info,
212 .nr_partitions = ARRAY_SIZE(partition_info),
217 static struct resource bf5xx_nand_resources[] = {
220 .end = NFC_DATA_RD + 2,
221 .flags = IORESOURCE_MEM,
226 .flags = IORESOURCE_IRQ,
230 static struct platform_device bf5xx_nand_device = {
231 .name = "bf5xx-nand",
233 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
234 .resource = bf5xx_nand_resources,
236 .platform_data = &bf5xx_nand_platform,
241 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
242 static struct resource bfin_pcmcia_cf_resources[] = {
244 .start = 0x20310000, /* IO PORT */
246 .flags = IORESOURCE_MEM,
248 .start = 0x20311000, /* Attribute Memory */
250 .flags = IORESOURCE_MEM,
254 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
256 .start = 6, /* Card Detect PF6 */
258 .flags = IORESOURCE_IRQ,
262 static struct platform_device bfin_pcmcia_cf_device = {
263 .name = "bfin_cf_pcmcia",
265 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
266 .resource = bfin_pcmcia_cf_resources,
270 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
271 static struct platform_device rtc_device = {
277 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
278 #include <linux/smc91x.h>
280 static struct smc91x_platdata smc91x_info = {
281 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
282 .leda = RPC_LED_100_10,
283 .ledb = RPC_LED_TX_RX,
286 static struct resource smc91x_resources[] = {
288 .name = "smc91x-regs",
290 .end = 0x20300300 + 16,
291 .flags = IORESOURCE_MEM,
296 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
299 static struct platform_device smc91x_device = {
302 .num_resources = ARRAY_SIZE(smc91x_resources),
303 .resource = smc91x_resources,
305 .platform_data = &smc91x_info,
310 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
311 static struct resource dm9000_resources[] = {
314 .end = 0x203FB800 + 1,
315 .flags = IORESOURCE_MEM,
319 .end = 0x203FB804 + 1,
320 .flags = IORESOURCE_MEM,
325 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
329 static struct platform_device dm9000_device = {
332 .num_resources = ARRAY_SIZE(dm9000_resources),
333 .resource = dm9000_resources,
337 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
338 static struct resource sl811_hcd_resources[] = {
342 .flags = IORESOURCE_MEM,
346 .flags = IORESOURCE_MEM,
348 .start = CONFIG_USB_SL811_BFIN_IRQ,
349 .end = CONFIG_USB_SL811_BFIN_IRQ,
350 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
354 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
355 void sl811_port_power(struct device *dev, int is_on)
357 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
358 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
362 static struct sl811_platform_data sl811_priv = {
364 .power = 250, /* == 500mA */
365 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
366 .port_power = &sl811_port_power,
370 static struct platform_device sl811_hcd_device = {
374 .platform_data = &sl811_priv,
376 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
377 .resource = sl811_hcd_resources,
381 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
382 static struct resource isp1362_hcd_resources[] = {
386 .flags = IORESOURCE_MEM,
390 .flags = IORESOURCE_MEM,
392 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
393 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
394 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
398 static struct isp1362_platform_data isp1362_priv = {
403 .int_edge_triggered = 0,
404 .remote_wakeup_connected = 0,
405 .no_power_switching = 1,
406 .power_switching_mode = 0,
409 static struct platform_device isp1362_hcd_device = {
410 .name = "isp1362-hcd",
413 .platform_data = &isp1362_priv,
415 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
416 .resource = isp1362_hcd_resources,
420 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
421 static struct platform_device bfin_mii_bus = {
422 .name = "bfin_mii_bus",
425 static struct platform_device bfin_mac_device = {
427 .dev.platform_data = &bfin_mii_bus,
431 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
432 static struct resource net2272_bfin_resources[] = {
435 .end = 0x20300000 + 0x100,
436 .flags = IORESOURCE_MEM,
440 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
444 static struct platform_device net2272_bfin_device = {
447 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
448 .resource = net2272_bfin_resources,
452 #if defined(CONFIG_MTD_M25P80) \
453 || defined(CONFIG_MTD_M25P80_MODULE)
454 static struct mtd_partition bfin_spi_flash_partitions[] = {
456 .name = "bootloader(spi)",
459 .mask_flags = MTD_CAP_ROM
461 .name = "linux kernel(spi)",
462 .size = MTDPART_SIZ_FULL,
463 .offset = MTDPART_OFS_APPEND,
467 static struct flash_platform_data bfin_spi_flash_data = {
469 .parts = bfin_spi_flash_partitions,
470 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
474 /* SPI flash chip (m25p64) */
475 static struct bfin5xx_spi_chip spi_flash_chip_info = {
476 .enable_dma = 0, /* use dma transfer with this chip*/
481 #if defined(CONFIG_BFIN_SPI_ADC) \
482 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
484 static struct bfin5xx_spi_chip spi_adc_chip_info = {
485 .enable_dma = 1, /* use dma transfer with this chip*/
490 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
491 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
492 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
498 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
499 static struct bfin5xx_spi_chip mmc_spi_chip_info = {
505 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
506 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
511 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
513 .vref_delay_usecs = 50, /* internal, no capacitor */
516 .pressure_max = 1000,
518 .stopacq_polarity = 1,
519 .first_conversion_delay = 3,
520 .acquisition_time = 1,
522 .pen_down_acc_interval = 1,
526 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
527 && defined(CONFIG_SND_SOC_WM8731_SPI)
528 static struct bfin5xx_spi_chip spi_wm8731_chip_info = {
534 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
535 static struct bfin5xx_spi_chip spidev_chip_info = {
541 static struct spi_board_info bfin_spi_board_info[] __initdata = {
542 #if defined(CONFIG_MTD_M25P80) \
543 || defined(CONFIG_MTD_M25P80_MODULE)
545 /* the modalias must be the same as spi device driver name */
546 .modalias = "m25p80", /* Name of spi_driver for this device */
547 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
548 .bus_num = 0, /* Framework bus number */
549 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
550 .platform_data = &bfin_spi_flash_data,
551 .controller_data = &spi_flash_chip_info,
556 #if defined(CONFIG_BFIN_SPI_ADC) \
557 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
559 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
560 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
561 .bus_num = 0, /* Framework bus number */
562 .chip_select = 1, /* Framework chip select. */
563 .platform_data = NULL, /* No spi_driver specific config */
564 .controller_data = &spi_adc_chip_info,
568 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
569 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
571 .modalias = "ad1836-spi",
572 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
574 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
575 .controller_data = &ad1836_spi_chip_info,
578 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
580 .modalias = "mmc_spi",
581 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
584 .controller_data = &mmc_spi_chip_info,
588 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
590 .modalias = "ad7877",
591 .platform_data = &bfin_ad7877_ts_info,
593 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
596 .controller_data = &spi_ad7877_chip_info,
599 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
600 && defined(CONFIG_SND_SOC_WM8731_SPI)
602 .modalias = "wm8731",
603 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
606 .controller_data = &spi_wm8731_chip_info,
610 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
612 .modalias = "spidev",
613 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
616 .controller_data = &spidev_chip_info,
621 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
622 /* SPI controller data */
623 static struct bfin5xx_spi_master bfin_spi0_info = {
625 .enable_dma = 1, /* master has the ability to do dma transfer */
626 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
630 static struct resource bfin_spi0_resource[] = {
632 .start = SPI0_REGBASE,
633 .end = SPI0_REGBASE + 0xFF,
634 .flags = IORESOURCE_MEM,
639 .flags = IORESOURCE_DMA,
644 .flags = IORESOURCE_IRQ,
648 static struct platform_device bfin_spi0_device = {
650 .id = 0, /* Bus number */
651 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
652 .resource = bfin_spi0_resource,
654 .platform_data = &bfin_spi0_info, /* Passed to driver */
657 #endif /* spi master and devices */
659 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
660 static struct platform_device bfin_fb_adv7393_device = {
661 .name = "bfin-adv7393",
665 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
666 static struct resource bfin_uart_resources[] = {
667 #ifdef CONFIG_SERIAL_BFIN_UART0
671 .flags = IORESOURCE_MEM,
674 #ifdef CONFIG_SERIAL_BFIN_UART1
678 .flags = IORESOURCE_MEM,
683 static struct platform_device bfin_uart_device = {
686 .num_resources = ARRAY_SIZE(bfin_uart_resources),
687 .resource = bfin_uart_resources,
691 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
692 #ifdef CONFIG_BFIN_SIR0
693 static struct resource bfin_sir0_resources[] = {
697 .flags = IORESOURCE_MEM,
700 .start = IRQ_UART0_RX,
701 .end = IRQ_UART0_RX+1,
702 .flags = IORESOURCE_IRQ,
705 .start = CH_UART0_RX,
706 .end = CH_UART0_RX+1,
707 .flags = IORESOURCE_DMA,
711 static struct platform_device bfin_sir0_device = {
714 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
715 .resource = bfin_sir0_resources,
718 #ifdef CONFIG_BFIN_SIR1
719 static struct resource bfin_sir1_resources[] = {
723 .flags = IORESOURCE_MEM,
726 .start = IRQ_UART1_RX,
727 .end = IRQ_UART1_RX+1,
728 .flags = IORESOURCE_IRQ,
731 .start = CH_UART1_RX,
732 .end = CH_UART1_RX+1,
733 .flags = IORESOURCE_DMA,
737 static struct platform_device bfin_sir1_device = {
740 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
741 .resource = bfin_sir1_resources,
746 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
747 static struct resource bfin_twi0_resource[] = {
749 .start = TWI0_REGBASE,
751 .flags = IORESOURCE_MEM,
756 .flags = IORESOURCE_IRQ,
760 static struct platform_device i2c_bfin_twi_device = {
761 .name = "i2c-bfin-twi",
763 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
764 .resource = bfin_twi0_resource,
768 static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
769 #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
771 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
774 #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
776 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
782 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
783 static struct platform_device bfin_sport0_uart_device = {
784 .name = "bfin-sport-uart",
788 static struct platform_device bfin_sport1_uart_device = {
789 .name = "bfin-sport-uart",
794 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
795 #include <linux/input.h>
796 #include <linux/gpio_keys.h>
798 static struct gpio_keys_button bfin_gpio_keys_table[] = {
799 {BTN_0, GPIO_PF14, 1, "gpio-keys: BTN0"},
802 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
803 .buttons = bfin_gpio_keys_table,
804 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
807 static struct platform_device bfin_device_gpiokeys = {
810 .platform_data = &bfin_gpio_keys_data,
815 static struct resource bfin_gpios_resources = {
817 .end = MAX_BLACKFIN_GPIOS - 1,
818 .flags = IORESOURCE_IRQ,
821 static struct platform_device bfin_gpios_device = {
822 .name = "simple-gpio",
825 .resource = &bfin_gpios_resources,
828 static const unsigned int cclk_vlev_datasheet[] =
830 VRPAIR(VLEV_100, 400000000),
831 VRPAIR(VLEV_105, 426000000),
832 VRPAIR(VLEV_110, 500000000),
833 VRPAIR(VLEV_115, 533000000),
834 VRPAIR(VLEV_120, 600000000),
837 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
838 .tuple_tab = cclk_vlev_datasheet,
839 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
840 .vr_settling_time = 25 /* us */,
843 static struct platform_device bfin_dpmc = {
846 .platform_data = &bfin_dmpc_vreg_data,
850 static struct platform_device *stamp_devices[] __initdata = {
854 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
858 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
859 &bfin_pcmcia_cf_device,
862 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
866 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
870 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
874 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
875 &bfin_isp1760_device,
878 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
882 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
886 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
890 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
895 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
896 &net2272_bfin_device,
899 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
903 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
904 &bfin_fb_adv7393_device,
907 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
911 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
912 #ifdef CONFIG_BFIN_SIR0
915 #ifdef CONFIG_BFIN_SIR1
920 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
921 &i2c_bfin_twi_device,
924 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
925 &bfin_sport0_uart_device,
926 &bfin_sport1_uart_device,
929 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
930 &bfin_device_gpiokeys,
933 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
940 static int __init cm_init(void)
942 printk(KERN_INFO "%s(): registering device resources\n", __func__);
943 i2c_register_board_info(0, bfin_i2c_board_info,
944 ARRAY_SIZE(bfin_i2c_board_info));
945 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
946 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
950 arch_initcall(cm_init);
952 void native_machine_restart(char *cmd)
954 /* workaround reboot hang when booting from SPI */
955 if ((bfin_read_SYSCR() & 0x7) == 0x3)
956 bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
959 void bfin_get_ether_addr(char *addr)
961 random_ether_addr(addr);
962 printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
964 EXPORT_SYMBOL(bfin_get_ether_addr);