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/platform_device.h>
11 #include <linux/mtd/mtd.h>
12 #include <linux/mtd/partitions.h>
13 #include <linux/mtd/physmap.h>
14 #include <linux/spi/spi.h>
15 #include <linux/spi/flash.h>
16 #include <linux/irq.h>
17 #include <linux/i2c.h>
18 #include <linux/interrupt.h>
19 #include <linux/usb/musb.h>
20 #include <asm/bfin6xx_spi.h>
25 #include <asm/portmux.h>
26 #include <asm/bfin_sdh.h>
27 #include <linux/input.h>
28 #include <linux/spi/ad7877.h>
31 * Name the Board for the /proc/cpuinfo
33 const char bfin_board_name
[] = "ADI BF609-EZKIT";
36 * Driver needs to know address, irq and flag pin.
39 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
40 #include <linux/usb/isp1760.h>
41 static struct resource bfin_isp1760_resources
[] = {
44 .end
= 0x2C0C0000 + 0xfffff,
45 .flags
= IORESOURCE_MEM
,
50 .flags
= IORESOURCE_IRQ
,
54 static struct isp1760_platform_data isp1760_priv
= {
59 .dack_polarity_high
= 0,
60 .dreq_polarity_high
= 0,
63 static struct platform_device bfin_isp1760_device
= {
67 .platform_data
= &isp1760_priv
,
69 .num_resources
= ARRAY_SIZE(bfin_isp1760_resources
),
70 .resource
= bfin_isp1760_resources
,
74 #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
75 #include <asm/bfin_rotary.h>
77 static struct bfin_rotary_platform_data bfin_rotary_data
= {
78 /*.rotary_up_key = KEY_UP,*/
79 /*.rotary_down_key = KEY_DOWN,*/
80 .rotary_rel_code
= REL_WHEEL
,
81 .rotary_button_key
= KEY_ENTER
,
82 .debounce
= 10, /* 0..17 */
83 .mode
= ROT_QUAD_ENC
| ROT_DEBE
,
86 static struct resource bfin_rotary_resources
[] = {
90 .flags
= IORESOURCE_IRQ
,
94 static struct platform_device bfin_rotary_device
= {
95 .name
= "bfin-rotary",
97 .num_resources
= ARRAY_SIZE(bfin_rotary_resources
),
98 .resource
= bfin_rotary_resources
,
100 .platform_data
= &bfin_rotary_data
,
105 #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
106 #include <linux/stmmac.h>
108 static unsigned short pins
[] = P_RMII0
;
110 static struct stmmac_mdio_bus_data phy_private_data
= {
115 static struct plat_stmmacenet_data eth_private_data
= {
119 .mdio_bus_data
= &phy_private_data
,
122 static struct platform_device bfin_eth_device
= {
126 .resource
= (struct resource
[]) {
128 .start
= EMAC0_MACCFG
,
129 .end
= EMAC0_MACCFG
+ 0x1274,
130 .flags
= IORESOURCE_MEM
,
134 .start
= IRQ_EMAC0_STAT
,
135 .end
= IRQ_EMAC0_STAT
,
136 .flags
= IORESOURCE_IRQ
,
140 .power
.can_wakeup
= 1,
141 .platform_data
= ð_private_data
,
146 #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
147 #include <linux/input/adxl34x.h>
148 static const struct adxl34x_platform_data adxl34x_info
= {
152 .tap_threshold
= 0x31,
153 .tap_duration
= 0x10,
156 .tap_axis_control
= ADXL_TAP_X_EN
| ADXL_TAP_Y_EN
| ADXL_TAP_Z_EN
,
157 .act_axis_control
= 0xFF,
158 .activity_threshold
= 5,
159 .inactivity_threshold
= 3,
160 .inactivity_time
= 4,
161 .free_fall_threshold
= 0x7,
162 .free_fall_time
= 0x20,
164 .data_range
= ADXL_FULL_RES
,
167 .ev_code_x
= ABS_X
, /* EV_REL */
168 .ev_code_y
= ABS_Y
, /* EV_REL */
169 .ev_code_z
= ABS_Z
, /* EV_REL */
171 .ev_code_tap
= {BTN_TOUCH
, BTN_TOUCH
, BTN_TOUCH
}, /* EV_KEY x,y,z */
173 /* .ev_code_ff = KEY_F,*/ /* EV_KEY */
174 /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
175 .power_mode
= ADXL_AUTO_SLEEP
| ADXL_LINK
,
176 .fifo_mode
= ADXL_FIFO_STREAM
,
177 .orientation_enable
= ADXL_EN_ORIENTATION_3D
,
178 .deadzone_angle
= ADXL_DEADZONE_ANGLE_10p8
,
179 .divisor_length
= ADXL_LP_FILTER_DIVISOR_16
,
180 /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */
181 .ev_codes_orient_3d
= {BTN_Z
, BTN_Y
, BTN_X
, BTN_A
, BTN_B
, BTN_C
},
185 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
186 static struct platform_device rtc_device
= {
192 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
193 #ifdef CONFIG_SERIAL_BFIN_UART0
194 static struct resource bfin_uart0_resources
[] = {
196 .start
= UART0_REVID
,
197 .end
= UART0_RXDIV
+4,
198 .flags
= IORESOURCE_MEM
,
201 .start
= IRQ_UART0_TX
,
203 .flags
= IORESOURCE_IRQ
,
206 .start
= IRQ_UART0_RX
,
208 .flags
= IORESOURCE_IRQ
,
211 .start
= IRQ_UART0_STAT
,
212 .end
= IRQ_UART0_STAT
,
213 .flags
= IORESOURCE_IRQ
,
216 .start
= CH_UART0_TX
,
218 .flags
= IORESOURCE_DMA
,
221 .start
= CH_UART0_RX
,
223 .flags
= IORESOURCE_DMA
,
225 #ifdef CONFIG_BFIN_UART0_CTSRTS
226 { /* CTS pin -- 0 means not supported */
229 .flags
= IORESOURCE_IO
,
231 { /* RTS pin -- 0 means not supported */
234 .flags
= IORESOURCE_IO
,
239 static unsigned short bfin_uart0_peripherals
[] = {
240 P_UART0_TX
, P_UART0_RX
,
241 #ifdef CONFIG_BFIN_UART0_CTSRTS
242 P_UART0_RTS
, P_UART0_CTS
,
247 static struct platform_device bfin_uart0_device
= {
250 .num_resources
= ARRAY_SIZE(bfin_uart0_resources
),
251 .resource
= bfin_uart0_resources
,
253 .platform_data
= &bfin_uart0_peripherals
, /* Passed to driver */
257 #ifdef CONFIG_SERIAL_BFIN_UART1
258 static struct resource bfin_uart1_resources
[] = {
260 .start
= UART1_REVID
,
261 .end
= UART1_RXDIV
+4,
262 .flags
= IORESOURCE_MEM
,
265 .start
= IRQ_UART1_TX
,
267 .flags
= IORESOURCE_IRQ
,
270 .start
= IRQ_UART1_RX
,
272 .flags
= IORESOURCE_IRQ
,
275 .start
= IRQ_UART1_STAT
,
276 .end
= IRQ_UART1_STAT
,
277 .flags
= IORESOURCE_IRQ
,
280 .start
= CH_UART1_TX
,
282 .flags
= IORESOURCE_DMA
,
285 .start
= CH_UART1_RX
,
287 .flags
= IORESOURCE_DMA
,
289 #ifdef CONFIG_BFIN_UART1_CTSRTS
290 { /* CTS pin -- 0 means not supported */
293 .flags
= IORESOURCE_IO
,
295 { /* RTS pin -- 0 means not supported */
298 .flags
= IORESOURCE_IO
,
303 static unsigned short bfin_uart1_peripherals
[] = {
304 P_UART1_TX
, P_UART1_RX
,
305 #ifdef CONFIG_BFIN_UART1_CTSRTS
306 P_UART1_RTS
, P_UART1_CTS
,
311 static struct platform_device bfin_uart1_device
= {
314 .num_resources
= ARRAY_SIZE(bfin_uart1_resources
),
315 .resource
= bfin_uart1_resources
,
317 .platform_data
= &bfin_uart1_peripherals
, /* Passed to driver */
323 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
324 #ifdef CONFIG_BFIN_SIR0
325 static struct resource bfin_sir0_resources
[] = {
329 .flags
= IORESOURCE_MEM
,
332 .start
= IRQ_UART0_TX
,
333 .end
= IRQ_UART0_TX
+1,
334 .flags
= IORESOURCE_IRQ
,
337 .start
= CH_UART0_TX
,
338 .end
= CH_UART0_TX
+1,
339 .flags
= IORESOURCE_DMA
,
342 static struct platform_device bfin_sir0_device
= {
345 .num_resources
= ARRAY_SIZE(bfin_sir0_resources
),
346 .resource
= bfin_sir0_resources
,
349 #ifdef CONFIG_BFIN_SIR1
350 static struct resource bfin_sir1_resources
[] = {
354 .flags
= IORESOURCE_MEM
,
357 .start
= IRQ_UART1_TX
,
358 .end
= IRQ_UART1_TX
+1,
359 .flags
= IORESOURCE_IRQ
,
362 .start
= CH_UART1_TX
,
363 .end
= CH_UART1_TX
+1,
364 .flags
= IORESOURCE_DMA
,
367 static struct platform_device bfin_sir1_device
= {
370 .num_resources
= ARRAY_SIZE(bfin_sir1_resources
),
371 .resource
= bfin_sir1_resources
,
376 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
377 static struct resource musb_resources
[] = {
381 .flags
= IORESOURCE_MEM
,
383 [1] = { /* general IRQ */
384 .start
= IRQ_USB_STAT
,
386 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
389 [2] = { /* DMA IRQ */
390 .start
= IRQ_USB_DMA
,
392 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
397 static struct musb_hdrc_config musb_config
= {
403 .clkin
= 48, /* musb CLKIN in MHZ */
406 static struct musb_hdrc_platform_data musb_plat
= {
407 #if defined(CONFIG_USB_MUSB_HDRC) && defined(CONFIG_USB_GADGET_MUSB_HDRC)
409 #elif defined(CONFIG_USB_MUSB_HDRC)
411 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
412 .mode
= MUSB_PERIPHERAL
,
414 .config
= &musb_config
,
417 static u64 musb_dmamask
= ~(u32
)0;
419 static struct platform_device musb_device
= {
420 .name
= "musb-blackfin",
423 .dma_mask
= &musb_dmamask
,
424 .coherent_dma_mask
= 0xffffffff,
425 .platform_data
= &musb_plat
,
427 .num_resources
= ARRAY_SIZE(musb_resources
),
428 .resource
= musb_resources
,
432 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
433 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
434 static struct resource bfin_sport0_uart_resources
[] = {
436 .start
= SPORT0_TCR1
,
437 .end
= SPORT0_MRCS3
+4,
438 .flags
= IORESOURCE_MEM
,
441 .start
= IRQ_SPORT0_RX
,
442 .end
= IRQ_SPORT0_RX
+1,
443 .flags
= IORESOURCE_IRQ
,
446 .start
= IRQ_SPORT0_ERROR
,
447 .end
= IRQ_SPORT0_ERROR
,
448 .flags
= IORESOURCE_IRQ
,
452 static unsigned short bfin_sport0_peripherals
[] = {
453 P_SPORT0_TFS
, P_SPORT0_DTPRI
, P_SPORT0_TSCLK
, P_SPORT0_RFS
,
454 P_SPORT0_DRPRI
, P_SPORT0_RSCLK
, 0
457 static struct platform_device bfin_sport0_uart_device
= {
458 .name
= "bfin-sport-uart",
460 .num_resources
= ARRAY_SIZE(bfin_sport0_uart_resources
),
461 .resource
= bfin_sport0_uart_resources
,
463 .platform_data
= &bfin_sport0_peripherals
, /* Passed to driver */
467 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
468 static struct resource bfin_sport1_uart_resources
[] = {
470 .start
= SPORT1_TCR1
,
471 .end
= SPORT1_MRCS3
+4,
472 .flags
= IORESOURCE_MEM
,
475 .start
= IRQ_SPORT1_RX
,
476 .end
= IRQ_SPORT1_RX
+1,
477 .flags
= IORESOURCE_IRQ
,
480 .start
= IRQ_SPORT1_ERROR
,
481 .end
= IRQ_SPORT1_ERROR
,
482 .flags
= IORESOURCE_IRQ
,
486 static unsigned short bfin_sport1_peripherals
[] = {
487 P_SPORT1_TFS
, P_SPORT1_DTPRI
, P_SPORT1_TSCLK
, P_SPORT1_RFS
,
488 P_SPORT1_DRPRI
, P_SPORT1_RSCLK
, 0
491 static struct platform_device bfin_sport1_uart_device
= {
492 .name
= "bfin-sport-uart",
494 .num_resources
= ARRAY_SIZE(bfin_sport1_uart_resources
),
495 .resource
= bfin_sport1_uart_resources
,
497 .platform_data
= &bfin_sport1_peripherals
, /* Passed to driver */
501 #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
502 static struct resource bfin_sport2_uart_resources
[] = {
504 .start
= SPORT2_TCR1
,
505 .end
= SPORT2_MRCS3
+4,
506 .flags
= IORESOURCE_MEM
,
509 .start
= IRQ_SPORT2_RX
,
510 .end
= IRQ_SPORT2_RX
+1,
511 .flags
= IORESOURCE_IRQ
,
514 .start
= IRQ_SPORT2_ERROR
,
515 .end
= IRQ_SPORT2_ERROR
,
516 .flags
= IORESOURCE_IRQ
,
520 static unsigned short bfin_sport2_peripherals
[] = {
521 P_SPORT2_TFS
, P_SPORT2_DTPRI
, P_SPORT2_TSCLK
, P_SPORT2_RFS
,
522 P_SPORT2_DRPRI
, P_SPORT2_RSCLK
, P_SPORT2_DRSEC
, P_SPORT2_DTSEC
, 0
525 static struct platform_device bfin_sport2_uart_device
= {
526 .name
= "bfin-sport-uart",
528 .num_resources
= ARRAY_SIZE(bfin_sport2_uart_resources
),
529 .resource
= bfin_sport2_uart_resources
,
531 .platform_data
= &bfin_sport2_peripherals
, /* Passed to driver */
537 #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
539 static unsigned short bfin_can0_peripherals
[] = {
540 P_CAN0_RX
, P_CAN0_TX
, 0
543 static struct resource bfin_can0_resources
[] = {
547 .flags
= IORESOURCE_MEM
,
550 .start
= IRQ_CAN0_RX
,
552 .flags
= IORESOURCE_IRQ
,
555 .start
= IRQ_CAN0_TX
,
557 .flags
= IORESOURCE_IRQ
,
560 .start
= IRQ_CAN0_STAT
,
561 .end
= IRQ_CAN0_STAT
,
562 .flags
= IORESOURCE_IRQ
,
566 static struct platform_device bfin_can0_device
= {
569 .num_resources
= ARRAY_SIZE(bfin_can0_resources
),
570 .resource
= bfin_can0_resources
,
572 .platform_data
= &bfin_can0_peripherals
, /* Passed to driver */
578 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
579 static struct mtd_partition partition_info
[] = {
581 .name
= "bootloader(nand)",
585 .name
= "linux kernel(nand)",
586 .offset
= MTDPART_OFS_APPEND
,
587 .size
= 4 * 1024 * 1024,
590 .name
= "file system(nand)",
591 .offset
= MTDPART_OFS_APPEND
,
592 .size
= MTDPART_SIZ_FULL
,
596 static struct bf5xx_nand_platform bfin_nand_platform
= {
597 .data_width
= NFC_NWIDTH_8
,
598 .partitions
= partition_info
,
599 .nr_partitions
= ARRAY_SIZE(partition_info
),
604 static struct resource bfin_nand_resources
[] = {
608 .flags
= IORESOURCE_MEM
,
613 .flags
= IORESOURCE_IRQ
,
617 static struct platform_device bfin_nand_device
= {
620 .num_resources
= ARRAY_SIZE(bfin_nand_resources
),
621 .resource
= bfin_nand_resources
,
623 .platform_data
= &bfin_nand_platform
,
628 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
630 static struct bfin_sd_host bfin_sdh_data
= {
632 .irq_int0
= IRQ_RSI_INT0
,
633 .pin_req
= {P_RSI_DATA0
, P_RSI_DATA1
, P_RSI_DATA2
, P_RSI_DATA3
, P_RSI_CMD
, P_RSI_CLK
, 0},
636 static struct platform_device bfin_sdh_device
= {
640 .platform_data
= &bfin_sdh_data
,
645 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
646 static struct mtd_partition ezkit_partitions
[] = {
648 .name
= "bootloader(nor)",
652 .name
= "linux kernel(nor)",
654 .offset
= MTDPART_OFS_APPEND
,
656 .name
= "file system(nor)",
657 .size
= 0x1000000 - 0x80000 - 0x400000,
658 .offset
= MTDPART_OFS_APPEND
,
662 int bf609_nor_flash_init(struct platform_device
*dev
)
664 #define CONFIG_SMC_GCTL_VAL 0x00000010
665 const unsigned short pins
[] = {
666 P_A3
, P_A4
, P_A5
, P_A6
, P_A7
, P_A8
, P_A9
, P_A10
, P_A11
, P_A12
,
667 P_A13
, P_A14
, P_A15
, P_A16
, P_A17
, P_A18
, P_A19
, P_A20
, P_A21
,
668 P_A22
, P_A23
, P_A24
, P_A25
, P_NORCK
, 0,
671 peripheral_request_list(pins
, "smc0");
673 bfin_write32(SMC_GCTL
, CONFIG_SMC_GCTL_VAL
);
674 bfin_write32(SMC_B0CTL
, 0x01002011);
675 bfin_write32(SMC_B0TIM
, 0x08170977);
676 bfin_write32(SMC_B0ETIM
, 0x00092231);
680 void bf609_nor_flash_exit(struct platform_device
*dev
)
682 const unsigned short pins
[] = {
683 P_A3
, P_A4
, P_A5
, P_A6
, P_A7
, P_A8
, P_A9
, P_A10
, P_A11
, P_A12
,
684 P_A13
, P_A14
, P_A15
, P_A16
, P_A17
, P_A18
, P_A19
, P_A20
, P_A21
,
685 P_A22
, P_A23
, P_A24
, P_A25
, P_NORCK
, 0,
688 peripheral_free_list(pins
);
690 bfin_write32(SMC_GCTL
, 0);
693 static struct physmap_flash_data ezkit_flash_data
= {
695 .parts
= ezkit_partitions
,
696 .init
= bf609_nor_flash_init
,
697 .exit
= bf609_nor_flash_exit
,
698 .nr_parts
= ARRAY_SIZE(ezkit_partitions
),
699 #ifdef CONFIG_ROMKERNEL
700 .probe_type
= "map_rom",
704 static struct resource ezkit_flash_resource
= {
707 .flags
= IORESOURCE_MEM
,
710 static struct platform_device ezkit_flash_device
= {
711 .name
= "physmap-flash",
714 .platform_data
= &ezkit_flash_data
,
717 .resource
= &ezkit_flash_resource
,
721 #if defined(CONFIG_MTD_M25P80) \
722 || defined(CONFIG_MTD_M25P80_MODULE)
723 /* SPI flash chip (w25q32) */
724 static struct mtd_partition bfin_spi_flash_partitions
[] = {
726 .name
= "bootloader(spi)",
729 .mask_flags
= MTD_CAP_ROM
731 .name
= "linux kernel(spi)",
733 .offset
= MTDPART_OFS_APPEND
,
735 .name
= "file system(spi)",
736 .size
= MTDPART_SIZ_FULL
,
737 .offset
= MTDPART_OFS_APPEND
,
741 static struct flash_platform_data bfin_spi_flash_data
= {
743 .parts
= bfin_spi_flash_partitions
,
744 .nr_parts
= ARRAY_SIZE(bfin_spi_flash_partitions
),
748 static struct bfin6xx_spi_chip spi_flash_chip_info
= {
749 .enable_dma
= true, /* use dma transfer with this chip*/
753 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
754 static struct bfin6xx_spi_chip spidev_chip_info
= {
759 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
760 static struct platform_device bfin_i2s_pcm
= {
761 .name
= "bfin-i2s-pcm-audio",
766 #if defined(CONFIG_SND_BF6XX_SOC_I2S) || \
767 defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
768 #include <asm/bfin_sport3.h>
769 static struct resource bfin_snd_resources
[] = {
771 .start
= SPORT0_CTL_A
,
773 .flags
= IORESOURCE_MEM
,
776 .start
= SPORT0_CTL_B
,
778 .flags
= IORESOURCE_MEM
,
781 .start
= CH_SPORT0_TX
,
783 .flags
= IORESOURCE_DMA
,
786 .start
= CH_SPORT0_RX
,
788 .flags
= IORESOURCE_DMA
,
791 .start
= IRQ_SPORT0_TX_STAT
,
792 .end
= IRQ_SPORT0_TX_STAT
,
793 .flags
= IORESOURCE_IRQ
,
796 .start
= IRQ_SPORT0_RX_STAT
,
797 .end
= IRQ_SPORT0_RX_STAT
,
798 .flags
= IORESOURCE_IRQ
,
802 static const unsigned short bfin_snd_pin
[] = {
803 P_SPORT0_ACLK
, P_SPORT0_AFS
, P_SPORT0_AD0
, P_SPORT0_BCLK
,
804 P_SPORT0_BFS
, P_SPORT0_BD0
, 0,
807 static struct bfin_snd_platform_data bfin_snd_data
= {
808 .pin_req
= bfin_snd_pin
,
811 static struct platform_device bfin_i2s
= {
813 .num_resources
= ARRAY_SIZE(bfin_snd_resources
),
814 .resource
= bfin_snd_resources
,
816 .platform_data
= &bfin_snd_data
,
821 #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
822 || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
823 static const char * const ad1836_link
[] = {
827 static struct platform_device bfin_ad1836_machine
= {
828 .name
= "bfin-snd-ad1836",
831 .platform_data
= (void *)ad1836_link
,
836 #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \
837 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
838 static struct platform_device adau1761_device
= {
839 .name
= "bfin-eval-adau1x61",
843 #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE)
844 #include <sound/adau17x1.h>
845 static struct adau1761_platform_data adau1761_info
= {
846 .lineout_mode
= ADAU1761_OUTPUT_MODE_LINE
,
847 .headphone_mode
= ADAU1761_OUTPUT_MODE_HEADPHONE_CAPLESS
,
851 #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
852 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
853 #include <linux/videodev2.h>
854 #include <media/blackfin/bfin_capture.h>
855 #include <media/blackfin/ppi.h>
857 static const unsigned short ppi_req
[] = {
858 P_PPI0_D0
, P_PPI0_D1
, P_PPI0_D2
, P_PPI0_D3
,
859 P_PPI0_D4
, P_PPI0_D5
, P_PPI0_D6
, P_PPI0_D7
,
860 P_PPI0_D8
, P_PPI0_D9
, P_PPI0_D10
, P_PPI0_D11
,
861 P_PPI0_D12
, P_PPI0_D13
, P_PPI0_D14
, P_PPI0_D15
,
862 #if !defined(CONFIG_VIDEO_VS6624) && !defined(CONFIG_VIDEO_VS6624_MODULE)
863 P_PPI0_D16
, P_PPI0_D17
, P_PPI0_D18
, P_PPI0_D19
,
864 P_PPI0_D20
, P_PPI0_D21
, P_PPI0_D22
, P_PPI0_D23
,
866 P_PPI0_CLK
, P_PPI0_FS1
, P_PPI0_FS2
,
870 static const struct ppi_info ppi_info
= {
871 .type
= PPI_TYPE_EPPI3
,
872 .dma_ch
= CH_EPPI0_CH0
,
873 .irq_err
= IRQ_EPPI0_STAT
,
874 .base
= (void __iomem
*)EPPI0_STAT
,
878 #if defined(CONFIG_VIDEO_VS6624) \
879 || defined(CONFIG_VIDEO_VS6624_MODULE)
880 static struct v4l2_input vs6624_inputs
[] = {
884 .type
= V4L2_INPUT_TYPE_CAMERA
,
885 .std
= V4L2_STD_UNKNOWN
,
889 static struct bcap_route vs6624_routes
[] = {
896 static const unsigned vs6624_ce_pin
= GPIO_PE4
;
898 static struct bfin_capture_config bfin_capture_data
= {
899 .card_name
= "BF609",
900 .inputs
= vs6624_inputs
,
901 .num_inputs
= ARRAY_SIZE(vs6624_inputs
),
902 .routes
= vs6624_routes
,
907 .platform_data
= (void *)&vs6624_ce_pin
,
909 .ppi_info
= &ppi_info
,
910 .ppi_control
= (PACK_EN
| DLEN_8
| EPPI_CTL_FS1HI_FS2HI
911 | EPPI_CTL_POLC3
| EPPI_CTL_SYNC2
| EPPI_CTL_NON656
),
916 #if defined(CONFIG_VIDEO_ADV7842) \
917 || defined(CONFIG_VIDEO_ADV7842_MODULE)
918 #include <media/adv7842.h>
920 static struct v4l2_input adv7842_inputs
[] = {
924 .type
= V4L2_INPUT_TYPE_CAMERA
,
926 .capabilities
= V4L2_IN_CAP_STD
,
931 .type
= V4L2_INPUT_TYPE_CAMERA
,
933 .capabilities
= V4L2_IN_CAP_STD
,
938 .type
= V4L2_INPUT_TYPE_CAMERA
,
939 .capabilities
= V4L2_IN_CAP_DV_TIMINGS
,
944 .type
= V4L2_INPUT_TYPE_CAMERA
,
945 .capabilities
= V4L2_IN_CAP_DV_TIMINGS
,
950 .type
= V4L2_INPUT_TYPE_CAMERA
,
951 .capabilities
= V4L2_IN_CAP_DV_TIMINGS
,
955 static struct bcap_route adv7842_routes
[] = {
959 .ppi_control
= (PACK_EN
| DLEN_8
| EPPI_CTL_FLDSEL
960 | EPPI_CTL_ACTIVE656
),
977 .ppi_control
= (EPPI_CTL_SPLTWRD
| PACK_EN
| DLEN_16
978 | EPPI_CTL_FS1LO_FS2LO
| EPPI_CTL_POLC2
979 | EPPI_CTL_SYNC2
| EPPI_CTL_NON656
),
983 static struct adv7842_output_format adv7842_opf
[] = {
985 .op_ch_sel
= ADV7842_OP_CH_SEL_BRG
,
986 .op_format_sel
= ADV7842_OP_FORMAT_SEL_SDR_ITU656_8
,
989 .insert_av_codes
= 1,
992 .op_ch_sel
= ADV7842_OP_CH_SEL_RGB
,
993 .op_format_sel
= ADV7842_OP_FORMAT_SEL_SDR_ITU656_16
,
999 static struct adv7842_platform_data adv7842_data
= {
1001 .num_opf
= ARRAY_SIZE(adv7842_opf
),
1002 .ain_sel
= ADV7842_AIN10_11_12_NC_SYNC_4_1
,
1003 .prim_mode
= ADV7842_PRIM_MODE_SDP
,
1004 .vid_std_select
= ADV7842_SDP_VID_STD_CVBS_SD_4x1
,
1005 .inp_color_space
= ADV7842_INP_COLOR_SPACE_AUTO
,
1012 .i2c_repeater
= 0x46,
1014 .i2c_infoframe
= 0x48,
1020 static struct bfin_capture_config bfin_capture_data
= {
1021 .card_name
= "BF609",
1022 .inputs
= adv7842_inputs
,
1023 .num_inputs
= ARRAY_SIZE(adv7842_inputs
),
1024 .routes
= adv7842_routes
,
1025 .i2c_adapter_id
= 0,
1029 .platform_data
= (void *)&adv7842_data
,
1031 .ppi_info
= &ppi_info
,
1032 .ppi_control
= (PACK_EN
| DLEN_8
| EPPI_CTL_FLDSEL
1033 | EPPI_CTL_ACTIVE656
),
1037 static struct platform_device bfin_capture_device
= {
1038 .name
= "bfin_capture",
1040 .platform_data
= &bfin_capture_data
,
1045 #if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \
1046 || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE)
1047 #include <linux/videodev2.h>
1048 #include <media/blackfin/bfin_display.h>
1049 #include <media/blackfin/ppi.h>
1051 static const unsigned short ppi_req_disp
[] = {
1052 P_PPI0_D0
, P_PPI0_D1
, P_PPI0_D2
, P_PPI0_D3
,
1053 P_PPI0_D4
, P_PPI0_D5
, P_PPI0_D6
, P_PPI0_D7
,
1054 P_PPI0_D8
, P_PPI0_D9
, P_PPI0_D10
, P_PPI0_D11
,
1055 P_PPI0_D12
, P_PPI0_D13
, P_PPI0_D14
, P_PPI0_D15
,
1056 P_PPI0_CLK
, P_PPI0_FS1
, P_PPI0_FS2
,
1060 static const struct ppi_info ppi_info
= {
1061 .type
= PPI_TYPE_EPPI3
,
1062 .dma_ch
= CH_EPPI0_CH0
,
1063 .irq_err
= IRQ_EPPI0_STAT
,
1064 .base
= (void __iomem
*)EPPI0_STAT
,
1065 .pin_req
= ppi_req_disp
,
1068 #if defined(CONFIG_VIDEO_ADV7511) \
1069 || defined(CONFIG_VIDEO_ADV7511_MODULE)
1070 #include <media/adv7511.h>
1072 static struct v4l2_output adv7511_outputs
[] = {
1076 .type
= V4L2_INPUT_TYPE_CAMERA
,
1077 .capabilities
= V4L2_OUT_CAP_DV_TIMINGS
,
1081 static struct disp_route adv7511_routes
[] = {
1087 static struct adv7511_platform_data adv7511_data
= {
1092 static struct bfin_display_config bfin_display_data
= {
1093 .card_name
= "BF609",
1094 .outputs
= adv7511_outputs
,
1095 .num_outputs
= ARRAY_SIZE(adv7511_outputs
),
1096 .routes
= adv7511_routes
,
1097 .i2c_adapter_id
= 0,
1101 .platform_data
= (void *)&adv7511_data
,
1103 .ppi_info
= &ppi_info
,
1104 .ppi_control
= (EPPI_CTL_SPLTWRD
| PACK_EN
| DLEN_16
1105 | EPPI_CTL_FS1LO_FS2LO
| EPPI_CTL_POLC3
1106 | EPPI_CTL_IFSGEN
| EPPI_CTL_SYNC2
1107 | EPPI_CTL_NON656
| EPPI_CTL_DIR
),
1111 static struct platform_device bfin_display_device
= {
1112 .name
= "bfin_display",
1114 .platform_data
= &bfin_display_data
,
1119 #if defined(CONFIG_BFIN_CRC)
1120 #define BFIN_CRC_NAME "bfin-crc"
1122 static struct resource bfin_crc0_resources
[] = {
1124 .start
= REG_CRC0_CTL
,
1125 .end
= REG_CRC0_REVID
+4,
1126 .flags
= IORESOURCE_MEM
,
1129 .start
= IRQ_CRC0_DCNTEXP
,
1130 .end
= IRQ_CRC0_DCNTEXP
,
1131 .flags
= IORESOURCE_IRQ
,
1134 .start
= CH_MEM_STREAM0_SRC_CRC0
,
1135 .end
= CH_MEM_STREAM0_SRC_CRC0
,
1136 .flags
= IORESOURCE_DMA
,
1139 .start
= CH_MEM_STREAM0_DEST_CRC0
,
1140 .end
= CH_MEM_STREAM0_DEST_CRC0
,
1141 .flags
= IORESOURCE_DMA
,
1145 static struct platform_device bfin_crc0_device
= {
1146 .name
= BFIN_CRC_NAME
,
1148 .num_resources
= ARRAY_SIZE(bfin_crc0_resources
),
1149 .resource
= bfin_crc0_resources
,
1152 static struct resource bfin_crc1_resources
[] = {
1154 .start
= REG_CRC1_CTL
,
1155 .end
= REG_CRC1_REVID
+4,
1156 .flags
= IORESOURCE_MEM
,
1159 .start
= IRQ_CRC1_DCNTEXP
,
1160 .end
= IRQ_CRC1_DCNTEXP
,
1161 .flags
= IORESOURCE_IRQ
,
1164 .start
= CH_MEM_STREAM1_SRC_CRC1
,
1165 .end
= CH_MEM_STREAM1_SRC_CRC1
,
1166 .flags
= IORESOURCE_DMA
,
1169 .start
= CH_MEM_STREAM1_DEST_CRC1
,
1170 .end
= CH_MEM_STREAM1_DEST_CRC1
,
1171 .flags
= IORESOURCE_DMA
,
1175 static struct platform_device bfin_crc1_device
= {
1176 .name
= BFIN_CRC_NAME
,
1178 .num_resources
= ARRAY_SIZE(bfin_crc1_resources
),
1179 .resource
= bfin_crc1_resources
,
1183 #if defined(CONFIG_CRYPTO_DEV_BFIN_CRC)
1184 #define BFIN_CRYPTO_CRC_NAME "bfin-hmac-crc"
1185 #define BFIN_CRYPTO_CRC_POLY_DATA 0x5c5c5c5c
1187 static struct resource bfin_crypto_crc_resources
[] = {
1189 .start
= REG_CRC0_CTL
,
1190 .end
= REG_CRC0_REVID
+4,
1191 .flags
= IORESOURCE_MEM
,
1194 .start
= IRQ_CRC0_DCNTEXP
,
1195 .end
= IRQ_CRC0_DCNTEXP
,
1196 .flags
= IORESOURCE_IRQ
,
1199 .start
= CH_MEM_STREAM0_SRC_CRC0
,
1200 .end
= CH_MEM_STREAM0_SRC_CRC0
,
1201 .flags
= IORESOURCE_DMA
,
1205 static struct platform_device bfin_crypto_crc_device
= {
1206 .name
= BFIN_CRYPTO_CRC_NAME
,
1208 .num_resources
= ARRAY_SIZE(bfin_crypto_crc_resources
),
1209 .resource
= bfin_crypto_crc_resources
,
1211 .platform_data
= (void *)BFIN_CRYPTO_CRC_POLY_DATA
,
1216 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
1217 static const struct ad7877_platform_data bfin_ad7877_ts_info
= {
1219 .vref_delay_usecs
= 50, /* internal, no capacitor */
1220 .x_plate_ohms
= 419,
1221 .y_plate_ohms
= 486,
1222 .pressure_max
= 1000,
1224 .stopacq_polarity
= 1,
1225 .first_conversion_delay
= 3,
1226 .acquisition_time
= 1,
1228 .pen_down_acc_interval
= 1,
1232 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1233 #include <linux/input.h>
1234 #include <linux/gpio_keys.h>
1236 static struct gpio_keys_button bfin_gpio_keys_table
[] = {
1237 {BTN_0
, GPIO_PB10
, 1, "gpio-keys: BTN0"},
1238 {BTN_1
, GPIO_PE1
, 1, "gpio-keys: BTN1"},
1241 static struct gpio_keys_platform_data bfin_gpio_keys_data
= {
1242 .buttons
= bfin_gpio_keys_table
,
1243 .nbuttons
= ARRAY_SIZE(bfin_gpio_keys_table
),
1246 static struct platform_device bfin_device_gpiokeys
= {
1247 .name
= "gpio-keys",
1249 .platform_data
= &bfin_gpio_keys_data
,
1254 static struct spi_board_info bfin_spi_board_info
[] __initdata
= {
1255 #if defined(CONFIG_MTD_M25P80) \
1256 || defined(CONFIG_MTD_M25P80_MODULE)
1258 /* the modalias must be the same as spi device driver name */
1259 .modalias
= "m25p80", /* Name of spi_driver for this device */
1260 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
1261 .bus_num
= 0, /* Framework bus number */
1262 .chip_select
= 1, /* SPI_SSEL1*/
1263 .platform_data
= &bfin_spi_flash_data
,
1264 .controller_data
= &spi_flash_chip_info
,
1268 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
1270 .modalias
= "ad7877",
1271 .platform_data
= &bfin_ad7877_ts_info
,
1273 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
1278 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
1280 .modalias
= "spidev",
1281 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
1284 .controller_data
= &spidev_chip_info
,
1287 #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
1289 .modalias
= "adxl34x",
1290 .platform_data
= &adxl34x_info
,
1292 .max_speed_hz
= 5000000, /* max spi clock (SCK) speed in HZ */
1299 #if defined(CONFIG_SPI_BFIN6XX) || defined(CONFIG_SPI_BFIN6XX_MODULE)
1301 static struct resource bfin_spi0_resource
[] = {
1303 .start
= SPI0_REGBASE
,
1304 .end
= SPI0_REGBASE
+ 0xFF,
1305 .flags
= IORESOURCE_MEM
,
1308 .start
= CH_SPI0_TX
,
1310 .flags
= IORESOURCE_DMA
,
1313 .start
= CH_SPI0_RX
,
1315 .flags
= IORESOURCE_DMA
,
1320 static struct resource bfin_spi1_resource
[] = {
1322 .start
= SPI1_REGBASE
,
1323 .end
= SPI1_REGBASE
+ 0xFF,
1324 .flags
= IORESOURCE_MEM
,
1327 .start
= CH_SPI1_TX
,
1329 .flags
= IORESOURCE_DMA
,
1332 .start
= CH_SPI1_RX
,
1334 .flags
= IORESOURCE_DMA
,
1339 /* SPI controller data */
1340 static struct bfin6xx_spi_master bf60x_spi_master_info0
= {
1341 .num_chipselect
= MAX_CTRL_CS
+ MAX_BLACKFIN_GPIOS
,
1342 .pin_req
= {P_SPI0_SCK
, P_SPI0_MISO
, P_SPI0_MOSI
, 0},
1345 static struct platform_device bf60x_spi_master0
= {
1347 .id
= 0, /* Bus number */
1348 .num_resources
= ARRAY_SIZE(bfin_spi0_resource
),
1349 .resource
= bfin_spi0_resource
,
1351 .platform_data
= &bf60x_spi_master_info0
, /* Passed to driver */
1355 static struct bfin6xx_spi_master bf60x_spi_master_info1
= {
1356 .num_chipselect
= MAX_CTRL_CS
+ MAX_BLACKFIN_GPIOS
,
1357 .pin_req
= {P_SPI1_SCK
, P_SPI1_MISO
, P_SPI1_MOSI
, 0},
1360 static struct platform_device bf60x_spi_master1
= {
1362 .id
= 1, /* Bus number */
1363 .num_resources
= ARRAY_SIZE(bfin_spi1_resource
),
1364 .resource
= bfin_spi1_resource
,
1366 .platform_data
= &bf60x_spi_master_info1
, /* Passed to driver */
1369 #endif /* spi master and devices */
1371 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1372 static const u16 bfin_twi0_pins
[] = {P_TWI0_SCL
, P_TWI0_SDA
, 0};
1374 static struct resource bfin_twi0_resource
[] = {
1376 .start
= TWI0_CLKDIV
,
1377 .end
= TWI0_CLKDIV
+ 0xFF,
1378 .flags
= IORESOURCE_MEM
,
1383 .flags
= IORESOURCE_IRQ
,
1387 static struct platform_device i2c_bfin_twi0_device
= {
1388 .name
= "i2c-bfin-twi",
1390 .num_resources
= ARRAY_SIZE(bfin_twi0_resource
),
1391 .resource
= bfin_twi0_resource
,
1393 .platform_data
= &bfin_twi0_pins
,
1397 static const u16 bfin_twi1_pins
[] = {P_TWI1_SCL
, P_TWI1_SDA
, 0};
1399 static struct resource bfin_twi1_resource
[] = {
1401 .start
= TWI1_CLKDIV
,
1402 .end
= TWI1_CLKDIV
+ 0xFF,
1403 .flags
= IORESOURCE_MEM
,
1408 .flags
= IORESOURCE_IRQ
,
1412 static struct platform_device i2c_bfin_twi1_device
= {
1413 .name
= "i2c-bfin-twi",
1415 .num_resources
= ARRAY_SIZE(bfin_twi1_resource
),
1416 .resource
= bfin_twi1_resource
,
1418 .platform_data
= &bfin_twi1_pins
,
1423 static struct i2c_board_info __initdata bfin_i2c_board_info0
[] = {
1424 #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
1426 I2C_BOARD_INFO("adxl34x", 0x53),
1428 .platform_data
= (void *)&adxl34x_info
,
1431 #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE)
1433 I2C_BOARD_INFO("adau1761", 0x38),
1434 .platform_data
= (void *)&adau1761_info
1437 #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE)
1439 I2C_BOARD_INFO("ssm2602", 0x1b),
1444 static struct i2c_board_info __initdata bfin_i2c_board_info1
[] = {
1447 static const unsigned int cclk_vlev_datasheet
[] =
1450 * Internal VLEV BF54XSBBC1533
1451 ****temporarily using these values until data sheet is updated
1453 VRPAIR(VLEV_085
, 150000000),
1454 VRPAIR(VLEV_090
, 250000000),
1455 VRPAIR(VLEV_110
, 276000000),
1456 VRPAIR(VLEV_115
, 301000000),
1457 VRPAIR(VLEV_120
, 525000000),
1458 VRPAIR(VLEV_125
, 550000000),
1459 VRPAIR(VLEV_130
, 600000000),
1462 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data
= {
1463 .tuple_tab
= cclk_vlev_datasheet
,
1464 .tabsize
= ARRAY_SIZE(cclk_vlev_datasheet
),
1465 .vr_settling_time
= 25 /* us */,
1468 static struct platform_device bfin_dpmc
= {
1469 .name
= "bfin dpmc",
1471 .platform_data
= &bfin_dmpc_vreg_data
,
1475 static struct platform_device
*ezkit_devices
[] __initdata
= {
1479 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
1483 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
1484 #ifdef CONFIG_SERIAL_BFIN_UART0
1487 #ifdef CONFIG_SERIAL_BFIN_UART1
1492 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
1493 #ifdef CONFIG_BFIN_SIR0
1496 #ifdef CONFIG_BFIN_SIR1
1501 #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
1505 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
1509 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
1510 &bfin_isp1760_device
,
1513 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1514 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1515 &bfin_sport0_uart_device
,
1517 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1518 &bfin_sport1_uart_device
,
1520 #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1521 &bfin_sport2_uart_device
,
1525 #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
1529 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
1533 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
1537 #if defined(CONFIG_SPI_BFIN6XX) || defined(CONFIG_SPI_BFIN6XX_MODULE)
1542 #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
1543 &bfin_rotary_device
,
1546 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1547 &i2c_bfin_twi0_device
,
1548 #if !defined(CONFIG_BF542)
1549 &i2c_bfin_twi1_device
,
1553 #if defined(CONFIG_BFIN_CRC)
1557 #if defined(CONFIG_CRYPTO_DEV_BFIN_CRC)
1558 &bfin_crypto_crc_device
,
1561 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1562 &bfin_device_gpiokeys
,
1565 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
1566 &ezkit_flash_device
,
1568 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
1571 #if defined(CONFIG_SND_BF6XX_SOC_I2S) || \
1572 defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
1575 #if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
1576 defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
1577 &bfin_ad1836_machine
,
1579 #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \
1580 defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
1583 #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
1584 || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
1585 &bfin_capture_device
,
1587 #if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \
1588 || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE)
1589 &bfin_display_device
,
1594 static int __init
ezkit_init(void)
1596 printk(KERN_INFO
"%s(): registering device resources\n", __func__
);
1598 i2c_register_board_info(0, bfin_i2c_board_info0
,
1599 ARRAY_SIZE(bfin_i2c_board_info0
));
1600 i2c_register_board_info(1, bfin_i2c_board_info1
,
1601 ARRAY_SIZE(bfin_i2c_board_info1
));
1603 #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
1604 if (!peripheral_request_list(pins
, "emac0"))
1605 printk(KERN_ERR
"%s(): request emac pins failed\n", __func__
);
1608 platform_add_devices(ezkit_devices
, ARRAY_SIZE(ezkit_devices
));
1610 spi_register_board_info(bfin_spi_board_info
, ARRAY_SIZE(bfin_spi_board_info
));
1615 arch_initcall(ezkit_init
);
1617 static struct platform_device
*ezkit_early_devices
[] __initdata
= {
1618 #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
1619 #ifdef CONFIG_SERIAL_BFIN_UART0
1622 #ifdef CONFIG_SERIAL_BFIN_UART1
1627 #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
1628 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1629 &bfin_sport0_uart_device
,
1631 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1632 &bfin_sport1_uart_device
,
1634 #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1635 &bfin_sport2_uart_device
,
1640 void __init
native_machine_early_platform_add_devices(void)
1642 printk(KERN_INFO
"register early platform devices\n");
1643 early_platform_add_devices(ezkit_early_devices
,
1644 ARRAY_SIZE(ezkit_early_devices
));