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 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
47 #include <linux/usb/musb.h>
51 #include <asm/bfin5xx_spi.h>
52 #include <asm/reboot.h>
54 #include <asm/portmux.h>
56 #include <linux/spi/ad7877.h>
59 * Name the Board for the /proc/cpuinfo
61 const char bfin_board_name[] = "Bluetechnix CM-BF527";
64 * Driver needs to know address, irq and flag pin.
67 #define ISP1761_BASE 0x203C0000
68 #define ISP1761_IRQ IRQ_PF7
70 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
71 static struct resource bfin_isp1761_resources[] = {
73 .name = "isp1761-regs",
74 .start = ISP1761_BASE + 0x00000000,
75 .end = ISP1761_BASE + 0x000fffff,
76 .flags = IORESOURCE_MEM,
81 .flags = IORESOURCE_IRQ,
85 static struct platform_device bfin_isp1761_device = {
88 .num_resources = ARRAY_SIZE(bfin_isp1761_resources),
89 .resource = bfin_isp1761_resources,
92 static struct platform_device *bfin_isp1761_devices[] = {
96 int __init bfin_isp1761_init(void)
98 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
100 printk(KERN_INFO "%s(): registering device resources\n", __func__);
101 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
103 return platform_add_devices(bfin_isp1761_devices, num_devices);
106 void __exit bfin_isp1761_exit(void)
108 platform_device_unregister(&bfin_isp1761_device);
111 arch_initcall(bfin_isp1761_init);
114 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
115 static struct resource musb_resources[] = {
119 .flags = IORESOURCE_MEM,
121 [1] = { /* general IRQ */
122 .start = IRQ_USB_INT0,
124 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
126 [2] = { /* DMA IRQ */
127 .start = IRQ_USB_DMA,
129 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
133 static struct musb_hdrc_platform_data musb_plat = {
134 #if defined(CONFIG_USB_MUSB_OTG)
136 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
138 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
139 .mode = MUSB_PERIPHERAL,
144 static u64 musb_dmamask = ~(u32)0;
146 static struct platform_device musb_device = {
150 .dma_mask = &musb_dmamask,
151 .coherent_dma_mask = 0xffffffff,
152 .platform_data = &musb_plat,
154 .num_resources = ARRAY_SIZE(musb_resources),
155 .resource = musb_resources,
159 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
160 static struct mtd_partition ezkit_partitions[] = {
162 .name = "bootloader(nor)",
166 .name = "linux kernel(nor)",
168 .offset = MTDPART_OFS_APPEND,
170 .name = "file system(nor)",
171 .size = MTDPART_SIZ_FULL,
172 .offset = MTDPART_OFS_APPEND,
176 static struct physmap_flash_data ezkit_flash_data = {
178 .parts = ezkit_partitions,
179 .nr_parts = ARRAY_SIZE(ezkit_partitions),
182 static struct resource ezkit_flash_resource = {
185 .flags = IORESOURCE_MEM,
188 static struct platform_device ezkit_flash_device = {
189 .name = "physmap-flash",
192 .platform_data = &ezkit_flash_data,
195 .resource = &ezkit_flash_resource,
199 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
200 static struct mtd_partition partition_info[] = {
202 .name = "linux kernel(nand)",
207 .name = "file system(nand)",
208 .offset = MTDPART_OFS_APPEND,
209 .size = MTDPART_SIZ_FULL,
213 static struct bf5xx_nand_platform bf5xx_nand_platform = {
214 .page_size = NFC_PG_SIZE_256,
215 .data_width = NFC_NWIDTH_8,
216 .partitions = partition_info,
217 .nr_partitions = ARRAY_SIZE(partition_info),
222 static struct resource bf5xx_nand_resources[] = {
225 .end = NFC_DATA_RD + 2,
226 .flags = IORESOURCE_MEM,
231 .flags = IORESOURCE_IRQ,
235 static struct platform_device bf5xx_nand_device = {
236 .name = "bf5xx-nand",
238 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
239 .resource = bf5xx_nand_resources,
241 .platform_data = &bf5xx_nand_platform,
246 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
247 static struct resource bfin_pcmcia_cf_resources[] = {
249 .start = 0x20310000, /* IO PORT */
251 .flags = IORESOURCE_MEM,
253 .start = 0x20311000, /* Attribute Memory */
255 .flags = IORESOURCE_MEM,
259 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
261 .start = 6, /* Card Detect PF6 */
263 .flags = IORESOURCE_IRQ,
267 static struct platform_device bfin_pcmcia_cf_device = {
268 .name = "bfin_cf_pcmcia",
270 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
271 .resource = bfin_pcmcia_cf_resources,
275 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
276 static struct platform_device rtc_device = {
282 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
283 static struct resource smc91x_resources[] = {
285 .name = "smc91x-regs",
287 .end = 0x20300300 + 16,
288 .flags = IORESOURCE_MEM,
293 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
296 static struct platform_device smc91x_device = {
299 .num_resources = ARRAY_SIZE(smc91x_resources),
300 .resource = smc91x_resources,
304 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
305 static struct resource dm9000_resources[] = {
308 .end = 0x203FB800 + 8,
309 .flags = IORESOURCE_MEM,
314 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
318 static struct platform_device dm9000_device = {
321 .num_resources = ARRAY_SIZE(dm9000_resources),
322 .resource = dm9000_resources,
326 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
327 static struct resource sl811_hcd_resources[] = {
331 .flags = IORESOURCE_MEM,
335 .flags = IORESOURCE_MEM,
337 .start = CONFIG_USB_SL811_BFIN_IRQ,
338 .end = CONFIG_USB_SL811_BFIN_IRQ,
339 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
343 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
344 void sl811_port_power(struct device *dev, int is_on)
346 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
347 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
351 static struct sl811_platform_data sl811_priv = {
353 .power = 250, /* == 500mA */
354 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
355 .port_power = &sl811_port_power,
359 static struct platform_device sl811_hcd_device = {
363 .platform_data = &sl811_priv,
365 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
366 .resource = sl811_hcd_resources,
370 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
371 static struct resource isp1362_hcd_resources[] = {
375 .flags = IORESOURCE_MEM,
379 .flags = IORESOURCE_MEM,
381 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
382 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
383 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
387 static struct isp1362_platform_data isp1362_priv = {
392 .int_edge_triggered = 0,
393 .remote_wakeup_connected = 0,
394 .no_power_switching = 1,
395 .power_switching_mode = 0,
398 static struct platform_device isp1362_hcd_device = {
399 .name = "isp1362-hcd",
402 .platform_data = &isp1362_priv,
404 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
405 .resource = isp1362_hcd_resources,
409 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
410 static struct platform_device bfin_mac_device = {
415 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
416 static struct resource net2272_bfin_resources[] = {
419 .end = 0x20300000 + 0x100,
420 .flags = IORESOURCE_MEM,
424 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
428 static struct platform_device net2272_bfin_device = {
431 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
432 .resource = net2272_bfin_resources,
436 #if defined(CONFIG_MTD_M25P80) \
437 || defined(CONFIG_MTD_M25P80_MODULE)
438 static struct mtd_partition bfin_spi_flash_partitions[] = {
440 .name = "bootloader(spi)",
443 .mask_flags = MTD_CAP_ROM
445 .name = "linux kernel(spi)",
446 .size = MTDPART_SIZ_FULL,
447 .offset = MTDPART_OFS_APPEND,
451 static struct flash_platform_data bfin_spi_flash_data = {
453 .parts = bfin_spi_flash_partitions,
454 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
458 /* SPI flash chip (m25p64) */
459 static struct bfin5xx_spi_chip spi_flash_chip_info = {
460 .enable_dma = 0, /* use dma transfer with this chip*/
465 #if defined(CONFIG_SPI_ADC_BF533) \
466 || defined(CONFIG_SPI_ADC_BF533_MODULE)
468 static struct bfin5xx_spi_chip spi_adc_chip_info = {
469 .enable_dma = 1, /* use dma transfer with this chip*/
474 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
475 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
476 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
482 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
483 static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
489 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
490 static struct bfin5xx_spi_chip spi_mmc_chip_info = {
496 #if defined(CONFIG_PBX)
497 static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
498 .ctl_reg = 0x4, /* send zero */
501 .cs_change_per_word = 1,
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_SPI_ADC_BF533) \
557 || defined(CONFIG_SPI_ADC_BF533_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_AD9960) || defined(CONFIG_AD9960_MODULE)
580 .modalias = "ad9960-spi",
581 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
584 .controller_data = &ad9960_spi_chip_info,
587 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
589 .modalias = "spi_mmc_dummy",
590 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
593 .platform_data = NULL,
594 .controller_data = &spi_mmc_chip_info,
598 .modalias = "spi_mmc",
599 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
601 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
602 .platform_data = NULL,
603 .controller_data = &spi_mmc_chip_info,
607 #if defined(CONFIG_PBX)
609 .modalias = "fxs-spi",
610 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
612 .chip_select = 8 - CONFIG_J11_JUMPER,
613 .controller_data = &spi_si3xxx_chip_info,
617 .modalias = "fxo-spi",
618 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
620 .chip_select = 8 - CONFIG_J19_JUMPER,
621 .controller_data = &spi_si3xxx_chip_info,
625 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
627 .modalias = "ad7877",
628 .platform_data = &bfin_ad7877_ts_info,
630 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
633 .controller_data = &spi_ad7877_chip_info,
636 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
637 && defined(CONFIG_SND_SOC_WM8731_SPI)
639 .modalias = "wm8731",
640 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
643 .controller_data = &spi_wm8731_chip_info,
647 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
649 .modalias = "spidev",
650 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
653 .controller_data = &spidev_chip_info,
658 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
659 /* SPI controller data */
660 static struct bfin5xx_spi_master bfin_spi0_info = {
662 .enable_dma = 1, /* master has the ability to do dma transfer */
663 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
667 static struct resource bfin_spi0_resource[] = {
669 .start = SPI0_REGBASE,
670 .end = SPI0_REGBASE + 0xFF,
671 .flags = IORESOURCE_MEM,
676 .flags = IORESOURCE_IRQ,
680 static struct platform_device bfin_spi0_device = {
682 .id = 0, /* Bus number */
683 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
684 .resource = bfin_spi0_resource,
686 .platform_data = &bfin_spi0_info, /* Passed to driver */
689 #endif /* spi master and devices */
691 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
692 static struct platform_device bfin_fb_adv7393_device = {
693 .name = "bfin-adv7393",
697 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
698 static struct resource bfin_uart_resources[] = {
699 #ifdef CONFIG_SERIAL_BFIN_UART0
703 .flags = IORESOURCE_MEM,
706 #ifdef CONFIG_SERIAL_BFIN_UART1
710 .flags = IORESOURCE_MEM,
715 static struct platform_device bfin_uart_device = {
718 .num_resources = ARRAY_SIZE(bfin_uart_resources),
719 .resource = bfin_uart_resources,
723 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
724 static struct resource bfin_sir_resources[] = {
725 #ifdef CONFIG_BFIN_SIR0
729 .flags = IORESOURCE_MEM,
732 #ifdef CONFIG_BFIN_SIR1
736 .flags = IORESOURCE_MEM,
741 static struct platform_device bfin_sir_device = {
744 .num_resources = ARRAY_SIZE(bfin_sir_resources),
745 .resource = bfin_sir_resources,
749 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
750 static struct resource bfin_twi0_resource[] = {
752 .start = TWI0_REGBASE,
754 .flags = IORESOURCE_MEM,
759 .flags = IORESOURCE_IRQ,
763 static struct platform_device i2c_bfin_twi_device = {
764 .name = "i2c-bfin-twi",
766 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
767 .resource = bfin_twi0_resource,
771 #ifdef CONFIG_I2C_BOARDINFO
772 static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
773 #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
775 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
776 .type = "pcf8574_lcd",
779 #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
781 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
782 .type = "pcf8574_keypad",
789 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
790 static struct platform_device bfin_sport0_uart_device = {
791 .name = "bfin-sport-uart",
795 static struct platform_device bfin_sport1_uart_device = {
796 .name = "bfin-sport-uart",
801 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
802 #include <linux/input.h>
803 #include <linux/gpio_keys.h>
805 static struct gpio_keys_button bfin_gpio_keys_table[] = {
806 {BTN_0, GPIO_PF14, 1, "gpio-keys: BTN0"},
809 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
810 .buttons = bfin_gpio_keys_table,
811 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
814 static struct platform_device bfin_device_gpiokeys = {
817 .platform_data = &bfin_gpio_keys_data,
822 static struct resource bfin_gpios_resources = {
824 .end = MAX_BLACKFIN_GPIOS - 1,
825 .flags = IORESOURCE_IRQ,
828 static struct platform_device bfin_gpios_device = {
829 .name = "simple-gpio",
832 .resource = &bfin_gpios_resources,
835 static const unsigned int cclk_vlev_datasheet[] =
837 VRPAIR(VLEV_100, 400000000),
838 VRPAIR(VLEV_105, 426000000),
839 VRPAIR(VLEV_110, 500000000),
840 VRPAIR(VLEV_115, 533000000),
841 VRPAIR(VLEV_120, 600000000),
844 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
845 .tuple_tab = cclk_vlev_datasheet,
846 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
847 .vr_settling_time = 25 /* us */,
850 static struct platform_device bfin_dpmc = {
853 .platform_data = &bfin_dmpc_vreg_data,
857 static struct platform_device *stamp_devices[] __initdata = {
861 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
865 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
866 &bfin_pcmcia_cf_device,
869 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
873 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
877 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
881 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
885 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
889 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
893 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
897 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
898 &net2272_bfin_device,
901 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
905 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
906 &bfin_fb_adv7393_device,
909 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
913 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
917 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
918 &i2c_bfin_twi_device,
921 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
922 &bfin_sport0_uart_device,
923 &bfin_sport1_uart_device,
926 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
927 &bfin_device_gpiokeys,
930 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
937 static int __init stamp_init(void)
939 printk(KERN_INFO "%s(): registering device resources\n", __func__);
941 #ifdef CONFIG_I2C_BOARDINFO
942 i2c_register_board_info(0, bfin_i2c_board_info,
943 ARRAY_SIZE(bfin_i2c_board_info));
946 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
947 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
951 arch_initcall(stamp_init);
953 void native_machine_restart(char *cmd)
955 /* workaround reboot hang when booting from SPI */
956 if ((bfin_read_SYSCR() & 0x7) == 0x3)
957 bfin_gpio_reset_spi0_ssel1();
960 void bfin_get_ether_addr(char *addr)
962 random_ether_addr(addr);
963 printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
965 EXPORT_SYMBOL(bfin_get_ether_addr);