diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2009-09-23 01:01:56 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-09 00:30:45 -0500 |
commit | df5de261306d9bfc1ed9121595593b10a7626b95 (patch) | |
tree | 6bfd86734f017ddcaeb4fc03b0f80819916e64e9 /arch/blackfin/mach-bf538/boards | |
parent | 08a54bffaf7d5dc9391518323234ce9f9ea4be8e (diff) |
Blackfin: move SPORT UART resources to boards files
Rather than keeping the pins in the actual driver and worrying about a
mess of Kconfig options, declare all the desired pin resources in the
boards file. This lets people easily select the specific pins/ports for
the normal emulated UART as well as GPIOs for CTS/RTS.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf538/boards')
-rw-r--r-- | arch/blackfin/mach-bf538/boards/ezkit.c | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c index 1912bc4555aa..d7c6b9f18b5e 100644 --- a/arch/blackfin/mach-bf538/boards/ezkit.c +++ b/arch/blackfin/mach-bf538/boards/ezkit.c | |||
@@ -262,6 +262,145 @@ static struct platform_device bfin_sir2_device = { | |||
262 | #endif | 262 | #endif |
263 | #endif | 263 | #endif |
264 | 264 | ||
265 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | ||
266 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
267 | static struct resource bfin_sport0_uart_resources[] = { | ||
268 | { | ||
269 | .start = SPORT0_TCR1, | ||
270 | .end = SPORT0_MRCS3+4, | ||
271 | .flags = IORESOURCE_MEM, | ||
272 | }, | ||
273 | { | ||
274 | .start = IRQ_SPORT0_RX, | ||
275 | .end = IRQ_SPORT0_RX+1, | ||
276 | .flags = IORESOURCE_IRQ, | ||
277 | }, | ||
278 | { | ||
279 | .start = IRQ_SPORT0_ERROR, | ||
280 | .end = IRQ_SPORT0_ERROR, | ||
281 | .flags = IORESOURCE_IRQ, | ||
282 | }, | ||
283 | }; | ||
284 | |||
285 | unsigned short bfin_sport0_peripherals[] = { | ||
286 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
287 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
288 | }; | ||
289 | |||
290 | static struct platform_device bfin_sport0_uart_device = { | ||
291 | .name = "bfin-sport-uart", | ||
292 | .id = 0, | ||
293 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
294 | .resource = bfin_sport0_uart_resources, | ||
295 | .dev = { | ||
296 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
297 | }, | ||
298 | }; | ||
299 | #endif | ||
300 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
301 | static struct resource bfin_sport1_uart_resources[] = { | ||
302 | { | ||
303 | .start = SPORT1_TCR1, | ||
304 | .end = SPORT1_MRCS3+4, | ||
305 | .flags = IORESOURCE_MEM, | ||
306 | }, | ||
307 | { | ||
308 | .start = IRQ_SPORT1_RX, | ||
309 | .end = IRQ_SPORT1_RX+1, | ||
310 | .flags = IORESOURCE_IRQ, | ||
311 | }, | ||
312 | { | ||
313 | .start = IRQ_SPORT1_ERROR, | ||
314 | .end = IRQ_SPORT1_ERROR, | ||
315 | .flags = IORESOURCE_IRQ, | ||
316 | }, | ||
317 | }; | ||
318 | |||
319 | unsigned short bfin_sport1_peripherals[] = { | ||
320 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
321 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
322 | }; | ||
323 | |||
324 | static struct platform_device bfin_sport1_uart_device = { | ||
325 | .name = "bfin-sport-uart", | ||
326 | .id = 1, | ||
327 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
328 | .resource = bfin_sport1_uart_resources, | ||
329 | .dev = { | ||
330 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
331 | }, | ||
332 | }; | ||
333 | #endif | ||
334 | #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART | ||
335 | static struct resource bfin_sport2_uart_resources[] = { | ||
336 | { | ||
337 | .start = SPORT2_TCR1, | ||
338 | .end = SPORT2_MRCS3+4, | ||
339 | .flags = IORESOURCE_MEM, | ||
340 | }, | ||
341 | { | ||
342 | .start = IRQ_SPORT2_RX, | ||
343 | .end = IRQ_SPORT2_RX+1, | ||
344 | .flags = IORESOURCE_IRQ, | ||
345 | }, | ||
346 | { | ||
347 | .start = IRQ_SPORT2_ERROR, | ||
348 | .end = IRQ_SPORT2_ERROR, | ||
349 | .flags = IORESOURCE_IRQ, | ||
350 | }, | ||
351 | }; | ||
352 | |||
353 | unsigned short bfin_sport2_peripherals[] = { | ||
354 | P_SPORT2_TFS, P_SPORT2_DTPRI, P_SPORT2_TSCLK, P_SPORT2_RFS, | ||
355 | P_SPORT2_DRPRI, P_SPORT2_RSCLK, P_SPORT2_DRSEC, P_SPORT2_DTSEC, 0 | ||
356 | }; | ||
357 | |||
358 | static struct platform_device bfin_sport2_uart_device = { | ||
359 | .name = "bfin-sport-uart", | ||
360 | .id = 2, | ||
361 | .num_resources = ARRAY_SIZE(bfin_sport2_uart_resources), | ||
362 | .resource = bfin_sport2_uart_resources, | ||
363 | .dev = { | ||
364 | .platform_data = &bfin_sport2_peripherals, /* Passed to driver */ | ||
365 | }, | ||
366 | }; | ||
367 | #endif | ||
368 | #ifdef CONFIG_SERIAL_BFIN_SPORT3_UART | ||
369 | static struct resource bfin_sport3_uart_resources[] = { | ||
370 | { | ||
371 | .start = SPORT3_TCR1, | ||
372 | .end = SPORT3_MRCS3+4, | ||
373 | .flags = IORESOURCE_MEM, | ||
374 | }, | ||
375 | { | ||
376 | .start = IRQ_SPORT3_RX, | ||
377 | .end = IRQ_SPORT3_RX+1, | ||
378 | .flags = IORESOURCE_IRQ, | ||
379 | }, | ||
380 | { | ||
381 | .start = IRQ_SPORT3_ERROR, | ||
382 | .end = IRQ_SPORT3_ERROR, | ||
383 | .flags = IORESOURCE_IRQ, | ||
384 | }, | ||
385 | }; | ||
386 | |||
387 | unsigned short bfin_sport3_peripherals[] = { | ||
388 | P_SPORT3_TFS, P_SPORT3_DTPRI, P_SPORT3_TSCLK, P_SPORT3_RFS, | ||
389 | P_SPORT3_DRPRI, P_SPORT3_RSCLK, P_SPORT3_DRSEC, P_SPORT3_DTSEC, 0 | ||
390 | }; | ||
391 | |||
392 | static struct platform_device bfin_sport3_uart_device = { | ||
393 | .name = "bfin-sport-uart", | ||
394 | .id = 3, | ||
395 | .num_resources = ARRAY_SIZE(bfin_sport3_uart_resources), | ||
396 | .resource = bfin_sport3_uart_resources, | ||
397 | .dev = { | ||
398 | .platform_data = &bfin_sport3_peripherals, /* Passed to driver */ | ||
399 | }, | ||
400 | }; | ||
401 | #endif | ||
402 | #endif | ||
403 | |||
265 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | 404 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) |
266 | unsigned short bfin_can_peripherals[] = { | 405 | unsigned short bfin_can_peripherals[] = { |
267 | P_CAN0_RX, P_CAN0_TX, 0 | 406 | P_CAN0_RX, P_CAN0_TX, 0 |
@@ -767,6 +906,21 @@ static struct platform_device *cm_bf538_devices[] __initdata = { | |||
767 | #endif | 906 | #endif |
768 | #endif | 907 | #endif |
769 | 908 | ||
909 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | ||
910 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
911 | &bfin_sport0_uart_device, | ||
912 | #endif | ||
913 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
914 | &bfin_sport1_uart_device, | ||
915 | #endif | ||
916 | #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART | ||
917 | &bfin_sport2_uart_device, | ||
918 | #endif | ||
919 | #ifdef CONFIG_SERIAL_BFIN_SPORT3_UART | ||
920 | &bfin_sport3_uart_device, | ||
921 | #endif | ||
922 | #endif | ||
923 | |||
770 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) | 924 | #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) |
771 | &bfin_can_device, | 925 | &bfin_can_device, |
772 | #endif | 926 | #endif |