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>
53 #include <linux/spi/ad7877.h>
56 * Name the Board for the /proc/cpuinfo
58 const char bfin_board_name
[] = "ADDS-BF527-EZKIT";
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", __FUNCTION__
);
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_platform_data musb_plat
= {
131 #if defined(CONFIG_USB_MUSB_OTG)
133 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
135 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
136 .mode
= MUSB_PERIPHERAL
,
141 static u64 musb_dmamask
= ~(u32
)0;
143 static struct platform_device musb_device
= {
147 .dma_mask
= &musb_dmamask
,
148 .coherent_dma_mask
= 0xffffffff,
149 .platform_data
= &musb_plat
,
151 .num_resources
= ARRAY_SIZE(musb_resources
),
152 .resource
= musb_resources
,
156 #if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
158 static struct resource bf52x_t350mcqb_resources
[] = {
160 .start
= IRQ_PPI_ERROR
,
161 .end
= IRQ_PPI_ERROR
,
162 .flags
= IORESOURCE_IRQ
,
166 static struct platform_device bf52x_t350mcqb_device
= {
167 .name
= "bfin-t350mcqb",
169 .num_resources
= ARRAY_SIZE(bf52x_t350mcqb_resources
),
170 .resource
= bf52x_t350mcqb_resources
,
174 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
175 static struct mtd_partition partition_info
[] = {
177 .name
= "Linux Kernel",
182 .name
= "File System",
183 .offset
= 4 * SIZE_1M
,
184 .size
= (256 - 4) * SIZE_1M
,
188 static struct bf5xx_nand_platform bf5xx_nand_platform
= {
189 .page_size
= NFC_PG_SIZE_256
,
190 .data_width
= NFC_NWIDTH_8
,
191 .partitions
= partition_info
,
192 .nr_partitions
= ARRAY_SIZE(partition_info
),
197 static struct resource bf5xx_nand_resources
[] = {
200 .end
= NFC_DATA_RD
+ 2,
201 .flags
= IORESOURCE_MEM
,
206 .flags
= IORESOURCE_IRQ
,
210 static struct platform_device bf5xx_nand_device
= {
211 .name
= "bf5xx-nand",
213 .num_resources
= ARRAY_SIZE(bf5xx_nand_resources
),
214 .resource
= bf5xx_nand_resources
,
216 .platform_data
= &bf5xx_nand_platform
,
221 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
222 static struct resource bfin_pcmcia_cf_resources
[] = {
224 .start
= 0x20310000, /* IO PORT */
226 .flags
= IORESOURCE_MEM
,
228 .start
= 0x20311000, /* Attribute Memory */
230 .flags
= IORESOURCE_MEM
,
234 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_LOWLEVEL
,
236 .start
= 6, /* Card Detect PF6 */
238 .flags
= IORESOURCE_IRQ
,
242 static struct platform_device bfin_pcmcia_cf_device
= {
243 .name
= "bfin_cf_pcmcia",
245 .num_resources
= ARRAY_SIZE(bfin_pcmcia_cf_resources
),
246 .resource
= bfin_pcmcia_cf_resources
,
250 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
251 static struct platform_device rtc_device
= {
257 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
258 static struct resource smc91x_resources
[] = {
260 .name
= "smc91x-regs",
262 .end
= 0x20300300 + 16,
263 .flags
= IORESOURCE_MEM
,
268 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
271 static struct platform_device smc91x_device
= {
274 .num_resources
= ARRAY_SIZE(smc91x_resources
),
275 .resource
= smc91x_resources
,
279 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
280 static struct resource dm9000_resources
[] = {
283 .end
= 0x203FB800 + 8,
284 .flags
= IORESOURCE_MEM
,
289 .flags
= (IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE
),
293 static struct platform_device dm9000_device
= {
296 .num_resources
= ARRAY_SIZE(dm9000_resources
),
297 .resource
= dm9000_resources
,
301 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
302 static struct resource sl811_hcd_resources
[] = {
306 .flags
= IORESOURCE_MEM
,
310 .flags
= IORESOURCE_MEM
,
312 .start
= CONFIG_USB_SL811_BFIN_IRQ
,
313 .end
= CONFIG_USB_SL811_BFIN_IRQ
,
314 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
318 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
319 void sl811_port_power(struct device
*dev
, int is_on
)
321 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS
, "usb:SL811_VBUS");
322 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS
, is_on
);
326 static struct sl811_platform_data sl811_priv
= {
328 .power
= 250, /* == 500mA */
329 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
330 .port_power
= &sl811_port_power
,
334 static struct platform_device sl811_hcd_device
= {
338 .platform_data
= &sl811_priv
,
340 .num_resources
= ARRAY_SIZE(sl811_hcd_resources
),
341 .resource
= sl811_hcd_resources
,
345 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
346 static struct resource isp1362_hcd_resources
[] = {
350 .flags
= IORESOURCE_MEM
,
354 .flags
= IORESOURCE_MEM
,
356 .start
= CONFIG_USB_ISP1362_BFIN_GPIO_IRQ
,
357 .end
= CONFIG_USB_ISP1362_BFIN_GPIO_IRQ
,
358 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
362 static struct isp1362_platform_data isp1362_priv
= {
367 .int_edge_triggered
= 0,
368 .remote_wakeup_connected
= 0,
369 .no_power_switching
= 1,
370 .power_switching_mode
= 0,
373 static struct platform_device isp1362_hcd_device
= {
374 .name
= "isp1362-hcd",
377 .platform_data
= &isp1362_priv
,
379 .num_resources
= ARRAY_SIZE(isp1362_hcd_resources
),
380 .resource
= isp1362_hcd_resources
,
384 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
385 static struct platform_device bfin_mac_device
= {
390 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
391 static struct resource net2272_bfin_resources
[] = {
394 .end
= 0x20300000 + 0x100,
395 .flags
= IORESOURCE_MEM
,
399 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
403 static struct platform_device net2272_bfin_device
= {
406 .num_resources
= ARRAY_SIZE(net2272_bfin_resources
),
407 .resource
= net2272_bfin_resources
,
411 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
412 /* all SPI peripherals info goes here */
414 #if defined(CONFIG_MTD_M25P80) \
415 || defined(CONFIG_MTD_M25P80_MODULE)
416 static struct mtd_partition bfin_spi_flash_partitions
[] = {
418 .name
= "bootloader",
421 .mask_flags
= MTD_CAP_ROM
427 .name
= "file system",
429 .offset
= 0x00100000,
433 static struct flash_platform_data bfin_spi_flash_data
= {
435 .parts
= bfin_spi_flash_partitions
,
436 .nr_parts
= ARRAY_SIZE(bfin_spi_flash_partitions
),
440 /* SPI flash chip (m25p64) */
441 static struct bfin5xx_spi_chip spi_flash_chip_info
= {
442 .enable_dma
= 0, /* use dma transfer with this chip*/
447 #if defined(CONFIG_SPI_ADC_BF533) \
448 || defined(CONFIG_SPI_ADC_BF533_MODULE)
450 static struct bfin5xx_spi_chip spi_adc_chip_info
= {
451 .enable_dma
= 1, /* use dma transfer with this chip*/
456 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
457 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
458 static struct bfin5xx_spi_chip ad1836_spi_chip_info
= {
464 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
465 static struct bfin5xx_spi_chip ad9960_spi_chip_info
= {
471 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
472 static struct bfin5xx_spi_chip spi_mmc_chip_info
= {
478 #if defined(CONFIG_PBX)
479 static struct bfin5xx_spi_chip spi_si3xxx_chip_info
= {
480 .ctl_reg
= 0x4, /* send zero */
483 .cs_change_per_word
= 1,
487 #if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
488 static struct bfin5xx_spi_chip ad5304_chip_info
= {
494 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
495 static struct bfin5xx_spi_chip spi_ad7877_chip_info
= {
500 static const struct ad7877_platform_data bfin_ad7877_ts_info
= {
502 .vref_delay_usecs
= 50, /* internal, no capacitor */
505 .pressure_max
= 1000,
507 .stopacq_polarity
= 1,
508 .first_conversion_delay
= 3,
509 .acquisition_time
= 1,
511 .pen_down_acc_interval
= 1,
515 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
516 && defined(CONFIG_SND_SOC_WM8731_SPI)
517 static struct bfin5xx_spi_chip spi_wm8731_chip_info
= {
523 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
524 static struct bfin5xx_spi_chip spidev_chip_info
= {
530 static struct spi_board_info bfin_spi_board_info
[] __initdata
= {
531 #if defined(CONFIG_MTD_M25P80) \
532 || defined(CONFIG_MTD_M25P80_MODULE)
534 /* the modalias must be the same as spi device driver name */
535 .modalias
= "m25p80", /* Name of spi_driver for this device */
536 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
537 .bus_num
= 0, /* Framework bus number */
538 .chip_select
= 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
539 .platform_data
= &bfin_spi_flash_data
,
540 .controller_data
= &spi_flash_chip_info
,
545 #if defined(CONFIG_SPI_ADC_BF533) \
546 || defined(CONFIG_SPI_ADC_BF533_MODULE)
548 .modalias
= "bfin_spi_adc", /* Name of spi_driver for this device */
549 .max_speed_hz
= 6250000, /* max spi clock (SCK) speed in HZ */
550 .bus_num
= 0, /* Framework bus number */
551 .chip_select
= 1, /* Framework chip select. */
552 .platform_data
= NULL
, /* No spi_driver specific config */
553 .controller_data
= &spi_adc_chip_info
,
557 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
558 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
560 .modalias
= "ad1836-spi",
561 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
563 .chip_select
= CONFIG_SND_BLACKFIN_SPI_PFBIT
,
564 .controller_data
= &ad1836_spi_chip_info
,
567 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
569 .modalias
= "ad9960-spi",
570 .max_speed_hz
= 10000000, /* max spi clock (SCK) speed in HZ */
573 .controller_data
= &ad9960_spi_chip_info
,
576 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
578 .modalias
= "spi_mmc_dummy",
579 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
582 .platform_data
= NULL
,
583 .controller_data
= &spi_mmc_chip_info
,
587 .modalias
= "spi_mmc",
588 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
590 .chip_select
= CONFIG_SPI_MMC_CS_CHAN
,
591 .platform_data
= NULL
,
592 .controller_data
= &spi_mmc_chip_info
,
596 #if defined(CONFIG_PBX)
598 .modalias
= "fxs-spi",
599 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
601 .chip_select
= 8 - CONFIG_J11_JUMPER
,
602 .controller_data
= &spi_si3xxx_chip_info
,
606 .modalias
= "fxo-spi",
607 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
609 .chip_select
= 8 - CONFIG_J19_JUMPER
,
610 .controller_data
= &spi_si3xxx_chip_info
,
614 #if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
616 .modalias
= "ad5304_spi",
617 .max_speed_hz
= 1250000, /* max spi clock (SCK) speed in HZ */
620 .platform_data
= NULL
,
621 .controller_data
= &ad5304_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 /* SPI controller data */
659 static struct bfin5xx_spi_master bfin_spi0_info
= {
661 .enable_dma
= 1, /* master has the ability to do dma transfer */
662 .pin_req
= {P_SPI0_SCK
, P_SPI0_MISO
, P_SPI0_MOSI
, 0},
666 static struct resource bfin_spi0_resource
[] = {
668 .start
= SPI0_REGBASE
,
669 .end
= SPI0_REGBASE
+ 0xFF,
670 .flags
= IORESOURCE_MEM
,
675 .flags
= IORESOURCE_IRQ
,
679 static struct platform_device bfin_spi0_device
= {
681 .id
= 0, /* Bus number */
682 .num_resources
= ARRAY_SIZE(bfin_spi0_resource
),
683 .resource
= bfin_spi0_resource
,
685 .platform_data
= &bfin_spi0_info
, /* Passed to driver */
688 #endif /* spi master and devices */
690 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
691 static struct platform_device bfin_fb_device
= {
692 .name
= "bf537-lq035",
696 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
697 static struct platform_device bfin_fb_adv7393_device
= {
698 .name
= "bfin-adv7393",
702 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
703 static struct resource bfin_uart_resources
[] = {
704 #ifdef CONFIG_SERIAL_BFIN_UART0
708 .flags
= IORESOURCE_MEM
,
711 #ifdef CONFIG_SERIAL_BFIN_UART1
715 .flags
= IORESOURCE_MEM
,
720 static struct platform_device bfin_uart_device
= {
723 .num_resources
= ARRAY_SIZE(bfin_uart_resources
),
724 .resource
= bfin_uart_resources
,
728 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
729 static struct resource bfin_twi0_resource
[] = {
731 .start
= TWI0_REGBASE
,
733 .flags
= IORESOURCE_MEM
,
738 .flags
= IORESOURCE_IRQ
,
742 static struct platform_device i2c_bfin_twi_device
= {
743 .name
= "i2c-bfin-twi",
745 .num_resources
= ARRAY_SIZE(bfin_twi0_resource
),
746 .resource
= bfin_twi0_resource
,
750 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
751 static struct platform_device bfin_sport0_uart_device
= {
752 .name
= "bfin-sport-uart",
756 static struct platform_device bfin_sport1_uart_device
= {
757 .name
= "bfin-sport-uart",
762 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
765 static struct pata_platform_info bfin_pata_platform_data
= {
767 .irq_type
= IRQF_TRIGGER_HIGH
| IRQF_DISABLED
,
770 static struct resource bfin_pata_resources
[] = {
774 .flags
= IORESOURCE_MEM
,
779 .flags
= IORESOURCE_MEM
,
784 .flags
= IORESOURCE_IRQ
,
788 static struct platform_device bfin_pata_device
= {
789 .name
= "pata_platform",
791 .num_resources
= ARRAY_SIZE(bfin_pata_resources
),
792 .resource
= bfin_pata_resources
,
794 .platform_data
= &bfin_pata_platform_data
,
799 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
800 #include <linux/input.h>
801 #include <linux/gpio_keys.h>
803 static struct gpio_keys_button bfin_gpio_keys_table
[] = {
804 {BTN_0
, GPIO_PG0
, 1, "gpio-keys: BTN0"},
805 {BTN_1
, GPIO_PG13
, 1, "gpio-keys: BTN1"},
808 static struct gpio_keys_platform_data bfin_gpio_keys_data
= {
809 .buttons
= bfin_gpio_keys_table
,
810 .nbuttons
= ARRAY_SIZE(bfin_gpio_keys_table
),
813 static struct platform_device bfin_device_gpiokeys
= {
816 .platform_data
= &bfin_gpio_keys_data
,
821 static struct platform_device
*stamp_devices
[] __initdata
= {
822 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
826 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
827 &bfin_pcmcia_cf_device
,
830 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
834 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
838 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
842 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
846 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
850 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
854 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
858 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
859 &net2272_bfin_device
,
862 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
866 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
870 #if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
871 &bf52x_t350mcqb_device
,
874 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
875 &bfin_fb_adv7393_device
,
878 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
882 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
883 &i2c_bfin_twi_device
,
886 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
887 &bfin_sport0_uart_device
,
888 &bfin_sport1_uart_device
,
891 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
895 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
896 &bfin_device_gpiokeys
,
900 static int __init
stamp_init(void)
902 printk(KERN_INFO
"%s(): registering device resources\n", __FUNCTION__
);
903 platform_add_devices(stamp_devices
, ARRAY_SIZE(stamp_devices
));
904 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
905 spi_register_board_info(bfin_spi_board_info
,
906 ARRAY_SIZE(bfin_spi_board_info
));
909 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
910 irq_desc
[PATA_INT
].status
|= IRQ_NOAUTOEN
;
915 arch_initcall(stamp_init
);
917 void native_machine_restart(char *cmd
)
919 /* workaround reboot hang when booting from SPI */
920 if ((bfin_read_SYSCR() & 0x7) == 0x3)
921 bfin_gpio_reset_spi0_ssel1();
925 * Currently the MAC address is saved in Flash by U-Boot
927 #define FLASH_MAC 0x203f0000
928 void bfin_get_ether_addr(char *addr
)
930 *(u32
*)(&(addr
[0])) = bfin_read32(FLASH_MAC
);
931 *(u16
*)(&(addr
[4])) = bfin_read16(FLASH_MAC
+ 4);
933 EXPORT_SYMBOL(bfin_get_ether_addr
);