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/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
, is_on
);
324 static struct sl811_platform_data sl811_priv
= {
326 .power
= 250, /* == 500mA */
327 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
328 .port_power
= &sl811_port_power
,
332 static struct platform_device sl811_hcd_device
= {
336 .platform_data
= &sl811_priv
,
338 .num_resources
= ARRAY_SIZE(sl811_hcd_resources
),
339 .resource
= sl811_hcd_resources
,
343 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
344 static struct resource isp1362_hcd_resources
[] = {
348 .flags
= IORESOURCE_MEM
,
352 .flags
= IORESOURCE_MEM
,
354 .start
= CONFIG_USB_ISP1362_BFIN_GPIO_IRQ
,
355 .end
= CONFIG_USB_ISP1362_BFIN_GPIO_IRQ
,
356 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
360 static struct isp1362_platform_data isp1362_priv
= {
365 .int_edge_triggered
= 0,
366 .remote_wakeup_connected
= 0,
367 .no_power_switching
= 1,
368 .power_switching_mode
= 0,
371 static struct platform_device isp1362_hcd_device
= {
372 .name
= "isp1362-hcd",
375 .platform_data
= &isp1362_priv
,
377 .num_resources
= ARRAY_SIZE(isp1362_hcd_resources
),
378 .resource
= isp1362_hcd_resources
,
382 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
383 static struct platform_device bfin_mac_device
= {
388 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
389 static struct resource net2272_bfin_resources
[] = {
392 .end
= 0x20300000 + 0x100,
393 .flags
= IORESOURCE_MEM
,
397 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
401 static struct platform_device net2272_bfin_device
= {
404 .num_resources
= ARRAY_SIZE(net2272_bfin_resources
),
405 .resource
= net2272_bfin_resources
,
409 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
410 /* all SPI peripherals info goes here */
412 #if defined(CONFIG_MTD_M25P80) \
413 || defined(CONFIG_MTD_M25P80_MODULE)
414 static struct mtd_partition bfin_spi_flash_partitions
[] = {
416 .name
= "bootloader",
419 .mask_flags
= MTD_CAP_ROM
425 .name
= "file system",
427 .offset
= 0x00100000,
431 static struct flash_platform_data bfin_spi_flash_data
= {
433 .parts
= bfin_spi_flash_partitions
,
434 .nr_parts
= ARRAY_SIZE(bfin_spi_flash_partitions
),
438 /* SPI flash chip (m25p64) */
439 static struct bfin5xx_spi_chip spi_flash_chip_info
= {
440 .enable_dma
= 0, /* use dma transfer with this chip*/
445 #if defined(CONFIG_SPI_ADC_BF533) \
446 || defined(CONFIG_SPI_ADC_BF533_MODULE)
448 static struct bfin5xx_spi_chip spi_adc_chip_info
= {
449 .enable_dma
= 1, /* use dma transfer with this chip*/
454 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
455 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
456 static struct bfin5xx_spi_chip ad1836_spi_chip_info
= {
462 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
463 static struct bfin5xx_spi_chip ad9960_spi_chip_info
= {
469 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
470 static struct bfin5xx_spi_chip spi_mmc_chip_info
= {
476 #if defined(CONFIG_PBX)
477 static struct bfin5xx_spi_chip spi_si3xxx_chip_info
= {
478 .ctl_reg
= 0x4, /* send zero */
481 .cs_change_per_word
= 1,
485 #if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
486 static struct bfin5xx_spi_chip ad5304_chip_info
= {
492 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
493 static struct bfin5xx_spi_chip spi_ad7877_chip_info
= {
498 static const struct ad7877_platform_data bfin_ad7877_ts_info
= {
500 .vref_delay_usecs
= 50, /* internal, no capacitor */
503 .pressure_max
= 1000,
505 .stopacq_polarity
= 1,
506 .first_conversion_delay
= 3,
507 .acquisition_time
= 1,
509 .pen_down_acc_interval
= 1,
513 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
514 && defined(CONFIG_SND_SOC_WM8731_SPI)
515 static struct bfin5xx_spi_chip spi_wm8731_chip_info
= {
520 static struct spi_board_info bfin_spi_board_info
[] __initdata
= {
521 #if defined(CONFIG_MTD_M25P80) \
522 || defined(CONFIG_MTD_M25P80_MODULE)
524 /* the modalias must be the same as spi device driver name */
525 .modalias
= "m25p80", /* Name of spi_driver for this device */
526 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
527 .bus_num
= 0, /* Framework bus number */
528 .chip_select
= 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
529 .platform_data
= &bfin_spi_flash_data
,
530 .controller_data
= &spi_flash_chip_info
,
535 #if defined(CONFIG_SPI_ADC_BF533) \
536 || defined(CONFIG_SPI_ADC_BF533_MODULE)
538 .modalias
= "bfin_spi_adc", /* Name of spi_driver for this device */
539 .max_speed_hz
= 6250000, /* max spi clock (SCK) speed in HZ */
540 .bus_num
= 0, /* Framework bus number */
541 .chip_select
= 1, /* Framework chip select. */
542 .platform_data
= NULL
, /* No spi_driver specific config */
543 .controller_data
= &spi_adc_chip_info
,
547 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
548 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
550 .modalias
= "ad1836-spi",
551 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
553 .chip_select
= CONFIG_SND_BLACKFIN_SPI_PFBIT
,
554 .controller_data
= &ad1836_spi_chip_info
,
557 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
559 .modalias
= "ad9960-spi",
560 .max_speed_hz
= 10000000, /* max spi clock (SCK) speed in HZ */
563 .controller_data
= &ad9960_spi_chip_info
,
566 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
568 .modalias
= "spi_mmc_dummy",
569 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
572 .platform_data
= NULL
,
573 .controller_data
= &spi_mmc_chip_info
,
577 .modalias
= "spi_mmc",
578 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
580 .chip_select
= CONFIG_SPI_MMC_CS_CHAN
,
581 .platform_data
= NULL
,
582 .controller_data
= &spi_mmc_chip_info
,
586 #if defined(CONFIG_PBX)
588 .modalias
= "fxs-spi",
589 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
591 .chip_select
= 8 - CONFIG_J11_JUMPER
,
592 .controller_data
= &spi_si3xxx_chip_info
,
596 .modalias
= "fxo-spi",
597 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
599 .chip_select
= 8 - CONFIG_J19_JUMPER
,
600 .controller_data
= &spi_si3xxx_chip_info
,
604 #if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
606 .modalias
= "ad5304_spi",
607 .max_speed_hz
= 1250000, /* max spi clock (SCK) speed in HZ */
610 .platform_data
= NULL
,
611 .controller_data
= &ad5304_chip_info
,
615 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
617 .modalias
= "ad7877",
618 .platform_data
= &bfin_ad7877_ts_info
,
620 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
623 .controller_data
= &spi_ad7877_chip_info
,
626 #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \
627 && defined(CONFIG_SND_SOC_WM8731_SPI)
629 .modalias
= "wm8731",
630 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
633 .controller_data
= &spi_wm8731_chip_info
,
639 /* SPI controller data */
640 static struct bfin5xx_spi_master bfin_spi0_info
= {
642 .enable_dma
= 1, /* master has the ability to do dma transfer */
643 .pin_req
= {P_SPI0_SCK
, P_SPI0_MISO
, P_SPI0_MOSI
, 0},
647 static struct resource bfin_spi0_resource
[] = {
649 .start
= SPI0_REGBASE
,
650 .end
= SPI0_REGBASE
+ 0xFF,
651 .flags
= IORESOURCE_MEM
,
656 .flags
= IORESOURCE_IRQ
,
660 static struct platform_device bfin_spi0_device
= {
662 .id
= 0, /* Bus number */
663 .num_resources
= ARRAY_SIZE(bfin_spi0_resource
),
664 .resource
= bfin_spi0_resource
,
666 .platform_data
= &bfin_spi0_info
, /* Passed to driver */
669 #endif /* spi master and devices */
671 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
672 static struct platform_device bfin_fb_device
= {
673 .name
= "bf537-lq035",
677 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
678 static struct platform_device bfin_fb_adv7393_device
= {
679 .name
= "bfin-adv7393",
683 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
684 static struct resource bfin_uart_resources
[] = {
685 #ifdef CONFIG_SERIAL_BFIN_UART0
689 .flags
= IORESOURCE_MEM
,
692 #ifdef CONFIG_SERIAL_BFIN_UART1
696 .flags
= IORESOURCE_MEM
,
701 static struct platform_device bfin_uart_device
= {
704 .num_resources
= ARRAY_SIZE(bfin_uart_resources
),
705 .resource
= bfin_uart_resources
,
709 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
710 static struct resource bfin_twi0_resource
[] = {
712 .start
= TWI0_REGBASE
,
714 .flags
= IORESOURCE_MEM
,
719 .flags
= IORESOURCE_IRQ
,
723 static struct platform_device i2c_bfin_twi_device
= {
724 .name
= "i2c-bfin-twi",
726 .num_resources
= ARRAY_SIZE(bfin_twi0_resource
),
727 .resource
= bfin_twi0_resource
,
731 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
732 static struct platform_device bfin_sport0_uart_device
= {
733 .name
= "bfin-sport-uart",
737 static struct platform_device bfin_sport1_uart_device
= {
738 .name
= "bfin-sport-uart",
743 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
746 static struct pata_platform_info bfin_pata_platform_data
= {
748 .irq_type
= IRQF_TRIGGER_HIGH
| IRQF_DISABLED
,
751 static struct resource bfin_pata_resources
[] = {
755 .flags
= IORESOURCE_MEM
,
760 .flags
= IORESOURCE_MEM
,
765 .flags
= IORESOURCE_IRQ
,
769 static struct platform_device bfin_pata_device
= {
770 .name
= "pata_platform",
772 .num_resources
= ARRAY_SIZE(bfin_pata_resources
),
773 .resource
= bfin_pata_resources
,
775 .platform_data
= &bfin_pata_platform_data
,
780 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
781 #include <linux/input.h>
782 #include <linux/gpio_keys.h>
784 static struct gpio_keys_button bfin_gpio_keys_table
[] = {
785 {BTN_0
, GPIO_PG0
, 1, "gpio-keys: BTN0"},
786 {BTN_1
, GPIO_PG13
, 1, "gpio-keys: BTN1"},
789 static struct gpio_keys_platform_data bfin_gpio_keys_data
= {
790 .buttons
= bfin_gpio_keys_table
,
791 .nbuttons
= ARRAY_SIZE(bfin_gpio_keys_table
),
794 static struct platform_device bfin_device_gpiokeys
= {
797 .platform_data
= &bfin_gpio_keys_data
,
802 static struct platform_device
*stamp_devices
[] __initdata
= {
803 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
807 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
808 &bfin_pcmcia_cf_device
,
811 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
815 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
819 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
823 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
827 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
831 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
835 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
839 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
840 &net2272_bfin_device
,
843 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
847 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
851 #if defined(CONFIG_FB_BFIN_T350MCQB) || defined(CONFIG_FB_BFIN_T350MCQB_MODULE)
852 &bf52x_t350mcqb_device
,
855 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
856 &bfin_fb_adv7393_device
,
859 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
863 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
864 &i2c_bfin_twi_device
,
867 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
868 &bfin_sport0_uart_device
,
869 &bfin_sport1_uart_device
,
872 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
876 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
877 &bfin_device_gpiokeys
,
881 static int __init
stamp_init(void)
883 printk(KERN_INFO
"%s(): registering device resources\n", __FUNCTION__
);
884 platform_add_devices(stamp_devices
, ARRAY_SIZE(stamp_devices
));
885 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
886 spi_register_board_info(bfin_spi_board_info
,
887 ARRAY_SIZE(bfin_spi_board_info
));
890 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
891 irq_desc
[PATA_INT
].status
|= IRQ_NOAUTOEN
;
896 arch_initcall(stamp_init
);
898 void native_machine_restart(char *cmd
)
900 /* workaround reboot hang when booting from SPI */
901 if ((bfin_read_SYSCR() & 0x7) == 0x3)
902 bfin_gpio_reset_spi0_ssel1();
906 * Currently the MAC address is saved in Flash by U-Boot
908 #define FLASH_MAC 0x203f0000
909 void bfin_get_ether_addr(char *addr
)
911 *(u32
*)(&(addr
[0])) = bfin_read32(FLASH_MAC
);
912 *(u16
*)(&(addr
[4])) = bfin_read16(FLASH_MAC
+ 4);
914 EXPORT_SYMBOL(bfin_get_ether_addr
);