blob: ce5a2bb147dc273219e5129675072fdc8e1393b2 [file] [log] [blame]
Roy Huang24a07a12007-07-12 22:41:45 +08001/*
Robin Getz96f10502009-09-24 14:11:24 +00002 * Copyright 2004-2009 Analog Devices Inc.
3 * 2005 National ICT Australia (NICTA)
4 * Aidan Williams <aidan@nicta.com.au>
Roy Huang24a07a12007-07-12 22:41:45 +08005 *
Robin Getz96f10502009-09-24 14:11:24 +00006 * Licensed under the GPL-2 or later.
Roy Huang24a07a12007-07-12 22:41:45 +08007 */
8
9#include <linux/device.h>
10#include <linux/platform_device.h>
11#include <linux/mtd/mtd.h>
12#include <linux/mtd/partitions.h>
Mike Frysingerde8c43f2008-01-24 17:14:04 +080013#include <linux/mtd/physmap.h>
Roy Huang24a07a12007-07-12 22:41:45 +080014#include <linux/spi/spi.h>
15#include <linux/spi/flash.h>
Mike Frysinger1f83b8f2007-07-12 22:58:21 +080016#include <linux/irq.h>
Bryan Wu81d9c7f2008-03-26 10:02:13 +080017#include <linux/i2c.h>
Roy Huang24a07a12007-07-12 22:41:45 +080018#include <linux/interrupt.h>
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080019#include <linux/usb/musb.h>
Roy Huang24a07a12007-07-12 22:41:45 +080020#include <asm/bfin5xx_spi.h>
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080021#include <asm/dma.h>
22#include <asm/gpio.h>
23#include <asm/nand.h>
Michael Hennerich14b03202008-05-07 11:41:26 +080024#include <asm/dpmc.h>
Bryan Wu5d448dd2007-11-12 23:24:42 +080025#include <asm/portmux.h>
Cliff Cai501674a2009-01-07 23:14:38 +080026#include <asm/bfin_sdh.h>
Bryan Wu639f6572008-08-27 10:51:02 +080027#include <mach/bf54x_keys.h>
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080028#include <linux/input.h>
29#include <linux/spi/ad7877.h>
Roy Huang24a07a12007-07-12 22:41:45 +080030
31/*
32 * Name the Board for the /proc/cpuinfo
33 */
Mike Frysingerfe85cad2008-11-18 17:48:22 +080034const char bfin_board_name[] = "ADI BF548-EZKIT";
Roy Huang24a07a12007-07-12 22:41:45 +080035
36/*
37 * Driver needs to know address, irq and flag pin.
38 */
39
Michael Hennerich0a6304a2008-07-26 16:14:57 +080040#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
Michael Hennerich3f375692008-11-18 17:48:22 +080041#include <linux/usb/isp1760.h>
42static struct resource bfin_isp1760_resources[] = {
Michael Hennerich0a6304a2008-07-26 16:14:57 +080043 [0] = {
Michael Hennerich0a6304a2008-07-26 16:14:57 +080044 .start = 0x2C0C0000,
45 .end = 0x2C0C0000 + 0xfffff,
46 .flags = IORESOURCE_MEM,
47 },
48 [1] = {
49 .start = IRQ_PG7,
50 .end = IRQ_PG7,
51 .flags = IORESOURCE_IRQ,
52 },
53};
54
Michael Hennerich3f375692008-11-18 17:48:22 +080055static struct isp1760_platform_data isp1760_priv = {
56 .is_isp1761 = 0,
Michael Hennerich3f375692008-11-18 17:48:22 +080057 .bus_width_16 = 1,
58 .port1_otg = 0,
59 .analog_oc = 0,
60 .dack_polarity_high = 0,
61 .dreq_polarity_high = 0,
62};
63
64static struct platform_device bfin_isp1760_device = {
Michael Hennerichc6feb7682009-10-15 10:37:33 +000065 .name = "isp1760",
Michael Hennerich0a6304a2008-07-26 16:14:57 +080066 .id = 0,
Michael Hennerich3f375692008-11-18 17:48:22 +080067 .dev = {
68 .platform_data = &isp1760_priv,
69 },
70 .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
71 .resource = bfin_isp1760_resources,
Michael Hennerich0a6304a2008-07-26 16:14:57 +080072};
Michael Hennerich0a6304a2008-07-26 16:14:57 +080073#endif
74
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080075#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
76
Bryan Wu639f6572008-08-27 10:51:02 +080077#include <mach/bf54x-lq043.h>
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080078
79static struct bfin_bf54xfb_mach_info bf54x_lq043_data = {
Stefan Pledl0e101ec2009-07-29 08:09:45 +000080 .width = 95,
81 .height = 54,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +080082 .xres = {480, 480, 480},
83 .yres = {272, 272, 272},
84 .bpp = {24, 24, 24},
85 .disp = GPIO_PE3,
86};
87
88static struct resource bf54x_lq043_resources[] = {
89 {
90 .start = IRQ_EPPI0_ERR,
91 .end = IRQ_EPPI0_ERR,
92 .flags = IORESOURCE_IRQ,
93 },
94};
95
96static struct platform_device bf54x_lq043_device = {
97 .name = "bf54x-lq043",
98 .id = -1,
99 .num_resources = ARRAY_SIZE(bf54x_lq043_resources),
100 .resource = bf54x_lq043_resources,
101 .dev = {
102 .platform_data = &bf54x_lq043_data,
103 },
104};
105#endif
106
107#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
Michael Hennerich8f740ef2007-10-13 00:36:46 -0400108static const unsigned int bf548_keymap[] = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800109 KEYVAL(0, 0, KEY_ENTER),
110 KEYVAL(0, 1, KEY_HELP),
111 KEYVAL(0, 2, KEY_0),
112 KEYVAL(0, 3, KEY_BACKSPACE),
113 KEYVAL(1, 0, KEY_TAB),
114 KEYVAL(1, 1, KEY_9),
115 KEYVAL(1, 2, KEY_8),
116 KEYVAL(1, 3, KEY_7),
117 KEYVAL(2, 0, KEY_DOWN),
118 KEYVAL(2, 1, KEY_6),
119 KEYVAL(2, 2, KEY_5),
120 KEYVAL(2, 3, KEY_4),
121 KEYVAL(3, 0, KEY_UP),
122 KEYVAL(3, 1, KEY_3),
123 KEYVAL(3, 2, KEY_2),
124 KEYVAL(3, 3, KEY_1),
125};
126
127static struct bfin_kpad_platform_data bf54x_kpad_data = {
128 .rows = 4,
129 .cols = 4,
Michael Hennerich8f740ef2007-10-13 00:36:46 -0400130 .keymap = bf548_keymap,
131 .keymapsize = ARRAY_SIZE(bf548_keymap),
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800132 .repeat = 0,
133 .debounce_time = 5000, /* ns (5ms) */
134 .coldrive_time = 1000, /* ns (1ms) */
135 .keyup_test_interval = 50, /* ms (50ms) */
136};
137
138static struct resource bf54x_kpad_resources[] = {
139 {
140 .start = IRQ_KEY,
141 .end = IRQ_KEY,
142 .flags = IORESOURCE_IRQ,
143 },
144};
145
146static struct platform_device bf54x_kpad_device = {
147 .name = "bf54x-keys",
148 .id = -1,
149 .num_resources = ARRAY_SIZE(bf54x_kpad_resources),
150 .resource = bf54x_kpad_resources,
151 .dev = {
152 .platform_data = &bf54x_kpad_data,
153 },
154};
155#endif
156
Michael Hennerichadfc0462009-10-09 07:37:03 +0000157#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
Michael Hennerichaca5e4a2008-10-08 14:27:59 +0800158#include <asm/bfin_rotary.h>
159
160static struct bfin_rotary_platform_data bfin_rotary_data = {
161 /*.rotary_up_key = KEY_UP,*/
162 /*.rotary_down_key = KEY_DOWN,*/
163 .rotary_rel_code = REL_WHEEL,
164 .rotary_button_key = KEY_ENTER,
165 .debounce = 10, /* 0..17 */
166 .mode = ROT_QUAD_ENC | ROT_DEBE,
167};
168
169static struct resource bfin_rotary_resources[] = {
170 {
171 .start = IRQ_CNT,
172 .end = IRQ_CNT,
173 .flags = IORESOURCE_IRQ,
174 },
175};
176
177static struct platform_device bfin_rotary_device = {
178 .name = "bfin-rotary",
179 .id = -1,
180 .num_resources = ARRAY_SIZE(bfin_rotary_resources),
181 .resource = bfin_rotary_resources,
182 .dev = {
183 .platform_data = &bfin_rotary_data,
184 },
185};
186#endif
187
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000188#if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
Michael Hennerich57af8ed2009-10-16 12:35:20 +0000189#include <linux/input/adxl34x.h>
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000190static const struct adxl34x_platform_data adxl34x_info = {
191 .x_axis_offset = 0,
192 .y_axis_offset = 0,
193 .z_axis_offset = 0,
194 .tap_threshold = 0x31,
195 .tap_duration = 0x10,
196 .tap_latency = 0x60,
197 .tap_window = 0xF0,
198 .tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN,
199 .act_axis_control = 0xFF,
200 .activity_threshold = 5,
201 .inactivity_threshold = 3,
202 .inactivity_time = 4,
203 .free_fall_threshold = 0x7,
204 .free_fall_time = 0x20,
205 .data_rate = 0x8,
206 .data_range = ADXL_FULL_RES,
207
208 .ev_type = EV_ABS,
209 .ev_code_x = ABS_X, /* EV_REL */
210 .ev_code_y = ABS_Y, /* EV_REL */
211 .ev_code_z = ABS_Z, /* EV_REL */
212
Michael Hennerich57af8ed2009-10-16 12:35:20 +0000213 .ev_code_tap = {BTN_TOUCH, BTN_TOUCH, BTN_TOUCH}, /* EV_KEY x,y,z */
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000214
215/* .ev_code_ff = KEY_F,*/ /* EV_KEY */
216/* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
217 .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK,
218 .fifo_mode = ADXL_FIFO_STREAM,
Michael Hennerich5db40362009-10-29 13:48:10 +0000219 .orientation_enable = ADXL_EN_ORIENTATION_3D,
220 .deadzone_angle = ADXL_DEADZONE_ANGLE_10p8,
221 .divisor_length = ADXL_LP_FILTER_DIVISOR_16,
222 /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */
223 .ev_codes_orient_3d = {BTN_Z, BTN_Y, BTN_X, BTN_A, BTN_B, BTN_C},
Michael Hennerichffc4d8b2009-05-29 15:41:18 +0000224};
225#endif
226
Roy Huang24a07a12007-07-12 22:41:45 +0800227#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
228static struct platform_device rtc_device = {
229 .name = "rtc-bfin",
230 .id = -1,
231};
232#endif
233
234#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
Roy Huang24a07a12007-07-12 22:41:45 +0800235#ifdef CONFIG_SERIAL_BFIN_UART0
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000236static struct resource bfin_uart0_resources[] = {
Roy Huang24a07a12007-07-12 22:41:45 +0800237 {
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000238 .start = UART0_DLL,
239 .end = UART0_RBR+2,
Roy Huang24a07a12007-07-12 22:41:45 +0800240 .flags = IORESOURCE_MEM,
241 },
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000242 {
243 .start = IRQ_UART0_RX,
244 .end = IRQ_UART0_RX+1,
245 .flags = IORESOURCE_IRQ,
246 },
247 {
248 .start = IRQ_UART0_ERROR,
249 .end = IRQ_UART0_ERROR,
250 .flags = IORESOURCE_IRQ,
251 },
252 {
253 .start = CH_UART0_TX,
254 .end = CH_UART0_TX,
255 .flags = IORESOURCE_DMA,
256 },
257 {
258 .start = CH_UART0_RX,
259 .end = CH_UART0_RX,
260 .flags = IORESOURCE_DMA,
261 },
262};
263
Mike Frysingera8b19882010-11-24 09:23:04 +0000264static unsigned short bfin_uart0_peripherals[] = {
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000265 P_UART0_TX, P_UART0_RX, 0
266};
267
268static struct platform_device bfin_uart0_device = {
269 .name = "bfin-uart",
270 .id = 0,
271 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
272 .resource = bfin_uart0_resources,
273 .dev = {
274 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
275 },
276};
Roy Huang24a07a12007-07-12 22:41:45 +0800277#endif
278#ifdef CONFIG_SERIAL_BFIN_UART1
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000279static struct resource bfin_uart1_resources[] = {
Roy Huang24a07a12007-07-12 22:41:45 +0800280 {
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000281 .start = UART1_DLL,
282 .end = UART1_RBR+2,
Roy Huang24a07a12007-07-12 22:41:45 +0800283 .flags = IORESOURCE_MEM,
284 },
Roy Huang24a07a12007-07-12 22:41:45 +0800285 {
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000286 .start = IRQ_UART1_RX,
287 .end = IRQ_UART1_RX+1,
288 .flags = IORESOURCE_IRQ,
Roy Huang24a07a12007-07-12 22:41:45 +0800289 },
Roy Huang24a07a12007-07-12 22:41:45 +0800290 {
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000291 .start = IRQ_UART1_ERROR,
292 .end = IRQ_UART1_ERROR,
293 .flags = IORESOURCE_IRQ,
294 },
295 {
296 .start = CH_UART1_TX,
297 .end = CH_UART1_TX,
298 .flags = IORESOURCE_DMA,
299 },
300 {
301 .start = CH_UART1_RX,
302 .end = CH_UART1_RX,
303 .flags = IORESOURCE_DMA,
304 },
305#ifdef CONFIG_BFIN_UART1_CTSRTS
306 { /* CTS pin -- 0 means not supported */
307 .start = GPIO_PE10,
308 .end = GPIO_PE10,
309 .flags = IORESOURCE_IO,
310 },
311 { /* RTS pin -- 0 means not supported */
312 .start = GPIO_PE9,
313 .end = GPIO_PE9,
314 .flags = IORESOURCE_IO,
Roy Huang24a07a12007-07-12 22:41:45 +0800315 },
316#endif
317};
318
Mike Frysingera8b19882010-11-24 09:23:04 +0000319static unsigned short bfin_uart1_peripherals[] = {
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000320 P_UART1_TX, P_UART1_RX,
321#ifdef CONFIG_BFIN_UART1_CTSRTS
322 P_UART1_RTS, P_UART1_CTS,
323#endif
324 0
325};
326
327static struct platform_device bfin_uart1_device = {
Roy Huang24a07a12007-07-12 22:41:45 +0800328 .name = "bfin-uart",
329 .id = 1,
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000330 .num_resources = ARRAY_SIZE(bfin_uart1_resources),
331 .resource = bfin_uart1_resources,
332 .dev = {
333 .platform_data = &bfin_uart1_peripherals, /* Passed to driver */
334 },
Roy Huang24a07a12007-07-12 22:41:45 +0800335};
336#endif
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000337#ifdef CONFIG_SERIAL_BFIN_UART2
338static struct resource bfin_uart2_resources[] = {
339 {
340 .start = UART2_DLL,
341 .end = UART2_RBR+2,
342 .flags = IORESOURCE_MEM,
343 },
344 {
345 .start = IRQ_UART2_RX,
346 .end = IRQ_UART2_RX+1,
347 .flags = IORESOURCE_IRQ,
348 },
349 {
350 .start = IRQ_UART2_ERROR,
351 .end = IRQ_UART2_ERROR,
352 .flags = IORESOURCE_IRQ,
353 },
354 {
355 .start = CH_UART2_TX,
356 .end = CH_UART2_TX,
357 .flags = IORESOURCE_DMA,
358 },
359 {
360 .start = CH_UART2_RX,
361 .end = CH_UART2_RX,
362 .flags = IORESOURCE_DMA,
363 },
364};
365
Mike Frysingera8b19882010-11-24 09:23:04 +0000366static unsigned short bfin_uart2_peripherals[] = {
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000367 P_UART2_TX, P_UART2_RX, 0
368};
369
370static struct platform_device bfin_uart2_device = {
371 .name = "bfin-uart",
372 .id = 2,
373 .num_resources = ARRAY_SIZE(bfin_uart2_resources),
374 .resource = bfin_uart2_resources,
375 .dev = {
376 .platform_data = &bfin_uart2_peripherals, /* Passed to driver */
377 },
378};
379#endif
380#ifdef CONFIG_SERIAL_BFIN_UART3
381static struct resource bfin_uart3_resources[] = {
382 {
383 .start = UART3_DLL,
384 .end = UART3_RBR+2,
385 .flags = IORESOURCE_MEM,
386 },
387 {
388 .start = IRQ_UART3_RX,
389 .end = IRQ_UART3_RX+1,
390 .flags = IORESOURCE_IRQ,
391 },
392 {
393 .start = IRQ_UART3_ERROR,
394 .end = IRQ_UART3_ERROR,
395 .flags = IORESOURCE_IRQ,
396 },
397 {
398 .start = CH_UART3_TX,
399 .end = CH_UART3_TX,
400 .flags = IORESOURCE_DMA,
401 },
402 {
403 .start = CH_UART3_RX,
404 .end = CH_UART3_RX,
405 .flags = IORESOURCE_DMA,
406 },
407#ifdef CONFIG_BFIN_UART3_CTSRTS
408 { /* CTS pin -- 0 means not supported */
409 .start = GPIO_PB3,
410 .end = GPIO_PB3,
411 .flags = IORESOURCE_IO,
412 },
413 { /* RTS pin -- 0 means not supported */
414 .start = GPIO_PB2,
415 .end = GPIO_PB2,
416 .flags = IORESOURCE_IO,
417 },
418#endif
419};
420
Mike Frysingera8b19882010-11-24 09:23:04 +0000421static unsigned short bfin_uart3_peripherals[] = {
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +0000422 P_UART3_TX, P_UART3_RX,
423#ifdef CONFIG_BFIN_UART3_CTSRTS
424 P_UART3_RTS, P_UART3_CTS,
425#endif
426 0
427};
428
429static struct platform_device bfin_uart3_device = {
430 .name = "bfin-uart",
431 .id = 3,
432 .num_resources = ARRAY_SIZE(bfin_uart3_resources),
433 .resource = bfin_uart3_resources,
434 .dev = {
435 .platform_data = &bfin_uart3_peripherals, /* Passed to driver */
436 },
437};
438#endif
439#endif
Roy Huang24a07a12007-07-12 22:41:45 +0800440
Graf Yang5be36d22008-04-25 03:09:15 +0800441#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
Graf Yang5be36d22008-04-25 03:09:15 +0800442#ifdef CONFIG_BFIN_SIR0
Graf Yang42bd8bc2009-01-07 23:14:39 +0800443static struct resource bfin_sir0_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800444 {
445 .start = 0xFFC00400,
446 .end = 0xFFC004FF,
447 .flags = IORESOURCE_MEM,
448 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800449 {
450 .start = IRQ_UART0_RX,
451 .end = IRQ_UART0_RX+1,
452 .flags = IORESOURCE_IRQ,
453 },
454 {
455 .start = CH_UART0_RX,
456 .end = CH_UART0_RX+1,
457 .flags = IORESOURCE_DMA,
458 },
459};
460static struct platform_device bfin_sir0_device = {
461 .name = "bfin_sir",
462 .id = 0,
463 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
464 .resource = bfin_sir0_resources,
465};
Graf Yang5be36d22008-04-25 03:09:15 +0800466#endif
467#ifdef CONFIG_BFIN_SIR1
Graf Yang42bd8bc2009-01-07 23:14:39 +0800468static struct resource bfin_sir1_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800469 {
470 .start = 0xFFC02000,
471 .end = 0xFFC020FF,
472 .flags = IORESOURCE_MEM,
473 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800474 {
475 .start = IRQ_UART1_RX,
476 .end = IRQ_UART1_RX+1,
477 .flags = IORESOURCE_IRQ,
478 },
479 {
480 .start = CH_UART1_RX,
481 .end = CH_UART1_RX+1,
482 .flags = IORESOURCE_DMA,
483 },
484};
485static struct platform_device bfin_sir1_device = {
486 .name = "bfin_sir",
487 .id = 1,
488 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
489 .resource = bfin_sir1_resources,
490};
Graf Yang5be36d22008-04-25 03:09:15 +0800491#endif
492#ifdef CONFIG_BFIN_SIR2
Graf Yang42bd8bc2009-01-07 23:14:39 +0800493static struct resource bfin_sir2_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800494 {
495 .start = 0xFFC02100,
496 .end = 0xFFC021FF,
497 .flags = IORESOURCE_MEM,
498 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800499 {
500 .start = IRQ_UART2_RX,
501 .end = IRQ_UART2_RX+1,
502 .flags = IORESOURCE_IRQ,
503 },
504 {
505 .start = CH_UART2_RX,
506 .end = CH_UART2_RX+1,
507 .flags = IORESOURCE_DMA,
508 },
509};
510static struct platform_device bfin_sir2_device = {
511 .name = "bfin_sir",
512 .id = 2,
513 .num_resources = ARRAY_SIZE(bfin_sir2_resources),
514 .resource = bfin_sir2_resources,
515};
Graf Yang5be36d22008-04-25 03:09:15 +0800516#endif
517#ifdef CONFIG_BFIN_SIR3
Graf Yang42bd8bc2009-01-07 23:14:39 +0800518static struct resource bfin_sir3_resources[] = {
Graf Yang5be36d22008-04-25 03:09:15 +0800519 {
520 .start = 0xFFC03100,
521 .end = 0xFFC031FF,
522 .flags = IORESOURCE_MEM,
523 },
Graf Yang42bd8bc2009-01-07 23:14:39 +0800524 {
525 .start = IRQ_UART3_RX,
526 .end = IRQ_UART3_RX+1,
527 .flags = IORESOURCE_IRQ,
528 },
529 {
530 .start = CH_UART3_RX,
531 .end = CH_UART3_RX+1,
532 .flags = IORESOURCE_DMA,
533 },
Graf Yang5be36d22008-04-25 03:09:15 +0800534};
Graf Yang42bd8bc2009-01-07 23:14:39 +0800535static struct platform_device bfin_sir3_device = {
Graf Yang5be36d22008-04-25 03:09:15 +0800536 .name = "bfin_sir",
Graf Yang42bd8bc2009-01-07 23:14:39 +0800537 .id = 3,
538 .num_resources = ARRAY_SIZE(bfin_sir3_resources),
539 .resource = bfin_sir3_resources,
Graf Yang5be36d22008-04-25 03:09:15 +0800540};
541#endif
Graf Yang42bd8bc2009-01-07 23:14:39 +0800542#endif
Graf Yang5be36d22008-04-25 03:09:15 +0800543
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800544#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
Mike Frysinger7a8b71d2009-06-05 20:41:17 -0400545#include <linux/smsc911x.h>
546
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800547static struct resource smsc911x_resources[] = {
548 {
549 .name = "smsc911x-memory",
550 .start = 0x24000000,
551 .end = 0x24000000 + 0xFF,
552 .flags = IORESOURCE_MEM,
553 },
554 {
555 .start = IRQ_PE8,
556 .end = IRQ_PE8,
557 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
558 },
559};
Mike Frysinger7a8b71d2009-06-05 20:41:17 -0400560
561static struct smsc911x_platform_config smsc911x_config = {
562 .flags = SMSC911X_USE_32BIT,
563 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
564 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
565 .phy_interface = PHY_INTERFACE_MODE_MII,
566};
567
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800568static struct platform_device smsc911x_device = {
569 .name = "smsc911x",
570 .id = 0,
571 .num_resources = ARRAY_SIZE(smsc911x_resources),
572 .resource = smsc911x_resources,
Mike Frysinger7a8b71d2009-06-05 20:41:17 -0400573 .dev = {
574 .platform_data = &smsc911x_config,
575 },
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800576};
577#endif
578
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800579#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
580static struct resource musb_resources[] = {
581 [0] = {
582 .start = 0xFFC03C00,
583 .end = 0xFFC040FF,
584 .flags = IORESOURCE_MEM,
585 },
586 [1] = { /* general IRQ */
587 .start = IRQ_USB_INT0,
588 .end = IRQ_USB_INT0,
589 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
Hema Kalliguddifcf173e2010-09-29 11:26:39 -0500590 .name = "mc"
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800591 },
592 [2] = { /* DMA IRQ */
593 .start = IRQ_USB_DMA,
594 .end = IRQ_USB_DMA,
595 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
Hema Kalliguddifcf173e2010-09-29 11:26:39 -0500596 .name = "dma"
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800597 },
598};
599
Bryan Wu50041ac2008-10-08 13:39:40 +0800600static struct musb_hdrc_config musb_config = {
601 .multipoint = 0,
602 .dyn_fifo = 0,
603 .soft_con = 1,
604 .dma = 1,
Bryan Wufea05da2009-01-07 23:14:39 +0800605 .num_eps = 8,
606 .dma_channels = 8,
Bryan Wu50041ac2008-10-08 13:39:40 +0800607 .gpio_vrsel = GPIO_PE7,
Cliff Cai85eb0e42010-01-22 04:02:46 +0000608 /* Some custom boards need to be active low, just set it to "0"
609 * if it is the case.
610 */
611 .gpio_vrsel_active = 1,
Bob Liu759a3f32010-09-17 11:09:57 +0000612 .clkin = 24, /* musb CLKIN in MHZ */
Bryan Wu50041ac2008-10-08 13:39:40 +0800613};
614
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800615static struct musb_hdrc_platform_data musb_plat = {
Bryan Wu29350772007-12-24 12:20:19 +0800616#if defined(CONFIG_USB_MUSB_OTG)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800617 .mode = MUSB_OTG,
Bryan Wu29350772007-12-24 12:20:19 +0800618#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800619 .mode = MUSB_HOST,
Bryan Wu29350772007-12-24 12:20:19 +0800620#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800621 .mode = MUSB_PERIPHERAL,
622#endif
Bryan Wu50041ac2008-10-08 13:39:40 +0800623 .config = &musb_config,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800624};
625
626static u64 musb_dmamask = ~(u32)0;
627
628static struct platform_device musb_device = {
Felipe Balbi9cb03082010-12-02 09:21:05 +0200629 .name = "musb-blackfin",
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800630 .id = 0,
631 .dev = {
632 .dma_mask = &musb_dmamask,
633 .coherent_dma_mask = 0xffffffff,
634 .platform_data = &musb_plat,
635 },
636 .num_resources = ARRAY_SIZE(musb_resources),
637 .resource = musb_resources,
638};
639#endif
640
Sonic Zhangdf5de262009-09-23 05:01:56 +0000641#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
642#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
643static struct resource bfin_sport0_uart_resources[] = {
644 {
645 .start = SPORT0_TCR1,
646 .end = SPORT0_MRCS3+4,
647 .flags = IORESOURCE_MEM,
648 },
649 {
650 .start = IRQ_SPORT0_RX,
651 .end = IRQ_SPORT0_RX+1,
652 .flags = IORESOURCE_IRQ,
653 },
654 {
655 .start = IRQ_SPORT0_ERROR,
656 .end = IRQ_SPORT0_ERROR,
657 .flags = IORESOURCE_IRQ,
658 },
659};
660
Mike Frysingera8b19882010-11-24 09:23:04 +0000661static unsigned short bfin_sport0_peripherals[] = {
Sonic Zhangdf5de262009-09-23 05:01:56 +0000662 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
Sonic Zhange54b6732010-11-12 02:45:38 +0000663 P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0
Sonic Zhangdf5de262009-09-23 05:01:56 +0000664};
665
666static struct platform_device bfin_sport0_uart_device = {
667 .name = "bfin-sport-uart",
668 .id = 0,
669 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
670 .resource = bfin_sport0_uart_resources,
671 .dev = {
672 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
673 },
674};
675#endif
676#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
677static struct resource bfin_sport1_uart_resources[] = {
678 {
679 .start = SPORT1_TCR1,
680 .end = SPORT1_MRCS3+4,
681 .flags = IORESOURCE_MEM,
682 },
683 {
684 .start = IRQ_SPORT1_RX,
685 .end = IRQ_SPORT1_RX+1,
686 .flags = IORESOURCE_IRQ,
687 },
688 {
689 .start = IRQ_SPORT1_ERROR,
690 .end = IRQ_SPORT1_ERROR,
691 .flags = IORESOURCE_IRQ,
692 },
693};
694
Mike Frysingera8b19882010-11-24 09:23:04 +0000695static unsigned short bfin_sport1_peripherals[] = {
Sonic Zhangdf5de262009-09-23 05:01:56 +0000696 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
Sonic Zhange54b6732010-11-12 02:45:38 +0000697 P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0
Sonic Zhangdf5de262009-09-23 05:01:56 +0000698};
699
700static struct platform_device bfin_sport1_uart_device = {
701 .name = "bfin-sport-uart",
702 .id = 1,
703 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
704 .resource = bfin_sport1_uart_resources,
705 .dev = {
706 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
707 },
708};
709#endif
710#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
711static struct resource bfin_sport2_uart_resources[] = {
712 {
713 .start = SPORT2_TCR1,
714 .end = SPORT2_MRCS3+4,
715 .flags = IORESOURCE_MEM,
716 },
717 {
718 .start = IRQ_SPORT2_RX,
719 .end = IRQ_SPORT2_RX+1,
720 .flags = IORESOURCE_IRQ,
721 },
722 {
723 .start = IRQ_SPORT2_ERROR,
724 .end = IRQ_SPORT2_ERROR,
725 .flags = IORESOURCE_IRQ,
726 },
727};
728
Mike Frysingera8b19882010-11-24 09:23:04 +0000729static unsigned short bfin_sport2_peripherals[] = {
Sonic Zhangdf5de262009-09-23 05:01:56 +0000730 P_SPORT2_TFS, P_SPORT2_DTPRI, P_SPORT2_TSCLK, P_SPORT2_RFS,
731 P_SPORT2_DRPRI, P_SPORT2_RSCLK, P_SPORT2_DRSEC, P_SPORT2_DTSEC, 0
732};
733
734static struct platform_device bfin_sport2_uart_device = {
735 .name = "bfin-sport-uart",
736 .id = 2,
737 .num_resources = ARRAY_SIZE(bfin_sport2_uart_resources),
738 .resource = bfin_sport2_uart_resources,
739 .dev = {
740 .platform_data = &bfin_sport2_peripherals, /* Passed to driver */
741 },
742};
743#endif
744#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
745static struct resource bfin_sport3_uart_resources[] = {
746 {
747 .start = SPORT3_TCR1,
748 .end = SPORT3_MRCS3+4,
749 .flags = IORESOURCE_MEM,
750 },
751 {
752 .start = IRQ_SPORT3_RX,
753 .end = IRQ_SPORT3_RX+1,
754 .flags = IORESOURCE_IRQ,
755 },
756 {
757 .start = IRQ_SPORT3_ERROR,
758 .end = IRQ_SPORT3_ERROR,
759 .flags = IORESOURCE_IRQ,
760 },
761};
762
Mike Frysingera8b19882010-11-24 09:23:04 +0000763static unsigned short bfin_sport3_peripherals[] = {
Sonic Zhangdf5de262009-09-23 05:01:56 +0000764 P_SPORT3_TFS, P_SPORT3_DTPRI, P_SPORT3_TSCLK, P_SPORT3_RFS,
765 P_SPORT3_DRPRI, P_SPORT3_RSCLK, P_SPORT3_DRSEC, P_SPORT3_DTSEC, 0
766};
767
768static struct platform_device bfin_sport3_uart_device = {
769 .name = "bfin-sport-uart",
770 .id = 3,
771 .num_resources = ARRAY_SIZE(bfin_sport3_uart_resources),
772 .resource = bfin_sport3_uart_resources,
773 .dev = {
774 .platform_data = &bfin_sport3_peripherals, /* Passed to driver */
775 },
776};
777#endif
778#endif
779
Barry Song706a01b2009-11-02 07:29:07 +0000780#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
Mike Frysingera8b19882010-11-24 09:23:04 +0000781static unsigned short bfin_can_peripherals[] = {
Barry Song706a01b2009-11-02 07:29:07 +0000782 P_CAN0_RX, P_CAN0_TX, 0
783};
784
785static struct resource bfin_can_resources[] = {
786 {
787 .start = 0xFFC02A00,
788 .end = 0xFFC02FFF,
789 .flags = IORESOURCE_MEM,
790 },
791 {
792 .start = IRQ_CAN0_RX,
793 .end = IRQ_CAN0_RX,
794 .flags = IORESOURCE_IRQ,
795 },
796 {
797 .start = IRQ_CAN0_TX,
798 .end = IRQ_CAN0_TX,
799 .flags = IORESOURCE_IRQ,
800 },
801 {
802 .start = IRQ_CAN0_ERROR,
803 .end = IRQ_CAN0_ERROR,
804 .flags = IORESOURCE_IRQ,
805 },
806};
807
808static struct platform_device bfin_can_device = {
809 .name = "bfin_can",
810 .num_resources = ARRAY_SIZE(bfin_can_resources),
811 .resource = bfin_can_resources,
812 .dev = {
813 .platform_data = &bfin_can_peripherals, /* Passed to driver */
814 },
815};
816#endif
817
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800818#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
819static struct resource bfin_atapi_resources[] = {
820 {
821 .start = 0xFFC03800,
822 .end = 0xFFC0386F,
823 .flags = IORESOURCE_MEM,
824 },
825 {
826 .start = IRQ_ATAPI_ERR,
827 .end = IRQ_ATAPI_ERR,
828 .flags = IORESOURCE_IRQ,
829 },
830};
831
832static struct platform_device bfin_atapi_device = {
833 .name = "pata-bf54x",
834 .id = -1,
835 .num_resources = ARRAY_SIZE(bfin_atapi_resources),
836 .resource = bfin_atapi_resources,
837};
838#endif
839
840#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
841static struct mtd_partition partition_info[] = {
842 {
Mike Frysinger73775b82010-08-27 20:43:39 +0000843 .name = "bootloader(nand)",
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800844 .offset = 0,
Mike Frysinger73775b82010-08-27 20:43:39 +0000845 .size = 0x80000,
846 }, {
847 .name = "linux kernel(nand)",
848 .offset = MTDPART_OFS_APPEND,
Mike Frysingerf4585a02008-10-13 14:45:21 +0800849 .size = 4 * 1024 * 1024,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800850 },
851 {
Robin Getzaa582972008-08-05 17:47:29 +0800852 .name = "file system(nand)",
Mike Frysingeredf05642008-02-25 11:38:11 +0800853 .offset = MTDPART_OFS_APPEND,
854 .size = MTDPART_SIZ_FULL,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800855 },
856};
857
858static struct bf5xx_nand_platform bf5xx_nand_platform = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800859 .data_width = NFC_NWIDTH_8,
860 .partitions = partition_info,
861 .nr_partitions = ARRAY_SIZE(partition_info),
862 .rd_dly = 3,
863 .wr_dly = 3,
864};
865
866static struct resource bf5xx_nand_resources[] = {
867 {
868 .start = 0xFFC03B00,
869 .end = 0xFFC03B4F,
870 .flags = IORESOURCE_MEM,
871 },
872 {
873 .start = CH_NFC,
874 .end = CH_NFC,
875 .flags = IORESOURCE_IRQ,
876 },
877};
878
879static struct platform_device bf5xx_nand_device = {
880 .name = "bf5xx-nand",
881 .id = 0,
882 .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
883 .resource = bf5xx_nand_resources,
884 .dev = {
885 .platform_data = &bf5xx_nand_platform,
886 },
887};
888#endif
889
Michael Hennerich3d7e6cf2008-03-03 17:40:28 -0700890#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
Cliff Cai501674a2009-01-07 23:14:38 +0800891
892static struct bfin_sd_host bfin_sdh_data = {
893 .dma_chan = CH_SDH,
894 .irq_int0 = IRQ_SDH_MASK0,
895 .pin_req = {P_SD_D0, P_SD_D1, P_SD_D2, P_SD_D3, P_SD_CLK, P_SD_CMD, 0},
896};
897
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800898static struct platform_device bf54x_sdh_device = {
899 .name = "bfin-sdh",
900 .id = 0,
Cliff Cai501674a2009-01-07 23:14:38 +0800901 .dev = {
902 .platform_data = &bfin_sdh_data,
903 },
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800904};
905#endif
906
Mike Frysinger793dc272008-03-26 08:09:12 +0800907#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800908static struct mtd_partition ezkit_partitions[] = {
909 {
Robin Getzaa582972008-08-05 17:47:29 +0800910 .name = "bootloader(nor)",
Mike Frysinger73775b82010-08-27 20:43:39 +0000911 .size = 0x80000,
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800912 .offset = 0,
913 }, {
Robin Getzaa582972008-08-05 17:47:29 +0800914 .name = "linux kernel(nor)",
Mike Frysinger664d0402008-10-09 17:28:36 +0800915 .size = 0x400000,
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800916 .offset = MTDPART_OFS_APPEND,
917 }, {
Robin Getzaa582972008-08-05 17:47:29 +0800918 .name = "file system(nor)",
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800919 .size = MTDPART_SIZ_FULL,
920 .offset = MTDPART_OFS_APPEND,
921 }
922};
923
924static struct physmap_flash_data ezkit_flash_data = {
925 .width = 2,
926 .parts = ezkit_partitions,
927 .nr_parts = ARRAY_SIZE(ezkit_partitions),
928};
929
930static struct resource ezkit_flash_resource = {
931 .start = 0x20000000,
Mike Frysinger664d0402008-10-09 17:28:36 +0800932 .end = 0x21ffffff,
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800933 .flags = IORESOURCE_MEM,
934};
935
936static struct platform_device ezkit_flash_device = {
937 .name = "physmap-flash",
938 .id = 0,
939 .dev = {
940 .platform_data = &ezkit_flash_data,
941 },
942 .num_resources = 1,
943 .resource = &ezkit_flash_resource,
944};
Mike Frysinger793dc272008-03-26 08:09:12 +0800945#endif
Mike Frysingerde8c43f2008-01-24 17:14:04 +0800946
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800947#if defined(CONFIG_MTD_M25P80) \
948 || defined(CONFIG_MTD_M25P80_MODULE)
949/* SPI flash chip (m25p16) */
950static struct mtd_partition bfin_spi_flash_partitions[] = {
951 {
Robin Getzaa582972008-08-05 17:47:29 +0800952 .name = "bootloader(spi)",
Mike Frysinger73775b82010-08-27 20:43:39 +0000953 .size = 0x00080000,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800954 .offset = 0,
955 .mask_flags = MTD_CAP_ROM
956 }, {
Robin Getzaa582972008-08-05 17:47:29 +0800957 .name = "linux kernel(spi)",
Mike Frysingeredf05642008-02-25 11:38:11 +0800958 .size = MTDPART_SIZ_FULL,
959 .offset = MTDPART_OFS_APPEND,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800960 }
961};
962
963static struct flash_platform_data bfin_spi_flash_data = {
964 .name = "m25p80",
965 .parts = bfin_spi_flash_partitions,
966 .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
967 .type = "m25p16",
968};
969
970static struct bfin5xx_spi_chip spi_flash_chip_info = {
971 .enable_dma = 0, /* use dma transfer with this chip*/
972 .bits_per_word = 8,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800973};
974#endif
975
Barry Song7ba80062010-01-28 09:37:21 +0000976#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
977 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
Bernd Schmidt37fa2422008-04-24 05:19:02 +0800978static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
979 .enable_dma = 0,
980 .bits_per_word = 16,
981};
982#endif
983
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800984#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
985static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +0800986 .enable_dma = 0,
987 .bits_per_word = 16,
988};
989
990static const struct ad7877_platform_data bfin_ad7877_ts_info = {
991 .model = 7877,
992 .vref_delay_usecs = 50, /* internal, no capacitor */
993 .x_plate_ohms = 419,
994 .y_plate_ohms = 486,
995 .pressure_max = 1000,
996 .pressure_min = 0,
997 .stopacq_polarity = 1,
998 .first_conversion_delay = 3,
999 .acquisition_time = 1,
1000 .averaging = 1,
1001 .pen_down_acc_interval = 1,
1002};
1003#endif
1004
Michael Hennerich6e668932008-02-09 01:54:09 +08001005#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
1006static struct bfin5xx_spi_chip spidev_chip_info = {
1007 .enable_dma = 0,
1008 .bits_per_word = 8,
1009};
1010#endif
1011
Michael Hennerichffc4d8b2009-05-29 15:41:18 +00001012#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
1013static struct bfin5xx_spi_chip spi_adxl34x_chip_info = {
1014 .enable_dma = 0, /* use dma transfer with this chip*/
1015 .bits_per_word = 8,
Michael Hennerichffc4d8b2009-05-29 15:41:18 +00001016};
1017#endif
1018
Mike Frysinger5bda2722008-06-07 15:03:01 +08001019static struct spi_board_info bfin_spi_board_info[] __initdata = {
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001020#if defined(CONFIG_MTD_M25P80) \
1021 || defined(CONFIG_MTD_M25P80_MODULE)
1022 {
1023 /* the modalias must be the same as spi device driver name */
1024 .modalias = "m25p80", /* Name of spi_driver for this device */
1025 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
1026 .bus_num = 0, /* Framework bus number */
1027 .chip_select = 1, /* SPI_SSEL1*/
1028 .platform_data = &bfin_spi_flash_data,
1029 .controller_data = &spi_flash_chip_info,
1030 .mode = SPI_MODE_3,
1031 },
1032#endif
Barry Song7ba80062010-01-28 09:37:21 +00001033#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
1034 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
Bernd Schmidt37fa2422008-04-24 05:19:02 +08001035 {
Barry Song7ba80062010-01-28 09:37:21 +00001036 .modalias = "ad183x",
Bernd Schmidt37fa2422008-04-24 05:19:02 +08001037 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1038 .bus_num = 1,
Barry Song7ba80062010-01-28 09:37:21 +00001039 .chip_select = 4,
Bernd Schmidt37fa2422008-04-24 05:19:02 +08001040 .controller_data = &ad1836_spi_chip_info,
1041 },
1042#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001043#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
Michael Hennerichffc4d8b2009-05-29 15:41:18 +00001044 {
1045 .modalias = "ad7877",
1046 .platform_data = &bfin_ad7877_ts_info,
1047 .irq = IRQ_PB4, /* old boards (<=Rev 1.3) use IRQ_PJ11 */
1048 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
1049 .bus_num = 0,
1050 .chip_select = 2,
1051 .controller_data = &spi_ad7877_chip_info,
1052 },
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001053#endif
Michael Hennerich6e668932008-02-09 01:54:09 +08001054#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
1055 {
1056 .modalias = "spidev",
1057 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1058 .bus_num = 0,
1059 .chip_select = 1,
1060 .controller_data = &spidev_chip_info,
1061 },
1062#endif
Michael Hennerichffc4d8b2009-05-29 15:41:18 +00001063#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
1064 {
1065 .modalias = "adxl34x",
1066 .platform_data = &adxl34x_info,
1067 .irq = IRQ_PC5,
1068 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
1069 .bus_num = 1,
1070 .chip_select = 2,
1071 .controller_data = &spi_adxl34x_chip_info,
1072 .mode = SPI_MODE_3,
1073 },
1074#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001075};
Mike Frysinger5bda2722008-06-07 15:03:01 +08001076#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001077/* SPI (0) */
1078static struct resource bfin_spi0_resource[] = {
1079 [0] = {
1080 .start = SPI0_REGBASE,
1081 .end = SPI0_REGBASE + 0xFF,
1082 .flags = IORESOURCE_MEM,
1083 },
1084 [1] = {
1085 .start = CH_SPI0,
1086 .end = CH_SPI0,
Yi Li53122692009-06-05 12:11:11 +00001087 .flags = IORESOURCE_DMA,
1088 },
1089 [2] = {
1090 .start = IRQ_SPI0,
1091 .end = IRQ_SPI0,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001092 .flags = IORESOURCE_IRQ,
1093 }
1094};
1095
1096/* SPI (1) */
1097static struct resource bfin_spi1_resource[] = {
1098 [0] = {
1099 .start = SPI1_REGBASE,
1100 .end = SPI1_REGBASE + 0xFF,
1101 .flags = IORESOURCE_MEM,
1102 },
1103 [1] = {
1104 .start = CH_SPI1,
1105 .end = CH_SPI1,
Yi Li53122692009-06-05 12:11:11 +00001106 .flags = IORESOURCE_DMA,
1107 },
1108 [2] = {
1109 .start = IRQ_SPI1,
1110 .end = IRQ_SPI1,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001111 .flags = IORESOURCE_IRQ,
1112 }
1113};
1114
1115/* SPI controller data */
Bryan Wu5d448dd2007-11-12 23:24:42 +08001116static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
Mike Frysingerc5af5452010-06-16 19:29:51 +00001117 .num_chipselect = 4,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001118 .enable_dma = 1, /* master has the ability to do dma transfer */
Bryan Wu5d448dd2007-11-12 23:24:42 +08001119 .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001120};
1121
1122static struct platform_device bf54x_spi_master0 = {
1123 .name = "bfin-spi",
1124 .id = 0, /* Bus number */
1125 .num_resources = ARRAY_SIZE(bfin_spi0_resource),
1126 .resource = bfin_spi0_resource,
1127 .dev = {
Bryan Wu5d448dd2007-11-12 23:24:42 +08001128 .platform_data = &bf54x_spi_master_info0, /* Passed to driver */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001129 },
1130};
1131
Bryan Wu5d448dd2007-11-12 23:24:42 +08001132static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
Mike Frysingerc5af5452010-06-16 19:29:51 +00001133 .num_chipselect = 4,
Bryan Wu5d448dd2007-11-12 23:24:42 +08001134 .enable_dma = 1, /* master has the ability to do dma transfer */
1135 .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
1136};
1137
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001138static struct platform_device bf54x_spi_master1 = {
1139 .name = "bfin-spi",
1140 .id = 1, /* Bus number */
1141 .num_resources = ARRAY_SIZE(bfin_spi1_resource),
1142 .resource = bfin_spi1_resource,
1143 .dev = {
Bryan Wu5d448dd2007-11-12 23:24:42 +08001144 .platform_data = &bf54x_spi_master_info1, /* Passed to driver */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001145 },
1146};
1147#endif /* spi master and devices */
1148
1149#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1150static struct resource bfin_twi0_resource[] = {
1151 [0] = {
1152 .start = TWI0_REGBASE,
1153 .end = TWI0_REGBASE + 0xFF,
1154 .flags = IORESOURCE_MEM,
1155 },
1156 [1] = {
1157 .start = IRQ_TWI0,
1158 .end = IRQ_TWI0,
1159 .flags = IORESOURCE_IRQ,
1160 },
1161};
1162
1163static struct platform_device i2c_bfin_twi0_device = {
1164 .name = "i2c-bfin-twi",
1165 .id = 0,
1166 .num_resources = ARRAY_SIZE(bfin_twi0_resource),
1167 .resource = bfin_twi0_resource,
1168};
1169
Mike Frysinger7160e952007-11-21 16:03:07 +08001170#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001171static struct resource bfin_twi1_resource[] = {
1172 [0] = {
1173 .start = TWI1_REGBASE,
1174 .end = TWI1_REGBASE + 0xFF,
1175 .flags = IORESOURCE_MEM,
1176 },
1177 [1] = {
1178 .start = IRQ_TWI1,
1179 .end = IRQ_TWI1,
1180 .flags = IORESOURCE_IRQ,
1181 },
1182};
1183
1184static struct platform_device i2c_bfin_twi1_device = {
1185 .name = "i2c-bfin-twi",
1186 .id = 1,
1187 .num_resources = ARRAY_SIZE(bfin_twi1_resource),
1188 .resource = bfin_twi1_resource,
1189};
1190#endif
Mike Frysinger7160e952007-11-21 16:03:07 +08001191#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001192
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001193static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
1194};
1195
1196#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
1197static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
Michael Hennerichebd58332009-07-02 11:00:38 +00001198#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001199 {
1200 I2C_BOARD_INFO("pcf8574_lcd", 0x22),
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001201 },
1202#endif
Michael Hennerich204844e2009-06-30 14:57:22 +00001203#if defined(CONFIG_INPUT_PCF8574) || defined(CONFIG_INPUT_PCF8574_MODULE)
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001204 {
1205 I2C_BOARD_INFO("pcf8574_keypad", 0x27),
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001206 .irq = 212,
1207 },
1208#endif
Michael Hennerichffc4d8b2009-05-29 15:41:18 +00001209#if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
1210 {
1211 I2C_BOARD_INFO("adxl34x", 0x53),
1212 .irq = IRQ_PC5,
1213 .platform_data = (void *)&adxl34x_info,
1214 },
1215#endif
steven miao39d3c1c2010-08-26 08:25:13 +00001216#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
1217 {
1218 I2C_BOARD_INFO("ad5252", 0x2f),
1219 },
1220#endif
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001221};
1222#endif
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001223
Michael Hennerich2463ef22008-01-27 16:49:48 +08001224#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1225#include <linux/gpio_keys.h>
1226
1227static struct gpio_keys_button bfin_gpio_keys_table[] = {
1228 {BTN_0, GPIO_PB8, 1, "gpio-keys: BTN0"},
1229 {BTN_1, GPIO_PB9, 1, "gpio-keys: BTN1"},
1230 {BTN_2, GPIO_PB10, 1, "gpio-keys: BTN2"},
1231 {BTN_3, GPIO_PB11, 1, "gpio-keys: BTN3"},
1232};
1233
1234static struct gpio_keys_platform_data bfin_gpio_keys_data = {
1235 .buttons = bfin_gpio_keys_table,
1236 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
1237};
1238
1239static struct platform_device bfin_device_gpiokeys = {
1240 .name = "gpio-keys",
1241 .dev = {
1242 .platform_data = &bfin_gpio_keys_data,
1243 },
1244};
1245#endif
1246
Michael Hennerich14b03202008-05-07 11:41:26 +08001247static const unsigned int cclk_vlev_datasheet[] =
1248{
1249/*
1250 * Internal VLEV BF54XSBBC1533
1251 ****temporarily using these values until data sheet is updated
1252 */
1253 VRPAIR(VLEV_085, 150000000),
1254 VRPAIR(VLEV_090, 250000000),
1255 VRPAIR(VLEV_110, 276000000),
1256 VRPAIR(VLEV_115, 301000000),
1257 VRPAIR(VLEV_120, 525000000),
1258 VRPAIR(VLEV_125, 550000000),
1259 VRPAIR(VLEV_130, 600000000),
1260};
1261
1262static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
1263 .tuple_tab = cclk_vlev_datasheet,
1264 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
1265 .vr_settling_time = 25 /* us */,
1266};
1267
1268static struct platform_device bfin_dpmc = {
1269 .name = "bfin dpmc",
1270 .dev = {
1271 .platform_data = &bfin_dmpc_vreg_data,
1272 },
1273};
1274
Barry Song439b4862009-11-13 02:41:07 +00001275#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
1276static struct platform_device bfin_i2s = {
1277 .name = "bfin-i2s",
1278 .id = CONFIG_SND_BF5XX_SPORT_NUM,
1279 /* TODO: add platform data here */
1280};
1281#endif
1282
1283#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
1284static struct platform_device bfin_tdm = {
1285 .name = "bfin-tdm",
1286 .id = CONFIG_SND_BF5XX_SPORT_NUM,
1287 /* TODO: add platform data here */
1288};
1289#endif
1290
1291#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
1292static struct platform_device bfin_ac97 = {
1293 .name = "bfin-ac97",
1294 .id = CONFIG_SND_BF5XX_SPORT_NUM,
1295 /* TODO: add platform data here */
1296};
1297#endif
1298
Roy Huang24a07a12007-07-12 22:41:45 +08001299static struct platform_device *ezkit_devices[] __initdata = {
Michael Hennerich14b03202008-05-07 11:41:26 +08001300
1301 &bfin_dpmc,
1302
Roy Huang24a07a12007-07-12 22:41:45 +08001303#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
1304 &rtc_device,
1305#endif
1306
1307#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
Sonic Zhang6bd1fbe2009-09-09 10:46:19 +00001308#ifdef CONFIG_SERIAL_BFIN_UART0
1309 &bfin_uart0_device,
1310#endif
1311#ifdef CONFIG_SERIAL_BFIN_UART1
1312 &bfin_uart1_device,
1313#endif
1314#ifdef CONFIG_SERIAL_BFIN_UART2
1315 &bfin_uart2_device,
1316#endif
1317#ifdef CONFIG_SERIAL_BFIN_UART3
1318 &bfin_uart3_device,
1319#endif
Roy Huang24a07a12007-07-12 22:41:45 +08001320#endif
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001321
Graf Yang5be36d22008-04-25 03:09:15 +08001322#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
Graf Yang42bd8bc2009-01-07 23:14:39 +08001323#ifdef CONFIG_BFIN_SIR0
1324 &bfin_sir0_device,
1325#endif
1326#ifdef CONFIG_BFIN_SIR1
1327 &bfin_sir1_device,
1328#endif
1329#ifdef CONFIG_BFIN_SIR2
1330 &bfin_sir2_device,
1331#endif
1332#ifdef CONFIG_BFIN_SIR3
1333 &bfin_sir3_device,
1334#endif
Graf Yang5be36d22008-04-25 03:09:15 +08001335#endif
1336
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001337#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
1338 &bf54x_lq043_device,
1339#endif
1340
1341#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
1342 &smsc911x_device,
1343#endif
1344
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001345#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
1346 &musb_device,
1347#endif
1348
Michael Hennerich3f375692008-11-18 17:48:22 +08001349#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
1350 &bfin_isp1760_device,
1351#endif
1352
Sonic Zhangdf5de262009-09-23 05:01:56 +00001353#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1354#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1355 &bfin_sport0_uart_device,
1356#endif
1357#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1358 &bfin_sport1_uart_device,
1359#endif
1360#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1361 &bfin_sport2_uart_device,
1362#endif
1363#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
1364 &bfin_sport3_uart_device,
1365#endif
1366#endif
1367
Barry Song706a01b2009-11-02 07:29:07 +00001368#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
1369 &bfin_can_device,
1370#endif
1371
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001372#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
1373 &bfin_atapi_device,
1374#endif
1375
1376#if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
1377 &bf5xx_nand_device,
1378#endif
1379
Michael Hennerich3d7e6cf2008-03-03 17:40:28 -07001380#if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001381 &bf54x_sdh_device,
1382#endif
1383
1384#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
1385 &bf54x_spi_master0,
Bryan Wud4b1d272007-10-21 17:03:55 +08001386 &bf54x_spi_master1,
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001387#endif
1388
1389#if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
1390 &bf54x_kpad_device,
1391#endif
1392
Michael Hennerichadfc0462009-10-09 07:37:03 +00001393#if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
Michael Hennerichaca5e4a2008-10-08 14:27:59 +08001394 &bfin_rotary_device,
1395#endif
1396
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001397#if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
1398 &i2c_bfin_twi0_device,
Mike Frysinger7160e952007-11-21 16:03:07 +08001399#if !defined(CONFIG_BF542)
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001400 &i2c_bfin_twi1_device,
1401#endif
Mike Frysinger7160e952007-11-21 16:03:07 +08001402#endif
Michael Hennerich2463ef22008-01-27 16:49:48 +08001403
1404#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
1405 &bfin_device_gpiokeys,
1406#endif
Mike Frysingercad2ab62008-02-22 17:01:31 +08001407
Mike Frysinger793dc272008-03-26 08:09:12 +08001408#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
Mike Frysingerde8c43f2008-01-24 17:14:04 +08001409 &ezkit_flash_device,
Mike Frysinger793dc272008-03-26 08:09:12 +08001410#endif
Barry Song439b4862009-11-13 02:41:07 +00001411
1412#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
1413 &bfin_i2s,
1414#endif
1415
1416#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE)
1417 &bfin_tdm,
1418#endif
1419
1420#if defined(CONFIG_SND_BF5XX_AC97) || defined(CONFIG_SND_BF5XX_AC97_MODULE)
1421 &bfin_ac97,
1422#endif
Roy Huang24a07a12007-07-12 22:41:45 +08001423};
1424
Mike Frysingera01d7a72008-02-02 15:34:56 +08001425static int __init ezkit_init(void)
Roy Huang24a07a12007-07-12 22:41:45 +08001426{
Harvey Harrisonb85d8582008-04-23 09:39:01 +08001427 printk(KERN_INFO "%s(): registering device resources\n", __func__);
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001428
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001429 i2c_register_board_info(0, bfin_i2c_board_info0,
1430 ARRAY_SIZE(bfin_i2c_board_info0));
1431#if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
1432 i2c_register_board_info(1, bfin_i2c_board_info1,
1433 ARRAY_SIZE(bfin_i2c_board_info1));
1434#endif
Bryan Wu81d9c7f2008-03-26 10:02:13 +08001435
Roy Huang24a07a12007-07-12 22:41:45 +08001436 platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001437
Mike Frysinger5bda2722008-06-07 15:03:01 +08001438 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
Bryan Wuc6c4d7b2007-10-11 01:20:06 +08001439
Roy Huang24a07a12007-07-12 22:41:45 +08001440 return 0;
1441}
1442
Mike Frysingera01d7a72008-02-02 15:34:56 +08001443arch_initcall(ezkit_init);
Sonic Zhangc13ce9f2009-09-23 09:37:46 +00001444
1445static struct platform_device *ezkit_early_devices[] __initdata = {
1446#if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
1447#ifdef CONFIG_SERIAL_BFIN_UART0
1448 &bfin_uart0_device,
1449#endif
1450#ifdef CONFIG_SERIAL_BFIN_UART1
1451 &bfin_uart1_device,
1452#endif
1453#ifdef CONFIG_SERIAL_BFIN_UART2
1454 &bfin_uart2_device,
1455#endif
1456#ifdef CONFIG_SERIAL_BFIN_UART3
1457 &bfin_uart3_device,
1458#endif
1459#endif
1460
1461#if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
1462#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1463 &bfin_sport0_uart_device,
1464#endif
1465#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1466 &bfin_sport1_uart_device,
1467#endif
1468#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1469 &bfin_sport2_uart_device,
1470#endif
1471#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
1472 &bfin_sport3_uart_device,
1473#endif
1474#endif
1475};
1476
1477void __init native_machine_early_platform_add_devices(void)
1478{
1479 printk(KERN_INFO "register early platform devices\n");
1480 early_platform_add_devices(ezkit_early_devices,
1481 ARRAY_SIZE(ezkit_early_devices));
1482}