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/kernel.h>
33 #include <linux/platform_device.h>
34 #include <linux/mtd/mtd.h>
35 #include <linux/mtd/nand.h>
36 #include <linux/mtd/partitions.h>
37 #include <linux/mtd/plat-ram.h>
38 #include <linux/mtd/physmap.h>
39 #include <linux/spi/spi.h>
40 #include <linux/spi/flash.h>
41 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
42 #include <linux/usb/isp1362.h>
44 #include <linux/ata_platform.h>
45 #include <linux/irq.h>
46 #include <linux/interrupt.h>
47 #include <linux/i2c.h>
48 #include <linux/usb/sl811.h>
49 #include <linux/spi/mmc_spi.h>
51 #include <asm/bfin5xx_spi.h>
52 #include <asm/reboot.h>
53 #include <asm/portmux.h>
57 * Name the Board for the /proc/cpuinfo
59 const char bfin_board_name[] = "ADI BF537-STAMP";
62 * Driver needs to know address, irq and flag pin.
65 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
66 #include <linux/usb/isp1760.h>
67 static struct resource bfin_isp1760_resources[] = {
70 .end = 0x203C0000 + 0x000fffff,
71 .flags = IORESOURCE_MEM,
76 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
80 static struct isp1760_platform_data isp1760_priv = {
85 .dack_polarity_high = 0,
86 .dreq_polarity_high = 0,
89 static struct platform_device bfin_isp1760_device = {
90 .name = "isp1760-hcd",
93 .platform_data = &isp1760_priv,
95 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
96 .resource = bfin_isp1760_resources,
100 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
101 #include <linux/input.h>
102 #include <linux/gpio_keys.h>
104 static struct gpio_keys_button bfin_gpio_keys_table[] = {
105 {BTN_0, GPIO_PF2, 1, "gpio-keys: BTN0"},
106 {BTN_1, GPIO_PF3, 1, "gpio-keys: BTN1"},
107 {BTN_2, GPIO_PF4, 1, "gpio-keys: BTN2"},
108 {BTN_3, GPIO_PF5, 1, "gpio-keys: BTN3"},
111 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
112 .buttons = bfin_gpio_keys_table,
113 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
116 static struct platform_device bfin_device_gpiokeys = {
119 .platform_data = &bfin_gpio_keys_data,
124 static struct resource bfin_gpios_resources = {
126 .end = MAX_BLACKFIN_GPIOS - 1,
127 .flags = IORESOURCE_IRQ,
130 static struct platform_device bfin_gpios_device = {
131 .name = "simple-gpio",
134 .resource = &bfin_gpios_resources,
137 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
138 static struct resource bfin_pcmcia_cf_resources[] = {
140 .start = 0x20310000, /* IO PORT */
142 .flags = IORESOURCE_MEM,
144 .start = 0x20311000, /* Attribute Memory */
146 .flags = IORESOURCE_MEM,
150 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
152 .start = 6, /* Card Detect PF6 */
154 .flags = IORESOURCE_IRQ,
158 static struct platform_device bfin_pcmcia_cf_device = {
159 .name = "bfin_cf_pcmcia",
161 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
162 .resource = bfin_pcmcia_cf_resources,
166 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
167 static struct platform_device rtc_device = {
173 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
174 static struct resource smc91x_resources[] = {
176 .name = "smc91x-regs",
178 .end = 0x20300300 + 16,
179 .flags = IORESOURCE_MEM,
184 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
187 static struct platform_device smc91x_device = {
190 .num_resources = ARRAY_SIZE(smc91x_resources),
191 .resource = smc91x_resources,
195 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
196 static struct resource dm9000_resources[] = {
199 .end = 0x203FB800 + 8,
200 .flags = IORESOURCE_MEM,
205 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
209 static struct platform_device dm9000_device = {
212 .num_resources = ARRAY_SIZE(dm9000_resources),
213 .resource = dm9000_resources,
217 #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
218 static struct resource ax88180_resources[] = {
221 .end = 0x20300000 + 0x8000,
222 .flags = IORESOURCE_MEM,
227 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL),
231 static struct platform_device ax88180_device = {
234 .num_resources = ARRAY_SIZE(ax88180_resources),
235 .resource = ax88180_resources,
239 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
240 static struct resource sl811_hcd_resources[] = {
244 .flags = IORESOURCE_MEM,
248 .flags = IORESOURCE_MEM,
250 .start = CONFIG_USB_SL811_BFIN_IRQ,
251 .end = CONFIG_USB_SL811_BFIN_IRQ,
252 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
256 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
257 void sl811_port_power(struct device *dev, int is_on)
259 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
260 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
264 static struct sl811_platform_data sl811_priv = {
266 .power = 250, /* == 500mA */
267 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
268 .port_power = &sl811_port_power,
272 static struct platform_device sl811_hcd_device = {
276 .platform_data = &sl811_priv,
278 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
279 .resource = sl811_hcd_resources,
283 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
284 static struct resource isp1362_hcd_resources[] = {
288 .flags = IORESOURCE_MEM,
292 .flags = IORESOURCE_MEM,
294 .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
295 .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
296 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
300 static struct isp1362_platform_data isp1362_priv = {
305 .int_edge_triggered = 0,
306 .remote_wakeup_connected = 0,
307 .no_power_switching = 1,
308 .power_switching_mode = 0,
311 static struct platform_device isp1362_hcd_device = {
312 .name = "isp1362-hcd",
315 .platform_data = &isp1362_priv,
317 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
318 .resource = isp1362_hcd_resources,
322 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
323 static struct platform_device bfin_mii_bus = {
324 .name = "bfin_mii_bus",
327 static struct platform_device bfin_mac_device = {
329 .dev.platform_data = &bfin_mii_bus,
333 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
334 static struct resource net2272_bfin_resources[] = {
337 .end = 0x20300000 + 0x100,
338 .flags = IORESOURCE_MEM,
342 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
346 static struct platform_device net2272_bfin_device = {
349 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
350 .resource = net2272_bfin_resources,
354 #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
355 #ifdef CONFIG_MTD_PARTITIONS
356 const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
358 static struct mtd_partition bfin_plat_nand_partitions[] = {
360 .name = "linux kernel(nand)",
364 .name = "file system(nand)",
365 .size = MTDPART_SIZ_FULL,
366 .offset = MTDPART_OFS_APPEND,
371 #define BFIN_NAND_PLAT_CLE 2
372 #define BFIN_NAND_PLAT_ALE 1
373 static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
375 struct nand_chip *this = mtd->priv;
377 if (cmd == NAND_CMD_NONE)
381 writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_CLE));
383 writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_ALE));
386 #define BFIN_NAND_PLAT_READY GPIO_PF3
387 static int bfin_plat_nand_dev_ready(struct mtd_info *mtd)
389 return gpio_get_value(BFIN_NAND_PLAT_READY);
392 static struct platform_nand_data bfin_plat_nand_data = {
395 #ifdef CONFIG_MTD_PARTITIONS
396 .part_probe_types = part_probes,
397 .partitions = bfin_plat_nand_partitions,
398 .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions),
402 .cmd_ctrl = bfin_plat_nand_cmd_ctrl,
403 .dev_ready = bfin_plat_nand_dev_ready,
407 #define MAX(x, y) (x > y ? x : y)
408 static struct resource bfin_plat_nand_resources = {
410 .end = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),
411 .flags = IORESOURCE_IO,
414 static struct platform_device bfin_async_nand_device = {
418 .resource = &bfin_plat_nand_resources,
420 .platform_data = &bfin_plat_nand_data,
424 static void bfin_plat_nand_init(void)
426 gpio_request(BFIN_NAND_PLAT_READY, "bfin_nand_plat");
429 static void bfin_plat_nand_init(void) {}
432 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
433 static struct mtd_partition stamp_partitions[] = {
435 .name = "bootloader(nor)",
439 .name = "linux kernel(nor)",
441 .offset = MTDPART_OFS_APPEND,
443 .name = "file system(nor)",
444 .size = 0x400000 - 0x40000 - 0x180000 - 0x10000,
445 .offset = MTDPART_OFS_APPEND,
447 .name = "MAC Address(nor)",
448 .size = MTDPART_SIZ_FULL,
450 .mask_flags = MTD_WRITEABLE,
454 static struct physmap_flash_data stamp_flash_data = {
456 .parts = stamp_partitions,
457 .nr_parts = ARRAY_SIZE(stamp_partitions),
460 static struct resource stamp_flash_resource = {
463 .flags = IORESOURCE_MEM,
466 static struct platform_device stamp_flash_device = {
467 .name = "physmap-flash",
470 .platform_data = &stamp_flash_data,
473 .resource = &stamp_flash_resource,
477 #if defined(CONFIG_MTD_M25P80) \
478 || defined(CONFIG_MTD_M25P80_MODULE)
479 static struct mtd_partition bfin_spi_flash_partitions[] = {
481 .name = "bootloader(spi)",
484 .mask_flags = MTD_CAP_ROM
486 .name = "linux kernel(spi)",
488 .offset = MTDPART_OFS_APPEND,
490 .name = "file system(spi)",
491 .size = MTDPART_SIZ_FULL,
492 .offset = MTDPART_OFS_APPEND,
496 static struct flash_platform_data bfin_spi_flash_data = {
498 .parts = bfin_spi_flash_partitions,
499 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
500 /* .type = "m25p64", */
503 /* SPI flash chip (m25p64) */
504 static struct bfin5xx_spi_chip spi_flash_chip_info = {
505 .enable_dma = 0, /* use dma transfer with this chip*/
510 #if defined(CONFIG_BFIN_SPI_ADC) \
511 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
513 static struct bfin5xx_spi_chip spi_adc_chip_info = {
514 .enable_dma = 1, /* use dma transfer with this chip*/
519 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
520 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
521 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
527 #if defined(CONFIG_SND_BF5XX_SOC_AD1938) \
528 || defined(CONFIG_SND_BF5XX_SOC_AD1938_MODULE)
529 static struct bfin5xx_spi_chip ad1938_spi_chip_info = {
536 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
537 static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
543 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
544 #define MMC_SPI_CARD_DETECT_INT IRQ_PF5
546 static int bfin_mmc_spi_init(struct device *dev,
547 irqreturn_t (*detect_int)(int, void *), void *data)
549 return request_irq(MMC_SPI_CARD_DETECT_INT, detect_int,
550 IRQF_TRIGGER_FALLING, "mmc-spi-detect", data);
553 static void bfin_mmc_spi_exit(struct device *dev, void *data)
555 free_irq(MMC_SPI_CARD_DETECT_INT, data);
558 static struct mmc_spi_platform_data bfin_mmc_spi_pdata = {
559 .init = bfin_mmc_spi_init,
560 .exit = bfin_mmc_spi_exit,
561 .detect_delay = 100, /* msecs */
564 static struct bfin5xx_spi_chip mmc_spi_chip_info = {
571 #if defined(CONFIG_PBX)
572 static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
573 .ctl_reg = 0x4, /* send zero */
576 .cs_change_per_word = 1,
580 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
581 #include <linux/spi/ad7877.h>
582 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
587 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
589 .vref_delay_usecs = 50, /* internal, no capacitor */
592 .pressure_max = 1000,
594 .stopacq_polarity = 1,
595 .first_conversion_delay = 3,
596 .acquisition_time = 1,
598 .pen_down_acc_interval = 1,
602 #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
603 #include <linux/spi/ad7879.h>
604 static const struct ad7879_platform_data bfin_ad7879_ts_info = {
605 .model = 7879, /* Model = AD7879 */
606 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */
607 .pressure_max = 10000,
609 .first_conversion_delay = 3, /* wait 512us before do a first conversion */
610 .acquisition_time = 1, /* 4us acquisition time per sample */
611 .median = 2, /* do 8 measurements */
612 .averaging = 1, /* take the average of 4 middle samples */
613 .pen_down_acc_interval = 255, /* 9.4 ms */
614 .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */
615 .gpio_default = 1, /* During initialization set GPIO = HIGH */
619 #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
620 #include <linux/input.h>
621 #include <linux/spi/adxl34x.h>
622 static const struct adxl34x_platform_data adxl34x_info = {
626 .tap_threshold = 0x31,
627 .tap_duration = 0x10,
630 .tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN,
631 .act_axis_control = 0xFF,
632 .activity_threshold = 5,
633 .inactivity_threshold = 3,
634 .inactivity_time = 4,
635 .free_fall_threshold = 0x7,
636 .free_fall_time = 0x20,
638 .data_range = ADXL_FULL_RES,
641 .ev_code_x = ABS_X, /* EV_REL */
642 .ev_code_y = ABS_Y, /* EV_REL */
643 .ev_code_z = ABS_Z, /* EV_REL */
645 .ev_code_tap_x = BTN_TOUCH, /* EV_KEY */
646 .ev_code_tap_y = BTN_TOUCH, /* EV_KEY */
647 .ev_code_tap_z = BTN_TOUCH, /* EV_KEY */
649 /* .ev_code_ff = KEY_F,*/ /* EV_KEY */
650 /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
651 .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK,
652 .fifo_mode = ADXL_FIFO_STREAM,
656 #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
657 static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
663 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
664 static struct bfin5xx_spi_chip spidev_chip_info = {
670 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
671 static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
677 #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
678 static struct bfin5xx_spi_chip enc28j60_spi_chip_info = {
681 .cs_gpio = GPIO_PF10,
685 #if defined(CONFIG_MTD_DATAFLASH) \
686 || defined(CONFIG_MTD_DATAFLASH_MODULE)
688 static struct mtd_partition bfin_spi_dataflash_partitions[] = {
690 .name = "bootloader(spi)",
693 .mask_flags = MTD_CAP_ROM
695 .name = "linux kernel(spi)",
697 .offset = MTDPART_OFS_APPEND,
699 .name = "file system(spi)",
700 .size = MTDPART_SIZ_FULL,
701 .offset = MTDPART_OFS_APPEND,
705 static struct flash_platform_data bfin_spi_dataflash_data = {
706 .name = "SPI Dataflash",
707 .parts = bfin_spi_dataflash_partitions,
708 .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
712 static struct bfin5xx_spi_chip data_flash_chip_info = {
713 .enable_dma = 0, /* use dma transfer with this chip*/
718 static struct spi_board_info bfin_spi_board_info[] __initdata = {
719 #if defined(CONFIG_MTD_M25P80) \
720 || defined(CONFIG_MTD_M25P80_MODULE)
722 /* the modalias must be the same as spi device driver name */
723 .modalias = "m25p80", /* Name of spi_driver for this device */
724 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
725 .bus_num = 0, /* Framework bus number */
726 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
727 .platform_data = &bfin_spi_flash_data,
728 .controller_data = &spi_flash_chip_info,
732 #if defined(CONFIG_MTD_DATAFLASH) \
733 || defined(CONFIG_MTD_DATAFLASH_MODULE)
734 { /* DataFlash chip */
735 .modalias = "mtd_dataflash",
736 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */
737 .bus_num = 0, /* Framework bus number */
738 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
739 .platform_data = &bfin_spi_dataflash_data,
740 .controller_data = &data_flash_chip_info,
744 #if defined(CONFIG_BFIN_SPI_ADC) \
745 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
747 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
748 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
749 .bus_num = 0, /* Framework bus number */
750 .chip_select = 1, /* Framework chip select. */
751 .platform_data = NULL, /* No spi_driver specific config */
752 .controller_data = &spi_adc_chip_info,
756 #if defined(CONFIG_SND_BLACKFIN_AD1836) \
757 || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
759 .modalias = "ad1836-spi",
760 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
762 .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
763 .controller_data = &ad1836_spi_chip_info,
767 #if defined(CONFIG_SND_BF5XX_SOC_AD1938) || defined(CONFIG_SND_BF5XX_SOC_AD1938_MODULE)
769 .modalias = "ad1938-spi",
770 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
772 .chip_select = 0,/* CONFIG_SND_BLACKFIN_SPI_PFBIT */
773 .controller_data = &ad1938_spi_chip_info,
778 #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
780 .modalias = "ad9960-spi",
781 .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
784 .controller_data = &ad9960_spi_chip_info,
787 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
789 .modalias = "mmc_spi",
790 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
793 .platform_data = &bfin_mmc_spi_pdata,
794 .controller_data = &mmc_spi_chip_info,
798 #if defined(CONFIG_PBX)
800 .modalias = "fxs-spi",
801 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
803 .chip_select = 8 - CONFIG_J11_JUMPER,
804 .controller_data = &spi_si3xxx_chip_info,
808 .modalias = "fxo-spi",
809 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
811 .chip_select = 8 - CONFIG_J19_JUMPER,
812 .controller_data = &spi_si3xxx_chip_info,
816 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
818 .modalias = "ad7877",
819 .platform_data = &bfin_ad7877_ts_info,
821 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
824 .controller_data = &spi_ad7877_chip_info,
827 #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
829 .modalias = "ad7879",
830 .platform_data = &bfin_ad7879_ts_info,
832 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
835 .controller_data = &spi_ad7879_chip_info,
836 .mode = SPI_CPHA | SPI_CPOL,
839 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
841 .modalias = "spidev",
842 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
845 .controller_data = &spidev_chip_info,
848 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
850 .modalias = "bfin-lq035q1-spi",
851 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
854 .controller_data = &lq035q1_spi_chip_info,
855 .mode = SPI_CPHA | SPI_CPOL,
858 #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
860 .modalias = "enc28j60",
861 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
864 .chip_select = 0, /* GPIO controlled SSEL */
865 .controller_data = &enc28j60_spi_chip_info,
871 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
872 /* SPI controller data */
873 static struct bfin5xx_spi_master bfin_spi0_info = {
875 .enable_dma = 1, /* master has the ability to do dma transfer */
876 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
880 static struct resource bfin_spi0_resource[] = {
882 .start = SPI0_REGBASE,
883 .end = SPI0_REGBASE + 0xFF,
884 .flags = IORESOURCE_MEM,
889 .flags = IORESOURCE_DMA,
894 .flags = IORESOURCE_IRQ,
898 static struct platform_device bfin_spi0_device = {
900 .id = 0, /* Bus number */
901 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
902 .resource = bfin_spi0_resource,
904 .platform_data = &bfin_spi0_info, /* Passed to driver */
907 #endif /* spi master and devices */
909 #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE)
911 /* SPORT SPI controller data */
912 static struct bfin5xx_spi_master bfin_sport_spi0_info = {
913 .num_chipselect = 1, /* master only supports one device */
914 .enable_dma = 0, /* master don't support DMA */
915 .pin_req = {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_DRPRI,
916 P_SPORT0_RSCLK, P_SPORT0_TFS, P_SPORT0_RFS, 0},
919 static struct resource bfin_sport_spi0_resource[] = {
921 .start = SPORT0_TCR1,
922 .end = SPORT0_TCR1 + 0xFF,
923 .flags = IORESOURCE_MEM,
926 .start = IRQ_SPORT0_ERROR,
927 .end = IRQ_SPORT0_ERROR,
928 .flags = IORESOURCE_IRQ,
932 static struct platform_device bfin_sport_spi0_device = {
933 .name = "bfin-sport-spi",
934 .id = 1, /* Bus number */
935 .num_resources = ARRAY_SIZE(bfin_sport_spi0_resource),
936 .resource = bfin_sport_spi0_resource,
938 .platform_data = &bfin_sport_spi0_info, /* Passed to driver */
942 static struct bfin5xx_spi_master bfin_sport_spi1_info = {
943 .num_chipselect = 1, /* master only supports one device */
944 .enable_dma = 0, /* master don't support DMA */
945 .pin_req = {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_DRPRI,
946 P_SPORT1_RSCLK, P_SPORT1_TFS, P_SPORT1_RFS, 0},
949 static struct resource bfin_sport_spi1_resource[] = {
951 .start = SPORT1_TCR1,
952 .end = SPORT1_TCR1 + 0xFF,
953 .flags = IORESOURCE_MEM,
956 .start = IRQ_SPORT1_ERROR,
957 .end = IRQ_SPORT1_ERROR,
958 .flags = IORESOURCE_IRQ,
962 static struct platform_device bfin_sport_spi1_device = {
963 .name = "bfin-sport-spi",
964 .id = 2, /* Bus number */
965 .num_resources = ARRAY_SIZE(bfin_sport_spi1_resource),
966 .resource = bfin_sport_spi1_resource,
968 .platform_data = &bfin_sport_spi1_info, /* Passed to driver */
972 #endif /* sport spi master and devices */
974 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
975 static struct platform_device bfin_fb_device = {
976 .name = "bf537-lq035",
980 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
981 static struct platform_device bfin_fb_adv7393_device = {
982 .name = "bfin-adv7393",
986 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
987 #include <asm/bfin-lq035q1.h>
989 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
990 .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
991 .use_bl = 0, /* let something else control the LCD Blacklight */
995 static struct resource bfin_lq035q1_resources[] = {
997 .start = IRQ_PPI_ERROR,
998 .end = IRQ_PPI_ERROR,
999 .flags = IORESOURCE_IRQ,
1003 static struct platform_device bfin_lq035q1_device = {
1004 .name = "bfin-lq035q1",
1006 .num_resources = ARRAY_SIZE(bfin_lq035q1_resources),
1007 .resource = bfin_lq035q1_resources,
1009 .platform_data = &bfin_lq035q1_data,
1014 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
1015 static struct resource bfin_uart_resources[] = {
1016 #ifdef CONFIG_SERIAL_BFIN_UART0
1018 .start = 0xFFC00400,
1020 .flags = IORESOURCE_MEM,
1023 #ifdef CONFIG_SERIAL_BFIN_UART1
1025 .start = 0xFFC02000,
1027 .flags = IORESOURCE_MEM,
1032 static struct platform_device bfin_uart_device = {
1033 .name = "bfin-uart",
1035 .num_resources = ARRAY_SIZE(bfin_uart_resources),
1036 .resource = bfin_uart_resources,
1040 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
1041 #ifdef CONFIG_BFIN_SIR0
1042 static struct resource bfin_sir0_resources[] = {
1044 .start = 0xFFC00400,
1046 .flags = IORESOURCE_MEM,
1049 .start = IRQ_UART0_RX,
1050 .end = IRQ_UART0_RX+1,
1051 .flags = IORESOURCE_IRQ,
1054 .start = CH_UART0_RX,
1055 .end = CH_UART0_RX+1,
1056 .flags = IORESOURCE_DMA,
1060 static struct platform_device bfin_sir0_device = {
1063 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
1064 .resource = bfin_sir0_resources,
1067 #ifdef CONFIG_BFIN_SIR1
1068 static struct resource bfin_sir1_resources[] = {
1070 .start = 0xFFC02000,
1072 .flags = IORESOURCE_MEM,
1075 .start = IRQ_UART1_RX,
1076 .end = IRQ_UART1_RX+1,
1077 .flags = IORESOURCE_IRQ,
1080 .start = CH_UART1_RX,
1081 .end = CH_UART1_RX+1,
1082 .flags = IORESOURCE_DMA,
1086 static struct platform_device bfin_sir1_device = {
1089 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
1090 .resource = bfin_sir1_resources,
1095 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1096 static struct resource bfin_twi0_resource[] = {
1098 .start = TWI0_REGBASE,
1099 .end = TWI0_REGBASE,
1100 .flags = IORESOURCE_MEM,
1105 .flags = IORESOURCE_IRQ,
1109 static struct platform_device i2c_bfin_twi_device = {
1110 .name = "i2c-bfin-twi",
1112 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
1113 .resource = bfin_twi0_resource,
1117 #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
1118 #include <linux/input.h>
1119 #include <linux/i2c/adp5588.h>
1120 static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = {
1134 [13] = KEY_BACKSLASH,
1146 [26] = KEY_LEFTBRACE,
1147 [27] = KEY_RIGHTBRACE,
1160 [41] = KEY_SEMICOLON,
1161 [42] = KEY_APOSTROPHE,
1162 [43] = KEY_BACKSLASH,
1182 [65] = KEY_BACKSPACE,
1195 static struct adp5588_kpad_platform_data adp5588_kpad_data = {
1198 .keymap = adp5588_keymap,
1199 .keymapsize = ARRAY_SIZE(adp5588_keymap),
1204 #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE)
1205 #include <linux/mfd/adp5520.h>
1208 * ADP5520/5501 Backlight Data
1211 static struct adp5520_backlight_platfrom_data adp5520_backlight_data = {
1212 .fade_in = FADE_T_1200ms,
1213 .fade_out = FADE_T_1200ms,
1214 .fade_led_law = BL_LAW_LINEAR,
1216 .abml_filt = BL_AMBL_FILT_640ms,
1217 .l1_daylight_max = BL_CUR_mA(15),
1218 .l1_daylight_dim = BL_CUR_mA(0),
1219 .l2_office_max = BL_CUR_mA(7),
1220 .l2_office_dim = BL_CUR_mA(0),
1221 .l3_dark_max = BL_CUR_mA(3),
1222 .l3_dark_dim = BL_CUR_mA(0),
1223 .l2_trip = L2_COMP_CURR_uA(700),
1224 .l2_hyst = L2_COMP_CURR_uA(50),
1225 .l3_trip = L3_COMP_CURR_uA(80),
1226 .l3_hyst = L3_COMP_CURR_uA(20),
1230 * ADP5520/5501 LEDs Data
1233 #include <linux/leds.h>
1235 static struct led_info adp5520_leds[] = {
1237 .name = "adp5520-led1",
1238 .default_trigger = "none",
1239 .flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | LED_OFFT_600ms,
1241 #ifdef ADP5520_EN_ALL_LEDS
1243 .name = "adp5520-led2",
1244 .default_trigger = "none",
1245 .flags = FLAG_ID_ADP5520_LED2_ADP5501_LED1,
1248 .name = "adp5520-led3",
1249 .default_trigger = "none",
1250 .flags = FLAG_ID_ADP5520_LED3_ADP5501_LED2,
1255 static struct adp5520_leds_platfrom_data adp5520_leds_data = {
1256 .num_leds = ARRAY_SIZE(adp5520_leds),
1257 .leds = adp5520_leds,
1258 .fade_in = FADE_T_600ms,
1259 .fade_out = FADE_T_600ms,
1260 .led_on_time = LED_ONT_600ms,
1267 static struct adp5520_gpio_platfrom_data adp5520_gpio_data = {
1269 .gpio_en_mask = GPIO_C1 | GPIO_C2 | GPIO_R2,
1270 .gpio_pullup_mask = GPIO_C1 | GPIO_C2 | GPIO_R2,
1274 * ADP5520 Keypad Data
1277 #include <linux/input.h>
1278 static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = {
1279 [KEY(0, 0)] = KEY_GRAVE,
1280 [KEY(0, 1)] = KEY_1,
1281 [KEY(0, 2)] = KEY_2,
1282 [KEY(0, 3)] = KEY_3,
1283 [KEY(1, 0)] = KEY_4,
1284 [KEY(1, 1)] = KEY_5,
1285 [KEY(1, 2)] = KEY_6,
1286 [KEY(1, 3)] = KEY_7,
1287 [KEY(2, 0)] = KEY_8,
1288 [KEY(2, 1)] = KEY_9,
1289 [KEY(2, 2)] = KEY_0,
1290 [KEY(2, 3)] = KEY_MINUS,
1291 [KEY(3, 0)] = KEY_EQUAL,
1292 [KEY(3, 1)] = KEY_BACKSLASH,
1293 [KEY(3, 2)] = KEY_BACKSPACE,
1294 [KEY(3, 3)] = KEY_ENTER,
1297 static struct adp5520_keys_platfrom_data adp5520_keys_data = {
1298 .rows_en_mask = ROW_R3 | ROW_R2 | ROW_R1 | ROW_R0,
1299 .cols_en_mask = COL_C3 | COL_C2 | COL_C1 | COL_C0,
1300 .keymap = adp5520_keymap,
1301 .keymapsize = ARRAY_SIZE(adp5520_keymap),
1306 * ADP5520/5501 Multifuction Device Init Data
1309 static struct adp5520_subdev_info adp5520_subdevs[] = {
1311 .name = "adp5520-backlight",
1313 .platform_data = &adp5520_backlight_data,
1316 .name = "adp5520-led",
1318 .platform_data = &adp5520_leds_data,
1321 .name = "adp5520-gpio",
1323 .platform_data = &adp5520_gpio_data,
1326 .name = "adp5520-keys",
1328 .platform_data = &adp5520_keys_data,
1332 static struct adp5520_platform_data adp5520_pdev_data = {
1333 .num_subdevs = ARRAY_SIZE(adp5520_subdevs),
1334 .subdevs = adp5520_subdevs,
1339 static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1340 #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE)
1342 I2C_BOARD_INFO("ad7142_joystick", 0x2C),
1346 #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
1348 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
1351 #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
1353 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
1357 #if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE)
1359 I2C_BOARD_INFO("ad7879", 0x2F),
1361 .platform_data = (void *)&bfin_ad7879_ts_info,
1364 #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
1366 I2C_BOARD_INFO("adp5588-keys", 0x34),
1368 .platform_data = (void *)&adp5588_kpad_data,
1371 #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE)
1373 I2C_BOARD_INFO("pmic-adp5520", 0x32),
1375 .platform_data = (void *)&adp5520_pdev_data,
1378 #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
1380 I2C_BOARD_INFO("adxl34x", 0x53),
1382 .platform_data = (void *)&adxl34x_info,
1387 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1388 static struct platform_device bfin_sport0_uart_device = {
1389 .name = "bfin-sport-uart",
1393 static struct platform_device bfin_sport1_uart_device = {
1394 .name = "bfin-sport-uart",
1399 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1400 #define CF_IDE_NAND_CARD_USE_HDD_INTERFACE
1401 /* #define CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE */
1403 #ifdef CF_IDE_NAND_CARD_USE_HDD_INTERFACE
1404 #define PATA_INT IRQ_PF5
1405 static struct pata_platform_info bfin_pata_platform_data = {
1407 .irq_flags = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
1410 static struct resource bfin_pata_resources[] = {
1412 .start = 0x20314020,
1414 .flags = IORESOURCE_MEM,
1417 .start = 0x2031401C,
1419 .flags = IORESOURCE_MEM,
1424 .flags = IORESOURCE_IRQ,
1427 #elif defined(CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE)
1428 static struct pata_platform_info bfin_pata_platform_data = {
1431 /* CompactFlash Storage Card Memory Mapped Adressing
1434 static struct resource bfin_pata_resources[] = {
1436 .start = 0x20211800,
1438 .flags = IORESOURCE_MEM,
1441 .start = 0x2021180E, /* Device Ctl */
1443 .flags = IORESOURCE_MEM,
1448 static struct platform_device bfin_pata_device = {
1449 .name = "pata_platform",
1451 .num_resources = ARRAY_SIZE(bfin_pata_resources),
1452 .resource = bfin_pata_resources,
1454 .platform_data = &bfin_pata_platform_data,
1459 static const unsigned int cclk_vlev_datasheet[] =
1461 VRPAIR(VLEV_085, 250000000),
1462 VRPAIR(VLEV_090, 376000000),
1463 VRPAIR(VLEV_095, 426000000),
1464 VRPAIR(VLEV_100, 426000000),
1465 VRPAIR(VLEV_105, 476000000),
1466 VRPAIR(VLEV_110, 476000000),
1467 VRPAIR(VLEV_115, 476000000),
1468 VRPAIR(VLEV_120, 500000000),
1469 VRPAIR(VLEV_125, 533000000),
1470 VRPAIR(VLEV_130, 600000000),
1473 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
1474 .tuple_tab = cclk_vlev_datasheet,
1475 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
1476 .vr_settling_time = 25 /* us */,
1479 static struct platform_device bfin_dpmc = {
1480 .name = "bfin dpmc",
1482 .platform_data = &bfin_dmpc_vreg_data,
1486 static struct platform_device *stamp_devices[] __initdata = {
1490 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
1491 &bfin_pcmcia_cf_device,
1494 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
1498 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
1502 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
1503 &isp1362_hcd_device,
1506 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
1507 &bfin_isp1760_device,
1510 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
1514 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
1518 #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE)
1522 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
1527 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
1528 &net2272_bfin_device,
1531 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1535 #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE)
1536 &bfin_sport_spi0_device,
1537 &bfin_sport_spi1_device,
1540 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
1544 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
1545 &bfin_lq035q1_device,
1548 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
1549 &bfin_fb_adv7393_device,
1552 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
1556 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
1557 #ifdef CONFIG_BFIN_SIR0
1560 #ifdef CONFIG_BFIN_SIR1
1565 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1566 &i2c_bfin_twi_device,
1569 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1570 &bfin_sport0_uart_device,
1571 &bfin_sport1_uart_device,
1574 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1578 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1579 &bfin_device_gpiokeys,
1584 #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
1585 &bfin_async_nand_device,
1588 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
1589 &stamp_flash_device,
1593 static int __init stamp_init(void)
1595 printk(KERN_INFO "%s(): registering device resources\n", __func__);
1596 i2c_register_board_info(0, bfin_i2c_board_info,
1597 ARRAY_SIZE(bfin_i2c_board_info));
1598 bfin_plat_nand_init();
1599 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
1600 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
1602 #if (defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)) \
1603 && defined(PATA_INT)
1604 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
1610 arch_initcall(stamp_init);
1612 void native_machine_restart(char *cmd)
1614 /* workaround reboot hang when booting from SPI */
1615 if ((bfin_read_SYSCR() & 0x7) == 0x3)
1616 bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
1620 * Currently the MAC address is saved in Flash by U-Boot
1622 #define FLASH_MAC 0x203f0000
1623 void bfin_get_ether_addr(char *addr)
1625 *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC);
1626 *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4);
1628 EXPORT_SYMBOL(bfin_get_ether_addr);