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/bfin5xx_spi.h>
25 #include <asm/bfin_sport.h>
26 #include <asm/portmux.h>
27 #include <asm/bfin_sdh.h>
28 #include <mach/bf54x_keys.h>
29 #include <linux/input.h>
30 #include <linux/spi/ad7877.h>
33 * Name the Board for the /proc/cpuinfo
35 const char bfin_board_name
[] = "ADI BF548-EZKIT";
38 * Driver needs to know address, irq and flag pin.
41 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
42 #include <linux/usb/isp1760.h>
43 static struct resource bfin_isp1760_resources
[] = {
46 .end
= 0x2C0C0000 + 0xfffff,
47 .flags
= IORESOURCE_MEM
,
52 .flags
= IORESOURCE_IRQ
,
56 static struct isp1760_platform_data isp1760_priv
= {
61 .dack_polarity_high
= 0,
62 .dreq_polarity_high
= 0,
65 static struct platform_device bfin_isp1760_device
= {
69 .platform_data
= &isp1760_priv
,
71 .num_resources
= ARRAY_SIZE(bfin_isp1760_resources
),
72 .resource
= bfin_isp1760_resources
,
76 #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
78 #include <mach/bf54x-lq043.h>
80 static struct bfin_bf54xfb_mach_info bf54x_lq043_data
= {
83 .xres
= {480, 480, 480},
84 .yres
= {272, 272, 272},
89 static struct resource bf54x_lq043_resources
[] = {
91 .start
= IRQ_EPPI0_ERR
,
93 .flags
= IORESOURCE_IRQ
,
97 static struct platform_device bf54x_lq043_device
= {
98 .name
= "bf54x-lq043",
100 .num_resources
= ARRAY_SIZE(bf54x_lq043_resources
),
101 .resource
= bf54x_lq043_resources
,
103 .platform_data
= &bf54x_lq043_data
,
108 #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
109 static const unsigned int bf548_keymap
[] = {
110 KEYVAL(0, 0, KEY_ENTER
),
111 KEYVAL(0, 1, KEY_HELP
),
113 KEYVAL(0, 3, KEY_BACKSPACE
),
114 KEYVAL(1, 0, KEY_TAB
),
118 KEYVAL(2, 0, KEY_DOWN
),
122 KEYVAL(3, 0, KEY_UP
),
128 static struct bfin_kpad_platform_data bf54x_kpad_data
= {
131 .keymap
= bf548_keymap
,
132 .keymapsize
= ARRAY_SIZE(bf548_keymap
),
134 .debounce_time
= 5000, /* ns (5ms) */
135 .coldrive_time
= 1000, /* ns (1ms) */
136 .keyup_test_interval
= 50, /* ms (50ms) */
139 static struct resource bf54x_kpad_resources
[] = {
143 .flags
= IORESOURCE_IRQ
,
147 static struct platform_device bf54x_kpad_device
= {
148 .name
= "bf54x-keys",
150 .num_resources
= ARRAY_SIZE(bf54x_kpad_resources
),
151 .resource
= bf54x_kpad_resources
,
153 .platform_data
= &bf54x_kpad_data
,
158 #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
159 #include <asm/bfin_rotary.h>
161 static struct bfin_rotary_platform_data bfin_rotary_data
= {
162 /*.rotary_up_key = KEY_UP,*/
163 /*.rotary_down_key = KEY_DOWN,*/
164 .rotary_rel_code
= REL_WHEEL
,
165 .rotary_button_key
= KEY_ENTER
,
166 .debounce
= 10, /* 0..17 */
167 .mode
= ROT_QUAD_ENC
| ROT_DEBE
,
170 static struct resource bfin_rotary_resources
[] = {
174 .flags
= IORESOURCE_IRQ
,
178 static struct platform_device bfin_rotary_device
= {
179 .name
= "bfin-rotary",
181 .num_resources
= ARRAY_SIZE(bfin_rotary_resources
),
182 .resource
= bfin_rotary_resources
,
184 .platform_data
= &bfin_rotary_data
,
189 #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
190 #include <linux/input/adxl34x.h>
191 static const struct adxl34x_platform_data adxl34x_info
= {
195 .tap_threshold
= 0x31,
196 .tap_duration
= 0x10,
199 .tap_axis_control
= ADXL_TAP_X_EN
| ADXL_TAP_Y_EN
| ADXL_TAP_Z_EN
,
200 .act_axis_control
= 0xFF,
201 .activity_threshold
= 5,
202 .inactivity_threshold
= 3,
203 .inactivity_time
= 4,
204 .free_fall_threshold
= 0x7,
205 .free_fall_time
= 0x20,
207 .data_range
= ADXL_FULL_RES
,
210 .ev_code_x
= ABS_X
, /* EV_REL */
211 .ev_code_y
= ABS_Y
, /* EV_REL */
212 .ev_code_z
= ABS_Z
, /* EV_REL */
214 .ev_code_tap
= {BTN_TOUCH
, BTN_TOUCH
, BTN_TOUCH
}, /* EV_KEY x,y,z */
216 /* .ev_code_ff = KEY_F,*/ /* EV_KEY */
217 /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
218 .power_mode
= ADXL_AUTO_SLEEP
| ADXL_LINK
,
219 .fifo_mode
= ADXL_FIFO_STREAM
,
220 .orientation_enable
= ADXL_EN_ORIENTATION_3D
,
221 .deadzone_angle
= ADXL_DEADZONE_ANGLE_10p8
,
222 .divisor_length
= ADXL_LP_FILTER_DIVISOR_16
,
223 /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */
224 .ev_codes_orient_3d
= {BTN_Z
, BTN_Y
, BTN_X
, BTN_A
, BTN_B
, BTN_C
},
228 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
229 static struct platform_device rtc_device
= {
235 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
236 #ifdef CONFIG_SERIAL_BFIN_UART0
237 static struct resource bfin_uart0_resources
[] = {
241 .flags
= IORESOURCE_MEM
,
244 .start
= IRQ_UART0_RX
,
245 .end
= IRQ_UART0_RX
+1,
246 .flags
= IORESOURCE_IRQ
,
249 .start
= IRQ_UART0_ERROR
,
250 .end
= IRQ_UART0_ERROR
,
251 .flags
= IORESOURCE_IRQ
,
254 .start
= CH_UART0_TX
,
256 .flags
= IORESOURCE_DMA
,
259 .start
= CH_UART0_RX
,
261 .flags
= IORESOURCE_DMA
,
265 static unsigned short bfin_uart0_peripherals
[] = {
266 P_UART0_TX
, P_UART0_RX
, 0
269 static struct platform_device bfin_uart0_device
= {
272 .num_resources
= ARRAY_SIZE(bfin_uart0_resources
),
273 .resource
= bfin_uart0_resources
,
275 .platform_data
= &bfin_uart0_peripherals
, /* Passed to driver */
279 #ifdef CONFIG_SERIAL_BFIN_UART1
280 static struct resource bfin_uart1_resources
[] = {
284 .flags
= IORESOURCE_MEM
,
287 .start
= IRQ_UART1_RX
,
288 .end
= IRQ_UART1_RX
+1,
289 .flags
= IORESOURCE_IRQ
,
292 .start
= IRQ_UART1_ERROR
,
293 .end
= IRQ_UART1_ERROR
,
294 .flags
= IORESOURCE_IRQ
,
297 .start
= CH_UART1_TX
,
299 .flags
= IORESOURCE_DMA
,
302 .start
= CH_UART1_RX
,
304 .flags
= IORESOURCE_DMA
,
306 #ifdef CONFIG_BFIN_UART1_CTSRTS
307 { /* CTS pin -- 0 means not supported */
310 .flags
= IORESOURCE_IO
,
312 { /* RTS pin -- 0 means not supported */
315 .flags
= IORESOURCE_IO
,
320 static unsigned short bfin_uart1_peripherals
[] = {
321 P_UART1_TX
, P_UART1_RX
,
322 #ifdef CONFIG_BFIN_UART1_CTSRTS
323 P_UART1_RTS
, P_UART1_CTS
,
328 static struct platform_device bfin_uart1_device
= {
331 .num_resources
= ARRAY_SIZE(bfin_uart1_resources
),
332 .resource
= bfin_uart1_resources
,
334 .platform_data
= &bfin_uart1_peripherals
, /* Passed to driver */
338 #ifdef CONFIG_SERIAL_BFIN_UART2
339 static struct resource bfin_uart2_resources
[] = {
343 .flags
= IORESOURCE_MEM
,
346 .start
= IRQ_UART2_RX
,
347 .end
= IRQ_UART2_RX
+1,
348 .flags
= IORESOURCE_IRQ
,
351 .start
= IRQ_UART2_ERROR
,
352 .end
= IRQ_UART2_ERROR
,
353 .flags
= IORESOURCE_IRQ
,
356 .start
= CH_UART2_TX
,
358 .flags
= IORESOURCE_DMA
,
361 .start
= CH_UART2_RX
,
363 .flags
= IORESOURCE_DMA
,
367 static unsigned short bfin_uart2_peripherals
[] = {
368 P_UART2_TX
, P_UART2_RX
, 0
371 static struct platform_device bfin_uart2_device
= {
374 .num_resources
= ARRAY_SIZE(bfin_uart2_resources
),
375 .resource
= bfin_uart2_resources
,
377 .platform_data
= &bfin_uart2_peripherals
, /* Passed to driver */
381 #ifdef CONFIG_SERIAL_BFIN_UART3
382 static struct resource bfin_uart3_resources
[] = {
386 .flags
= IORESOURCE_MEM
,
389 .start
= IRQ_UART3_RX
,
390 .end
= IRQ_UART3_RX
+1,
391 .flags
= IORESOURCE_IRQ
,
394 .start
= IRQ_UART3_ERROR
,
395 .end
= IRQ_UART3_ERROR
,
396 .flags
= IORESOURCE_IRQ
,
399 .start
= CH_UART3_TX
,
401 .flags
= IORESOURCE_DMA
,
404 .start
= CH_UART3_RX
,
406 .flags
= IORESOURCE_DMA
,
408 #ifdef CONFIG_BFIN_UART3_CTSRTS
409 { /* CTS pin -- 0 means not supported */
412 .flags
= IORESOURCE_IO
,
414 { /* RTS pin -- 0 means not supported */
417 .flags
= IORESOURCE_IO
,
422 static unsigned short bfin_uart3_peripherals
[] = {
423 P_UART3_TX
, P_UART3_RX
,
424 #ifdef CONFIG_BFIN_UART3_CTSRTS
425 P_UART3_RTS
, P_UART3_CTS
,
430 static struct platform_device bfin_uart3_device
= {
433 .num_resources
= ARRAY_SIZE(bfin_uart3_resources
),
434 .resource
= bfin_uart3_resources
,
436 .platform_data
= &bfin_uart3_peripherals
, /* Passed to driver */
442 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
443 #ifdef CONFIG_BFIN_SIR0
444 static struct resource bfin_sir0_resources
[] = {
448 .flags
= IORESOURCE_MEM
,
451 .start
= IRQ_UART0_RX
,
452 .end
= IRQ_UART0_RX
+1,
453 .flags
= IORESOURCE_IRQ
,
456 .start
= CH_UART0_RX
,
457 .end
= CH_UART0_RX
+1,
458 .flags
= IORESOURCE_DMA
,
461 static struct platform_device bfin_sir0_device
= {
464 .num_resources
= ARRAY_SIZE(bfin_sir0_resources
),
465 .resource
= bfin_sir0_resources
,
468 #ifdef CONFIG_BFIN_SIR1
469 static struct resource bfin_sir1_resources
[] = {
473 .flags
= IORESOURCE_MEM
,
476 .start
= IRQ_UART1_RX
,
477 .end
= IRQ_UART1_RX
+1,
478 .flags
= IORESOURCE_IRQ
,
481 .start
= CH_UART1_RX
,
482 .end
= CH_UART1_RX
+1,
483 .flags
= IORESOURCE_DMA
,
486 static struct platform_device bfin_sir1_device
= {
489 .num_resources
= ARRAY_SIZE(bfin_sir1_resources
),
490 .resource
= bfin_sir1_resources
,
493 #ifdef CONFIG_BFIN_SIR2
494 static struct resource bfin_sir2_resources
[] = {
498 .flags
= IORESOURCE_MEM
,
501 .start
= IRQ_UART2_RX
,
502 .end
= IRQ_UART2_RX
+1,
503 .flags
= IORESOURCE_IRQ
,
506 .start
= CH_UART2_RX
,
507 .end
= CH_UART2_RX
+1,
508 .flags
= IORESOURCE_DMA
,
511 static struct platform_device bfin_sir2_device
= {
514 .num_resources
= ARRAY_SIZE(bfin_sir2_resources
),
515 .resource
= bfin_sir2_resources
,
518 #ifdef CONFIG_BFIN_SIR3
519 static struct resource bfin_sir3_resources
[] = {
523 .flags
= IORESOURCE_MEM
,
526 .start
= IRQ_UART3_RX
,
527 .end
= IRQ_UART3_RX
+1,
528 .flags
= IORESOURCE_IRQ
,
531 .start
= CH_UART3_RX
,
532 .end
= CH_UART3_RX
+1,
533 .flags
= IORESOURCE_DMA
,
536 static struct platform_device bfin_sir3_device
= {
539 .num_resources
= ARRAY_SIZE(bfin_sir3_resources
),
540 .resource
= bfin_sir3_resources
,
545 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
546 #include <linux/smsc911x.h>
548 static struct resource smsc911x_resources
[] = {
550 .name
= "smsc911x-memory",
552 .end
= 0x24000000 + 0xFF,
553 .flags
= IORESOURCE_MEM
,
558 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_LOWLEVEL
,
562 static struct smsc911x_platform_config smsc911x_config
= {
563 .flags
= SMSC911X_USE_32BIT
,
564 .irq_polarity
= SMSC911X_IRQ_POLARITY_ACTIVE_LOW
,
565 .irq_type
= SMSC911X_IRQ_TYPE_OPEN_DRAIN
,
566 .phy_interface
= PHY_INTERFACE_MODE_MII
,
569 static struct platform_device smsc911x_device
= {
572 .num_resources
= ARRAY_SIZE(smsc911x_resources
),
573 .resource
= smsc911x_resources
,
575 .platform_data
= &smsc911x_config
,
580 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
581 static struct resource musb_resources
[] = {
585 .flags
= IORESOURCE_MEM
,
587 [1] = { /* general IRQ */
588 .start
= IRQ_USB_INT0
,
590 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
593 [2] = { /* DMA IRQ */
594 .start
= IRQ_USB_DMA
,
596 .flags
= IORESOURCE_IRQ
| IORESOURCE_IRQ_HIGHLEVEL
,
601 static struct musb_hdrc_config musb_config
= {
608 .gpio_vrsel
= GPIO_PE7
,
609 /* Some custom boards need to be active low, just set it to "0"
612 .gpio_vrsel_active
= 1,
613 .clkin
= 24, /* musb CLKIN in MHZ */
616 static struct musb_hdrc_platform_data musb_plat
= {
617 #if defined(CONFIG_USB_MUSB_OTG)
619 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
621 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
622 .mode
= MUSB_PERIPHERAL
,
624 .config
= &musb_config
,
627 static u64 musb_dmamask
= ~(u32
)0;
629 static struct platform_device musb_device
= {
630 .name
= "musb-blackfin",
633 .dma_mask
= &musb_dmamask
,
634 .coherent_dma_mask
= 0xffffffff,
635 .platform_data
= &musb_plat
,
637 .num_resources
= ARRAY_SIZE(musb_resources
),
638 .resource
= musb_resources
,
642 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
643 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
644 static struct resource bfin_sport0_uart_resources
[] = {
646 .start
= SPORT0_TCR1
,
647 .end
= SPORT0_MRCS3
+4,
648 .flags
= IORESOURCE_MEM
,
651 .start
= IRQ_SPORT0_RX
,
652 .end
= IRQ_SPORT0_RX
+1,
653 .flags
= IORESOURCE_IRQ
,
656 .start
= IRQ_SPORT0_ERROR
,
657 .end
= IRQ_SPORT0_ERROR
,
658 .flags
= IORESOURCE_IRQ
,
662 static unsigned short bfin_sport0_peripherals
[] = {
663 P_SPORT0_TFS
, P_SPORT0_DTPRI
, P_SPORT0_TSCLK
, P_SPORT0_RFS
,
664 P_SPORT0_DRPRI
, P_SPORT0_RSCLK
, 0
667 static struct platform_device bfin_sport0_uart_device
= {
668 .name
= "bfin-sport-uart",
670 .num_resources
= ARRAY_SIZE(bfin_sport0_uart_resources
),
671 .resource
= bfin_sport0_uart_resources
,
673 .platform_data
= &bfin_sport0_peripherals
, /* Passed to driver */
677 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
678 static struct resource bfin_sport1_uart_resources
[] = {
680 .start
= SPORT1_TCR1
,
681 .end
= SPORT1_MRCS3
+4,
682 .flags
= IORESOURCE_MEM
,
685 .start
= IRQ_SPORT1_RX
,
686 .end
= IRQ_SPORT1_RX
+1,
687 .flags
= IORESOURCE_IRQ
,
690 .start
= IRQ_SPORT1_ERROR
,
691 .end
= IRQ_SPORT1_ERROR
,
692 .flags
= IORESOURCE_IRQ
,
696 static unsigned short bfin_sport1_peripherals
[] = {
697 P_SPORT1_TFS
, P_SPORT1_DTPRI
, P_SPORT1_TSCLK
, P_SPORT1_RFS
,
698 P_SPORT1_DRPRI
, P_SPORT1_RSCLK
, 0
701 static struct platform_device bfin_sport1_uart_device
= {
702 .name
= "bfin-sport-uart",
704 .num_resources
= ARRAY_SIZE(bfin_sport1_uart_resources
),
705 .resource
= bfin_sport1_uart_resources
,
707 .platform_data
= &bfin_sport1_peripherals
, /* Passed to driver */
711 #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
712 static struct resource bfin_sport2_uart_resources
[] = {
714 .start
= SPORT2_TCR1
,
715 .end
= SPORT2_MRCS3
+4,
716 .flags
= IORESOURCE_MEM
,
719 .start
= IRQ_SPORT2_RX
,
720 .end
= IRQ_SPORT2_RX
+1,
721 .flags
= IORESOURCE_IRQ
,
724 .start
= IRQ_SPORT2_ERROR
,
725 .end
= IRQ_SPORT2_ERROR
,
726 .flags
= IORESOURCE_IRQ
,
730 static unsigned short bfin_sport2_peripherals
[] = {
731 P_SPORT2_TFS
, P_SPORT2_DTPRI
, P_SPORT2_TSCLK
, P_SPORT2_RFS
,
732 P_SPORT2_DRPRI
, P_SPORT2_RSCLK
, P_SPORT2_DRSEC
, P_SPORT2_DTSEC
, 0
735 static struct platform_device bfin_sport2_uart_device
= {
736 .name
= "bfin-sport-uart",
738 .num_resources
= ARRAY_SIZE(bfin_sport2_uart_resources
),
739 .resource
= bfin_sport2_uart_resources
,
741 .platform_data
= &bfin_sport2_peripherals
, /* Passed to driver */
745 #ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
746 static struct resource bfin_sport3_uart_resources
[] = {
748 .start
= SPORT3_TCR1
,
749 .end
= SPORT3_MRCS3
+4,
750 .flags
= IORESOURCE_MEM
,
753 .start
= IRQ_SPORT3_RX
,
754 .end
= IRQ_SPORT3_RX
+1,
755 .flags
= IORESOURCE_IRQ
,
758 .start
= IRQ_SPORT3_ERROR
,
759 .end
= IRQ_SPORT3_ERROR
,
760 .flags
= IORESOURCE_IRQ
,
764 static unsigned short bfin_sport3_peripherals
[] = {
765 P_SPORT3_TFS
, P_SPORT3_DTPRI
, P_SPORT3_TSCLK
, P_SPORT3_RFS
,
766 P_SPORT3_DRPRI
, P_SPORT3_RSCLK
, P_SPORT3_DRSEC
, P_SPORT3_DTSEC
, 0
769 static struct platform_device bfin_sport3_uart_device
= {
770 .name
= "bfin-sport-uart",
772 .num_resources
= ARRAY_SIZE(bfin_sport3_uart_resources
),
773 .resource
= bfin_sport3_uart_resources
,
775 .platform_data
= &bfin_sport3_peripherals
, /* Passed to driver */
781 #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
783 static unsigned short bfin_can0_peripherals
[] = {
784 P_CAN0_RX
, P_CAN0_TX
, 0
787 static struct resource bfin_can0_resources
[] = {
791 .flags
= IORESOURCE_MEM
,
794 .start
= IRQ_CAN0_RX
,
796 .flags
= IORESOURCE_IRQ
,
799 .start
= IRQ_CAN0_TX
,
801 .flags
= IORESOURCE_IRQ
,
804 .start
= IRQ_CAN0_ERROR
,
805 .end
= IRQ_CAN0_ERROR
,
806 .flags
= IORESOURCE_IRQ
,
810 static struct platform_device bfin_can0_device
= {
813 .num_resources
= ARRAY_SIZE(bfin_can0_resources
),
814 .resource
= bfin_can0_resources
,
816 .platform_data
= &bfin_can0_peripherals
, /* Passed to driver */
820 static unsigned short bfin_can1_peripherals
[] = {
821 P_CAN1_RX
, P_CAN1_TX
, 0
824 static struct resource bfin_can1_resources
[] = {
828 .flags
= IORESOURCE_MEM
,
831 .start
= IRQ_CAN1_RX
,
833 .flags
= IORESOURCE_IRQ
,
836 .start
= IRQ_CAN1_TX
,
838 .flags
= IORESOURCE_IRQ
,
841 .start
= IRQ_CAN1_ERROR
,
842 .end
= IRQ_CAN1_ERROR
,
843 .flags
= IORESOURCE_IRQ
,
847 static struct platform_device bfin_can1_device
= {
850 .num_resources
= ARRAY_SIZE(bfin_can1_resources
),
851 .resource
= bfin_can1_resources
,
853 .platform_data
= &bfin_can1_peripherals
, /* Passed to driver */
859 #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
860 static struct resource bfin_atapi_resources
[] = {
864 .flags
= IORESOURCE_MEM
,
867 .start
= IRQ_ATAPI_ERR
,
868 .end
= IRQ_ATAPI_ERR
,
869 .flags
= IORESOURCE_IRQ
,
873 static struct platform_device bfin_atapi_device
= {
874 .name
= "pata-bf54x",
876 .num_resources
= ARRAY_SIZE(bfin_atapi_resources
),
877 .resource
= bfin_atapi_resources
,
881 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
882 static struct mtd_partition partition_info
[] = {
884 .name
= "bootloader(nand)",
888 .name
= "linux kernel(nand)",
889 .offset
= MTDPART_OFS_APPEND
,
890 .size
= 4 * 1024 * 1024,
893 .name
= "file system(nand)",
894 .offset
= MTDPART_OFS_APPEND
,
895 .size
= MTDPART_SIZ_FULL
,
899 static struct bf5xx_nand_platform bf5xx_nand_platform
= {
900 .data_width
= NFC_NWIDTH_8
,
901 .partitions
= partition_info
,
902 .nr_partitions
= ARRAY_SIZE(partition_info
),
907 static struct resource bf5xx_nand_resources
[] = {
911 .flags
= IORESOURCE_MEM
,
916 .flags
= IORESOURCE_IRQ
,
920 static struct platform_device bf5xx_nand_device
= {
921 .name
= "bf5xx-nand",
923 .num_resources
= ARRAY_SIZE(bf5xx_nand_resources
),
924 .resource
= bf5xx_nand_resources
,
926 .platform_data
= &bf5xx_nand_platform
,
931 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
933 static struct bfin_sd_host bfin_sdh_data
= {
935 .irq_int0
= IRQ_SDH_MASK0
,
936 .pin_req
= {P_SD_D0
, P_SD_D1
, P_SD_D2
, P_SD_D3
, P_SD_CLK
, P_SD_CMD
, 0},
939 static struct platform_device bf54x_sdh_device
= {
943 .platform_data
= &bfin_sdh_data
,
948 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
949 static struct mtd_partition ezkit_partitions
[] = {
951 .name
= "bootloader(nor)",
955 .name
= "linux kernel(nor)",
957 .offset
= MTDPART_OFS_APPEND
,
959 .name
= "file system(nor)",
960 .size
= 0x1000000 - 0x80000 - 0x400000 - 0x8000 * 4,
961 .offset
= MTDPART_OFS_APPEND
,
963 .name
= "config(nor)",
965 .offset
= MTDPART_OFS_APPEND
,
967 .name
= "u-boot env(nor)",
969 .offset
= MTDPART_OFS_APPEND
,
973 static struct physmap_flash_data ezkit_flash_data
= {
975 .parts
= ezkit_partitions
,
976 .nr_parts
= ARRAY_SIZE(ezkit_partitions
),
979 static struct resource ezkit_flash_resource
= {
982 .flags
= IORESOURCE_MEM
,
985 static struct platform_device ezkit_flash_device
= {
986 .name
= "physmap-flash",
989 .platform_data
= &ezkit_flash_data
,
992 .resource
= &ezkit_flash_resource
,
996 #if defined(CONFIG_MTD_M25P80) \
997 || defined(CONFIG_MTD_M25P80_MODULE)
998 /* SPI flash chip (m25p16) */
999 static struct mtd_partition bfin_spi_flash_partitions
[] = {
1001 .name
= "bootloader(spi)",
1004 .mask_flags
= MTD_CAP_ROM
1006 .name
= "linux kernel(spi)",
1007 .size
= MTDPART_SIZ_FULL
,
1008 .offset
= MTDPART_OFS_APPEND
,
1012 static struct flash_platform_data bfin_spi_flash_data
= {
1014 .parts
= bfin_spi_flash_partitions
,
1015 .nr_parts
= ARRAY_SIZE(bfin_spi_flash_partitions
),
1019 static struct bfin5xx_spi_chip spi_flash_chip_info
= {
1020 .enable_dma
= 0, /* use dma transfer with this chip*/
1025 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
1026 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
1027 static struct bfin5xx_spi_chip ad1836_spi_chip_info
= {
1029 .bits_per_word
= 16,
1033 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
1034 static struct bfin5xx_spi_chip spi_ad7877_chip_info
= {
1036 .bits_per_word
= 16,
1039 static const struct ad7877_platform_data bfin_ad7877_ts_info
= {
1041 .vref_delay_usecs
= 50, /* internal, no capacitor */
1042 .x_plate_ohms
= 419,
1043 .y_plate_ohms
= 486,
1044 .pressure_max
= 1000,
1046 .stopacq_polarity
= 1,
1047 .first_conversion_delay
= 3,
1048 .acquisition_time
= 1,
1050 .pen_down_acc_interval
= 1,
1054 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
1055 static struct bfin5xx_spi_chip spidev_chip_info
= {
1061 #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
1062 static struct bfin5xx_spi_chip spi_adxl34x_chip_info
= {
1063 .enable_dma
= 0, /* use dma transfer with this chip*/
1068 static struct spi_board_info bfin_spi_board_info
[] __initdata
= {
1069 #if defined(CONFIG_MTD_M25P80) \
1070 || defined(CONFIG_MTD_M25P80_MODULE)
1072 /* the modalias must be the same as spi device driver name */
1073 .modalias
= "m25p80", /* Name of spi_driver for this device */
1074 .max_speed_hz
= 25000000, /* max spi clock (SCK) speed in HZ */
1075 .bus_num
= 0, /* Framework bus number */
1076 .chip_select
= 1, /* SPI_SSEL1*/
1077 .platform_data
= &bfin_spi_flash_data
,
1078 .controller_data
= &spi_flash_chip_info
,
1082 #if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
1083 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
1085 .modalias
= "ad183x",
1086 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
1089 .controller_data
= &ad1836_spi_chip_info
,
1092 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
1094 .modalias
= "ad7877",
1095 .platform_data
= &bfin_ad7877_ts_info
,
1096 .irq
= IRQ_PB4
, /* old boards (<=Rev 1.3) use IRQ_PJ11 */
1097 .max_speed_hz
= 12500000, /* max spi clock (SCK) speed in HZ */
1100 .controller_data
= &spi_ad7877_chip_info
,
1103 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
1105 .modalias
= "spidev",
1106 .max_speed_hz
= 3125000, /* max spi clock (SCK) speed in HZ */
1109 .controller_data
= &spidev_chip_info
,
1112 #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
1114 .modalias
= "adxl34x",
1115 .platform_data
= &adxl34x_info
,
1117 .max_speed_hz
= 5000000, /* max spi clock (SCK) speed in HZ */
1120 .controller_data
= &spi_adxl34x_chip_info
,
1125 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1127 static struct resource bfin_spi0_resource
[] = {
1129 .start
= SPI0_REGBASE
,
1130 .end
= SPI0_REGBASE
+ 0xFF,
1131 .flags
= IORESOURCE_MEM
,
1136 .flags
= IORESOURCE_DMA
,
1141 .flags
= IORESOURCE_IRQ
,
1146 static struct resource bfin_spi1_resource
[] = {
1148 .start
= SPI1_REGBASE
,
1149 .end
= SPI1_REGBASE
+ 0xFF,
1150 .flags
= IORESOURCE_MEM
,
1155 .flags
= IORESOURCE_DMA
,
1160 .flags
= IORESOURCE_IRQ
,
1164 /* SPI controller data */
1165 static struct bfin5xx_spi_master bf54x_spi_master_info0
= {
1166 .num_chipselect
= 4,
1167 .enable_dma
= 1, /* master has the ability to do dma transfer */
1168 .pin_req
= {P_SPI0_SCK
, P_SPI0_MISO
, P_SPI0_MOSI
, 0},
1171 static struct platform_device bf54x_spi_master0
= {
1173 .id
= 0, /* Bus number */
1174 .num_resources
= ARRAY_SIZE(bfin_spi0_resource
),
1175 .resource
= bfin_spi0_resource
,
1177 .platform_data
= &bf54x_spi_master_info0
, /* Passed to driver */
1181 static struct bfin5xx_spi_master bf54x_spi_master_info1
= {
1182 .num_chipselect
= 4,
1183 .enable_dma
= 1, /* master has the ability to do dma transfer */
1184 .pin_req
= {P_SPI1_SCK
, P_SPI1_MISO
, P_SPI1_MOSI
, 0},
1187 static struct platform_device bf54x_spi_master1
= {
1189 .id
= 1, /* Bus number */
1190 .num_resources
= ARRAY_SIZE(bfin_spi1_resource
),
1191 .resource
= bfin_spi1_resource
,
1193 .platform_data
= &bf54x_spi_master_info1
, /* Passed to driver */
1196 #endif /* spi master and devices */
1198 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1199 static struct resource bfin_twi0_resource
[] = {
1201 .start
= TWI0_REGBASE
,
1202 .end
= TWI0_REGBASE
+ 0xFF,
1203 .flags
= IORESOURCE_MEM
,
1208 .flags
= IORESOURCE_IRQ
,
1212 static struct platform_device i2c_bfin_twi0_device
= {
1213 .name
= "i2c-bfin-twi",
1215 .num_resources
= ARRAY_SIZE(bfin_twi0_resource
),
1216 .resource
= bfin_twi0_resource
,
1219 #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
1220 static struct resource bfin_twi1_resource
[] = {
1222 .start
= TWI1_REGBASE
,
1223 .end
= TWI1_REGBASE
+ 0xFF,
1224 .flags
= IORESOURCE_MEM
,
1229 .flags
= IORESOURCE_IRQ
,
1233 static struct platform_device i2c_bfin_twi1_device
= {
1234 .name
= "i2c-bfin-twi",
1236 .num_resources
= ARRAY_SIZE(bfin_twi1_resource
),
1237 .resource
= bfin_twi1_resource
,
1242 static struct i2c_board_info __initdata bfin_i2c_board_info0
[] = {
1245 #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
1246 static struct i2c_board_info __initdata bfin_i2c_board_info1
[] = {
1247 #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
1249 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
1252 #if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
1254 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
1258 #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
1260 I2C_BOARD_INFO("adxl34x", 0x53),
1262 .platform_data
= (void *)&adxl34x_info
,
1265 #if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
1267 I2C_BOARD_INFO("ad5252", 0x2f),
1273 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1274 #include <linux/gpio_keys.h>
1276 static struct gpio_keys_button bfin_gpio_keys_table
[] = {
1277 {BTN_0
, GPIO_PB8
, 1, "gpio-keys: BTN0"},
1278 {BTN_1
, GPIO_PB9
, 1, "gpio-keys: BTN1"},
1279 {BTN_2
, GPIO_PB10
, 1, "gpio-keys: BTN2"},
1280 {BTN_3
, GPIO_PB11
, 1, "gpio-keys: BTN3"},
1283 static struct gpio_keys_platform_data bfin_gpio_keys_data
= {
1284 .buttons
= bfin_gpio_keys_table
,
1285 .nbuttons
= ARRAY_SIZE(bfin_gpio_keys_table
),
1288 static struct platform_device bfin_device_gpiokeys
= {
1289 .name
= "gpio-keys",
1291 .platform_data
= &bfin_gpio_keys_data
,
1296 static const unsigned int cclk_vlev_datasheet
[] =
1299 * Internal VLEV BF54XSBBC1533
1300 ****temporarily using these values until data sheet is updated
1302 VRPAIR(VLEV_085
, 150000000),
1303 VRPAIR(VLEV_090
, 250000000),
1304 VRPAIR(VLEV_110
, 276000000),
1305 VRPAIR(VLEV_115
, 301000000),
1306 VRPAIR(VLEV_120
, 525000000),
1307 VRPAIR(VLEV_125
, 550000000),
1308 VRPAIR(VLEV_130
, 600000000),
1311 static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data
= {
1312 .tuple_tab
= cclk_vlev_datasheet
,
1313 .tabsize
= ARRAY_SIZE(cclk_vlev_datasheet
),
1314 .vr_settling_time
= 25 /* us */,
1317 static struct platform_device bfin_dpmc
= {
1318 .name
= "bfin dpmc",
1320 .platform_data
= &bfin_dmpc_vreg_data
,
1324 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
1325 defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \
1326 defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
1328 #define SPORT_REQ(x) \
1329 [x] = {P_SPORT##x##_TFS, P_SPORT##x##_DTPRI, P_SPORT##x##_TSCLK, \
1330 P_SPORT##x##_RFS, P_SPORT##x##_DRPRI, P_SPORT##x##_RSCLK, 0}
1332 static const u16 bfin_snd_pin
[][7] = {
1337 static struct bfin_snd_platform_data bfin_snd_data
[] = {
1339 .pin_req
= &bfin_snd_pin
[0][0],
1342 .pin_req
= &bfin_snd_pin
[1][0],
1346 #define BFIN_SND_RES(x) \
1349 .start = SPORT##x##_TCR1, \
1350 .end = SPORT##x##_TCR1, \
1351 .flags = IORESOURCE_MEM \
1354 .start = CH_SPORT##x##_RX, \
1355 .end = CH_SPORT##x##_RX, \
1356 .flags = IORESOURCE_DMA, \
1359 .start = CH_SPORT##x##_TX, \
1360 .end = CH_SPORT##x##_TX, \
1361 .flags = IORESOURCE_DMA, \
1364 .start = IRQ_SPORT##x##_ERROR, \
1365 .end = IRQ_SPORT##x##_ERROR, \
1366 .flags = IORESOURCE_IRQ, \
1370 static struct resource bfin_snd_resources
[][4] = {
1375 static struct platform_device bfin_pcm
= {
1376 .name
= "bfin-pcm-audio",
1381 #if defined(CONFIG_SND_BF5XX_SOC_AD73311) || defined(CONFIG_SND_BF5XX_SOC_AD73311_MODULE)
1382 static struct platform_device bfin_ad73311_codec_device
= {
1388 #if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE)
1389 static struct platform_device bfin_ad1980_codec_device
= {
1395 #if defined(CONFIG_SND_BF5XX_SOC_I2S) || defined(CONFIG_SND_BF5XX_SOC_I2S_MODULE)
1396 static struct platform_device bfin_i2s
= {
1398 .id
= CONFIG_SND_BF5XX_SPORT_NUM
,
1399 .num_resources
= ARRAY_SIZE(bfin_snd_resources
[CONFIG_SND_BF5XX_SPORT_NUM
]),
1400 .resource
= bfin_snd_resources
[CONFIG_SND_BF5XX_SPORT_NUM
],
1402 .platform_data
= &bfin_snd_data
[CONFIG_SND_BF5XX_SPORT_NUM
],
1407 #if defined(CONFIG_SND_BF5XX_SOC_TDM) || defined(CONFIG_SND_BF5XX_SOC_TDM_MODULE)
1408 static struct platform_device bfin_tdm
= {
1410 .id
= CONFIG_SND_BF5XX_SPORT_NUM
,
1411 .num_resources
= ARRAY_SIZE(bfin_snd_resources
[CONFIG_SND_BF5XX_SPORT_NUM
]),
1412 .resource
= bfin_snd_resources
[CONFIG_SND_BF5XX_SPORT_NUM
],
1414 .platform_data
= &bfin_snd_data
[CONFIG_SND_BF5XX_SPORT_NUM
],
1419 #if defined(CONFIG_SND_BF5XX_SOC_AC97) || defined(CONFIG_SND_BF5XX_SOC_AC97_MODULE)
1420 static struct platform_device bfin_ac97
= {
1421 .name
= "bfin-ac97",
1422 .id
= CONFIG_SND_BF5XX_SPORT_NUM
,
1423 .num_resources
= ARRAY_SIZE(bfin_snd_resources
[CONFIG_SND_BF5XX_SPORT_NUM
]),
1424 .resource
= bfin_snd_resources
[CONFIG_SND_BF5XX_SPORT_NUM
],
1426 .platform_data
= &bfin_snd_data
[CONFIG_SND_BF5XX_SPORT_NUM
],
1431 static struct platform_device
*ezkit_devices
[] __initdata
= {
1435 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
1439 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
1440 #ifdef CONFIG_SERIAL_BFIN_UART0
1443 #ifdef CONFIG_SERIAL_BFIN_UART1
1446 #ifdef CONFIG_SERIAL_BFIN_UART2
1449 #ifdef CONFIG_SERIAL_BFIN_UART3
1454 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
1455 #ifdef CONFIG_BFIN_SIR0
1458 #ifdef CONFIG_BFIN_SIR1
1461 #ifdef CONFIG_BFIN_SIR2
1464 #ifdef CONFIG_BFIN_SIR3
1469 #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
1470 &bf54x_lq043_device
,
1473 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
1477 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
1481 #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
1482 &bfin_isp1760_device
,
1485 #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1486 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1487 &bfin_sport0_uart_device
,
1489 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1490 &bfin_sport1_uart_device
,
1492 #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1493 &bfin_sport2_uart_device
,
1495 #ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
1496 &bfin_sport3_uart_device
,
1500 #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
1505 #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
1509 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
1513 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
1517 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1522 #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
1526 #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
1527 &bfin_rotary_device
,
1530 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1531 &i2c_bfin_twi0_device
,
1532 #if !defined(CONFIG_BF542)
1533 &i2c_bfin_twi1_device
,
1537 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1538 &bfin_device_gpiokeys
,
1541 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
1542 &ezkit_flash_device
,
1545 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) || \
1546 defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) || \
1547 defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
1551 #if defined(CONFIG_SND_BF5XX_SOC_AD1980) || defined(CONFIG_SND_BF5XX_SOC_AD1980_MODULE)
1552 &bfin_ad1980_codec_device
,
1555 #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
1559 #if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
1563 #if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
1568 static int __init
ezkit_init(void)
1570 printk(KERN_INFO
"%s(): registering device resources\n", __func__
);
1572 i2c_register_board_info(0, bfin_i2c_board_info0
,
1573 ARRAY_SIZE(bfin_i2c_board_info0
));
1574 #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
1575 i2c_register_board_info(1, bfin_i2c_board_info1
,
1576 ARRAY_SIZE(bfin_i2c_board_info1
));
1579 platform_add_devices(ezkit_devices
, ARRAY_SIZE(ezkit_devices
));
1581 spi_register_board_info(bfin_spi_board_info
, ARRAY_SIZE(bfin_spi_board_info
));
1586 arch_initcall(ezkit_init
);
1588 static struct platform_device
*ezkit_early_devices
[] __initdata
= {
1589 #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
1590 #ifdef CONFIG_SERIAL_BFIN_UART0
1593 #ifdef CONFIG_SERIAL_BFIN_UART1
1596 #ifdef CONFIG_SERIAL_BFIN_UART2
1599 #ifdef CONFIG_SERIAL_BFIN_UART3
1604 #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
1605 #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1606 &bfin_sport0_uart_device
,
1608 #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1609 &bfin_sport1_uart_device
,
1611 #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1612 &bfin_sport2_uart_device
,
1614 #ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
1615 &bfin_sport3_uart_device
,
1620 void __init
native_machine_early_platform_add_devices(void)
1622 printk(KERN_INFO
"register early platform devices\n");
1623 early_platform_add_devices(ezkit_early_devices
,
1624 ARRAY_SIZE(ezkit_early_devices
));