diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2009-09-23 05:37:46 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-09 00:30:45 -0500 |
commit | c13ce9fd26c3a0e32b3bf0b00929181e66114ed2 (patch) | |
tree | 2f7093e48f93dfdea691b057d9a7ded6fddedc07 /arch/blackfin/mach-bf533/boards | |
parent | b635f1912da764c960c044ffd58ba27157aa2c85 (diff) |
Blackfin: add UART/SPORT early platform resources
This lets people easily select the UART/SPORT consoles for early printk
while leveraging the pins declared in the boards file.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf533/boards')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/H8606.c | 15 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/blackstamp.c | 24 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/cm_bf533.c | 24 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ezkit.c | 15 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ip0x.c | 15 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/stamp.c | 24 |
6 files changed, 117 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c index cb3b74f32346..d10c8e8b69cf 100644 --- a/arch/blackfin/mach-bf533/boards/H8606.c +++ b/arch/blackfin/mach-bf533/boards/H8606.c | |||
@@ -455,3 +455,18 @@ static int __init H8606_init(void) | |||
455 | } | 455 | } |
456 | 456 | ||
457 | arch_initcall(H8606_init); | 457 | arch_initcall(H8606_init); |
458 | |||
459 | static struct platform_device *H8606_early_devices[] __initdata = { | ||
460 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
461 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
462 | &bfin_uart0_device, | ||
463 | #endif | ||
464 | #endif | ||
465 | }; | ||
466 | |||
467 | void __init native_machine_early_platform_add_devices(void) | ||
468 | { | ||
469 | printk(KERN_INFO "register early platform devices\n"); | ||
470 | early_platform_add_devices(H8606_early_devices, | ||
471 | ARRAY_SIZE(H8606_early_devices)); | ||
472 | } | ||
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c index 4d9294642f10..842b4fa76ea9 100644 --- a/arch/blackfin/mach-bf533/boards/blackstamp.c +++ b/arch/blackfin/mach-bf533/boards/blackstamp.c | |||
@@ -486,3 +486,27 @@ static int __init blackstamp_init(void) | |||
486 | } | 486 | } |
487 | 487 | ||
488 | arch_initcall(blackstamp_init); | 488 | arch_initcall(blackstamp_init); |
489 | |||
490 | static struct platform_device *stamp_early_devices[] __initdata = { | ||
491 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
492 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
493 | &bfin_uart0_device, | ||
494 | #endif | ||
495 | #endif | ||
496 | |||
497 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
498 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
499 | &bfin_sport0_uart_device, | ||
500 | #endif | ||
501 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
502 | &bfin_sport1_uart_device, | ||
503 | #endif | ||
504 | #endif | ||
505 | }; | ||
506 | |||
507 | void __init native_machine_early_platform_add_devices(void) | ||
508 | { | ||
509 | printk(KERN_INFO "register early platform devices\n"); | ||
510 | early_platform_add_devices(stamp_early_devices, | ||
511 | ARRAY_SIZE(stamp_early_devices)); | ||
512 | } | ||
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c index 33ff27a4a474..0592fe0bb8af 100644 --- a/arch/blackfin/mach-bf533/boards/cm_bf533.c +++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c | |||
@@ -580,3 +580,27 @@ static int __init cm_bf533_init(void) | |||
580 | } | 580 | } |
581 | 581 | ||
582 | arch_initcall(cm_bf533_init); | 582 | arch_initcall(cm_bf533_init); |
583 | |||
584 | static struct platform_device *cm_bf533_early_devices[] __initdata = { | ||
585 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
586 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
587 | &bfin_uart0_device, | ||
588 | #endif | ||
589 | #endif | ||
590 | |||
591 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
592 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
593 | &bfin_sport0_uart_device, | ||
594 | #endif | ||
595 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
596 | &bfin_sport1_uart_device, | ||
597 | #endif | ||
598 | #endif | ||
599 | }; | ||
600 | |||
601 | void __init native_machine_early_platform_add_devices(void) | ||
602 | { | ||
603 | printk(KERN_INFO "register early platform devices\n"); | ||
604 | early_platform_add_devices(cm_bf533_early_devices, | ||
605 | ARRAY_SIZE(cm_bf533_early_devices)); | ||
606 | } | ||
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 50392476722a..5332c9828a33 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -531,3 +531,18 @@ static int __init ezkit_init(void) | |||
531 | } | 531 | } |
532 | 532 | ||
533 | arch_initcall(ezkit_init); | 533 | arch_initcall(ezkit_init); |
534 | |||
535 | static struct platform_device *ezkit_early_devices[] __initdata = { | ||
536 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
537 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
538 | &bfin_uart0_device, | ||
539 | #endif | ||
540 | #endif | ||
541 | }; | ||
542 | |||
543 | void __init native_machine_early_platform_add_devices(void) | ||
544 | { | ||
545 | printk(KERN_INFO "register early platform devices\n"); | ||
546 | early_platform_add_devices(ezkit_early_devices, | ||
547 | ARRAY_SIZE(ezkit_early_devices)); | ||
548 | } | ||
diff --git a/arch/blackfin/mach-bf533/boards/ip0x.c b/arch/blackfin/mach-bf533/boards/ip0x.c index a60d0369ceb7..7349970db978 100644 --- a/arch/blackfin/mach-bf533/boards/ip0x.c +++ b/arch/blackfin/mach-bf533/boards/ip0x.c | |||
@@ -308,3 +308,18 @@ static int __init ip0x_init(void) | |||
308 | } | 308 | } |
309 | 309 | ||
310 | arch_initcall(ip0x_init); | 310 | arch_initcall(ip0x_init); |
311 | |||
312 | static struct platform_device *ip0x_early_devices[] __initdata = { | ||
313 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
314 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
315 | &bfin_uart0_device, | ||
316 | #endif | ||
317 | #endif | ||
318 | }; | ||
319 | |||
320 | void __init native_machine_early_platform_add_devices(void) | ||
321 | { | ||
322 | printk(KERN_INFO "register early platform devices\n"); | ||
323 | early_platform_add_devices(ip0x_early_devices, | ||
324 | ARRAY_SIZE(ip0x_early_devices)); | ||
325 | } | ||
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 428f724dd080..3e80a795d3c7 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -642,6 +642,30 @@ static int __init stamp_init(void) | |||
642 | 642 | ||
643 | arch_initcall(stamp_init); | 643 | arch_initcall(stamp_init); |
644 | 644 | ||
645 | static struct platform_device *stamp_early_devices[] __initdata = { | ||
646 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
647 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
648 | &bfin_uart0_device, | ||
649 | #endif | ||
650 | #endif | ||
651 | |||
652 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
653 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
654 | &bfin_sport0_uart_device, | ||
655 | #endif | ||
656 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
657 | &bfin_sport1_uart_device, | ||
658 | #endif | ||
659 | #endif | ||
660 | }; | ||
661 | |||
662 | void __init native_machine_early_platform_add_devices(void) | ||
663 | { | ||
664 | printk(KERN_INFO "register early platform devices\n"); | ||
665 | early_platform_add_devices(stamp_early_devices, | ||
666 | ARRAY_SIZE(stamp_early_devices)); | ||
667 | } | ||
668 | |||
645 | void native_machine_restart(char *cmd) | 669 | void native_machine_restart(char *cmd) |
646 | { | 670 | { |
647 | /* workaround pull up on cpld / flash pin not being strong enough */ | 671 | /* workaround pull up on cpld / flash pin not being strong enough */ |