2 * Copyright 2004-2009 Analog Devices Inc.
3 * 2005 National ICT Australia (NICTA)
4 * Aidan Williams <aidan@nicta.com.au>
6 * Licensed under the GPL-2 or later.
9 #include <linux/device.h>
10 #include <linux/kernel.h>
11 #include <linux/platform_device.h>
13 #include <linux/mtd/mtd.h>
14 #include <linux/mtd/nand.h>
15 #include <linux/mtd/partitions.h>
16 #include <linux/mtd/plat-ram.h>
17 #include <linux/mtd/physmap.h>
18 #include <linux/spi/spi.h>
19 #include <linux/spi/flash.h>
20 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
21 #include <linux/usb/isp1362.h>
23 #include <linux/i2c.h>
24 #include <linux/i2c/adp5588.h>
25 #include <linux/etherdevice.h>
26 #include <linux/ata_platform.h>
27 #include <linux/irq.h>
28 #include <linux/interrupt.h>
29 #include <linux/usb/sl811.h>
30 #include <linux/spi/mmc_spi.h>
31 #include <linux/leds.h>
32 #include <linux/input.h>
34 #include <asm/bfin5xx_spi.h>
35 #include <asm/reboot.h>
36 #include <asm/portmux.h>
38 #include <asm/bfin_sport.h>
39 #ifdef CONFIG_REGULATOR_FIXED_VOLTAGE
40 #include <linux/regulator/fixed.h>
42 #include <linux/regulator/machine.h>
43 #include <linux/regulator/consumer.h>
44 #include <linux/regulator/userspace-consumer.h>
47 * Name the Board for the /proc/cpuinfo
49 const char bfin_board_name[] = "ADI BF537-STAMP";
52 * Driver needs to know address, irq and flag pin.
55 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
56 #include <linux/usb/isp1760.h>
57 static struct resource bfin_isp1760_resources[] = {
60 .end = 0x203C0000 + 0x000fffff,
61 .flags = IORESOURCE_MEM,
66 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
70 static struct isp1760_platform_data isp1760_priv = {
75 .dack_polarity_high = 0,
76 .dreq_polarity_high = 0,
79 static struct platform_device bfin_isp1760_device = {
83 .platform_data = &isp1760_priv,
85 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
86 .resource = bfin_isp1760_resources,
90 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
91 #include <linux/gpio_keys.h>
93 static struct gpio_keys_button bfin_gpio_keys_table[] = {
94 {BTN_0, GPIO_PF2, 1, "gpio-keys: BTN0"},
95 {BTN_1, GPIO_PF3, 1, "gpio-keys: BTN1"},
96 {BTN_2, GPIO_PF4, 1, "gpio-keys: BTN2"},
97 {BTN_3, GPIO_PF5, 1, "gpio-keys: BTN3"},
100 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
101 .buttons = bfin_gpio_keys_table,
102 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
105 static struct platform_device bfin_device_gpiokeys = {
108 .platform_data = &bfin_gpio_keys_data,
113 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
114 static struct resource bfin_pcmcia_cf_resources[] = {
116 .start = 0x20310000, /* IO PORT */
118 .flags = IORESOURCE_MEM,
120 .start = 0x20311000, /* Attribute Memory */
122 .flags = IORESOURCE_MEM,
126 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
128 .start = 6, /* Card Detect PF6 */
130 .flags = IORESOURCE_IRQ,
134 static struct platform_device bfin_pcmcia_cf_device = {
135 .name = "bfin_cf_pcmcia",
137 .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
138 .resource = bfin_pcmcia_cf_resources,
142 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
143 static struct platform_device rtc_device = {
149 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
150 #include <linux/smc91x.h>
152 static struct smc91x_platdata smc91x_info = {
153 .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
154 .leda = RPC_LED_100_10,
155 .ledb = RPC_LED_TX_RX,
158 static struct resource smc91x_resources[] = {
160 .name = "smc91x-regs",
162 .end = 0x20300300 + 16,
163 .flags = IORESOURCE_MEM,
168 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
171 static struct platform_device smc91x_device = {
174 .num_resources = ARRAY_SIZE(smc91x_resources),
175 .resource = smc91x_resources,
177 .platform_data = &smc91x_info,
182 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
183 static struct resource dm9000_resources[] = {
186 .end = 0x203FB800 + 1,
187 .flags = IORESOURCE_MEM,
191 .end = 0x203FB804 + 1,
192 .flags = IORESOURCE_MEM,
197 .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE),
201 static struct platform_device dm9000_device = {
204 .num_resources = ARRAY_SIZE(dm9000_resources),
205 .resource = dm9000_resources,
209 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
210 static struct resource sl811_hcd_resources[] = {
214 .flags = IORESOURCE_MEM,
218 .flags = IORESOURCE_MEM,
222 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
226 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
227 void sl811_port_power(struct device *dev, int is_on)
229 gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
230 gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
234 static struct sl811_platform_data sl811_priv = {
236 .power = 250, /* == 500mA */
237 #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
238 .port_power = &sl811_port_power,
242 static struct platform_device sl811_hcd_device = {
246 .platform_data = &sl811_priv,
248 .num_resources = ARRAY_SIZE(sl811_hcd_resources),
249 .resource = sl811_hcd_resources,
253 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
254 static struct resource isp1362_hcd_resources[] = {
258 .flags = IORESOURCE_MEM,
262 .flags = IORESOURCE_MEM,
266 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
270 static struct isp1362_platform_data isp1362_priv = {
275 .int_edge_triggered = 0,
276 .remote_wakeup_connected = 0,
277 .no_power_switching = 1,
278 .power_switching_mode = 0,
281 static struct platform_device isp1362_hcd_device = {
282 .name = "isp1362-hcd",
285 .platform_data = &isp1362_priv,
287 .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
288 .resource = isp1362_hcd_resources,
292 #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
293 static unsigned short bfin_can_peripherals[] = {
294 P_CAN0_RX, P_CAN0_TX, 0
297 static struct resource bfin_can_resources[] = {
301 .flags = IORESOURCE_MEM,
306 .flags = IORESOURCE_IRQ,
311 .flags = IORESOURCE_IRQ,
314 .start = IRQ_CAN_ERROR,
315 .end = IRQ_CAN_ERROR,
316 .flags = IORESOURCE_IRQ,
320 static struct platform_device bfin_can_device = {
322 .num_resources = ARRAY_SIZE(bfin_can_resources),
323 .resource = bfin_can_resources,
325 .platform_data = &bfin_can_peripherals, /* Passed to driver */
330 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
331 #include <linux/bfin_mac.h>
332 static const unsigned short bfin_mac_peripherals[] = P_MII0;
334 static struct bfin_phydev_platform_data bfin_phydev_data[] = {
337 .irq = PHY_POLL, /* IRQ_MAC_PHYINT */
341 static struct bfin_mii_bus_platform_data bfin_mii_bus_data = {
343 .phydev_data = bfin_phydev_data,
344 .phy_mode = PHY_INTERFACE_MODE_MII,
345 .mac_peripherals = bfin_mac_peripherals,
348 static struct platform_device bfin_mii_bus = {
349 .name = "bfin_mii_bus",
351 .platform_data = &bfin_mii_bus_data,
355 static struct platform_device bfin_mac_device = {
358 .platform_data = &bfin_mii_bus,
363 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
364 static struct resource net2272_bfin_resources[] = {
367 .end = 0x20300000 + 0x100,
368 .flags = IORESOURCE_MEM,
372 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
376 static struct platform_device net2272_bfin_device = {
379 .num_resources = ARRAY_SIZE(net2272_bfin_resources),
380 .resource = net2272_bfin_resources,
384 #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
385 #ifdef CONFIG_MTD_PARTITIONS
386 const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
388 static struct mtd_partition bfin_plat_nand_partitions[] = {
390 .name = "linux kernel(nand)",
394 .name = "file system(nand)",
395 .size = MTDPART_SIZ_FULL,
396 .offset = MTDPART_OFS_APPEND,
401 #define BFIN_NAND_PLAT_CLE 2
402 #define BFIN_NAND_PLAT_ALE 1
403 static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
405 struct nand_chip *this = mtd->priv;
407 if (cmd == NAND_CMD_NONE)
411 writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_CLE));
413 writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_ALE));
416 #define BFIN_NAND_PLAT_READY GPIO_PF3
417 static int bfin_plat_nand_dev_ready(struct mtd_info *mtd)
419 return gpio_get_value(BFIN_NAND_PLAT_READY);
422 static struct platform_nand_data bfin_plat_nand_data = {
426 #ifdef CONFIG_MTD_PARTITIONS
427 .part_probe_types = part_probes,
428 .partitions = bfin_plat_nand_partitions,
429 .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions),
433 .cmd_ctrl = bfin_plat_nand_cmd_ctrl,
434 .dev_ready = bfin_plat_nand_dev_ready,
438 #define MAX(x, y) (x > y ? x : y)
439 static struct resource bfin_plat_nand_resources = {
441 .end = 0x20212000 + (1 << MAX(BFIN_NAND_PLAT_CLE, BFIN_NAND_PLAT_ALE)),
442 .flags = IORESOURCE_MEM,
445 static struct platform_device bfin_async_nand_device = {
449 .resource = &bfin_plat_nand_resources,
451 .platform_data = &bfin_plat_nand_data,
455 static void bfin_plat_nand_init(void)
457 gpio_request(BFIN_NAND_PLAT_READY, "bfin_nand_plat");
460 static void bfin_plat_nand_init(void) {}
463 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
464 static struct mtd_partition stamp_partitions[] = {
466 .name = "bootloader(nor)",
470 .name = "linux kernel(nor)",
472 .offset = MTDPART_OFS_APPEND,
474 .name = "file system(nor)",
475 .size = 0x400000 - 0x40000 - 0x180000 - 0x10000,
476 .offset = MTDPART_OFS_APPEND,
478 .name = "MAC Address(nor)",
479 .size = MTDPART_SIZ_FULL,
481 .mask_flags = MTD_WRITEABLE,
485 static struct physmap_flash_data stamp_flash_data = {
487 .parts = stamp_partitions,
488 .nr_parts = ARRAY_SIZE(stamp_partitions),
489 #ifdef CONFIG_ROMKERNEL
490 .probe_type = "map_rom",
494 static struct resource stamp_flash_resource = {
497 .flags = IORESOURCE_MEM,
500 static struct platform_device stamp_flash_device = {
501 .name = "physmap-flash",
504 .platform_data = &stamp_flash_data,
507 .resource = &stamp_flash_resource,
511 #if defined(CONFIG_MTD_M25P80) \
512 || defined(CONFIG_MTD_M25P80_MODULE)
513 static struct mtd_partition bfin_spi_flash_partitions[] = {
515 .name = "bootloader(spi)",
518 .mask_flags = MTD_CAP_ROM
520 .name = "linux kernel(spi)",
522 .offset = MTDPART_OFS_APPEND,
524 .name = "file system(spi)",
525 .size = MTDPART_SIZ_FULL,
526 .offset = MTDPART_OFS_APPEND,
530 static struct flash_platform_data bfin_spi_flash_data = {
532 .parts = bfin_spi_flash_partitions,
533 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
534 /* .type = "m25p64", */
537 /* SPI flash chip (m25p64) */
538 static struct bfin5xx_spi_chip spi_flash_chip_info = {
539 .enable_dma = 0, /* use dma transfer with this chip*/
544 #if defined(CONFIG_BFIN_SPI_ADC) \
545 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
547 static struct bfin5xx_spi_chip spi_adc_chip_info = {
548 .enable_dma = 1, /* use dma transfer with this chip*/
553 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
554 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
555 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
561 #if defined(CONFIG_SND_BF5XX_SOC_AD193X) \
562 || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE)
563 static struct bfin5xx_spi_chip ad1938_spi_chip_info = {
569 #if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) \
570 || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE)
571 static struct bfin5xx_spi_chip adav801_spi_chip_info = {
577 #if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE)
578 #include <linux/input/ad714x.h>
579 static struct bfin5xx_spi_chip ad7147_spi_chip_info = {
584 static struct ad714x_slider_plat ad7147_spi_slider_plat[] = {
592 static struct ad714x_button_plat ad7147_spi_button_plat[] = {
594 .keycode = BTN_FORWARD,
604 .keycode = BTN_MIDDLE,
609 .keycode = BTN_RIGHT,
619 static struct ad714x_platform_data ad7147_spi_platform_data = {
622 .slider = ad7147_spi_slider_plat,
623 .button = ad7147_spi_button_plat,
625 {0xFBFF, 0x1FFF, 0, 0x2626, 1600, 1600, 1600, 1600},
626 {0xEFFF, 0x1FFF, 0, 0x2626, 1650, 1650, 1650, 1650},
627 {0xFFFF, 0x1FFE, 0, 0x2626, 1650, 1650, 1650, 1650},
628 {0xFFFF, 0x1FFB, 0, 0x2626, 1650, 1650, 1650, 1650},
629 {0xFFFF, 0x1FEF, 0, 0x2626, 1650, 1650, 1650, 1650},
630 {0xFFFF, 0x1FBF, 0, 0x2626, 1650, 1650, 1650, 1650},
631 {0xFFFF, 0x1EFF, 0, 0x2626, 1650, 1650, 1650, 1650},
632 {0xFFFF, 0x1BFF, 0, 0x2626, 1600, 1600, 1600, 1600},
633 {0xFF7B, 0x3FFF, 0x506, 0x2626, 1100, 1100, 1150, 1150},
634 {0xFDFE, 0x3FFF, 0x606, 0x2626, 1100, 1100, 1150, 1150},
635 {0xFEBA, 0x1FFF, 0x1400, 0x2626, 1200, 1200, 1300, 1300},
636 {0xFFEF, 0x1FFF, 0x0, 0x2626, 1100, 1100, 1150, 1150},
638 .sys_cfg_reg = {0x2B2, 0x0, 0x3233, 0x819, 0x832, 0xCFF, 0xCFF, 0x0},
642 #if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE)
643 #include <linux/input/ad714x.h>
644 static struct ad714x_button_plat ad7142_i2c_button_plat[] = {
666 static struct ad714x_platform_data ad7142_i2c_platform_data = {
668 .button = ad7142_i2c_button_plat,
670 /* fixme: figure out right setting for all comoponent according
671 * to hardware feature of EVAL-AD7142EB board */
672 {0xE7FF, 0x3FFF, 0x0005, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
673 {0xFDBF, 0x3FFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
674 {0xFFFF, 0x2DFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
675 {0xFFFF, 0x37BF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
676 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
677 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
678 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
679 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
680 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
681 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
682 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
683 {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
685 .sys_cfg_reg = {0x0B2, 0x0, 0x690, 0x664, 0x290F, 0xF, 0xF, 0x0},
689 #if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE)
690 static struct bfin5xx_spi_chip ad2s90_spi_chip_info = {
696 #if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE)
697 static unsigned short ad2s120x_platform_data[] = {
698 /* used as SAMPLE and RDVEL */
699 GPIO_PF5, GPIO_PF6, 0
702 static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = {
708 #if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE)
709 static unsigned short ad2s1210_platform_data[] = {
710 /* use as SAMPLE, A0, A1 */
711 GPIO_PF7, GPIO_PF8, GPIO_PF9,
712 # if defined(CONFIG_AD2S1210_GPIO_INPUT) || defined(CONFIG_AD2S1210_GPIO_OUTPUT)
713 /* the RES0 and RES1 pins */
719 static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = {
725 #if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE)
726 static struct bfin5xx_spi_chip ad7314_spi_chip_info = {
732 #if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE)
733 static unsigned short ad7816_platform_data[] = {
734 GPIO_PF4, /* rdwr_pin */
735 GPIO_PF5, /* convert_pin */
736 GPIO_PF7, /* busy_pin */
740 static struct bfin5xx_spi_chip ad7816_spi_chip_info = {
746 #if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE)
747 static unsigned long adt7310_platform_data[3] = {
748 /* INT bound temperature alarm event. line 1 */
749 IRQ_PG4, IRQF_TRIGGER_LOW,
750 /* CT bound temperature alarm event irq_flags. line 0 */
754 static struct bfin5xx_spi_chip adt7310_spi_chip_info = {
760 #if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE)
761 static unsigned short ad7298_platform_data[] = {
762 GPIO_PF7, /* busy_pin */
766 static struct bfin5xx_spi_chip ad7298_spi_chip_info = {
772 #if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE)
773 static unsigned long adt7316_spi_data[2] = {
774 IRQF_TRIGGER_LOW, /* interrupt flags */
775 GPIO_PF7, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */
778 static struct bfin5xx_spi_chip adt7316_spi_chip_info = {
784 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
785 #define MMC_SPI_CARD_DETECT_INT IRQ_PF5
787 static int bfin_mmc_spi_init(struct device *dev,
788 irqreturn_t (*detect_int)(int, void *), void *data)
790 return request_irq(MMC_SPI_CARD_DETECT_INT, detect_int,
791 IRQF_TRIGGER_FALLING, "mmc-spi-detect", data);
794 static void bfin_mmc_spi_exit(struct device *dev, void *data)
796 free_irq(MMC_SPI_CARD_DETECT_INT, data);
799 static struct mmc_spi_platform_data bfin_mmc_spi_pdata = {
800 .init = bfin_mmc_spi_init,
801 .exit = bfin_mmc_spi_exit,
802 .detect_delay = 100, /* msecs */
805 static struct bfin5xx_spi_chip mmc_spi_chip_info = {
812 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
813 #include <linux/spi/ad7877.h>
814 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
819 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
821 .vref_delay_usecs = 50, /* internal, no capacitor */
824 .pressure_max = 1000,
826 .stopacq_polarity = 1,
827 .first_conversion_delay = 3,
828 .acquisition_time = 1,
830 .pen_down_acc_interval = 1,
834 #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
835 #include <linux/spi/ad7879.h>
836 static const struct ad7879_platform_data bfin_ad7879_ts_info = {
837 .model = 7879, /* Model = AD7879 */
838 .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */
839 .pressure_max = 10000,
841 .first_conversion_delay = 3, /* wait 512us before do a first conversion */
842 .acquisition_time = 1, /* 4us acquisition time per sample */
843 .median = 2, /* do 8 measurements */
844 .averaging = 1, /* take the average of 4 middle samples */
845 .pen_down_acc_interval = 255, /* 9.4 ms */
846 .gpio_export = 1, /* Export GPIO to gpiolib */
847 .gpio_base = -1, /* Dynamic allocation */
851 #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
852 #include <linux/input/adxl34x.h>
853 static const struct adxl34x_platform_data adxl34x_info = {
857 .tap_threshold = 0x31,
858 .tap_duration = 0x10,
861 .tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN,
862 .act_axis_control = 0xFF,
863 .activity_threshold = 5,
864 .inactivity_threshold = 3,
865 .inactivity_time = 4,
866 .free_fall_threshold = 0x7,
867 .free_fall_time = 0x20,
869 .data_range = ADXL_FULL_RES,
872 .ev_code_x = ABS_X, /* EV_REL */
873 .ev_code_y = ABS_Y, /* EV_REL */
874 .ev_code_z = ABS_Z, /* EV_REL */
876 .ev_code_tap = {BTN_TOUCH, BTN_TOUCH, BTN_TOUCH}, /* EV_KEY x,y,z */
878 /* .ev_code_ff = KEY_F,*/ /* EV_KEY */
879 /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
880 .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK,
881 .fifo_mode = ADXL_FIFO_STREAM,
882 .orientation_enable = ADXL_EN_ORIENTATION_3D,
883 .deadzone_angle = ADXL_DEADZONE_ANGLE_10p8,
884 .divisor_length = ADXL_LP_FILTER_DIVISOR_16,
885 /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */
886 .ev_codes_orient_3d = {BTN_Z, BTN_Y, BTN_X, BTN_A, BTN_B, BTN_C},
890 #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
891 static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
897 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
898 static struct bfin5xx_spi_chip spidev_chip_info = {
904 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
905 static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
911 #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
912 static struct bfin5xx_spi_chip enc28j60_spi_chip_info = {
918 #if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE)
919 static struct bfin5xx_spi_chip adf7021_spi_chip_info = {
923 #include <linux/spi/adf702x.h>
924 #define TXREG 0x0160A470
925 static const u32 adf7021_regs[] = {
944 static struct adf702x_platform_data adf7021_platform_data = {
945 .regs_base = (void *)SPORT1_TCR1,
946 .dma_ch_rx = CH_SPORT1_RX,
947 .dma_ch_tx = CH_SPORT1_TX,
948 .irq_sport_err = IRQ_SPORT1_ERROR,
949 .gpio_int_rfs = GPIO_PF8,
950 .pin_req = {P_SPORT1_DTPRI, P_SPORT1_RFS, P_SPORT1_DRPRI,
951 P_SPORT1_RSCLK, P_SPORT1_TSCLK, 0},
952 .adf702x_model = MODEL_ADF7021,
953 .adf702x_regs = adf7021_regs,
956 static inline void adf702x_mac_init(void)
958 random_ether_addr(adf7021_platform_data.mac_addr);
961 static inline void adf702x_mac_init(void) {}
964 #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
965 #include <linux/spi/ads7846.h>
966 static struct bfin5xx_spi_chip ad7873_spi_chip_info = {
970 static int ads7873_get_pendown_state(void)
972 return gpio_get_value(GPIO_PF6);
975 static struct ads7846_platform_data __initdata ad7873_pdata = {
976 .model = 7873, /* AD7873 */
982 .debounce_tol = (~0),
983 .get_pendown_state = ads7873_get_pendown_state,
987 #if defined(CONFIG_MTD_DATAFLASH) \
988 || defined(CONFIG_MTD_DATAFLASH_MODULE)
990 static struct mtd_partition bfin_spi_dataflash_partitions[] = {
992 .name = "bootloader(spi)",
995 .mask_flags = MTD_CAP_ROM
997 .name = "linux kernel(spi)",
999 .offset = MTDPART_OFS_APPEND,
1001 .name = "file system(spi)",
1002 .size = MTDPART_SIZ_FULL,
1003 .offset = MTDPART_OFS_APPEND,
1007 static struct flash_platform_data bfin_spi_dataflash_data = {
1008 .name = "SPI Dataflash",
1009 .parts = bfin_spi_dataflash_partitions,
1010 .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
1013 /* DataFlash chip */
1014 static struct bfin5xx_spi_chip data_flash_chip_info = {
1015 .enable_dma = 0, /* use dma transfer with this chip*/
1020 #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
1021 static struct bfin5xx_spi_chip spi_adxl34x_chip_info = {
1022 .enable_dma = 0, /* use dma transfer with this chip*/
1027 #if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE)
1028 static struct bfin5xx_spi_chip spi_ad7476_chip_info = {
1029 .enable_dma = 0, /* use dma transfer with this chip*/
1034 static struct spi_board_info bfin_spi_board_info[] __initdata = {
1035 #if defined(CONFIG_MTD_M25P80) \
1036 || defined(CONFIG_MTD_M25P80_MODULE)
1038 /* the modalias must be the same as spi device driver name */
1039 .modalias = "m25p80", /* Name of spi_driver for this device */
1040 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
1041 .bus_num = 0, /* Framework bus number */
1042 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
1043 .platform_data = &bfin_spi_flash_data,
1044 .controller_data = &spi_flash_chip_info,
1048 #if defined(CONFIG_MTD_DATAFLASH) \
1049 || defined(CONFIG_MTD_DATAFLASH_MODULE)
1050 { /* DataFlash chip */
1051 .modalias = "mtd_dataflash",
1052 .max_speed_hz = 33250000, /* max spi clock (SCK) speed in HZ */
1053 .bus_num = 0, /* Framework bus number */
1054 .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
1055 .platform_data = &bfin_spi_dataflash_data,
1056 .controller_data = &data_flash_chip_info,
1060 #if defined(CONFIG_BFIN_SPI_ADC) \
1061 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
1063 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
1064 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
1065 .bus_num = 0, /* Framework bus number */
1066 .chip_select = 1, /* Framework chip select. */
1067 .platform_data = NULL, /* No spi_driver specific config */
1068 .controller_data = &spi_adc_chip_info,
1072 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
1073 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
1075 .modalias = "ad183x",
1076 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1079 .platform_data = "ad1836", /* only includes chip name for the moment */
1080 .controller_data = &ad1836_spi_chip_info,
1085 #if defined(CONFIG_SND_BF5XX_SOC_AD193X) || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE)
1087 .modalias = "ad193x",
1088 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1091 .controller_data = &ad1938_spi_chip_info,
1096 #if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE)
1098 .modalias = "adav80x",
1099 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1102 .controller_data = &adav801_spi_chip_info,
1107 #if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE)
1109 .modalias = "ad714x_captouch",
1110 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1115 .platform_data = &ad7147_spi_platform_data,
1116 .controller_data = &ad7147_spi_chip_info,
1120 #if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE)
1122 .modalias = "ad2s90",
1124 .chip_select = 3, /* change it for your board */
1126 .platform_data = NULL,
1127 .controller_data = &ad2s90_spi_chip_info,
1131 #if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE)
1133 .modalias = "ad2s120x",
1135 .chip_select = 4, /* CS, change it for your board */
1136 .platform_data = ad2s120x_platform_data,
1137 .controller_data = &ad2s120x_spi_chip_info,
1141 #if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE)
1143 .modalias = "ad2s1210",
1144 .max_speed_hz = 8192000,
1146 .chip_select = 4, /* CS, change it for your board */
1147 .platform_data = ad2s1210_platform_data,
1148 .controller_data = &ad2s1210_spi_chip_info,
1152 #if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE)
1154 .modalias = "ad7314",
1155 .max_speed_hz = 1000000,
1157 .chip_select = 4, /* CS, change it for your board */
1158 .controller_data = &ad7314_spi_chip_info,
1163 #if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE)
1165 .modalias = "ad7818",
1166 .max_speed_hz = 1000000,
1168 .chip_select = 4, /* CS, change it for your board */
1169 .platform_data = ad7816_platform_data,
1170 .controller_data = &ad7816_spi_chip_info,
1175 #if defined(CONFIG_ADT7310) || defined(CONFIG_ADT7310_MODULE)
1177 .modalias = "adt7310",
1178 .max_speed_hz = 1000000,
1179 .irq = IRQ_PG5, /* CT alarm event. Line 0 */
1181 .chip_select = 4, /* CS, change it for your board */
1182 .platform_data = adt7310_platform_data,
1183 .controller_data = &adt7310_spi_chip_info,
1188 #if defined(CONFIG_AD7298) || defined(CONFIG_AD7298_MODULE)
1190 .modalias = "ad7298",
1191 .max_speed_hz = 1000000,
1193 .chip_select = 4, /* CS, change it for your board */
1194 .platform_data = ad7298_platform_data,
1195 .controller_data = &ad7298_spi_chip_info,
1200 #if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE)
1202 .modalias = "adt7316",
1203 .max_speed_hz = 1000000,
1204 .irq = IRQ_PG5, /* interrupt line */
1206 .chip_select = 4, /* CS, change it for your board */
1207 .platform_data = adt7316_spi_data,
1208 .controller_data = &adt7316_spi_chip_info,
1213 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
1215 .modalias = "mmc_spi",
1216 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
1219 .platform_data = &bfin_mmc_spi_pdata,
1220 .controller_data = &mmc_spi_chip_info,
1224 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
1226 .modalias = "ad7877",
1227 .platform_data = &bfin_ad7877_ts_info,
1229 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
1232 .controller_data = &spi_ad7877_chip_info,
1235 #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
1237 .modalias = "ad7879",
1238 .platform_data = &bfin_ad7879_ts_info,
1240 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
1243 .controller_data = &spi_ad7879_chip_info,
1244 .mode = SPI_CPHA | SPI_CPOL,
1247 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
1249 .modalias = "spidev",
1250 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1253 .controller_data = &spidev_chip_info,
1256 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
1258 .modalias = "bfin-lq035q1-spi",
1259 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
1262 .controller_data = &lq035q1_spi_chip_info,
1263 .mode = SPI_CPHA | SPI_CPOL,
1266 #if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
1268 .modalias = "enc28j60",
1269 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
1272 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */
1273 .controller_data = &enc28j60_spi_chip_info,
1277 #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
1279 .modalias = "adxl34x",
1280 .platform_data = &adxl34x_info,
1282 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
1285 .controller_data = &spi_adxl34x_chip_info,
1289 #if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE)
1291 .modalias = "adf702x",
1292 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */
1294 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */
1295 .controller_data = &adf7021_spi_chip_info,
1296 .platform_data = &adf7021_platform_data,
1300 #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
1302 .modalias = "ads7846",
1303 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */
1306 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */
1307 .controller_data = &ad7873_spi_chip_info,
1308 .platform_data = &ad7873_pdata,
1312 #if defined(CONFIG_AD7476) \
1313 || defined(CONFIG_AD7476_MODULE)
1315 .modalias = "ad7476", /* Name of spi_driver for this device */
1316 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
1317 .bus_num = 0, /* Framework bus number */
1318 .chip_select = 1, /* Framework chip select. */
1319 .platform_data = NULL, /* No spi_driver specific config */
1320 .controller_data = &spi_ad7476_chip_info,
1324 #if defined(CONFIG_ADE7753) \
1325 || defined(CONFIG_ADE7753_MODULE)
1327 .modalias = "ade7753",
1328 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1330 .chip_select = 1, /* CS, change it for your board */
1331 .platform_data = NULL, /* No spi_driver specific config */
1335 #if defined(CONFIG_ADE7754) \
1336 || defined(CONFIG_ADE7754_MODULE)
1338 .modalias = "ade7754",
1339 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1341 .chip_select = 1, /* CS, change it for your board */
1342 .platform_data = NULL, /* No spi_driver specific config */
1346 #if defined(CONFIG_ADE7758) \
1347 || defined(CONFIG_ADE7758_MODULE)
1349 .modalias = "ade7758",
1350 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1352 .chip_select = 1, /* CS, change it for your board */
1353 .platform_data = NULL, /* No spi_driver specific config */
1357 #if defined(CONFIG_ADE7759) \
1358 || defined(CONFIG_ADE7759_MODULE)
1360 .modalias = "ade7759",
1361 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1363 .chip_select = 1, /* CS, change it for your board */
1364 .platform_data = NULL, /* No spi_driver specific config */
1368 #if defined(CONFIG_ADE7854_SPI) \
1369 || defined(CONFIG_ADE7854_SPI_MODULE)
1371 .modalias = "ade7854",
1372 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1374 .chip_select = 1, /* CS, change it for your board */
1375 .platform_data = NULL, /* No spi_driver specific config */
1379 #if defined(CONFIG_ADIS16060) \
1380 || defined(CONFIG_ADIS16060_MODULE)
1382 .modalias = "adis16060_r",
1383 .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */
1385 .chip_select = MAX_CTRL_CS + 1, /* CS for read, change it for your board */
1386 .platform_data = NULL, /* No spi_driver specific config */
1390 .modalias = "adis16060_w",
1391 .max_speed_hz = 2900000, /* max spi clock (SCK) speed in HZ */
1393 .chip_select = 2, /* CS for write, change it for your board */
1394 .platform_data = NULL, /* No spi_driver specific config */
1398 #if defined(CONFIG_ADIS16130) \
1399 || defined(CONFIG_ADIS16130_MODULE)
1401 .modalias = "adis16130",
1402 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1404 .chip_select = 1, /* CS for read, change it for your board */
1405 .platform_data = NULL, /* No spi_driver specific config */
1409 #if defined(CONFIG_ADIS16201) \
1410 || defined(CONFIG_ADIS16201_MODULE)
1412 .modalias = "adis16201",
1413 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1415 .chip_select = 5, /* CS, change it for your board */
1416 .platform_data = NULL, /* No spi_driver specific config */
1421 #if defined(CONFIG_ADIS16203) \
1422 || defined(CONFIG_ADIS16203_MODULE)
1424 .modalias = "adis16203",
1425 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1427 .chip_select = 5, /* CS, change it for your board */
1428 .platform_data = NULL, /* No spi_driver specific config */
1433 #if defined(CONFIG_ADIS16204) \
1434 || defined(CONFIG_ADIS16204_MODULE)
1436 .modalias = "adis16204",
1437 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1439 .chip_select = 5, /* CS, change it for your board */
1440 .platform_data = NULL, /* No spi_driver specific config */
1445 #if defined(CONFIG_ADIS16209) \
1446 || defined(CONFIG_ADIS16209_MODULE)
1448 .modalias = "adis16209",
1449 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1451 .chip_select = 5, /* CS, change it for your board */
1452 .platform_data = NULL, /* No spi_driver specific config */
1457 #if defined(CONFIG_ADIS16220) \
1458 || defined(CONFIG_ADIS16220_MODULE)
1460 .modalias = "adis16220",
1461 .max_speed_hz = 2000000, /* max spi clock (SCK) speed in HZ */
1463 .chip_select = 5, /* CS, change it for your board */
1464 .platform_data = NULL, /* No spi_driver specific config */
1469 #if defined(CONFIG_ADIS16240) \
1470 || defined(CONFIG_ADIS16240_MODULE)
1472 .modalias = "adis16240",
1473 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */
1475 .chip_select = 5, /* CS, change it for your board */
1476 .platform_data = NULL, /* No spi_driver specific config */
1481 #if defined(CONFIG_ADIS16260) \
1482 || defined(CONFIG_ADIS16260_MODULE)
1484 .modalias = "adis16260",
1485 .max_speed_hz = 1500000, /* max spi clock (SCK) speed in HZ */
1487 .chip_select = 5, /* CS, change it for your board */
1488 .platform_data = NULL, /* No spi_driver specific config */
1493 #if defined(CONFIG_ADIS16261) \
1494 || defined(CONFIG_ADIS16261_MODULE)
1496 .modalias = "adis16261",
1497 .max_speed_hz = 2500000, /* max spi clock (SCK) speed in HZ */
1499 .chip_select = 1, /* CS, change it for your board */
1500 .platform_data = NULL, /* No spi_driver specific config */
1504 #if defined(CONFIG_ADIS16300) \
1505 || defined(CONFIG_ADIS16300_MODULE)
1507 .modalias = "adis16300",
1508 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1510 .chip_select = 5, /* CS, change it for your board */
1511 .platform_data = NULL, /* No spi_driver specific config */
1516 #if defined(CONFIG_ADIS16350) \
1517 || defined(CONFIG_ADIS16350_MODULE)
1519 .modalias = "adis16364",
1520 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1522 .chip_select = 5, /* CS, change it for your board */
1523 .platform_data = NULL, /* No spi_driver specific config */
1528 #if defined(CONFIG_ADIS16400) \
1529 || defined(CONFIG_ADIS16400_MODULE)
1531 .modalias = "adis16400",
1532 .max_speed_hz = 1000000, /* max spi clock (SCK) speed in HZ */
1534 .chip_select = 1, /* CS, change it for your board */
1535 .platform_data = NULL, /* No spi_driver specific config */
1541 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1542 /* SPI controller data */
1543 static struct bfin5xx_spi_master bfin_spi0_info = {
1544 .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
1545 .enable_dma = 1, /* master has the ability to do dma transfer */
1546 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
1550 static struct resource bfin_spi0_resource[] = {
1552 .start = SPI0_REGBASE,
1553 .end = SPI0_REGBASE + 0xFF,
1554 .flags = IORESOURCE_MEM,
1559 .flags = IORESOURCE_DMA,
1564 .flags = IORESOURCE_IRQ,
1568 static struct platform_device bfin_spi0_device = {
1570 .id = 0, /* Bus number */
1571 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
1572 .resource = bfin_spi0_resource,
1574 .platform_data = &bfin_spi0_info, /* Passed to driver */
1577 #endif /* spi master and devices */
1579 #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE)
1581 /* SPORT SPI controller data */
1582 static struct bfin5xx_spi_master bfin_sport_spi0_info = {
1583 .num_chipselect = 1, /* master only supports one device */
1584 .enable_dma = 0, /* master don't support DMA */
1585 .pin_req = {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_DRPRI,
1586 P_SPORT0_RSCLK, P_SPORT0_TFS, P_SPORT0_RFS, 0},
1589 static struct resource bfin_sport_spi0_resource[] = {
1591 .start = SPORT0_TCR1,
1592 .end = SPORT0_TCR1 + 0xFF,
1593 .flags = IORESOURCE_MEM,
1596 .start = IRQ_SPORT0_ERROR,
1597 .end = IRQ_SPORT0_ERROR,
1598 .flags = IORESOURCE_IRQ,
1602 static struct platform_device bfin_sport_spi0_device = {
1603 .name = "bfin-sport-spi",
1604 .id = 1, /* Bus number */
1605 .num_resources = ARRAY_SIZE(bfin_sport_spi0_resource),
1606 .resource = bfin_sport_spi0_resource,
1608 .platform_data = &bfin_sport_spi0_info, /* Passed to driver */
1612 static struct bfin5xx_spi_master bfin_sport_spi1_info = {
1613 .num_chipselect = 1, /* master only supports one device */
1614 .enable_dma = 0, /* master don't support DMA */
1615 .pin_req = {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_DRPRI,
1616 P_SPORT1_RSCLK, P_SPORT1_TFS, P_SPORT1_RFS, 0},
1619 static struct resource bfin_sport_spi1_resource[] = {
1621 .start = SPORT1_TCR1,
1622 .end = SPORT1_TCR1 + 0xFF,
1623 .flags = IORESOURCE_MEM,
1626 .start = IRQ_SPORT1_ERROR,
1627 .end = IRQ_SPORT1_ERROR,
1628 .flags = IORESOURCE_IRQ,
1632 static struct platform_device bfin_sport_spi1_device = {
1633 .name = "bfin-sport-spi",
1634 .id = 2, /* Bus number */
1635 .num_resources = ARRAY_SIZE(bfin_sport_spi1_resource),
1636 .resource = bfin_sport_spi1_resource,
1638 .platform_data = &bfin_sport_spi1_info, /* Passed to driver */
1642 #endif /* sport spi master and devices */
1644 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
1645 static struct platform_device bfin_fb_device = {
1646 .name = "bf537-lq035",
1650 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
1651 #include <asm/bfin-lq035q1.h>
1653 static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
1654 .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
1655 .ppi_mode = USE_RGB565_16_BIT_PPI,
1656 .use_bl = 0, /* let something else control the LCD Blacklight */
1657 .gpio_bl = GPIO_PF7,
1660 static struct resource bfin_lq035q1_resources[] = {
1662 .start = IRQ_PPI_ERROR,
1663 .end = IRQ_PPI_ERROR,
1664 .flags = IORESOURCE_IRQ,
1668 static struct platform_device bfin_lq035q1_device = {
1669 .name = "bfin-lq035q1",
1671 .num_resources = ARRAY_SIZE(bfin_lq035q1_resources),
1672 .resource = bfin_lq035q1_resources,
1674 .platform_data = &bfin_lq035q1_data,
1679 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
1680 #ifdef CONFIG_SERIAL_BFIN_UART0
1681 static struct resource bfin_uart0_resources[] = {
1684 .end = UART0_GCTL+2,
1685 .flags = IORESOURCE_MEM,
1688 .start = IRQ_UART0_RX,
1689 .end = IRQ_UART0_RX+1,
1690 .flags = IORESOURCE_IRQ,
1693 .start = IRQ_UART0_ERROR,
1694 .end = IRQ_UART0_ERROR,
1695 .flags = IORESOURCE_IRQ,
1698 .start = CH_UART0_TX,
1700 .flags = IORESOURCE_DMA,
1703 .start = CH_UART0_RX,
1705 .flags = IORESOURCE_DMA,
1707 #ifdef CONFIG_BFIN_UART0_CTSRTS
1711 .flags = IORESOURCE_IO,
1716 .flags = IORESOURCE_IO,
1721 static unsigned short bfin_uart0_peripherals[] = {
1722 P_UART0_TX, P_UART0_RX, 0
1725 static struct platform_device bfin_uart0_device = {
1726 .name = "bfin-uart",
1728 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
1729 .resource = bfin_uart0_resources,
1731 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
1735 #ifdef CONFIG_SERIAL_BFIN_UART1
1736 static struct resource bfin_uart1_resources[] = {
1739 .end = UART1_GCTL+2,
1740 .flags = IORESOURCE_MEM,
1743 .start = IRQ_UART1_RX,
1744 .end = IRQ_UART1_RX+1,
1745 .flags = IORESOURCE_IRQ,
1748 .start = IRQ_UART1_ERROR,
1749 .end = IRQ_UART1_ERROR,
1750 .flags = IORESOURCE_IRQ,
1753 .start = CH_UART1_TX,
1755 .flags = IORESOURCE_DMA,
1758 .start = CH_UART1_RX,
1760 .flags = IORESOURCE_DMA,
1764 static unsigned short bfin_uart1_peripherals[] = {
1765 P_UART1_TX, P_UART1_RX, 0
1768 static struct platform_device bfin_uart1_device = {
1769 .name = "bfin-uart",
1771 .num_resources = ARRAY_SIZE(bfin_uart1_resources),
1772 .resource = bfin_uart1_resources,
1774 .platform_data = &bfin_uart1_peripherals, /* Passed to driver */
1780 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
1781 #ifdef CONFIG_BFIN_SIR0
1782 static struct resource bfin_sir0_resources[] = {
1784 .start = 0xFFC00400,
1786 .flags = IORESOURCE_MEM,
1789 .start = IRQ_UART0_RX,
1790 .end = IRQ_UART0_RX+1,
1791 .flags = IORESOURCE_IRQ,
1794 .start = CH_UART0_RX,
1795 .end = CH_UART0_RX+1,
1796 .flags = IORESOURCE_DMA,
1800 static struct platform_device bfin_sir0_device = {
1803 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
1804 .resource = bfin_sir0_resources,
1807 #ifdef CONFIG_BFIN_SIR1
1808 static struct resource bfin_sir1_resources[] = {
1810 .start = 0xFFC02000,
1812 .flags = IORESOURCE_MEM,
1815 .start = IRQ_UART1_RX,
1816 .end = IRQ_UART1_RX+1,
1817 .flags = IORESOURCE_IRQ,
1820 .start = CH_UART1_RX,
1821 .end = CH_UART1_RX+1,
1822 .flags = IORESOURCE_DMA,
1826 static struct platform_device bfin_sir1_device = {
1829 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
1830 .resource = bfin_sir1_resources,
1835 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1836 static struct resource bfin_twi0_resource[] = {
1838 .start = TWI0_REGBASE,
1839 .end = TWI0_REGBASE,
1840 .flags = IORESOURCE_MEM,
1845 .flags = IORESOURCE_IRQ,
1849 static struct platform_device i2c_bfin_twi_device = {
1850 .name = "i2c-bfin-twi",
1852 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
1853 .resource = bfin_twi0_resource,
1857 #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
1858 static const unsigned short adp5588_keymap[ADP5588_KEYMAPSIZE] = {
1872 [13] = KEY_BACKSLASH,
1884 [26] = KEY_LEFTBRACE,
1885 [27] = KEY_RIGHTBRACE,
1898 [41] = KEY_SEMICOLON,
1899 [42] = KEY_APOSTROPHE,
1900 [43] = KEY_BACKSLASH,
1920 [65] = KEY_BACKSPACE,
1933 static struct adp5588_kpad_platform_data adp5588_kpad_data = {
1936 .keymap = adp5588_keymap,
1937 .keymapsize = ARRAY_SIZE(adp5588_keymap),
1942 #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE)
1943 #include <linux/mfd/adp5520.h>
1946 * ADP5520/5501 Backlight Data
1949 static struct adp5520_backlight_platform_data adp5520_backlight_data = {
1950 .fade_in = ADP5520_FADE_T_1200ms,
1951 .fade_out = ADP5520_FADE_T_1200ms,
1952 .fade_led_law = ADP5520_BL_LAW_LINEAR,
1954 .abml_filt = ADP5520_BL_AMBL_FILT_640ms,
1955 .l1_daylight_max = ADP5520_BL_CUR_mA(15),
1956 .l1_daylight_dim = ADP5520_BL_CUR_mA(0),
1957 .l2_office_max = ADP5520_BL_CUR_mA(7),
1958 .l2_office_dim = ADP5520_BL_CUR_mA(0),
1959 .l3_dark_max = ADP5520_BL_CUR_mA(3),
1960 .l3_dark_dim = ADP5520_BL_CUR_mA(0),
1961 .l2_trip = ADP5520_L2_COMP_CURR_uA(700),
1962 .l2_hyst = ADP5520_L2_COMP_CURR_uA(50),
1963 .l3_trip = ADP5520_L3_COMP_CURR_uA(80),
1964 .l3_hyst = ADP5520_L3_COMP_CURR_uA(20),
1968 * ADP5520/5501 LEDs Data
1971 static struct led_info adp5520_leds[] = {
1973 .name = "adp5520-led1",
1974 .default_trigger = "none",
1975 .flags = FLAG_ID_ADP5520_LED1_ADP5501_LED0 | ADP5520_LED_OFFT_600ms,
1977 #ifdef ADP5520_EN_ALL_LEDS
1979 .name = "adp5520-led2",
1980 .default_trigger = "none",
1981 .flags = FLAG_ID_ADP5520_LED2_ADP5501_LED1,
1984 .name = "adp5520-led3",
1985 .default_trigger = "none",
1986 .flags = FLAG_ID_ADP5520_LED3_ADP5501_LED2,
1991 static struct adp5520_leds_platform_data adp5520_leds_data = {
1992 .num_leds = ARRAY_SIZE(adp5520_leds),
1993 .leds = adp5520_leds,
1994 .fade_in = ADP5520_FADE_T_600ms,
1995 .fade_out = ADP5520_FADE_T_600ms,
1996 .led_on_time = ADP5520_LED_ONT_600ms,
2003 static struct adp5520_gpio_platform_data adp5520_gpio_data = {
2005 .gpio_en_mask = ADP5520_GPIO_C1 | ADP5520_GPIO_C2 | ADP5520_GPIO_R2,
2006 .gpio_pullup_mask = ADP5520_GPIO_C1 | ADP5520_GPIO_C2 | ADP5520_GPIO_R2,
2010 * ADP5520 Keypad Data
2013 static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = {
2014 [ADP5520_KEY(0, 0)] = KEY_GRAVE,
2015 [ADP5520_KEY(0, 1)] = KEY_1,
2016 [ADP5520_KEY(0, 2)] = KEY_2,
2017 [ADP5520_KEY(0, 3)] = KEY_3,
2018 [ADP5520_KEY(1, 0)] = KEY_4,
2019 [ADP5520_KEY(1, 1)] = KEY_5,
2020 [ADP5520_KEY(1, 2)] = KEY_6,
2021 [ADP5520_KEY(1, 3)] = KEY_7,
2022 [ADP5520_KEY(2, 0)] = KEY_8,
2023 [ADP5520_KEY(2, 1)] = KEY_9,
2024 [ADP5520_KEY(2, 2)] = KEY_0,
2025 [ADP5520_KEY(2, 3)] = KEY_MINUS,
2026 [ADP5520_KEY(3, 0)] = KEY_EQUAL,
2027 [ADP5520_KEY(3, 1)] = KEY_BACKSLASH,
2028 [ADP5520_KEY(3, 2)] = KEY_BACKSPACE,
2029 [ADP5520_KEY(3, 3)] = KEY_ENTER,
2032 static struct adp5520_keys_platform_data adp5520_keys_data = {
2033 .rows_en_mask = ADP5520_ROW_R3 | ADP5520_ROW_R2 | ADP5520_ROW_R1 | ADP5520_ROW_R0,
2034 .cols_en_mask = ADP5520_COL_C3 | ADP5520_COL_C2 | ADP5520_COL_C1 | ADP5520_COL_C0,
2035 .keymap = adp5520_keymap,
2036 .keymapsize = ARRAY_SIZE(adp5520_keymap),
2041 * ADP5520/5501 Multifunction Device Init Data
2044 static struct adp5520_platform_data adp5520_pdev_data = {
2045 .backlight = &adp5520_backlight_data,
2046 .leds = &adp5520_leds_data,
2047 .gpio = &adp5520_gpio_data,
2048 .keys = &adp5520_keys_data,
2053 #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE)
2054 static struct adp5588_gpio_platform_data adp5588_gpio_data = {
2056 .pullup_dis_mask = 0,
2060 #if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE)
2061 #include <linux/i2c/adp8870.h>
2062 static struct led_info adp8870_leds[] = {
2064 .name = "adp8870-led7",
2065 .default_trigger = "none",
2066 .flags = ADP8870_LED_D7 | ADP8870_LED_OFFT_600ms,
2071 static struct adp8870_backlight_platform_data adp8870_pdata = {
2072 .bl_led_assign = ADP8870_BL_D1 | ADP8870_BL_D2 | ADP8870_BL_D3 |
2073 ADP8870_BL_D4 | ADP8870_BL_D5 | ADP8870_BL_D6, /* 1 = Backlight 0 = Individual LED */
2074 .pwm_assign = 0, /* 1 = Enables PWM mode */
2076 .bl_fade_in = ADP8870_FADE_T_1200ms, /* Backlight Fade-In Timer */
2077 .bl_fade_out = ADP8870_FADE_T_1200ms, /* Backlight Fade-Out Timer */
2078 .bl_fade_law = ADP8870_FADE_LAW_CUBIC1, /* fade-on/fade-off transfer characteristic */
2080 .en_ambl_sens = 1, /* 1 = enable ambient light sensor */
2081 .abml_filt = ADP8870_BL_AMBL_FILT_320ms, /* Light sensor filter time */
2083 .l1_daylight_max = ADP8870_BL_CUR_mA(20), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
2084 .l1_daylight_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
2085 .l2_bright_max = ADP8870_BL_CUR_mA(14), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
2086 .l2_bright_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
2087 .l3_office_max = ADP8870_BL_CUR_mA(6), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
2088 .l3_office_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
2089 .l4_indoor_max = ADP8870_BL_CUR_mA(3), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
2090 .l4_indor_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
2091 .l5_dark_max = ADP8870_BL_CUR_mA(2), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
2092 .l5_dark_dim = ADP8870_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
2094 .l2_trip = ADP8870_L2_COMP_CURR_uA(710), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
2095 .l2_hyst = ADP8870_L2_COMP_CURR_uA(73), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
2096 .l3_trip = ADP8870_L3_COMP_CURR_uA(389), /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */
2097 .l3_hyst = ADP8870_L3_COMP_CURR_uA(54), /* use L3_COMP_CURR_uA(I) 0 <= I <= 551 uA */
2098 .l4_trip = ADP8870_L4_COMP_CURR_uA(167), /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */
2099 .l4_hyst = ADP8870_L4_COMP_CURR_uA(16), /* use L4_COMP_CURR_uA(I) 0 <= I <= 275 uA */
2100 .l5_trip = ADP8870_L5_COMP_CURR_uA(43), /* use L5_COMP_CURR_uA(I) 0 <= I <= 138 uA */
2101 .l5_hyst = ADP8870_L5_COMP_CURR_uA(11), /* use L6_COMP_CURR_uA(I) 0 <= I <= 138 uA */
2103 .leds = adp8870_leds,
2104 .num_leds = ARRAY_SIZE(adp8870_leds),
2105 .led_fade_law = ADP8870_FADE_LAW_SQUARE, /* fade-on/fade-off transfer characteristic */
2106 .led_fade_in = ADP8870_FADE_T_600ms,
2107 .led_fade_out = ADP8870_FADE_T_600ms,
2108 .led_on_time = ADP8870_LED_ONT_200ms,
2112 #if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE)
2113 #include <linux/i2c/adp8860.h>
2114 static struct led_info adp8860_leds[] = {
2116 .name = "adp8860-led7",
2117 .default_trigger = "none",
2118 .flags = ADP8860_LED_D7 | ADP8860_LED_OFFT_600ms,
2122 static struct adp8860_backlight_platform_data adp8860_pdata = {
2123 .bl_led_assign = ADP8860_BL_D1 | ADP8860_BL_D2 | ADP8860_BL_D3 |
2124 ADP8860_BL_D4 | ADP8860_BL_D5 | ADP8860_BL_D6, /* 1 = Backlight 0 = Individual LED */
2126 .bl_fade_in = ADP8860_FADE_T_1200ms, /* Backlight Fade-In Timer */
2127 .bl_fade_out = ADP8860_FADE_T_1200ms, /* Backlight Fade-Out Timer */
2128 .bl_fade_law = ADP8860_FADE_LAW_CUBIC1, /* fade-on/fade-off transfer characteristic */
2130 .en_ambl_sens = 1, /* 1 = enable ambient light sensor */
2131 .abml_filt = ADP8860_BL_AMBL_FILT_320ms, /* Light sensor filter time */
2133 .l1_daylight_max = ADP8860_BL_CUR_mA(20), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
2134 .l1_daylight_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
2135 .l2_office_max = ADP8860_BL_CUR_mA(6), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
2136 .l2_office_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
2137 .l3_dark_max = ADP8860_BL_CUR_mA(2), /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
2138 .l3_dark_dim = ADP8860_BL_CUR_mA(0), /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
2140 .l2_trip = ADP8860_L2_COMP_CURR_uA(710), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
2141 .l2_hyst = ADP8860_L2_COMP_CURR_uA(73), /* use L2_COMP_CURR_uA(I) 0 <= I <= 1106 uA */
2142 .l3_trip = ADP8860_L3_COMP_CURR_uA(43), /* use L3_COMP_CURR_uA(I) 0 <= I <= 138 uA */
2143 .l3_hyst = ADP8860_L3_COMP_CURR_uA(11), /* use L3_COMP_CURR_uA(I) 0 <= I <= 138 uA */
2145 .leds = adp8860_leds,
2146 .num_leds = ARRAY_SIZE(adp8860_leds),
2147 .led_fade_law = ADP8860_FADE_LAW_SQUARE, /* fade-on/fade-off transfer characteristic */
2148 .led_fade_in = ADP8860_FADE_T_600ms,
2149 .led_fade_out = ADP8860_FADE_T_600ms,
2150 .led_on_time = ADP8860_LED_ONT_200ms,
2154 #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE)
2155 static struct regulator_consumer_supply ad5398_consumer = {
2156 .supply = "current",
2159 static struct regulator_init_data ad5398_regulator_data = {
2161 .name = "current range",
2163 .valid_ops_mask = REGULATOR_CHANGE_CURRENT | REGULATOR_CHANGE_STATUS,
2165 .num_consumer_supplies = 1,
2166 .consumer_supplies = &ad5398_consumer,
2169 #if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \
2170 defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE)
2171 static struct platform_device ad5398_virt_consumer_device = {
2172 .name = "reg-virt-consumer",
2175 .platform_data = "current", /* Passed to driver */
2179 #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \
2180 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
2181 static struct regulator_bulk_data ad5398_bulk_data = {
2182 .supply = "current",
2185 static struct regulator_userspace_consumer_data ad5398_userspace_comsumer_data = {
2188 .supplies = &ad5398_bulk_data,
2191 static struct platform_device ad5398_userspace_consumer_device = {
2192 .name = "reg-userspace-consumer",
2195 .platform_data = &ad5398_userspace_comsumer_data,
2201 #if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE)
2202 /* INT bound temperature alarm event. line 1 */
2203 static unsigned long adt7410_platform_data[2] = {
2204 IRQ_PG4, IRQF_TRIGGER_LOW,
2208 #if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE)
2209 /* INT bound temperature alarm event. line 1 */
2210 static unsigned long adt7316_i2c_data[2] = {
2211 IRQF_TRIGGER_LOW, /* interrupt flags */
2212 GPIO_PF4, /* ldac_pin, 0 means DAC/LDAC registers control DAC update */
2216 static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
2217 #if defined(CONFIG_SND_BF5XX_SOC_AD193X) || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE)
2219 I2C_BOARD_INFO("ad1937", 0x04),
2223 #if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE)
2225 I2C_BOARD_INFO("adav803", 0x10),
2229 #if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE)
2231 I2C_BOARD_INFO("ad7142_captouch", 0x2C),
2233 .platform_data = (void *)&ad7142_i2c_platform_data,
2237 #if defined(CONFIG_AD7150) || defined(CONFIG_AD7150_MODULE)
2239 I2C_BOARD_INFO("ad7150", 0x48),
2240 .irq = IRQ_PG5, /* fixme: use real interrupt number */
2244 #if defined(CONFIG_AD7152) || defined(CONFIG_AD7152_MODULE)
2246 I2C_BOARD_INFO("ad7152", 0x48),
2250 #if defined(CONFIG_AD774X) || defined(CONFIG_AD774X_MODULE)
2252 I2C_BOARD_INFO("ad774x", 0x48),
2256 #if defined(CONFIG_AD7414) || defined(CONFIG_AD7414_MODULE)
2258 I2C_BOARD_INFO("ad7414", 0x9),
2260 .irq_flags = IRQF_TRIGGER_LOW,
2264 #if defined(CONFIG_AD7416) || defined(CONFIG_AD7416_MODULE)
2266 I2C_BOARD_INFO("ad7417", 0xb),
2268 .irq_flags = IRQF_TRIGGER_LOW,
2269 .platform_data = (void *)GPIO_PF4,
2273 #if defined(CONFIG_ADE7854_I2C) || defined(CONFIG_ADE7854_I2C_MODULE)
2275 I2C_BOARD_INFO("ade7854", 0x38),
2279 #if defined(CONFIG_ADT75) || defined(CONFIG_ADT75_MODULE)
2281 I2C_BOARD_INFO("adt75", 0x9),
2283 .irq_flags = IRQF_TRIGGER_LOW,
2287 #if defined(CONFIG_ADT7408) || defined(CONFIG_ADT7408_MODULE)
2289 I2C_BOARD_INFO("adt7408", 0x18),
2291 .irq_flags = IRQF_TRIGGER_LOW,
2295 #if defined(CONFIG_ADT7410) || defined(CONFIG_ADT7410_MODULE)
2297 I2C_BOARD_INFO("adt7410", 0x48),
2298 /* CT critical temperature event. line 0 */
2300 .irq_flags = IRQF_TRIGGER_LOW,
2301 .platform_data = (void *)&adt7410_platform_data,
2305 #if defined(CONFIG_AD7291) || defined(CONFIG_AD7291_MODULE)
2307 I2C_BOARD_INFO("ad7291", 0x20),
2309 .irq_flags = IRQF_TRIGGER_LOW,
2313 #if defined(CONFIG_ADT7316_I2C) || defined(CONFIG_ADT7316_I2C_MODULE)
2315 I2C_BOARD_INFO("adt7316", 0x48),
2317 .platform_data = (void *)&adt7316_i2c_data,
2321 #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
2323 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
2326 #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
2328 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
2332 #if defined(CONFIG_TOUCHSCREEN_AD7879_I2C) || defined(CONFIG_TOUCHSCREEN_AD7879_I2C_MODULE)
2334 I2C_BOARD_INFO("ad7879", 0x2F),
2336 .platform_data = (void *)&bfin_ad7879_ts_info,
2339 #if defined(CONFIG_KEYBOARD_ADP5588) || defined(CONFIG_KEYBOARD_ADP5588_MODULE)
2341 I2C_BOARD_INFO("adp5588-keys", 0x34),
2343 .platform_data = (void *)&adp5588_kpad_data,
2346 #if defined(CONFIG_PMIC_ADP5520) || defined(CONFIG_PMIC_ADP5520_MODULE)
2348 I2C_BOARD_INFO("pmic-adp5520", 0x32),
2350 .platform_data = (void *)&adp5520_pdev_data,
2353 #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
2355 I2C_BOARD_INFO("adxl34x", 0x53),
2357 .platform_data = (void *)&adxl34x_info,
2360 #if defined(CONFIG_GPIO_ADP5588) || defined(CONFIG_GPIO_ADP5588_MODULE)
2362 I2C_BOARD_INFO("adp5588-gpio", 0x34),
2363 .platform_data = (void *)&adp5588_gpio_data,
2366 #if defined(CONFIG_FB_BFIN_7393) || defined(CONFIG_FB_BFIN_7393_MODULE)
2368 I2C_BOARD_INFO("bfin-adv7393", 0x2B),
2371 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
2373 I2C_BOARD_INFO("bf537-lq035-ad5280", 0x2F),
2376 #if defined(CONFIG_BACKLIGHT_ADP8870) || defined(CONFIG_BACKLIGHT_ADP8870_MODULE)
2378 I2C_BOARD_INFO("adp8870", 0x2B),
2379 .platform_data = (void *)&adp8870_pdata,
2382 #if defined(CONFIG_SND_SOC_ADAU1371) || defined(CONFIG_SND_SOC_ADAU1371_MODULE)
2384 I2C_BOARD_INFO("adau1371", 0x1A),
2387 #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE)
2389 I2C_BOARD_INFO("adau1761", 0x38),
2392 #if defined(CONFIG_SND_SOC_ADAU1361) || defined(CONFIG_SND_SOC_ADAU1361_MODULE)
2394 I2C_BOARD_INFO("adau1361", 0x38),
2397 #if defined(CONFIG_AD525X_DPOT) || defined(CONFIG_AD525X_DPOT_MODULE)
2399 I2C_BOARD_INFO("ad5258", 0x18),
2402 #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE)
2404 I2C_BOARD_INFO("ssm2602", 0x1b),
2407 #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE)
2409 I2C_BOARD_INFO("ad5398", 0xC),
2410 .platform_data = (void *)&ad5398_regulator_data,
2413 #if defined(CONFIG_BACKLIGHT_ADP8860) || defined(CONFIG_BACKLIGHT_ADP8860_MODULE)
2415 I2C_BOARD_INFO("adp8860", 0x2A),
2416 .platform_data = (void *)&adp8860_pdata,
2419 #if defined(CONFIG_SND_SOC_ADAU1373) || defined(CONFIG_SND_SOC_ADAU1373_MODULE)
2421 I2C_BOARD_INFO("adau1373", 0x1A),
2424 #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
2426 I2C_BOARD_INFO("ad5252", 0x2e),
2431 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
2432 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
2433 static struct resource bfin_sport0_uart_resources[] = {
2435 .start = SPORT0_TCR1,
2436 .end = SPORT0_MRCS3+4,
2437 .flags = IORESOURCE_MEM,
2440 .start = IRQ_SPORT0_RX,
2441 .end = IRQ_SPORT0_RX+1,
2442 .flags = IORESOURCE_IRQ,
2445 .start = IRQ_SPORT0_ERROR,
2446 .end = IRQ_SPORT0_ERROR,
2447 .flags = IORESOURCE_IRQ,
2451 static unsigned short bfin_sport0_peripherals[] = {
2452 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
2453 P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0
2456 static struct platform_device bfin_sport0_uart_device = {
2457 .name = "bfin-sport-uart",
2459 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
2460 .resource = bfin_sport0_uart_resources,
2462 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
2466 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
2467 static struct resource bfin_sport1_uart_resources[] = {
2469 .start = SPORT1_TCR1,
2470 .end = SPORT1_MRCS3+4,
2471 .flags = IORESOURCE_MEM,
2474 .start = IRQ_SPORT1_RX,
2475 .end = IRQ_SPORT1_RX+1,
2476 .flags = IORESOURCE_IRQ,
2479 .start = IRQ_SPORT1_ERROR,
2480 .end = IRQ_SPORT1_ERROR,
2481 .flags = IORESOURCE_IRQ,
2485 static unsigned short bfin_sport1_peripherals[] = {
2486 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
2487 P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0
2490 static struct platform_device bfin_sport1_uart_device = {
2491 .name = "bfin-sport-uart",
2493 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
2494 .resource = bfin_sport1_uart_resources,
2496 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
2502 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
2503 #define CF_IDE_NAND_CARD_USE_HDD_INTERFACE
2504 /* #define CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE */
2506 #ifdef CF_IDE_NAND_CARD_USE_HDD_INTERFACE
2507 #define PATA_INT IRQ_PF5
2508 static struct pata_platform_info bfin_pata_platform_data = {
2510 .irq_flags = IRQF_TRIGGER_HIGH | IRQF_DISABLED,
2513 static struct resource bfin_pata_resources[] = {
2515 .start = 0x20314020,
2517 .flags = IORESOURCE_MEM,
2520 .start = 0x2031401C,
2522 .flags = IORESOURCE_MEM,
2527 .flags = IORESOURCE_IRQ,
2530 #elif defined(CF_IDE_NAND_CARD_USE_CF_IN_COMMON_MEMORY_MODE)
2531 static struct pata_platform_info bfin_pata_platform_data = {
2534 /* CompactFlash Storage Card Memory Mapped Addressing
2537 static struct resource bfin_pata_resources[] = {
2539 .start = 0x20211800,
2541 .flags = IORESOURCE_MEM,
2544 .start = 0x2021180E, /* Device Ctl */
2546 .flags = IORESOURCE_MEM,
2551 static struct platform_device bfin_pata_device = {
2552 .name = "pata_platform",
2554 .num_resources = ARRAY_SIZE(bfin_pata_resources),
2555 .resource = bfin_pata_resources,
2557 .platform_data = &bfin_pata_platform_data,
2562 static const unsigned int cclk_vlev_datasheet[] =
2564 VRPAIR(VLEV_085, 250000000),
2565 VRPAIR(VLEV_090, 376000000),
2566 VRPAIR(VLEV_095, 426000000),
2567 VRPAIR(VLEV_100, 426000000),
2568 VRPAIR(VLEV_105, 476000000),
2569 VRPAIR(VLEV_110, 476000000),
2570 VRPAIR(VLEV_115, 476000000),
2571 VRPAIR(VLEV_120, 500000000),
2572 VRPAIR(VLEV_125, 533000000),
2573 VRPAIR(VLEV_130, 600000000),
2576 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
2577 .tuple_tab = cclk_vlev_datasheet,
2578 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
2579 .vr_settling_time = 25 /* us */,
2582 static struct platform_device bfin_dpmc = {
2583 .name = "bfin dpmc",
2585 .platform_data = &bfin_dmpc_vreg_data,
2589 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
2590 defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \
2591 defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
2593 #define SPORT_REQ(x) \
2594 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \
2595 P_SPORT##x##_RFS, P_SPORT##x##_DRPRI, P_SPORT##x##_RSCLK, 0}
2597 static const u16 bfin_snd_pin[][7] = {
2602 static struct bfin_snd_platform_data bfin_snd_data[] = {
2604 .pin_req = &bfin_snd_pin[0][0],
2607 .pin_req = &bfin_snd_pin[1][0],
2611 #define BFIN_SND_RES(x) \
2614 .start = SPORT##x##_TCR1, \
2615 .end = SPORT##x##_TCR1, \
2616 .flags = IORESOURCE_MEM \
2619 .start = CH_SPORT##x##_RX, \
2620 .end = CH_SPORT##x##_RX, \
2621 .flags = IORESOURCE_DMA, \
2624 .start = CH_SPORT##x##_TX, \
2625 .end = CH_SPORT##x##_TX, \
2626 .flags = IORESOURCE_DMA, \
2629 .start = IRQ_SPORT##x##_ERROR, \
2630 .end = IRQ_SPORT##x##_ERROR, \
2631 .flags = IORESOURCE_IRQ, \
2635 static struct resource bfin_snd_resources[][4] = {
2640 static struct platform_device bfin_pcm = {
2641 .name = "bfin-pcm-audio",
2646 #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
2647 static struct platform_device bfin_ad73311_codec_device = {
2653 #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
2654 static struct platform_device bfin_i2s = {
2656 .id = CONFIG_SND_BF5XX_SPORT_NUM,
2657 .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
2658 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
2660 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
2665 #if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE)
2666 static struct platform_device bfin_tdm = {
2668 .id = CONFIG_SND_BF5XX_SPORT_NUM,
2669 .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
2670 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
2672 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
2677 #if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
2678 static struct platform_device bfin_ac97 = {
2679 .name = "bfin-ac97",
2680 .id = CONFIG_SND_BF5XX_SPORT_NUM,
2681 .num_resources = ARRAY_SIZE(bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM]),
2682 .resource = bfin_snd_resources[CONFIG_SND_BF5XX_SPORT_NUM],
2684 .platform_data = &bfin_snd_data[CONFIG_SND_BF5XX_SPORT_NUM],
2689 #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
2690 #define REGULATOR_ADP122 "adp122"
2691 #define REGULATOR_ADP122_UV 2500000
2693 static struct regulator_consumer_supply adp122_consumers = {
2694 .supply = REGULATOR_ADP122,
2697 static struct regulator_init_data adp_switch_regulator_data = {
2699 .name = REGULATOR_ADP122,
2700 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
2701 .min_uV = REGULATOR_ADP122_UV,
2702 .max_uV = REGULATOR_ADP122_UV,
2706 .num_consumer_supplies = 1, /* only 1 */
2707 .consumer_supplies = &adp122_consumers,
2710 static struct fixed_voltage_config adp_switch_pdata = {
2711 .supply_name = REGULATOR_ADP122,
2712 .microvolts = REGULATOR_ADP122_UV,
2715 .enabled_at_boot = 0,
2716 .init_data = &adp_switch_regulator_data,
2719 static struct platform_device adp_switch_device = {
2720 .name = "reg-fixed-voltage",
2723 .platform_data = &adp_switch_pdata,
2727 #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \
2728 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
2729 static struct regulator_bulk_data adp122_bulk_data = {
2730 .supply = REGULATOR_ADP122,
2733 static struct regulator_userspace_consumer_data adp122_userspace_comsumer_data = {
2734 .name = REGULATOR_ADP122,
2736 .supplies = &adp122_bulk_data,
2739 static struct platform_device adp122_userspace_consumer_device = {
2740 .name = "reg-userspace-consumer",
2743 .platform_data = &adp122_userspace_comsumer_data,
2749 #if defined(CONFIG_IIO_GPIO_TRIGGER) || \
2750 defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
2752 static struct resource iio_gpio_trigger_resources[] = {
2756 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
2760 static struct platform_device iio_gpio_trigger = {
2761 .name = "iio_gpio_trigger",
2762 .num_resources = ARRAY_SIZE(iio_gpio_trigger_resources),
2763 .resource = iio_gpio_trigger_resources,
2767 static struct platform_device *stamp_devices[] __initdata = {
2771 #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
2772 &bfin_pcmcia_cf_device,
2775 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
2779 #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
2783 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
2784 &isp1362_hcd_device,
2787 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
2788 &bfin_isp1760_device,
2791 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
2795 #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE)
2799 #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
2803 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
2808 #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
2809 &net2272_bfin_device,
2812 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
2816 #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE)
2817 &bfin_sport_spi0_device,
2818 &bfin_sport_spi1_device,
2821 #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
2825 #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
2826 &bfin_lq035q1_device,
2829 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
2830 #ifdef CONFIG_SERIAL_BFIN_UART0
2833 #ifdef CONFIG_SERIAL_BFIN_UART1
2838 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
2839 #ifdef CONFIG_BFIN_SIR0
2842 #ifdef CONFIG_BFIN_SIR1
2847 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
2848 &i2c_bfin_twi_device,
2851 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
2852 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
2853 &bfin_sport0_uart_device,
2855 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
2856 &bfin_sport1_uart_device,
2860 #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
2864 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
2865 &bfin_device_gpiokeys,
2868 #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
2869 &bfin_async_nand_device,
2872 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
2873 &stamp_flash_device,
2876 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
2877 defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \
2878 defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
2882 #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
2883 &bfin_ad73311_codec_device,
2886 #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
2890 #if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE)
2894 #if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
2898 #if defined(CONFIG_REGULATOR_AD5398) || defined(CONFIG_REGULATOR_AD5398_MODULE)
2899 #if defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER) || \
2900 defined(CONFIG_REGULATOR_VIRTUAL_CONSUMER_MODULE)
2901 &ad5398_virt_consumer_device,
2903 #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \
2904 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
2905 &ad5398_userspace_consumer_device,
2909 #if defined(CONFIG_REGULATOR_FIXED_VOLTAGE) || defined(CONFIG_REGULATOR_FIXED_VOLTAGE_MODULE)
2911 #if defined(CONFIG_REGULATOR_USERSPACE_CONSUMER) || \
2912 defined(CONFIG_REGULATOR_USERSPACE_CONSUMER_MODULE)
2913 &adp122_userspace_consumer_device,
2917 #if defined(CONFIG_IIO_GPIO_TRIGGER) || \
2918 defined(CONFIG_IIO_GPIO_TRIGGER_MODULE)
2923 static int __init stamp_init(void)
2925 printk(KERN_INFO "%s(): registering device resources\n", __func__);
2926 bfin_plat_nand_init();
2928 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
2929 i2c_register_board_info(0, bfin_i2c_board_info,
2930 ARRAY_SIZE(bfin_i2c_board_info));
2931 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
2936 arch_initcall(stamp_init);
2939 static struct platform_device *stamp_early_devices[] __initdata = {
2940 #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
2941 #ifdef CONFIG_SERIAL_BFIN_UART0
2944 #ifdef CONFIG_SERIAL_BFIN_UART1
2949 #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
2950 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
2951 &bfin_sport0_uart_device,
2953 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
2954 &bfin_sport1_uart_device,
2959 void __init native_machine_early_platform_add_devices(void)
2961 printk(KERN_INFO "register early platform devices\n");
2962 early_platform_add_devices(stamp_early_devices,
2963 ARRAY_SIZE(stamp_early_devices));
2966 void native_machine_restart(char *cmd)
2968 /* workaround reboot hang when booting from SPI */
2969 if ((bfin_read_SYSCR() & 0x7) == 0x3)
2970 bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS);
2974 * Currently the MAC address is saved in Flash by U-Boot
2976 #define FLASH_MAC 0x203f0000
2977 void bfin_get_ether_addr(char *addr)
2979 *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC);
2980 *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4);
2982 EXPORT_SYMBOL(bfin_get_ether_addr);