2 * File: arch/blackfin/mach-bf527/boards/ezkit.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/spi/spi.h>
36 #include <linux/spi/flash.h>
37 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38 #include <linux/usb/isp1362.h>
40 #include <linux/ata_platform.h>
41 #include <linux/irq.h>
42 #include <linux/interrupt.h>
43 #include <linux/usb/sl811.h>
44 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
45 #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[] = "ADDS-BF527-EZKIT";
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_platform_data musb_plat = {
132 #if defined(CONFIG_USB_MUSB_OTG)
134 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
136 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
137 .mode = MUSB_PERIPHERAL,
142 static u64 musb_dmamask = ~(u32)0;
144 static struct platform_device musb_device = {
148 .dma_mask = &musb_dmamask,
149 .coherent_dma_mask = 0xffffffff,
150 .platform_data = &musb_plat,
152 .num_resources = ARRAY_SIZE(musb_resources),
153 .resource = musb_resources,
157 #if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
159 static struct resource bf52x_t350mcqb_resources[] = {
161 .start = IRQ_PPI_ERROR,
162 .end = IRQ_PPI_ERROR,
163 .flags = IORESOURCE_IRQ,
167 static struct platform_device bf52x_t350mcqb_device = {
168 .name = "bfin-t350mcqb",
170 .num_resources = ARRAY_SIZE(bf52x_t350mcqb_resources),
171 .resource = bf52x_t350mcqb_resources,
175 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
176 static struct mtd_partition partition_info[] = {
178 .name = "Linux Kernel",
183 .name = "File System",
184 .offset = MTDPART_OFS_APPEND,
185 .size = MTDPART_SIZ_FULL,
189 static struct bf5xx_nand_platform bf5xx_nand_platform = {
190 .page_size = NFC_PG_SIZE_256,
191 .data_width = NFC_NWIDTH_8,
192 .partitions = partition_info,
193 .nr_partitions = ARRAY_SIZE(partition_info),
198 static struct resource bf5xx_nand_resources[] = {
201 .end = NFC_DATA_RD + 2,
202 .flags = IORESOURCE_MEM,
207 .flags = IORESOURCE_IRQ,
211 static struct platform_device bf5xx_nand_device = {
212 .name = "bf5xx-nand",
214 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
215 .resource = bf5xx_nand_resources,
217 .platform_data = &bf5xx_nand_platform,
222 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
223 static struct resource bfin_pcmcia_cf_resources[] = {
225 .start = 0x20310000, /* IO PORT */
227 .flags = IORESOURCE_MEM,
229 .start = 0x20311000, /* Attribute Memory */
231 .flags = IORESOURCE_MEM,
235 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
237 .start = 6, /* Card Detect PF6 */
239 .flags = IORESOURCE_IRQ,
243 static struct platform_device bfin_pcmcia_cf_device = {
244 .name = "bfin_cf_pcmcia",
246 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
247 .resource = bfin_pcmcia_cf_resources,
251 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
252 static struct platform_device rtc_device = {
258 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
259 static struct resource smc91x_resources[] = {
261 .name = "smc91x-regs",
263 .end = 0x20300300 + 16,
264 .flags = IORESOURCE_MEM,
269 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
272 static struct platform_device smc91x_device = {
275 .num_resources = ARRAY_SIZE(smc91x_resources),
276 .resource = smc91x_resources,
280 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
281 static struct resource dm9000_resources[] = {
284 .end = 0x203FB800 + 8,
285 .flags = IORESOURCE_MEM,
290 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
294 static struct platform_device dm9000_device = {
297 .num_resources = ARRAY_SIZE(dm9000_resources),
298 .resource = dm9000_resources,
302 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
303 static struct resource sl811_hcd_resources[] = {
307 .flags = IORESOURCE_MEM,
311 .flags = IORESOURCE_MEM,
313 .start = CONFIG_USB_SL811_BFIN_IRQ,
314 .end = CONFIG_USB_SL811_BFIN_IRQ,
315 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
319 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
320 void sl811_port_power(struct device *dev, int is_on)
322 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
323 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
327 static struct sl811_platform_data sl811_priv = {
329 .power = 250, /* == 500mA */
330 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
331 .port_power = &sl811_port_power,
335 static struct platform_device sl811_hcd_device = {
339 .platform_data = &sl811_priv,
341 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
342 .resource = sl811_hcd_resources,
346 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
347 static struct resource isp1362_hcd_resources[] = {
351 .flags = IORESOURCE_MEM,
355 .flags = IORESOURCE_MEM,
357 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
358 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
359 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
363 static struct isp1362_platform_data isp1362_priv = {
368 .int_edge_triggered = 0,
369 .remote_wakeup_connected = 0,
370 .no_power_switching = 1,
371 .power_switching_mode = 0,
374 static struct platform_device isp1362_hcd_device = {
375 .name = "isp1362-hcd",
378 .platform_data = &isp1362_priv,
380 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
381 .resource = isp1362_hcd_resources,
385 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
386 static struct platform_device bfin_mac_device = {
391 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
392 static struct resource net2272_bfin_resources[] = {
395 .end = 0x20300000 + 0x100,
396 .flags = IORESOURCE_MEM,
400 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
404 static struct platform_device net2272_bfin_device = {
407 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
408 .resource = net2272_bfin_resources,
412 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
413 /* all SPI peripherals info goes here */
415 #if defined(CONFIG_MTD_M25P80) \
416 || defined(CONFIG_MTD_M25P80_MODULE)
417 static struct mtd_partition bfin_spi_flash_partitions[] = {
419 .name = "bootloader",
422 .mask_flags = MTD_CAP_ROM
426 .offset = MTDPART_OFS_APPEND,
428 .name = "file system",
429 .size = MTDPART_SIZ_FULL,
430 .offset = MTDPART_OFS_APPEND,
434 static struct flash_platform_data bfin_spi_flash_data = {
436 .parts = bfin_spi_flash_partitions,
437 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
441 /* SPI flash chip (m25p64) */
442 static struct bfin5xx_spi_chip spi_flash_chip_info = {
443 .enable_dma = 0, /* use dma transfer with this chip*/
448 #if defined(CONFIG_SPI_ADC_BF533) \
449 || defined(CONFIG_SPI_ADC_BF533_MODULE)
451 static struct bfin5xx_spi_chip spi_adc_chip_info = {
452 .enable_dma = 1, /* use dma transfer with this chip*/
457 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
458 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
459 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
465 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
466 static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
472 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
473 static struct bfin5xx_spi_chip spi_mmc_chip_info = {
479 #if defined(CONFIG_PBX)
480 static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
481 .ctl_reg = 0x4, /* send zero */
484 .cs_change_per_word = 1,
488 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
489 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
494 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
496 .vref_delay_usecs = 50, /* internal, no capacitor */
499 .pressure_max = 1000,
501 .stopacq_polarity = 1,
502 .first_conversion_delay = 3,
503 .acquisition_time = 1,
505 .pen_down_acc_interval = 1,
509 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
510 && defined(CONFIG_SND_SOC_WM8731_SPI)
511 static struct bfin5xx_spi_chip spi_wm8731_chip_info = {
517 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
518 static struct bfin5xx_spi_chip spidev_chip_info = {
524 static struct spi_board_info bfin_spi_board_info[] __initdata = {
525 #if defined(CONFIG_MTD_M25P80) \
526 || defined(CONFIG_MTD_M25P80_MODULE)
528 /* the modalias must be the same as spi device driver name */
529 .modalias = "m25p80", /* Name of spi_driver for this device */
530 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
531 .bus_num = 0, /* Framework bus number */
532 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
533 .platform_data = &bfin_spi_flash_data,
534 .controller_data = &spi_flash_chip_info,
539 #if defined(CONFIG_SPI_ADC_BF533) \
540 || defined(CONFIG_SPI_ADC_BF533_MODULE)
542 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
543 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
544 .bus_num = 0, /* Framework bus number */
545 .chip_select = 1, /* Framework chip select. */
546 .platform_data = NULL, /* No spi_driver specific config */
547 .controller_data = &spi_adc_chip_info,
551 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
552 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
554 .modalias = "ad1836-spi",
555 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
557 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
558 .controller_data = &ad1836_spi_chip_info,
561 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
563 .modalias = "ad9960-spi",
564 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
567 .controller_data = &ad9960_spi_chip_info,
570 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
572 .modalias = "spi_mmc_dummy",
573 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
576 .platform_data = NULL,
577 .controller_data = &spi_mmc_chip_info,
581 .modalias = "spi_mmc",
582 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
584 .chip_select = CONFIG_SPI_MMC_CS_CHAN,
585 .platform_data = NULL,
586 .controller_data = &spi_mmc_chip_info,
590 #if defined(CONFIG_PBX)
592 .modalias = "fxs-spi",
593 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
595 .chip_select = 8 - CONFIG_J11_JUMPER,
596 .controller_data = &spi_si3xxx_chip_info,
600 .modalias = "fxo-spi",
601 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
603 .chip_select = 8 - CONFIG_J19_JUMPER,
604 .controller_data = &spi_si3xxx_chip_info,
608 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
610 .modalias = "ad7877",
611 .platform_data = &bfin_ad7877_ts_info,
613 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
616 .controller_data = &spi_ad7877_chip_info,
619 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
620 && defined(CONFIG_SND_SOC_WM8731_SPI)
622 .modalias = "wm8731",
623 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
626 .controller_data = &spi_wm8731_chip_info,
630 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
632 .modalias = "spidev",
633 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
636 .controller_data = &spidev_chip_info,
641 /* SPI controller data */
642 static struct bfin5xx_spi_master bfin_spi0_info = {
644 .enable_dma = 1, /* master has the ability to do dma transfer */
645 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
649 static struct resource bfin_spi0_resource[] = {
651 .start = SPI0_REGBASE,
652 .end = SPI0_REGBASE + 0xFF,
653 .flags = IORESOURCE_MEM,
658 .flags = IORESOURCE_IRQ,
662 static struct platform_device bfin_spi0_device = {
664 .id = 0, /* Bus number */
665 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
666 .resource = bfin_spi0_resource,
668 .platform_data = &bfin_spi0_info, /* Passed to driver */
671 #endif /* spi master and devices */
673 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
674 static struct platform_device bfin_fb_device = {
675 .name = "bf537-lq035",
679 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
680 static struct platform_device bfin_fb_adv7393_device = {
681 .name = "bfin-adv7393",
685 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
686 static struct resource bfin_uart_resources[] = {
687 #ifdef CONFIG_SERIAL_BFIN_UART0
691 .flags = IORESOURCE_MEM,
694 #ifdef CONFIG_SERIAL_BFIN_UART1
698 .flags = IORESOURCE_MEM,
703 static struct platform_device bfin_uart_device = {
706 .num_resources = ARRAY_SIZE(bfin_uart_resources),
707 .resource = bfin_uart_resources,
711 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
712 static struct resource bfin_sir_resources[] = {
713 #ifdef CONFIG_BFIN_SIR0
717 .flags = IORESOURCE_MEM,
720 #ifdef CONFIG_BFIN_SIR1
724 .flags = IORESOURCE_MEM,
729 static struct platform_device bfin_sir_device = {
732 .num_resources = ARRAY_SIZE(bfin_sir_resources),
733 .resource = bfin_sir_resources,
737 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
738 static struct resource bfin_twi0_resource[] = {
740 .start = TWI0_REGBASE,
742 .flags = IORESOURCE_MEM,
747 .flags = IORESOURCE_IRQ,
751 static struct platform_device i2c_bfin_twi_device = {
752 .name = "i2c-bfin-twi",
754 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
755 .resource = bfin_twi0_resource,
759 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
760 static struct platform_device bfin_sport0_uart_device = {
761 .name = "bfin-sport-uart",
765 static struct platform_device bfin_sport1_uart_device = {
766 .name = "bfin-sport-uart",
771 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
774 static struct pata_platform_info bfin_pata_platform_data = {
776 .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
779 static struct resource bfin_pata_resources[] = {
783 .flags = IORESOURCE_MEM,
788 .flags = IORESOURCE_MEM,
793 .flags = IORESOURCE_IRQ,
797 static struct platform_device bfin_pata_device = {
798 .name = "pata_platform",
800 .num_resources = ARRAY_SIZE(bfin_pata_resources),
801 .resource = bfin_pata_resources,
803 .platform_data = &bfin_pata_platform_data,
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_PG0, 1, "gpio-keys: BTN0"},
814 {BTN_1, GPIO_PG13, 1, "gpio-keys: BTN1"},
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_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
917 #if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
918 &bf52x_t350mcqb_device,
921 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
922 &bfin_fb_adv7393_device,
925 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
929 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
933 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
934 &i2c_bfin_twi_device,
937 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
938 &bfin_sport0_uart_device,
939 &bfin_sport1_uart_device,
942 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
946 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
947 &bfin_device_gpiokeys,
953 static int __init stamp_init(void)
955 printk(KERN_INFO "%s(): registering device resources\n", __func__);
956 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
957 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
958 spi_register_board_info(bfin_spi_board_info,
959 ARRAY_SIZE(bfin_spi_board_info));
962 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
963 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
968 arch_initcall(stamp_init);
970 void native_machine_restart(char *cmd)
972 /* workaround reboot hang when booting from SPI */
973 if ((bfin_read_SYSCR() & 0x7) == 0x3)
974 bfin_gpio_reset_spi0_ssel1();
977 void bfin_get_ether_addr(char *addr)
979 /* the MAC is stored in OTP memory page 0xDF */
982 u32 (*otp_read)(u32 page, u32 flags, u64 *page_content) = (void *)0xEF00001A;
984 ret = otp_read(0xDF, 0x00, &otp_mac);
986 char *otp_mac_p = (char *)&otp_mac;
987 for (ret = 0; ret < 6; ++ret)
988 addr[ret] = otp_mac_p[5 - ret];
991 EXPORT_SYMBOL(bfin_get_ether_addr);