2 * File: arch/blackfin/mach-bf537/boards/stamp.c
3 * Based on: arch/blackfin/mach-bf533/boards/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2006 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 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
39 #include <linux/usb/isp1362.h>
41 #include <linux/ata_platform.h>
42 #include <linux/irq.h>
43 #include <linux/interrupt.h>
44 #include <linux/usb/sl811.h>
46 #include <asm/bfin5xx_spi.h>
47 #include <asm/reboot.h>
48 #include <asm/portmux.h>
49 #include <linux/spi/ad7877.h>
52 * Name the Board for the /proc/cpuinfo
54 const char bfin_board_name
[] = "ADDS-BF537-STAMP";
57 * Driver needs to know address, irq and flag pin.
60 #define ISP1761_BASE 0x203C0000
61 #define ISP1761_IRQ IRQ_PF7
63 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
64 static struct resource bfin_isp1761_resources
[] = {
66 .name
= "isp1761-regs",
67 .start
= ISP1761_BASE
+ 0x00000000,
68 .end
= ISP1761_BASE
+ 0x000fffff,
69 .flags
= IORESOURCE_MEM
,
74 .flags
= IORESOURCE_IRQ
,
78 static struct platform_device bfin_isp1761_device
= {
81 .num_resources
= ARRAY_SIZE(bfin_isp1761_resources
),
82 .resource
= bfin_isp1761_resources
,
85 static struct platform_device
*bfin_isp1761_devices
[] = {
89 int __init
bfin_isp1761_init(void)
91 unsigned int num_devices
= ARRAY_SIZE(bfin_isp1761_devices
);
93 printk(KERN_INFO
"%s(): registering device resources\n", __FUNCTION__
);
94 set_irq_type(ISP1761_IRQ
, IRQF_TRIGGER_FALLING
);
96 return platform_add_devices(bfin_isp1761_devices
, num_devices
);
99 void __exit
bfin_isp1761_exit(void)
101 platform_device_unregister(&bfin_isp1761_device
);
104 arch_initcall(bfin_isp1761_init
);
107 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
108 #include <linux/input.h>
109 #include <linux/gpio_keys.h>
111 static struct gpio_keys_button bfin_gpio_keys_table
[] = {
112 {BTN_0
, GPIO_PF2
, 1, "gpio-keys: BTN0"},
113 {BTN_1
, GPIO_PF3
, 1, "gpio-keys: BTN1"},
114 {BTN_2
, GPIO_PF4
, 1, "gpio-keys: BTN2"},
115 {BTN_3
, GPIO_PF5
, 1, "gpio-keys: BTN3"},
118 static struct gpio_keys_platform_data bfin_gpio_keys_data
= {
119 .buttons
= bfin_gpio_keys_table
,
120 .nbuttons
= ARRAY_SIZE(bfin_gpio_keys_table
),
123 static struct platform_device bfin_device_gpiokeys
= {
126 .platform_data
= &bfin_gpio_keys_data
,
131 <<<<<<< HEAD
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
133 static struct resource bfin_gpios_resources
= {
135 .end
= MAX_BLACKFIN_GPIOS
- 1,
136 .flags
= IORESOURCE_IRQ
,
139 static struct platform_device bfin_gpios_device
= {
140 .name
= "simple-gpio",
143 .resource
= &bfin_gpios_resources
,
146 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
147 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
148 static struct resource bfin_pcmcia_cf_resources
[] = {
150 .start
= 0x20310000, /* IO PORT */
152 .flags
= IORESOURCE_MEM
,
154 .start
= 0x20311000, /* Attribute Memory */
156 .flags
= IORESOURCE_MEM
,
160 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_LOWLEVEL
,
162 .start
= 6, /* Card Detect PF6 */
164 .flags
= IORESOURCE_IRQ
,
168 static struct platform_device bfin_pcmcia_cf_device
= {
169 .name
= "bfin_cf_pcmcia",
171 .num_resources
= ARRAY_SIZE(bfin_pcmcia_cf_resources
),
172 .resource
= bfin_pcmcia_cf_resources
,
176 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
177 static struct platform_device rtc_device
= {
183 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
184 static struct resource smc91x_resources
[] = {
186 .name
= "smc91x-regs",
188 .end
= 0x20300300 + 16,
189 .flags
= IORESOURCE_MEM
,
194 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
197 static struct platform_device smc91x_device
= {
200 .num_resources
= ARRAY_SIZE(smc91x_resources
),
201 .resource
= smc91x_resources
,
205 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
206 static struct resource dm9000_resources
[] = {
209 .end
= 0x203FB800 + 8,
210 .flags
= IORESOURCE_MEM
,
215 .flags
= (IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHEDGE
),
219 static struct platform_device dm9000_device
= {
222 .num_resources
= ARRAY_SIZE(dm9000_resources
),
223 .resource
= dm9000_resources
,
227 #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
228 static struct resource ax88180_resources
[] = {
231 .end
= 0x20300000 + 0x8000,
232 .flags
= IORESOURCE_MEM
,
237 .flags
= (IORESOURCE_IRQ
| IORESOURCE_IRQ_LOWLEVEL
),
241 static struct platform_device ax88180_device
= {
244 .num_resources
= ARRAY_SIZE(ax88180_resources
),
245 .resource
= ax88180_resources
,
249 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
250 static struct resource sl811_hcd_resources
[] = {
254 .flags
= IORESOURCE_MEM
,
258 .flags
= IORESOURCE_MEM
,
260 .start
= CONFIG_USB_SL811_BFIN_IRQ
,
261 .end
= CONFIG_USB_SL811_BFIN_IRQ
,
262 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
266 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
267 void sl811_port_power(struct device
*dev
, int is_on
)
269 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS
, "usb:SL811_VBUS");
270 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS
, is_on
);
274 static struct sl811_platform_data sl811_priv
= {
276 .power
= 250, /* == 500mA */
277 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
278 .port_power
= &sl811_port_power
,
282 static struct platform_device sl811_hcd_device
= {
286 .platform_data
= &sl811_priv
,
288 .num_resources
= ARRAY_SIZE(sl811_hcd_resources
),
289 .resource
= sl811_hcd_resources
,
293 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
294 static struct resource isp1362_hcd_resources
[] = {
298 .flags
= IORESOURCE_MEM
,
302 .flags
= IORESOURCE_MEM
,
304 .start
= CONFIG_USB_ISP1362_BFIN_GPIO_IRQ
,
305 .end
= CONFIG_USB_ISP1362_BFIN_GPIO_IRQ
,
306 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
310 static struct isp1362_platform_data isp1362_priv
= {
315 .int_edge_triggered
= 0,
316 .remote_wakeup_connected
= 0,
317 .no_power_switching
= 1,
318 .power_switching_mode
= 0,
321 static struct platform_device isp1362_hcd_device
= {
322 .name
= "isp1362-hcd",
325 .platform_data
= &isp1362_priv
,
327 .num_resources
= ARRAY_SIZE(isp1362_hcd_resources
),
328 .resource
= isp1362_hcd_resources
,
332 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
333 static struct platform_device bfin_mac_device
= {
338 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
339 static struct resource net2272_bfin_resources
[] = {
342 .end
= 0x20300000 + 0x100,
343 .flags
= IORESOURCE_MEM
,
347 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
351 static struct platform_device net2272_bfin_device
= {
354 .num_resources
= ARRAY_SIZE(net2272_bfin_resources
),
355 .resource
= net2272_bfin_resources
,
359 static struct mtd_partition stamp_partitions
[] = {
361 .name
= "Bootloader",
362 <<<<<<< HEAD
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
366 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
371 .offset
= MTDPART_OFS_APPEND
,
374 <<<<<<< HEAD
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
375 .size
= 0x400000 - 0x20000 - 0xE0000 - 0x10000,
377 .size
= 0x400000 - 0x40000 - 0xE0000 - 0x10000,
378 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
379 .offset
= MTDPART_OFS_APPEND
,
381 .name
= "MAC Address",
382 .size
= MTDPART_SIZ_FULL
,
384 .mask_flags
= MTD_WRITEABLE
,
388 static struct physmap_flash_data stamp_flash_data
= {
390 .parts
= stamp_partitions
,
391 .nr_parts
= ARRAY_SIZE(stamp_partitions
),
394 static struct resource stamp_flash_resource
= {
397 .flags
= IORESOURCE_MEM
,
400 static struct platform_device stamp_flash_device
= {
401 .name
= "physmap-flash",
404 .platform_data
= &stamp_flash_data
,
407 .resource
= &stamp_flash_resource
,
410 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
411 /* all SPI peripherals info goes here */
413 #if defined(CONFIG_MTD_M25P80) \
414 || defined(CONFIG_MTD_M25P80_MODULE)
415 static struct mtd_partition bfin_spi_flash_partitions
[] = {
417 .name
= "bootloader",
418 <<<<<<< HEAD
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
422 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
424 .mask_flags
= MTD_CAP_ROM
428 <<<<<<< HEAD
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
431 .offset
= MTDPART_OFS_APPEND
,
432 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
434 .name
= "file system",
435 <<<<<<< HEAD
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
437 .offset
= 0x00100000,
439 .size
= MTDPART_SIZ_FULL
,
440 .offset
= MTDPART_OFS_APPEND
,
441 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
445 static struct flash_platform_data bfin_spi_flash_data
= {
447 .parts
= bfin_spi_flash_partitions
,
448 .nr_parts
= ARRAY_SIZE(bfin_spi_flash_partitions
),
452 /* SPI flash chip (m25p64) */
453 static struct bfin5xx_spi_chip spi_flash_chip_info
= {
454 .enable_dma
= 0, /* use dma transfer with this chip*/
459 #if defined(CONFIG_SPI_ADC_BF533) \
460 || defined(CONFIG_SPI_ADC_BF533_MODULE)
462 static struct bfin5xx_spi_chip spi_adc_chip_info
= {
463 .enable_dma
= 1, /* use dma transfer with this chip*/
468 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
469 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
470 static struct bfin5xx_spi_chip ad1836_spi_chip_info
= {
476 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
477 static struct bfin5xx_spi_chip ad9960_spi_chip_info
= {
483 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
484 static struct bfin5xx_spi_chip spi_mmc_chip_info
= {
490 #if defined(CONFIG_PBX)
491 static struct bfin5xx_spi_chip spi_si3xxx_chip_info
= {
492 .ctl_reg
= 0x4, /* send zero */
495 .cs_change_per_word
= 1,
499 <<<<<<< HEAD
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
500 #if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
501 static struct bfin5xx_spi_chip ad5304_chip_info
= {
508 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
509 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
510 static struct bfin5xx_spi_chip spi_ad7877_chip_info
= {
515 static const struct ad7877_platform_data bfin_ad7877_ts_info
= {
517 .vref_delay_usecs
= 50, /* internal, no capacitor */
520 .pressure_max
= 1000,
522 .stopacq_polarity
= 1,
523 .first_conversion_delay
= 3,
524 .acquisition_time
= 1,
526 .pen_down_acc_interval
= 1,
530 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
531 static struct bfin5xx_spi_chip spidev_chip_info
= {
537 static struct spi_board_info bfin_spi_board_info
[] __initdata
= {
538 #if defined(CONFIG_MTD_M25P80) \
539 || defined(CONFIG_MTD_M25P80_MODULE)
541 /* the modalias must be the same as spi device driver name */
542 .modalias
= "m25p80", /* Name of spi_driver for this device */
543 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
544 .bus_num
= 0, /* Framework bus number */
545 .chip_select
= 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
546 .platform_data
= &bfin_spi_flash_data
,
547 .controller_data
= &spi_flash_chip_info
,
552 #if defined(CONFIG_SPI_ADC_BF533) \
553 || defined(CONFIG_SPI_ADC_BF533_MODULE)
555 .modalias
= "bfin_spi_adc", /* Name of spi_driver for this device */
556 .max_speed_hz
= 6250000, /* max spi clock (SCK) speed in HZ */
557 .bus_num
= 0, /* Framework bus number */
558 .chip_select
= 1, /* Framework chip select. */
559 .platform_data
= NULL
, /* No spi_driver specific config */
560 .controller_data
= &spi_adc_chip_info
,
564 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
565 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
567 .modalias
= "ad1836-spi",
568 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
570 .chip_select
= CONFIG_SND_BLACKFIN_SPI_PFBIT
,
571 .controller_data
= &ad1836_spi_chip_info
,
574 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
576 .modalias
= "ad9960-spi",
577 .max_speed_hz
= 10000000, /* max spi clock (SCK) speed in HZ */
580 .controller_data
= &ad9960_spi_chip_info
,
583 #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
585 .modalias
= "spi_mmc_dummy",
586 .max_speed_hz
= 20000000, /* max spi clock (SCK) speed in HZ */
589 .platform_data
= NULL
,
590 .controller_data
= &spi_mmc_chip_info
,
594 .modalias
= "spi_mmc",
595 .max_speed_hz
= 20000000, /* max spi clock (SCK) speed in HZ */
597 .chip_select
= CONFIG_SPI_MMC_CS_CHAN
,
598 .platform_data
= NULL
,
599 .controller_data
= &spi_mmc_chip_info
,
603 #if defined(CONFIG_PBX)
605 .modalias
= "fxs-spi",
606 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
608 .chip_select
= 8 - CONFIG_J11_JUMPER
,
609 .controller_data
= &spi_si3xxx_chip_info
,
613 .modalias
= "fxo-spi",
614 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
616 .chip_select
= 8 - CONFIG_J19_JUMPER
,
617 .controller_data
= &spi_si3xxx_chip_info
,
621 <<<<<<< HEAD
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
622 #if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
624 .modalias
= "ad5304_spi",
625 .max_speed_hz
= 1250000, /* max spi clock (SCK) speed in HZ */
628 .platform_data
= NULL
,
629 .controller_data
= &ad5304_chip_info
,
634 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
635 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
637 .modalias
= "ad7877",
638 .platform_data
= &bfin_ad7877_ts_info
,
640 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
643 .controller_data
= &spi_ad7877_chip_info
,
646 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
648 .modalias
= "spidev",
649 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
652 .controller_data
= &spidev_chip_info
,
657 /* SPI controller data */
658 static struct bfin5xx_spi_master bfin_spi0_info
= {
660 .enable_dma
= 1, /* master has the ability to do dma transfer */
661 .pin_req
= {P_SPI0_SCK
, P_SPI0_MISO
, P_SPI0_MOSI
, 0},
665 static struct resource bfin_spi0_resource
[] = {
667 .start
= SPI0_REGBASE
,
668 .end
= SPI0_REGBASE
+ 0xFF,
669 .flags
= IORESOURCE_MEM
,
674 .flags
= IORESOURCE_IRQ
,
678 static struct platform_device bfin_spi0_device
= {
680 .id
= 0, /* Bus number */
681 .num_resources
= ARRAY_SIZE(bfin_spi0_resource
),
682 .resource
= bfin_spi0_resource
,
684 .platform_data
= &bfin_spi0_info
, /* Passed to driver */
687 #endif /* spi master and devices */
689 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
690 static struct platform_device bfin_fb_device
= {
691 .name
= "bf537-lq035",
695 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
696 static struct platform_device bfin_fb_adv7393_device
= {
697 .name
= "bfin-adv7393",
701 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
702 static struct resource bfin_uart_resources
[] = {
703 #ifdef CONFIG_SERIAL_BFIN_UART0
707 .flags
= IORESOURCE_MEM
,
710 #ifdef CONFIG_SERIAL_BFIN_UART1
714 .flags
= IORESOURCE_MEM
,
719 static struct platform_device bfin_uart_device
= {
722 .num_resources
= ARRAY_SIZE(bfin_uart_resources
),
723 .resource
= bfin_uart_resources
,
727 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
728 static struct resource bfin_twi0_resource
[] = {
730 .start
= TWI0_REGBASE
,
732 .flags
= IORESOURCE_MEM
,
737 .flags
= IORESOURCE_IRQ
,
741 static struct platform_device i2c_bfin_twi_device
= {
742 .name
= "i2c-bfin-twi",
744 .num_resources
= ARRAY_SIZE(bfin_twi0_resource
),
745 .resource
= bfin_twi0_resource
,
749 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
750 static struct platform_device bfin_sport0_uart_device
= {
751 .name
= "bfin-sport-uart",
755 static struct platform_device bfin_sport1_uart_device
= {
756 .name
= "bfin-sport-uart",
761 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
764 static struct pata_platform_info bfin_pata_platform_data
= {
766 .irq_flags
= IRQF_TRIGGER_HIGH
| IRQF_DISABLED
,
769 static struct resource bfin_pata_resources
[] = {
773 .flags
= IORESOURCE_MEM
,
778 .flags
= IORESOURCE_MEM
,
783 .flags
= IORESOURCE_IRQ
,
787 static struct platform_device bfin_pata_device
= {
788 .name
= "pata_platform",
790 .num_resources
= ARRAY_SIZE(bfin_pata_resources
),
791 .resource
= bfin_pata_resources
,
793 .platform_data
= &bfin_pata_platform_data
,
798 static struct platform_device
*stamp_devices
[] __initdata
= {
799 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
800 &bfin_pcmcia_cf_device
,
803 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
807 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
811 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
815 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
819 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
823 #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
827 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
831 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
832 &net2272_bfin_device
,
835 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
839 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
843 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
844 &bfin_fb_adv7393_device
,
847 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
851 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
852 &i2c_bfin_twi_device
,
855 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
856 &bfin_sport0_uart_device
,
857 &bfin_sport1_uart_device
,
860 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
864 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
865 &bfin_device_gpiokeys
,
867 <<<<<<< HEAD
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
871 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a
:arch
/blackfin
/mach
-bf537
/boards
/stamp
.c
875 static int __init
stamp_init(void)
877 printk(KERN_INFO
"%s(): registering device resources\n", __FUNCTION__
);
878 platform_add_devices(stamp_devices
, ARRAY_SIZE(stamp_devices
));
879 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
880 spi_register_board_info(bfin_spi_board_info
,
881 ARRAY_SIZE(bfin_spi_board_info
));
884 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
885 irq_desc
[PATA_INT
].status
|= IRQ_NOAUTOEN
;
890 arch_initcall(stamp_init
);
892 void native_machine_restart(char *cmd
)
894 /* workaround reboot hang when booting from SPI */
895 if ((bfin_read_SYSCR() & 0x7) == 0x3)
896 bfin_gpio_reset_spi0_ssel1();
900 * Currently the MAC address is saved in Flash by U-Boot
902 #define FLASH_MAC 0x203f0000
903 void bfin_get_ether_addr(char *addr
)
905 *(u32
*)(&(addr
[0])) = bfin_read32(FLASH_MAC
);
906 *(u16
*)(&(addr
[4])) = bfin_read16(FLASH_MAC
+ 4);
908 EXPORT_SYMBOL(bfin_get_ether_addr
);