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 #define ISP1761_BASE 0x203C0000
65 #define ISP1761_IRQ IRQ_PF7
67 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
68 static struct resource bfin_isp1761_resources[] = {
70 .name = "isp1761-regs",
71 .start = ISP1761_BASE + 0x00000000,
72 .end = ISP1761_BASE + 0x000fffff,
73 .flags = IORESOURCE_MEM,
78 .flags = IORESOURCE_IRQ,
82 static struct platform_device bfin_isp1761_device = {
85 .num_resources = ARRAY_SIZE(bfin_isp1761_resources),
86 .resource = bfin_isp1761_resources,
89 static struct platform_device *bfin_isp1761_devices[] = {
93 int __init bfin_isp1761_init(void)
95 unsigned int num_devices = ARRAY_SIZE(bfin_isp1761_devices);
97 printk(KERN_INFO "%s(): registering device resources\n", __func__);
98 set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
100 return platform_add_devices(bfin_isp1761_devices, num_devices);
103 void __exit bfin_isp1761_exit(void)
105 platform_device_unregister(&bfin_isp1761_device);
108 arch_initcall(bfin_isp1761_init);
111 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
112 static struct resource musb_resources[] = {
116 .flags = IORESOURCE_MEM,
118 [1] = { /* general IRQ */
119 .start = IRQ_USB_INT0,
121 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
123 [2] = { /* DMA IRQ */
124 .start = IRQ_USB_DMA,
126 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
130 static struct musb_hdrc_config musb_config = {
137 .gpio_vrsel = GPIO_PF11,
140 static struct musb_hdrc_platform_data musb_plat = {
141 #if defined(CONFIG_USB_MUSB_OTG)
143 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
145 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
146 .mode = MUSB_PERIPHERAL,
148 .config = &musb_config,
151 static u64 musb_dmamask = ~(u32)0;
153 static struct platform_device musb_device = {
157 .dma_mask = &musb_dmamask,
158 .coherent_dma_mask = 0xffffffff,
159 .platform_data = &musb_plat,
161 .num_resources = ARRAY_SIZE(musb_resources),
162 .resource = musb_resources,
166 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
167 static struct mtd_partition ezkit_partitions[] = {
169 .name = "bootloader(nor)",
173 .name = "linux kernel(nor)",
175 .offset = MTDPART_OFS_APPEND,
177 .name = "file system(nor)",
178 .size = MTDPART_SIZ_FULL,
179 .offset = MTDPART_OFS_APPEND,
183 static struct physmap_flash_data ezkit_flash_data = {
185 .parts = ezkit_partitions,
186 .nr_parts = ARRAY_SIZE(ezkit_partitions),
189 static struct resource ezkit_flash_resource = {
192 .flags = IORESOURCE_MEM,
195 static struct platform_device ezkit_flash_device = {
196 .name = "physmap-flash",
199 .platform_data = &ezkit_flash_data,
202 .resource = &ezkit_flash_resource,
206 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
207 static struct mtd_partition partition_info[] = {
209 .name = "linux kernel(nand)",
211 .size = 4 * 1024 * 1024,
214 .name = "file system(nand)",
215 .offset = MTDPART_OFS_APPEND,
216 .size = MTDPART_SIZ_FULL,
220 static struct bf5xx_nand_platform bf5xx_nand_platform = {
221 .page_size = NFC_PG_SIZE_256,
222 .data_width = NFC_NWIDTH_8,
223 .partitions = partition_info,
224 .nr_partitions = ARRAY_SIZE(partition_info),
229 static struct resource bf5xx_nand_resources[] = {
232 .end = NFC_DATA_RD + 2,
233 .flags = IORESOURCE_MEM,
238 .flags = IORESOURCE_IRQ,
242 static struct platform_device bf5xx_nand_device = {
243 .name = "bf5xx-nand",
245 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
246 .resource = bf5xx_nand_resources,
248 .platform_data = &bf5xx_nand_platform,
253 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
254 static struct resource bfin_pcmcia_cf_resources[] = {
256 .start = 0x20310000, /* IO PORT */
258 .flags = IORESOURCE_MEM,
260 .start = 0x20311000, /* Attribute Memory */
262 .flags = IORESOURCE_MEM,
266 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
268 .start = 6, /* Card Detect PF6 */
270 .flags = IORESOURCE_IRQ,
274 static struct platform_device bfin_pcmcia_cf_device = {
275 .name = "bfin_cf_pcmcia",
277 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
278 .resource = bfin_pcmcia_cf_resources,
282 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
283 static struct platform_device rtc_device = {
289 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
290 static struct resource smc91x_resources[] = {
292 .name = "smc91x-regs",
294 .end = 0x20300300 + 16,
295 .flags = IORESOURCE_MEM,
300 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
303 static struct platform_device smc91x_device = {
306 .num_resources = ARRAY_SIZE(smc91x_resources),
307 .resource = smc91x_resources,
311 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
312 static struct resource dm9000_resources[] = {
315 .end = 0x203FB800 + 8,
316 .flags = IORESOURCE_MEM,
321 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
325 static struct platform_device dm9000_device = {
328 .num_resources = ARRAY_SIZE(dm9000_resources),
329 .resource = dm9000_resources,
333 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
334 static struct resource sl811_hcd_resources[] = {
338 .flags = IORESOURCE_MEM,
342 .flags = IORESOURCE_MEM,
344 .start = CONFIG_USB_SL811_BFIN_IRQ,
345 .end = CONFIG_USB_SL811_BFIN_IRQ,
346 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
350 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
351 void sl811_port_power(struct device *dev, int is_on)
353 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
354 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
358 static struct sl811_platform_data sl811_priv = {
360 .power = 250, /* == 500mA */
361 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
362 .port_power = &sl811_port_power,
366 static struct platform_device sl811_hcd_device = {
370 .platform_data = &sl811_priv,
372 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
373 .resource = sl811_hcd_resources,
377 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
378 static struct resource isp1362_hcd_resources[] = {
382 .flags = IORESOURCE_MEM,
386 .flags = IORESOURCE_MEM,
388 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
389 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
390 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
394 static struct isp1362_platform_data isp1362_priv = {
399 .int_edge_triggered = 0,
400 .remote_wakeup_connected = 0,
401 .no_power_switching = 1,
402 .power_switching_mode = 0,
405 static struct platform_device isp1362_hcd_device = {
406 .name = "isp1362-hcd",
409 .platform_data = &isp1362_priv,
411 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
412 .resource = isp1362_hcd_resources,
416 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
417 static struct platform_device bfin_mac_device = {
422 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
423 static struct resource net2272_bfin_resources[] = {
426 .end = 0x20300000 + 0x100,
427 .flags = IORESOURCE_MEM,
431 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
435 static struct platform_device net2272_bfin_device = {
438 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
439 .resource = net2272_bfin_resources,
443 #if defined(CONFIG_MTD_M25P80) \
444 || defined(CONFIG_MTD_M25P80_MODULE)
445 static struct mtd_partition bfin_spi_flash_partitions[] = {
447 .name = "bootloader(spi)",
450 .mask_flags = MTD_CAP_ROM
452 .name = "linux kernel(spi)",
453 .size = MTDPART_SIZ_FULL,
454 .offset = MTDPART_OFS_APPEND,
458 static struct flash_platform_data bfin_spi_flash_data = {
460 .parts = bfin_spi_flash_partitions,
461 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
465 /* SPI flash chip (m25p64) */
466 static struct bfin5xx_spi_chip spi_flash_chip_info = {
467 .enable_dma = 0, /* use dma transfer with this chip*/
472 #if defined(CONFIG_SPI_ADC_BF533) \
473 || defined(CONFIG_SPI_ADC_BF533_MODULE)
475 static struct bfin5xx_spi_chip spi_adc_chip_info = {
476 .enable_dma = 1, /* use dma transfer with this chip*/
481 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
482 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
483 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
489 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
490 static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
496 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
497 static struct bfin5xx_spi_chip spi_mmc_chip_info = {
503 #if defined(CONFIG_PBX)
504 static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
505 .ctl_reg = 0x4, /* send zero */
508 .cs_change_per_word = 1,
512 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
513 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
518 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
520 .vref_delay_usecs = 50, /* internal, no capacitor */
523 .pressure_max = 1000,
525 .stopacq_polarity = 1,
526 .first_conversion_delay = 3,
527 .acquisition_time = 1,
529 .pen_down_acc_interval = 1,
533 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
534 && defined(CONFIG_SND_SOC_WM8731_SPI)
535 static struct bfin5xx_spi_chip spi_wm8731_chip_info = {
541 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
542 static struct bfin5xx_spi_chip spidev_chip_info = {
548 static struct spi_board_info bfin_spi_board_info[] __initdata = {
549 #if defined(CONFIG_MTD_M25P80) \
550 || defined(CONFIG_MTD_M25P80_MODULE)
552 /* the modalias must be the same as spi device driver name */
553 .modalias = "m25p80", /* Name of spi_driver for this device */
554 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
555 .bus_num = 0, /* Framework bus number */
556 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
557 .platform_data = &bfin_spi_flash_data,
558 .controller_data = &spi_flash_chip_info,
563 #if defined(CONFIG_SPI_ADC_BF533) \
564 || defined(CONFIG_SPI_ADC_BF533_MODULE)
566 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
567 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
568 .bus_num = 0, /* Framework bus number */
569 .chip_select = 1, /* Framework chip select. */
570 .platform_data = NULL, /* No spi_driver specific config */
571 .controller_data = &spi_adc_chip_info,
575 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
576 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
578 .modalias = "ad1836-spi",
579 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
581 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
582 .controller_data = &ad1836_spi_chip_info,
585 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
587 .modalias = "ad9960-spi",
588 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
591 .controller_data = &ad9960_spi_chip_info,
594 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
596 .modalias = "spi_mmc_dummy",
597 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
600 .platform_data = NULL,
601 .controller_data = &spi_mmc_chip_info,
605 .modalias = "spi_mmc",
606 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
608 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
609 .platform_data = NULL,
610 .controller_data = &spi_mmc_chip_info,
614 #if defined(CONFIG_PBX)
616 .modalias = "fxs-spi",
617 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
619 .chip_select = 8 - CONFIG_J11_JUMPER,
620 .controller_data = &spi_si3xxx_chip_info,
624 .modalias = "fxo-spi",
625 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
627 .chip_select = 8 - CONFIG_J19_JUMPER,
628 .controller_data = &spi_si3xxx_chip_info,
632 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
634 .modalias = "ad7877",
635 .platform_data = &bfin_ad7877_ts_info,
637 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
640 .controller_data = &spi_ad7877_chip_info,
643 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
644 && defined(CONFIG_SND_SOC_WM8731_SPI)
646 .modalias = "wm8731",
647 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
650 .controller_data = &spi_wm8731_chip_info,
654 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
656 .modalias = "spidev",
657 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
660 .controller_data = &spidev_chip_info,
665 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
666 /* SPI controller data */
667 static struct bfin5xx_spi_master bfin_spi0_info = {
669 .enable_dma = 1, /* master has the ability to do dma transfer */
670 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
674 static struct resource bfin_spi0_resource[] = {
676 .start = SPI0_REGBASE,
677 .end = SPI0_REGBASE + 0xFF,
678 .flags = IORESOURCE_MEM,
683 .flags = IORESOURCE_IRQ,
687 static struct platform_device bfin_spi0_device = {
689 .id = 0, /* Bus number */
690 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
691 .resource = bfin_spi0_resource,
693 .platform_data = &bfin_spi0_info, /* Passed to driver */
696 #endif /* spi master and devices */
698 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
699 static struct platform_device bfin_fb_adv7393_device = {
700 .name = "bfin-adv7393",
704 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
705 static struct resource bfin_uart_resources[] = {
706 #ifdef CONFIG_SERIAL_BFIN_UART0
710 .flags = IORESOURCE_MEM,
713 #ifdef CONFIG_SERIAL_BFIN_UART1
717 .flags = IORESOURCE_MEM,
722 static struct platform_device bfin_uart_device = {
725 .num_resources = ARRAY_SIZE(bfin_uart_resources),
726 .resource = bfin_uart_resources,
730 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
731 static struct resource bfin_sir_resources[] = {
732 #ifdef CONFIG_BFIN_SIR0
736 .flags = IORESOURCE_MEM,
739 #ifdef CONFIG_BFIN_SIR1
743 .flags = IORESOURCE_MEM,
748 static struct platform_device bfin_sir_device = {
751 .num_resources = ARRAY_SIZE(bfin_sir_resources),
752 .resource = bfin_sir_resources,
756 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
757 static struct resource bfin_twi0_resource[] = {
759 .start = TWI0_REGBASE,
761 .flags = IORESOURCE_MEM,
766 .flags = IORESOURCE_IRQ,
770 static struct platform_device i2c_bfin_twi_device = {
771 .name = "i2c-bfin-twi",
773 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
774 .resource = bfin_twi0_resource,
778 #ifdef CONFIG_I2C_BOARDINFO
779 static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
780 #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
782 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
783 .type = "pcf8574_lcd",
786 #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
788 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
789 .type = "pcf8574_keypad",
796 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
797 static struct platform_device bfin_sport0_uart_device = {
798 .name = "bfin-sport-uart",
802 static struct platform_device bfin_sport1_uart_device = {
803 .name = "bfin-sport-uart",
808 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
809 #include <linux/input.h>
810 #include <linux/gpio_keys.h>
812 static struct gpio_keys_button bfin_gpio_keys_table[] = {
813 {BTN_0, GPIO_PF14, 1, "gpio-keys: BTN0"},
816 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
817 .buttons = bfin_gpio_keys_table,
818 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
821 static struct platform_device bfin_device_gpiokeys = {
824 .platform_data = &bfin_gpio_keys_data,
829 static struct resource bfin_gpios_resources = {
831 .end = MAX_BLACKFIN_GPIOS - 1,
832 .flags = IORESOURCE_IRQ,
835 static struct platform_device bfin_gpios_device = {
836 .name = "simple-gpio",
839 .resource = &bfin_gpios_resources,
842 static const unsigned int cclk_vlev_datasheet[] =
844 VRPAIR(VLEV_100, 400000000),
845 VRPAIR(VLEV_105, 426000000),
846 VRPAIR(VLEV_110, 500000000),
847 VRPAIR(VLEV_115, 533000000),
848 VRPAIR(VLEV_120, 600000000),
851 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
852 .tuple_tab = cclk_vlev_datasheet,
853 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
854 .vr_settling_time = 25 /* us */,
857 static struct platform_device bfin_dpmc = {
860 .platform_data = &bfin_dmpc_vreg_data,
864 static struct platform_device *stamp_devices[] __initdata = {
868 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
872 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
873 &bfin_pcmcia_cf_device,
876 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
880 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
884 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
888 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
892 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
896 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
900 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
904 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
905 &net2272_bfin_device,
908 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
912 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
913 &bfin_fb_adv7393_device,
916 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
920 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
924 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
925 &i2c_bfin_twi_device,
928 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
929 &bfin_sport0_uart_device,
930 &bfin_sport1_uart_device,
933 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
934 &bfin_device_gpiokeys,
937 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
944 static int __init stamp_init(void)
946 printk(KERN_INFO "%s(): registering device resources\n", __func__);
948 #ifdef CONFIG_I2C_BOARDINFO
949 i2c_register_board_info(0, bfin_i2c_board_info,
950 ARRAY_SIZE(bfin_i2c_board_info));
953 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
954 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
958 arch_initcall(stamp_init);
960 void native_machine_restart(char *cmd)
962 /* workaround reboot hang when booting from SPI */
963 if ((bfin_read_SYSCR() & 0x7) == 0x3)
964 bfin_gpio_reset_spi0_ssel1();
967 void bfin_get_ether_addr(char *addr)
969 random_ether_addr(addr);
970 printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
972 EXPORT_SYMBOL(bfin_get_ether_addr);