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 = {
85 .dack_polarity_high = 0,
86 .dreq_polarity_high = 0,
89 static struct platform_device bfin_isp1760_device = {
90 .name = "isp1760-hcd",
93 .platform_data = &isp1760_priv,
95 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
96 .resource = bfin_isp1760_resources,
100 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
101 static struct resource musb_resources[] = {
105 .flags = IORESOURCE_MEM,
107 [1] = { /* general IRQ */
108 .start = IRQ_USB_INT0,
110 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
112 [2] = { /* DMA IRQ */
113 .start = IRQ_USB_DMA,
115 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
119 static struct musb_hdrc_config musb_config = {
126 .gpio_vrsel = GPIO_PF11,
129 static struct musb_hdrc_platform_data musb_plat = {
130 #if defined(CONFIG_USB_MUSB_OTG)
132 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
134 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
135 .mode = MUSB_PERIPHERAL,
137 .config = &musb_config,
140 static u64 musb_dmamask = ~(u32)0;
142 static struct platform_device musb_device = {
146 .dma_mask = &musb_dmamask,
147 .coherent_dma_mask = 0xffffffff,
148 .platform_data = &musb_plat,
150 .num_resources = ARRAY_SIZE(musb_resources),
151 .resource = musb_resources,
155 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
156 static struct mtd_partition ezkit_partitions[] = {
158 .name = "bootloader(nor)",
162 .name = "linux kernel(nor)",
164 .offset = MTDPART_OFS_APPEND,
166 .name = "file system(nor)",
167 .size = MTDPART_SIZ_FULL,
168 .offset = MTDPART_OFS_APPEND,
172 static struct physmap_flash_data ezkit_flash_data = {
174 .parts = ezkit_partitions,
175 .nr_parts = ARRAY_SIZE(ezkit_partitions),
178 static struct resource ezkit_flash_resource = {
181 .flags = IORESOURCE_MEM,
184 static struct platform_device ezkit_flash_device = {
185 .name = "physmap-flash",
188 .platform_data = &ezkit_flash_data,
191 .resource = &ezkit_flash_resource,
195 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
196 static struct mtd_partition partition_info[] = {
198 .name = "linux kernel(nand)",
200 .size = 4 * 1024 * 1024,
203 .name = "file system(nand)",
204 .offset = MTDPART_OFS_APPEND,
205 .size = MTDPART_SIZ_FULL,
209 static struct bf5xx_nand_platform bf5xx_nand_platform = {
210 .page_size = NFC_PG_SIZE_256,
211 .data_width = NFC_NWIDTH_8,
212 .partitions = partition_info,
213 .nr_partitions = ARRAY_SIZE(partition_info),
218 static struct resource bf5xx_nand_resources[] = {
221 .end = NFC_DATA_RD + 2,
222 .flags = IORESOURCE_MEM,
227 .flags = IORESOURCE_IRQ,
231 static struct platform_device bf5xx_nand_device = {
232 .name = "bf5xx-nand",
234 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
235 .resource = bf5xx_nand_resources,
237 .platform_data = &bf5xx_nand_platform,
242 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
243 static struct resource bfin_pcmcia_cf_resources[] = {
245 .start = 0x20310000, /* IO PORT */
247 .flags = IORESOURCE_MEM,
249 .start = 0x20311000, /* Attribute Memory */
251 .flags = IORESOURCE_MEM,
255 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
257 .start = 6, /* Card Detect PF6 */
259 .flags = IORESOURCE_IRQ,
263 static struct platform_device bfin_pcmcia_cf_device = {
264 .name = "bfin_cf_pcmcia",
266 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
267 .resource = bfin_pcmcia_cf_resources,
271 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
272 static struct platform_device rtc_device = {
278 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
279 static struct resource smc91x_resources[] = {
281 .name = "smc91x-regs",
283 .end = 0x20300300 + 16,
284 .flags = IORESOURCE_MEM,
289 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
292 static struct platform_device smc91x_device = {
295 .num_resources = ARRAY_SIZE(smc91x_resources),
296 .resource = smc91x_resources,
300 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
301 static struct resource dm9000_resources[] = {
304 .end = 0x203FB800 + 8,
305 .flags = IORESOURCE_MEM,
310 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
314 static struct platform_device dm9000_device = {
317 .num_resources = ARRAY_SIZE(dm9000_resources),
318 .resource = dm9000_resources,
322 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
323 static struct resource sl811_hcd_resources[] = {
327 .flags = IORESOURCE_MEM,
331 .flags = IORESOURCE_MEM,
333 .start = CONFIG_USB_SL811_BFIN_IRQ,
334 .end = CONFIG_USB_SL811_BFIN_IRQ,
335 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
339 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
340 void sl811_port_power(struct device *dev, int is_on)
342 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
343 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
347 static struct sl811_platform_data sl811_priv = {
349 .power = 250, /* == 500mA */
350 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
351 .port_power = &sl811_port_power,
355 static struct platform_device sl811_hcd_device = {
359 .platform_data = &sl811_priv,
361 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
362 .resource = sl811_hcd_resources,
366 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
367 static struct resource isp1362_hcd_resources[] = {
371 .flags = IORESOURCE_MEM,
375 .flags = IORESOURCE_MEM,
377 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
378 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
379 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
383 static struct isp1362_platform_data isp1362_priv = {
388 .int_edge_triggered = 0,
389 .remote_wakeup_connected = 0,
390 .no_power_switching = 1,
391 .power_switching_mode = 0,
394 static struct platform_device isp1362_hcd_device = {
395 .name = "isp1362-hcd",
398 .platform_data = &isp1362_priv,
400 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
401 .resource = isp1362_hcd_resources,
405 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
406 static struct platform_device bfin_mii_bus = {
407 .name = "bfin_mii_bus",
410 static struct platform_device bfin_mac_device = {
412 .dev.platform_data = &bfin_mii_bus,
416 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
417 static struct resource net2272_bfin_resources[] = {
420 .end = 0x20300000 + 0x100,
421 .flags = IORESOURCE_MEM,
425 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
429 static struct platform_device net2272_bfin_device = {
432 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
433 .resource = net2272_bfin_resources,
437 #if defined(CONFIG_MTD_M25P80) \
438 || defined(CONFIG_MTD_M25P80_MODULE)
439 static struct mtd_partition bfin_spi_flash_partitions[] = {
441 .name = "bootloader(spi)",
444 .mask_flags = MTD_CAP_ROM
446 .name = "linux kernel(spi)",
447 .size = MTDPART_SIZ_FULL,
448 .offset = MTDPART_OFS_APPEND,
452 static struct flash_platform_data bfin_spi_flash_data = {
454 .parts = bfin_spi_flash_partitions,
455 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
459 /* SPI flash chip (m25p64) */
460 static struct bfin5xx_spi_chip spi_flash_chip_info = {
461 .enable_dma = 0, /* use dma transfer with this chip*/
466 #if defined(CONFIG_SPI_ADC_BF533) \
467 || defined(CONFIG_SPI_ADC_BF533_MODULE)
469 static struct bfin5xx_spi_chip spi_adc_chip_info = {
470 .enable_dma = 1, /* use dma transfer with this chip*/
475 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
476 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
477 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
483 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
484 static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
490 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
491 static struct bfin5xx_spi_chip spi_mmc_chip_info = {
497 #if defined(CONFIG_PBX)
498 static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
499 .ctl_reg = 0x4, /* send zero */
502 .cs_change_per_word = 1,
506 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
507 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
512 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
514 .vref_delay_usecs = 50, /* internal, no capacitor */
517 .pressure_max = 1000,
519 .stopacq_polarity = 1,
520 .first_conversion_delay = 3,
521 .acquisition_time = 1,
523 .pen_down_acc_interval = 1,
527 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
528 && defined(CONFIG_SND_SOC_WM8731_SPI)
529 static struct bfin5xx_spi_chip spi_wm8731_chip_info = {
535 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
536 static struct bfin5xx_spi_chip spidev_chip_info = {
542 static struct spi_board_info bfin_spi_board_info[] __initdata = {
543 #if defined(CONFIG_MTD_M25P80) \
544 || defined(CONFIG_MTD_M25P80_MODULE)
546 /* the modalias must be the same as spi device driver name */
547 .modalias = "m25p80", /* Name of spi_driver for this device */
548 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
549 .bus_num = 0, /* Framework bus number */
550 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
551 .platform_data = &bfin_spi_flash_data,
552 .controller_data = &spi_flash_chip_info,
557 #if defined(CONFIG_SPI_ADC_BF533) \
558 || defined(CONFIG_SPI_ADC_BF533_MODULE)
560 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
561 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
562 .bus_num = 0, /* Framework bus number */
563 .chip_select = 1, /* Framework chip select. */
564 .platform_data = NULL, /* No spi_driver specific config */
565 .controller_data = &spi_adc_chip_info,
569 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
570 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
572 .modalias = "ad1836-spi",
573 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
575 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
576 .controller_data = &ad1836_spi_chip_info,
579 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
581 .modalias = "ad9960-spi",
582 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
585 .controller_data = &ad9960_spi_chip_info,
588 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
590 .modalias = "spi_mmc_dummy",
591 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
594 .platform_data = NULL,
595 .controller_data = &spi_mmc_chip_info,
599 .modalias = "spi_mmc",
600 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
602 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
603 .platform_data = NULL,
604 .controller_data = &spi_mmc_chip_info,
608 #if defined(CONFIG_PBX)
610 .modalias = "fxs-spi",
611 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
613 .chip_select = 8 - CONFIG_J11_JUMPER,
614 .controller_data = &spi_si3xxx_chip_info,
618 .modalias = "fxo-spi",
619 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
621 .chip_select = 8 - CONFIG_J19_JUMPER,
622 .controller_data = &spi_si3xxx_chip_info,
626 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
628 .modalias = "ad7877",
629 .platform_data = &bfin_ad7877_ts_info,
631 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
634 .controller_data = &spi_ad7877_chip_info,
637 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
638 && defined(CONFIG_SND_SOC_WM8731_SPI)
640 .modalias = "wm8731",
641 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
644 .controller_data = &spi_wm8731_chip_info,
648 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
650 .modalias = "spidev",
651 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
654 .controller_data = &spidev_chip_info,
659 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
660 /* SPI controller data */
661 static struct bfin5xx_spi_master bfin_spi0_info = {
663 .enable_dma = 1, /* master has the ability to do dma transfer */
664 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
668 static struct resource bfin_spi0_resource[] = {
670 .start = SPI0_REGBASE,
671 .end = SPI0_REGBASE + 0xFF,
672 .flags = IORESOURCE_MEM,
677 .flags = IORESOURCE_IRQ,
681 static struct platform_device bfin_spi0_device = {
683 .id = 0, /* Bus number */
684 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
685 .resource = bfin_spi0_resource,
687 .platform_data = &bfin_spi0_info, /* Passed to driver */
690 #endif /* spi master and devices */
692 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
693 static struct platform_device bfin_fb_adv7393_device = {
694 .name = "bfin-adv7393",
698 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
699 static struct resource bfin_uart_resources[] = {
700 #ifdef CONFIG_SERIAL_BFIN_UART0
704 .flags = IORESOURCE_MEM,
707 #ifdef CONFIG_SERIAL_BFIN_UART1
711 .flags = IORESOURCE_MEM,
716 static struct platform_device bfin_uart_device = {
719 .num_resources = ARRAY_SIZE(bfin_uart_resources),
720 .resource = bfin_uart_resources,
724 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
725 #ifdef CONFIG_BFIN_SIR0
726 static struct resource bfin_sir0_resources[] = {
730 .flags = IORESOURCE_MEM,
733 .start = IRQ_UART0_RX,
734 .end = IRQ_UART0_RX+1,
735 .flags = IORESOURCE_IRQ,
738 .start = CH_UART0_RX,
739 .end = CH_UART0_RX+1,
740 .flags = IORESOURCE_DMA,
744 static struct platform_device bfin_sir0_device = {
747 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
748 .resource = bfin_sir0_resources,
751 #ifdef CONFIG_BFIN_SIR1
752 static struct resource bfin_sir1_resources[] = {
756 .flags = IORESOURCE_MEM,
759 .start = IRQ_UART1_RX,
760 .end = IRQ_UART1_RX+1,
761 .flags = IORESOURCE_IRQ,
764 .start = CH_UART1_RX,
765 .end = CH_UART1_RX+1,
766 .flags = IORESOURCE_DMA,
770 static struct platform_device bfin_sir1_device = {
773 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
774 .resource = bfin_sir1_resources,
779 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
780 static struct resource bfin_twi0_resource[] = {
782 .start = TWI0_REGBASE,
784 .flags = IORESOURCE_MEM,
789 .flags = IORESOURCE_IRQ,
793 static struct platform_device i2c_bfin_twi_device = {
794 .name = "i2c-bfin-twi",
796 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
797 .resource = bfin_twi0_resource,
801 static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
802 #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE)
804 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
805 .type = "pcf8574_lcd",
808 #if defined(CONFIG_TWI_KEYPAD) || defined(CONFIG_TWI_KEYPAD_MODULE)
810 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
811 .type = "pcf8574_keypad",
817 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
818 static struct platform_device bfin_sport0_uart_device = {
819 .name = "bfin-sport-uart",
823 static struct platform_device bfin_sport1_uart_device = {
824 .name = "bfin-sport-uart",
829 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
830 #include <linux/input.h>
831 #include <linux/gpio_keys.h>
833 static struct gpio_keys_button bfin_gpio_keys_table[] = {
834 {BTN_0, GPIO_PF14, 1, "gpio-keys: BTN0"},
837 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
838 .buttons = bfin_gpio_keys_table,
839 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
842 static struct platform_device bfin_device_gpiokeys = {
845 .platform_data = &bfin_gpio_keys_data,
850 static struct resource bfin_gpios_resources = {
852 .end = MAX_BLACKFIN_GPIOS - 1,
853 .flags = IORESOURCE_IRQ,
856 static struct platform_device bfin_gpios_device = {
857 .name = "simple-gpio",
860 .resource = &bfin_gpios_resources,
863 static const unsigned int cclk_vlev_datasheet[] =
865 VRPAIR(VLEV_100, 400000000),
866 VRPAIR(VLEV_105, 426000000),
867 VRPAIR(VLEV_110, 500000000),
868 VRPAIR(VLEV_115, 533000000),
869 VRPAIR(VLEV_120, 600000000),
872 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
873 .tuple_tab = cclk_vlev_datasheet,
874 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
875 .vr_settling_time = 25 /* us */,
878 static struct platform_device bfin_dpmc = {
881 .platform_data = &bfin_dmpc_vreg_data,
885 static struct platform_device *stamp_devices[] __initdata = {
889 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
893 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
894 &bfin_pcmcia_cf_device,
897 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
901 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
905 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
909 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
910 &bfin_isp1760_device,
913 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
917 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
921 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
925 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
930 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
931 &net2272_bfin_device,
934 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
938 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
939 &bfin_fb_adv7393_device,
942 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
946 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
947 #ifdef CONFIG_BFIN_SIR0
950 #ifdef CONFIG_BFIN_SIR1
955 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
956 &i2c_bfin_twi_device,
959 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
960 &bfin_sport0_uart_device,
961 &bfin_sport1_uart_device,
964 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
965 &bfin_device_gpiokeys,
968 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
975 static int __init cm_init(void)
977 printk(KERN_INFO "%s(): registering device resources\n", __func__);
978 i2c_register_board_info(0, bfin_i2c_board_info,
979 ARRAY_SIZE(bfin_i2c_board_info));
980 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
981 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
985 arch_initcall(cm_init);
987 void native_machine_restart(char *cmd)
989 /* workaround reboot hang when booting from SPI */
990 if ((bfin_read_SYSCR() & 0x7) == 0x3)
991 bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
994 void bfin_get_ether_addr(char *addr)
996 random_ether_addr(addr);
997 printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
999 EXPORT_SYMBOL(bfin_get_ether_addr);