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>
49 #include <asm/bfin5xx_spi.h>
50 #include <asm/reboot.h>
52 #include <asm/portmux.h>
54 #include <linux/spi/ad7877.h>
57 * Name the Board for the /proc/cpuinfo
59 const char bfin_board_name[] = "Bluetechnix CM-BF527";
62 * Driver needs to know address, irq and flag pin.
65 #define ISP1761_BASE 0x203C0000
66 #define ISP1761_IRQ IRQ_PF7
68 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
69 static struct resource bfin_isp1761_resources[] = {
71 .name = "isp1761-regs",
72 .start = ISP1761_BASE + 0x00000000,
73 .end = ISP1761_BASE + 0x000fffff,
74 .flags = IORESOURCE_MEM,
79 .flags = IORESOURCE_IRQ,
83 static struct platform_device bfin_isp1761_device = {
86 .num_resources = ARRAY_SIZE(bfin_isp1761_resources),
87 .resource = bfin_isp1761_resources,
90 static struct platform_device *bfin_isp1761_devices[] = {
94 int __init bfin_isp1761_init(void)
96 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
98 printk(KERN_INFO "%s(): registering device resources\n", __func__);
99 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
101 return platform_add_devices(bfin_isp1761_devices, num_devices);
104 void __exit bfin_isp1761_exit(void)
106 platform_device_unregister(&bfin_isp1761_device);
109 arch_initcall(bfin_isp1761_init);
112 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
113 static struct resource musb_resources[] = {
117 .flags = IORESOURCE_MEM,
119 [1] = { /* general IRQ */
120 .start = IRQ_USB_INT0,
122 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
124 [2] = { /* DMA IRQ */
125 .start = IRQ_USB_DMA,
127 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
131 static struct musb_hdrc_config musb_config = {
138 .gpio_vrsel = GPIO_PF11,
141 static struct musb_hdrc_platform_data musb_plat = {
142 #if defined(CONFIG_USB_MUSB_OTG)
144 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
146 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
147 .mode = MUSB_PERIPHERAL,
149 .config = &musb_config,
152 static u64 musb_dmamask = ~(u32)0;
154 static struct platform_device musb_device = {
158 .dma_mask = &musb_dmamask,
159 .coherent_dma_mask = 0xffffffff,
160 .platform_data = &musb_plat,
162 .num_resources = ARRAY_SIZE(musb_resources),
163 .resource = musb_resources,
167 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
168 static struct mtd_partition ezkit_partitions[] = {
170 .name = "bootloader(nor)",
174 .name = "linux kernel(nor)",
176 .offset = MTDPART_OFS_APPEND,
178 .name = "file system(nor)",
179 .size = MTDPART_SIZ_FULL,
180 .offset = MTDPART_OFS_APPEND,
184 static struct physmap_flash_data ezkit_flash_data = {
186 .parts = ezkit_partitions,
187 .nr_parts = ARRAY_SIZE(ezkit_partitions),
190 static struct resource ezkit_flash_resource = {
193 .flags = IORESOURCE_MEM,
196 static struct platform_device ezkit_flash_device = {
197 .name = "physmap-flash",
200 .platform_data = &ezkit_flash_data,
203 .resource = &ezkit_flash_resource,
207 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
208 static struct mtd_partition partition_info[] = {
210 .name = "linux kernel(nand)",
215 .name = "file system(nand)",
216 .offset = MTDPART_OFS_APPEND,
217 .size = MTDPART_SIZ_FULL,
221 static struct bf5xx_nand_platform bf5xx_nand_platform = {
222 .page_size = NFC_PG_SIZE_256,
223 .data_width = NFC_NWIDTH_8,
224 .partitions = partition_info,
225 .nr_partitions = ARRAY_SIZE(partition_info),
230 static struct resource bf5xx_nand_resources[] = {
233 .end = NFC_DATA_RD + 2,
234 .flags = IORESOURCE_MEM,
239 .flags = IORESOURCE_IRQ,
243 static struct platform_device bf5xx_nand_device = {
244 .name = "bf5xx-nand",
246 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
247 .resource = bf5xx_nand_resources,
249 .platform_data = &bf5xx_nand_platform,
254 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
255 static struct resource bfin_pcmcia_cf_resources[] = {
257 .start = 0x20310000, /* IO PORT */
259 .flags = IORESOURCE_MEM,
261 .start = 0x20311000, /* Attribute Memory */
263 .flags = IORESOURCE_MEM,
267 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
269 .start = 6, /* Card Detect PF6 */
271 .flags = IORESOURCE_IRQ,
275 static struct platform_device bfin_pcmcia_cf_device = {
276 .name = "bfin_cf_pcmcia",
278 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
279 .resource = bfin_pcmcia_cf_resources,
283 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
284 static struct platform_device rtc_device = {
290 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
291 static struct resource smc91x_resources[] = {
293 .name = "smc91x-regs",
295 .end = 0x20300300 + 16,
296 .flags = IORESOURCE_MEM,
301 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
304 static struct platform_device smc91x_device = {
307 .num_resources = ARRAY_SIZE(smc91x_resources),
308 .resource = smc91x_resources,
312 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
313 static struct resource dm9000_resources[] = {
316 .end = 0x203FB800 + 8,
317 .flags = IORESOURCE_MEM,
322 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
326 static struct platform_device dm9000_device = {
329 .num_resources = ARRAY_SIZE(dm9000_resources),
330 .resource = dm9000_resources,
334 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
335 static struct resource sl811_hcd_resources[] = {
339 .flags = IORESOURCE_MEM,
343 .flags = IORESOURCE_MEM,
345 .start = CONFIG_USB_SL811_BFIN_IRQ,
346 .end = CONFIG_USB_SL811_BFIN_IRQ,
347 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
351 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
352 void sl811_port_power(struct device *dev, int is_on)
354 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
355 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
359 static struct sl811_platform_data sl811_priv = {
361 .power = 250, /* == 500mA */
362 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
363 .port_power = &sl811_port_power,
367 static struct platform_device sl811_hcd_device = {
371 .platform_data = &sl811_priv,
373 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
374 .resource = sl811_hcd_resources,
378 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
379 static struct resource isp1362_hcd_resources[] = {
383 .flags = IORESOURCE_MEM,
387 .flags = IORESOURCE_MEM,
389 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
390 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
391 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
395 static struct isp1362_platform_data isp1362_priv = {
400 .int_edge_triggered = 0,
401 .remote_wakeup_connected = 0,
402 .no_power_switching = 1,
403 .power_switching_mode = 0,
406 static struct platform_device isp1362_hcd_device = {
407 .name = "isp1362-hcd",
410 .platform_data = &isp1362_priv,
412 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
413 .resource = isp1362_hcd_resources,
417 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
418 static struct platform_device bfin_mac_device = {
423 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
424 static struct resource net2272_bfin_resources[] = {
427 .end = 0x20300000 + 0x100,
428 .flags = IORESOURCE_MEM,
432 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
436 static struct platform_device net2272_bfin_device = {
439 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
440 .resource = net2272_bfin_resources,
444 #if defined(CONFIG_MTD_M25P80) \
445 || defined(CONFIG_MTD_M25P80_MODULE)
446 static struct mtd_partition bfin_spi_flash_partitions[] = {
448 .name = "bootloader(spi)",
451 .mask_flags = MTD_CAP_ROM
453 .name = "linux kernel(spi)",
454 .size = MTDPART_SIZ_FULL,
455 .offset = MTDPART_OFS_APPEND,
459 static struct flash_platform_data bfin_spi_flash_data = {
461 .parts = bfin_spi_flash_partitions,
462 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
466 /* SPI flash chip (m25p64) */
467 static struct bfin5xx_spi_chip spi_flash_chip_info = {
468 .enable_dma = 0, /* use dma transfer with this chip*/
473 #if defined(CONFIG_SPI_ADC_BF533) \
474 || defined(CONFIG_SPI_ADC_BF533_MODULE)
476 static struct bfin5xx_spi_chip spi_adc_chip_info = {
477 .enable_dma = 1, /* use dma transfer with this chip*/
482 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
483 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
484 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
490 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
491 static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
497 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
498 static struct bfin5xx_spi_chip spi_mmc_chip_info = {
504 #if defined(CONFIG_PBX)
505 static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
506 .ctl_reg = 0x4, /* send zero */
509 .cs_change_per_word = 1,
513 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
514 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
519 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
521 .vref_delay_usecs = 50, /* internal, no capacitor */
524 .pressure_max = 1000,
526 .stopacq_polarity = 1,
527 .first_conversion_delay = 3,
528 .acquisition_time = 1,
530 .pen_down_acc_interval = 1,
534 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
535 && defined(CONFIG_SND_SOC_WM8731_SPI)
536 static struct bfin5xx_spi_chip spi_wm8731_chip_info = {
542 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
543 static struct bfin5xx_spi_chip spidev_chip_info = {
549 static struct spi_board_info bfin_spi_board_info[] __initdata = {
550 #if defined(CONFIG_MTD_M25P80) \
551 || defined(CONFIG_MTD_M25P80_MODULE)
553 /* the modalias must be the same as spi device driver name */
554 .modalias = "m25p80", /* Name of spi_driver for this device */
555 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
556 .bus_num = 0, /* Framework bus number */
557 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
558 .platform_data = &bfin_spi_flash_data,
559 .controller_data = &spi_flash_chip_info,
564 #if defined(CONFIG_SPI_ADC_BF533) \
565 || defined(CONFIG_SPI_ADC_BF533_MODULE)
567 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
568 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
569 .bus_num = 0, /* Framework bus number */
570 .chip_select = 1, /* Framework chip select. */
571 .platform_data = NULL, /* No spi_driver specific config */
572 .controller_data = &spi_adc_chip_info,
576 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
577 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
579 .modalias = "ad1836-spi",
580 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
582 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
583 .controller_data = &ad1836_spi_chip_info,
586 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
588 .modalias = "ad9960-spi",
589 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
592 .controller_data = &ad9960_spi_chip_info,
595 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
597 .modalias = "spi_mmc_dummy",
598 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
601 .platform_data = NULL,
602 .controller_data = &spi_mmc_chip_info,
606 .modalias = "spi_mmc",
607 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
609 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
610 .platform_data = NULL,
611 .controller_data = &spi_mmc_chip_info,
615 #if defined(CONFIG_PBX)
617 .modalias = "fxs-spi",
618 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
620 .chip_select = 8 - CONFIG_J11_JUMPER,
621 .controller_data = &spi_si3xxx_chip_info,
625 .modalias = "fxo-spi",
626 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
628 .chip_select = 8 - CONFIG_J19_JUMPER,
629 .controller_data = &spi_si3xxx_chip_info,
633 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
635 .modalias = "ad7877",
636 .platform_data = &bfin_ad7877_ts_info,
638 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
641 .controller_data = &spi_ad7877_chip_info,
644 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
645 && defined(CONFIG_SND_SOC_WM8731_SPI)
647 .modalias = "wm8731",
648 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
651 .controller_data = &spi_wm8731_chip_info,
655 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
657 .modalias = "spidev",
658 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
661 .controller_data = &spidev_chip_info,
666 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
667 /* SPI controller data */
668 static struct bfin5xx_spi_master bfin_spi0_info = {
670 .enable_dma = 1, /* master has the ability to do dma transfer */
671 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
675 static struct resource bfin_spi0_resource[] = {
677 .start = SPI0_REGBASE,
678 .end = SPI0_REGBASE + 0xFF,
679 .flags = IORESOURCE_MEM,
684 .flags = IORESOURCE_IRQ,
688 static struct platform_device bfin_spi0_device = {
690 .id = 0, /* Bus number */
691 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
692 .resource = bfin_spi0_resource,
694 .platform_data = &bfin_spi0_info, /* Passed to driver */
697 #endif /* spi master and devices */
699 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
700 static struct platform_device bfin_fb_adv7393_device = {
701 .name = "bfin-adv7393",
705 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
706 static struct resource bfin_uart_resources[] = {
707 #ifdef CONFIG_SERIAL_BFIN_UART0
711 .flags = IORESOURCE_MEM,
714 #ifdef CONFIG_SERIAL_BFIN_UART1
718 .flags = IORESOURCE_MEM,
723 static struct platform_device bfin_uart_device = {
726 .num_resources = ARRAY_SIZE(bfin_uart_resources),
727 .resource = bfin_uart_resources,
731 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
732 static struct resource bfin_sir_resources[] = {
733 #ifdef CONFIG_BFIN_SIR0
737 .flags = IORESOURCE_MEM,
740 #ifdef CONFIG_BFIN_SIR1
744 .flags = IORESOURCE_MEM,
749 static struct platform_device bfin_sir_device = {
752 .num_resources = ARRAY_SIZE(bfin_sir_resources),
753 .resource = bfin_sir_resources,
757 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
758 static struct resource bfin_twi0_resource[] = {
760 .start = TWI0_REGBASE,
762 .flags = IORESOURCE_MEM,
767 .flags = IORESOURCE_IRQ,
771 static struct platform_device i2c_bfin_twi_device = {
772 .name = "i2c-bfin-twi",
774 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
775 .resource = bfin_twi0_resource,
779 #ifdef CONFIG_I2C_BOARDINFO
780 static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
781 #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
783 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
784 .type = "pcf8574_lcd",
787 #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
789 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
790 .type = "pcf8574_keypad",
797 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
798 static struct platform_device bfin_sport0_uart_device = {
799 .name = "bfin-sport-uart",
803 static struct platform_device bfin_sport1_uart_device = {
804 .name = "bfin-sport-uart",
809 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
810 #include <linux/input.h>
811 #include <linux/gpio_keys.h>
813 static struct gpio_keys_button bfin_gpio_keys_table[] = {
814 {BTN_0, GPIO_PF14, 1, "gpio-keys: BTN0"},
817 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
818 .buttons = bfin_gpio_keys_table,
819 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
822 static struct platform_device bfin_device_gpiokeys = {
825 .platform_data = &bfin_gpio_keys_data,
830 static struct resource bfin_gpios_resources = {
832 .end = MAX_BLACKFIN_GPIOS - 1,
833 .flags = IORESOURCE_IRQ,
836 static struct platform_device bfin_gpios_device = {
837 .name = "simple-gpio",
840 .resource = &bfin_gpios_resources,
843 static const unsigned int cclk_vlev_datasheet[] =
845 VRPAIR(VLEV_100, 400000000),
846 VRPAIR(VLEV_105, 426000000),
847 VRPAIR(VLEV_110, 500000000),
848 VRPAIR(VLEV_115, 533000000),
849 VRPAIR(VLEV_120, 600000000),
852 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
853 .tuple_tab = cclk_vlev_datasheet,
854 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
855 .vr_settling_time = 25 /* us */,
858 static struct platform_device bfin_dpmc = {
861 .platform_data = &bfin_dmpc_vreg_data,
865 static struct platform_device *stamp_devices[] __initdata = {
869 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
873 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
874 &bfin_pcmcia_cf_device,
877 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
881 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
885 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
889 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
893 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
897 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
901 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
905 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
906 &net2272_bfin_device,
909 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
913 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
914 &bfin_fb_adv7393_device,
917 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
921 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
925 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
926 &i2c_bfin_twi_device,
929 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
930 &bfin_sport0_uart_device,
931 &bfin_sport1_uart_device,
934 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
935 &bfin_device_gpiokeys,
938 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
945 static int __init stamp_init(void)
947 printk(KERN_INFO "%s(): registering device resources\n", __func__);
949 #ifdef CONFIG_I2C_BOARDINFO
950 i2c_register_board_info(0, bfin_i2c_board_info,
951 ARRAY_SIZE(bfin_i2c_board_info));
954 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
955 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
959 arch_initcall(stamp_init);
961 void native_machine_restart(char *cmd)
963 /* workaround reboot hang when booting from SPI */
964 if ((bfin_read_SYSCR() & 0x7) == 0x3)
965 bfin_gpio_reset_spi0_ssel1();
968 void bfin_get_ether_addr(char *addr)
970 random_ether_addr(addr);
971 printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
973 EXPORT_SYMBOL(bfin_get_ether_addr);