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-2007 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/pata_platform.h>
41 #include <linux/irq.h>
42 #include <linux/interrupt.h>
43 #include <linux/usb/sl811.h>
44 #include <linux/usb/musb.h>
47 #include <asm/bfin5xx_spi.h>
48 #include <asm/reboot.h>
50 #include <asm/portmux.h>
51 #include <linux/spi/ad7877.h>
54 * Name the Board for the /proc/cpuinfo
56 const char bfin_board_name
[] = "ADDS-BF527-EZKIT";
59 * Driver needs to know address, irq and flag pin.
62 #define ISP1761_BASE 0x203C0000
63 #define ISP1761_IRQ IRQ_PF7
65 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
66 static struct resource bfin_isp1761_resources
[] = {
68 .name
= "isp1761-regs",
69 .start
= ISP1761_BASE
+ 0x00000000,
70 .end
= ISP1761_BASE
+ 0x000fffff,
71 .flags
= IORESOURCE_MEM
,
76 .flags
= IORESOURCE_IRQ
,
80 static struct platform_device bfin_isp1761_device
= {
83 .num_resources
= ARRAY_SIZE(bfin_isp1761_resources
),
84 .resource
= bfin_isp1761_resources
,
87 static struct platform_device
*bfin_isp1761_devices
[] = {
91 int __init
bfin_isp1761_init(void)
93 unsigned int num_devices
= ARRAY_SIZE(bfin_isp1761_devices
);
95 printk(KERN_INFO
"%s(): registering device resources\n", __FUNCTION__
);
96 set_irq_type(ISP1761_IRQ
, IRQF_TRIGGER_FALLING
);
98 return platform_add_devices(bfin_isp1761_devices
, num_devices
);
101 void __exit
bfin_isp1761_exit(void)
103 platform_device_unregister(&bfin_isp1761_device
);
106 arch_initcall(bfin_isp1761_init
);
109 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
110 static struct resource musb_resources
[] = {
114 .flags
= IORESOURCE_MEM
,
116 [1] = { /* general IRQ */
117 .start
= IRQ_USB_INT0
,
119 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
121 [2] = { /* DMA IRQ */
122 .start
= IRQ_USB_DMA
,
124 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
128 static struct musb_hdrc_platform_data musb_plat
= {
129 #if defined(CONFIG_USB_MUSB_OTG)
131 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
133 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
134 .mode
= MUSB_PERIPHERAL
,
139 static u64 musb_dmamask
= ~(u32
)0;
141 static struct platform_device musb_device
= {
145 .dma_mask
= &musb_dmamask
,
146 .coherent_dma_mask
= 0xffffffff,
147 .platform_data
= &musb_plat
,
149 .num_resources
= ARRAY_SIZE(musb_resources
),
150 .resource
= musb_resources
,
154 #if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
156 static struct resource bf52x_t350mcqb_resources
[] = {
158 .start
= IRQ_PPI_ERROR
,
159 .end
= IRQ_PPI_ERROR
,
160 .flags
= IORESOURCE_IRQ
,
164 static struct platform_device bf52x_t350mcqb_device
= {
165 .name
= "bfin-t350mcqb",
167 .num_resources
= ARRAY_SIZE(bf52x_t350mcqb_resources
),
168 .resource
= bf52x_t350mcqb_resources
,
172 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
173 static struct mtd_partition partition_info
[] = {
175 .name
= "Linux Kernel",
180 .name
= "File System",
181 .offset
= 4 * SIZE_1M
,
182 .size
= (256 - 4) * SIZE_1M
,
186 static struct bf5xx_nand_platform bf5xx_nand_platform
= {
187 .page_size
= NFC_PG_SIZE_256
,
188 .data_width
= NFC_NWIDTH_8
,
189 .partitions
= partition_info
,
190 .nr_partitions
= ARRAY_SIZE(partition_info
),
195 static struct resource bf5xx_nand_resources
[] = {
198 .end
= NFC_DATA_RD
+ 2,
199 .flags
= IORESOURCE_MEM
,
204 .flags
= IORESOURCE_IRQ
,
208 static struct platform_device bf5xx_nand_device
= {
209 .name
= "bf5xx-nand",
211 .num_resources
= ARRAY_SIZE(bf5xx_nand_resources
),
212 .resource
= bf5xx_nand_resources
,
214 .platform_data
= &bf5xx_nand_platform
,
219 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
220 static struct resource bfin_pcmcia_cf_resources
[] = {
222 .start
= 0x20310000, /* IO PORT */
224 .flags
= IORESOURCE_MEM
,
226 .start
= 0x20311000, /* Attribute Memory */
228 .flags
= IORESOURCE_MEM
,
232 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_LOWLEVEL
,
234 .start
= 6, /* Card Detect PF6 */
236 .flags
= IORESOURCE_IRQ
,
240 static struct platform_device bfin_pcmcia_cf_device
= {
241 .name
= "bfin_cf_pcmcia",
243 .num_resources
= ARRAY_SIZE(bfin_pcmcia_cf_resources
),
244 .resource
= bfin_pcmcia_cf_resources
,
248 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
249 static struct platform_device rtc_device
= {
255 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
256 static struct resource smc91x_resources
[] = {
258 .name
= "smc91x-regs",
260 .end
= 0x20300300 + 16,
261 .flags
= IORESOURCE_MEM
,
266 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
269 static struct platform_device smc91x_device
= {
272 .num_resources
= ARRAY_SIZE(smc91x_resources
),
273 .resource
= smc91x_resources
,
277 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
278 static struct resource dm9000_resources
[] = {
281 .end
= 0x203FB800 + 8,
282 .flags
= IORESOURCE_MEM
,
287 .flags
= (IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE
),
291 static struct platform_device dm9000_device
= {
294 .num_resources
= ARRAY_SIZE(dm9000_resources
),
295 .resource
= dm9000_resources
,
299 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
300 static struct resource sl811_hcd_resources
[] = {
304 .flags
= IORESOURCE_MEM
,
308 .flags
= IORESOURCE_MEM
,
310 .start
= CONFIG_USB_SL811_BFIN_IRQ
,
311 .end
= CONFIG_USB_SL811_BFIN_IRQ
,
312 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
316 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
317 void sl811_port_power(struct device
*dev
, int is_on
)
319 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS
, "usb:SL811_VBUS");
320 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS
);
323 gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS
, 1);
325 gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS
, 0);
329 static struct sl811_platform_data sl811_priv
= {
331 .power
= 250, /* == 500mA */
332 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
333 .port_power
= &sl811_port_power
,
337 static struct platform_device sl811_hcd_device
= {
341 .platform_data
= &sl811_priv
,
343 .num_resources
= ARRAY_SIZE(sl811_hcd_resources
),
344 .resource
= sl811_hcd_resources
,
348 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
349 static struct resource isp1362_hcd_resources
[] = {
353 .flags
= IORESOURCE_MEM
,
357 .flags
= IORESOURCE_MEM
,
359 .start
= CONFIG_USB_ISP1362_BFIN_GPIO_IRQ
,
360 .end
= CONFIG_USB_ISP1362_BFIN_GPIO_IRQ
,
361 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
365 static struct isp1362_platform_data isp1362_priv
= {
370 .int_edge_triggered
= 0,
371 .remote_wakeup_connected
= 0,
372 .no_power_switching
= 1,
373 .power_switching_mode
= 0,
376 static struct platform_device isp1362_hcd_device
= {
377 .name
= "isp1362-hcd",
380 .platform_data
= &isp1362_priv
,
382 .num_resources
= ARRAY_SIZE(isp1362_hcd_resources
),
383 .resource
= isp1362_hcd_resources
,
387 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
388 static struct platform_device bfin_mac_device
= {
393 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
394 static struct resource net2272_bfin_resources
[] = {
397 .end
= 0x20300000 + 0x100,
398 .flags
= IORESOURCE_MEM
,
402 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
406 static struct platform_device net2272_bfin_device
= {
409 .num_resources
= ARRAY_SIZE(net2272_bfin_resources
),
410 .resource
= net2272_bfin_resources
,
414 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
415 /* all SPI peripherals info goes here */
417 #if defined(CONFIG_MTD_M25P80) \
418 || defined(CONFIG_MTD_M25P80_MODULE)
419 static struct mtd_partition bfin_spi_flash_partitions
[] = {
421 .name
= "bootloader",
424 .mask_flags
= MTD_CAP_ROM
430 .name
= "file system",
432 .offset
= 0x00100000,
436 static struct flash_platform_data bfin_spi_flash_data
= {
438 .parts
= bfin_spi_flash_partitions
,
439 .nr_parts
= ARRAY_SIZE(bfin_spi_flash_partitions
),
443 /* SPI flash chip (m25p64) */
444 static struct bfin5xx_spi_chip spi_flash_chip_info
= {
445 .enable_dma
= 0, /* use dma transfer with this chip*/
450 #if defined(CONFIG_SPI_ADC_BF533) \
451 || defined(CONFIG_SPI_ADC_BF533_MODULE)
453 static struct bfin5xx_spi_chip spi_adc_chip_info
= {
454 .enable_dma
= 1, /* use dma transfer with this chip*/
459 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
460 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
461 static struct bfin5xx_spi_chip ad1836_spi_chip_info
= {
467 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
468 static struct bfin5xx_spi_chip ad9960_spi_chip_info
= {
474 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
475 static struct bfin5xx_spi_chip spi_mmc_chip_info
= {
481 #if defined(CONFIG_PBX)
482 static struct bfin5xx_spi_chip spi_si3xxx_chip_info
= {
483 .ctl_reg
= 0x4, /* send zero */
486 .cs_change_per_word
= 1,
490 #if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
491 static struct bfin5xx_spi_chip ad5304_chip_info
= {
497 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
498 static struct bfin5xx_spi_chip spi_ad7877_chip_info
= {
503 static const struct ad7877_platform_data bfin_ad7877_ts_info
= {
505 .vref_delay_usecs
= 50, /* internal, no capacitor */
508 .pressure_max
= 1000,
510 .stopacq_polarity
= 1,
511 .first_conversion_delay
= 3,
512 .acquisition_time
= 1,
514 .pen_down_acc_interval
= 1,
518 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
519 && defined(CONFIG_SND_SOC_WM8731_SPI)
520 static struct bfin5xx_spi_chip spi_wm8731_chip_info
= {
525 static struct spi_board_info bfin_spi_board_info
[] __initdata
= {
526 #if defined(CONFIG_MTD_M25P80) \
527 || defined(CONFIG_MTD_M25P80_MODULE)
529 /* the modalias must be the same as spi device driver name */
530 .modalias
= "m25p80", /* Name of spi_driver for this device */
531 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
532 .bus_num
= 0, /* Framework bus number */
533 .chip_select
= 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
534 .platform_data
= &bfin_spi_flash_data
,
535 .controller_data
= &spi_flash_chip_info
,
540 #if defined(CONFIG_SPI_ADC_BF533) \
541 || defined(CONFIG_SPI_ADC_BF533_MODULE)
543 .modalias
= "bfin_spi_adc", /* Name of spi_driver for this device */
544 .max_speed_hz
= 6250000, /* max spi clock (SCK) speed in HZ */
545 .bus_num
= 0, /* Framework bus number */
546 .chip_select
= 1, /* Framework chip select. */
547 .platform_data
= NULL
, /* No spi_driver specific config */
548 .controller_data
= &spi_adc_chip_info
,
552 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
553 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
555 .modalias
= "ad1836-spi",
556 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
558 .chip_select
= CONFIG_SND_BLACKFIN_SPI_PFBIT
,
559 .controller_data
= &ad1836_spi_chip_info
,
562 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
564 .modalias
= "ad9960-spi",
565 .max_speed_hz
= 10000000, /* max spi clock (SCK) speed in HZ */
568 .controller_data
= &ad9960_spi_chip_info
,
571 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
573 .modalias
= "spi_mmc_dummy",
574 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
577 .platform_data
= NULL
,
578 .controller_data
= &spi_mmc_chip_info
,
582 .modalias
= "spi_mmc",
583 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
585 .chip_select
= CONFIG_SPI_MMC_CS_CHAN
,
586 .platform_data
= NULL
,
587 .controller_data
= &spi_mmc_chip_info
,
591 #if defined(CONFIG_PBX)
593 .modalias
= "fxs-spi",
594 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
596 .chip_select
= 8 - CONFIG_J11_JUMPER
,
597 .controller_data
= &spi_si3xxx_chip_info
,
601 .modalias
= "fxo-spi",
602 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
604 .chip_select
= 8 - CONFIG_J19_JUMPER
,
605 .controller_data
= &spi_si3xxx_chip_info
,
609 #if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
611 .modalias
= "ad5304_spi",
612 .max_speed_hz
= 1250000, /* max spi clock (SCK) speed in HZ */
615 .platform_data
= NULL
,
616 .controller_data
= &ad5304_chip_info
,
620 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
622 .modalias
= "ad7877",
623 .platform_data
= &bfin_ad7877_ts_info
,
625 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
628 .controller_data
= &spi_ad7877_chip_info
,
631 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
632 && defined(CONFIG_SND_SOC_WM8731_SPI)
634 .modalias
= "wm8731",
635 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
638 .controller_data
= &spi_wm8731_chip_info
,
644 /* SPI controller data */
645 static struct bfin5xx_spi_master bfin_spi0_info
= {
647 .enable_dma
= 1, /* master has the ability to do dma transfer */
648 .pin_req
= {P_SPI0_SCK
, P_SPI0_MISO
, P_SPI0_MOSI
, 0},
652 static struct resource bfin_spi0_resource
[] = {
654 .start
= SPI0_REGBASE
,
655 .end
= SPI0_REGBASE
+ 0xFF,
656 .flags
= IORESOURCE_MEM
,
661 .flags
= IORESOURCE_IRQ
,
665 static struct platform_device bfin_spi0_device
= {
667 .id
= 0, /* Bus number */
668 .num_resources
= ARRAY_SIZE(bfin_spi0_resource
),
669 .resource
= bfin_spi0_resource
,
671 .platform_data
= &bfin_spi0_info
, /* Passed to driver */
674 #endif /* spi master and devices */
676 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
677 static struct platform_device bfin_fb_device
= {
678 .name
= "bf537-lq035",
682 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
683 static struct platform_device bfin_fb_adv7393_device
= {
684 .name
= "bfin-adv7393",
688 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
689 static struct resource bfin_uart_resources
[] = {
690 #ifdef CONFIG_SERIAL_BFIN_UART0
694 .flags
= IORESOURCE_MEM
,
697 #ifdef CONFIG_SERIAL_BFIN_UART1
701 .flags
= IORESOURCE_MEM
,
706 static struct platform_device bfin_uart_device
= {
709 .num_resources
= ARRAY_SIZE(bfin_uart_resources
),
710 .resource
= bfin_uart_resources
,
714 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
715 static struct resource bfin_twi0_resource
[] = {
717 .start
= TWI0_REGBASE
,
719 .flags
= IORESOURCE_MEM
,
724 .flags
= IORESOURCE_IRQ
,
728 static struct platform_device i2c_bfin_twi_device
= {
729 .name
= "i2c-bfin-twi",
731 .num_resources
= ARRAY_SIZE(bfin_twi0_resource
),
732 .resource
= bfin_twi0_resource
,
736 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
737 static struct platform_device bfin_sport0_uart_device
= {
738 .name
= "bfin-sport-uart",
742 static struct platform_device bfin_sport1_uart_device
= {
743 .name
= "bfin-sport-uart",
748 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
751 static struct pata_platform_info bfin_pata_platform_data
= {
753 .irq_type
= IRQF_TRIGGER_HIGH
| IRQF_DISABLED
,
756 static struct resource bfin_pata_resources
[] = {
760 .flags
= IORESOURCE_MEM
,
765 .flags
= IORESOURCE_MEM
,
770 .flags
= IORESOURCE_IRQ
,
774 static struct platform_device bfin_pata_device
= {
775 .name
= "pata_platform",
777 .num_resources
= ARRAY_SIZE(bfin_pata_resources
),
778 .resource
= bfin_pata_resources
,
780 .platform_data
= &bfin_pata_platform_data
,
785 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
786 #include <linux/input.h>
787 #include <linux/gpio_keys.h>
789 static struct gpio_keys_button bfin_gpio_keys_table
[] = {
790 {BTN_0
, GPIO_PG0
, 1, "gpio-keys: BTN0"},
791 {BTN_1
, GPIO_PG13
, 1, "gpio-keys: BTN1"},
794 static struct gpio_keys_platform_data bfin_gpio_keys_data
= {
795 .buttons
= bfin_gpio_keys_table
,
796 .nbuttons
= ARRAY_SIZE(bfin_gpio_keys_table
),
799 static struct platform_device bfin_device_gpiokeys
= {
802 .platform_data
= &bfin_gpio_keys_data
,
807 static struct platform_device
*stamp_devices
[] __initdata
= {
808 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
812 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
813 &bfin_pcmcia_cf_device
,
816 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
820 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
824 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
828 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
832 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
836 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
840 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
844 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
845 &net2272_bfin_device
,
848 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
852 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
856 #if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
857 &bf52x_t350mcqb_device
,
860 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
861 &bfin_fb_adv7393_device
,
864 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
868 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
869 &i2c_bfin_twi_device
,
872 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
873 &bfin_sport0_uart_device
,
874 &bfin_sport1_uart_device
,
877 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
881 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
882 &bfin_device_gpiokeys
,
886 static int __init
stamp_init(void)
888 printk(KERN_INFO
"%s(): registering device resources\n", __FUNCTION__
);
889 platform_add_devices(stamp_devices
, ARRAY_SIZE(stamp_devices
));
890 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
891 spi_register_board_info(bfin_spi_board_info
,
892 ARRAY_SIZE(bfin_spi_board_info
));
895 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
896 irq_desc
[PATA_INT
].status
|= IRQ_NOAUTOEN
;
901 arch_initcall(stamp_init
);
903 void native_machine_restart(char *cmd
)
905 /* workaround reboot hang when booting from SPI */
906 if ((bfin_read_SYSCR() & 0x7) == 0x3)
907 bfin_gpio_reset_spi0_ssel1();
911 * Currently the MAC address is saved in Flash by U-Boot
913 #define FLASH_MAC 0x203f0000
914 void bfin_get_ether_addr(char *addr
)
916 *(u32
*)(&(addr
[0])) = bfin_read32(FLASH_MAC
);
917 *(u16
*)(&(addr
[4])) = bfin_read16(FLASH_MAC
+ 4);
919 EXPORT_SYMBOL(bfin_get_ether_addr
);