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 | |
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')
22 files changed, 538 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index 06e4316912d..44d6d529902 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c | |||
@@ -775,6 +775,33 @@ static int __init ezbrd_init(void) | |||
775 | 775 | ||
776 | arch_initcall(ezbrd_init); | 776 | arch_initcall(ezbrd_init); |
777 | 777 | ||
778 | static struct platform_device *ezbrd_early_devices[] __initdata = { | ||
779 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
780 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
781 | &bfin_uart0_device, | ||
782 | #endif | ||
783 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
784 | &bfin_uart1_device, | ||
785 | #endif | ||
786 | #endif | ||
787 | |||
788 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
789 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
790 | &bfin_sport0_uart_device, | ||
791 | #endif | ||
792 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
793 | &bfin_sport1_uart_device, | ||
794 | #endif | ||
795 | #endif | ||
796 | }; | ||
797 | |||
798 | void __init native_machine_early_platform_add_devices(void) | ||
799 | { | ||
800 | printk(KERN_INFO "register early platform devices\n"); | ||
801 | early_platform_add_devices(ezbrd_early_devices, | ||
802 | ARRAY_SIZE(ezbrd_early_devices)); | ||
803 | } | ||
804 | |||
778 | void native_machine_restart(char *cmd) | 805 | void native_machine_restart(char *cmd) |
779 | { | 806 | { |
780 | /* workaround reboot hang when booting from SPI */ | 807 | /* workaround reboot hang when booting from SPI */ |
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c index 3543bdf3268..eaa0131f960 100644 --- a/arch/blackfin/mach-bf527/boards/cm_bf527.c +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c | |||
@@ -1014,6 +1014,33 @@ static int __init cm_init(void) | |||
1014 | 1014 | ||
1015 | arch_initcall(cm_init); | 1015 | arch_initcall(cm_init); |
1016 | 1016 | ||
1017 | static struct platform_device *cmbf527_early_devices[] __initdata = { | ||
1018 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
1019 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
1020 | &bfin_uart0_device, | ||
1021 | #endif | ||
1022 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
1023 | &bfin_uart1_device, | ||
1024 | #endif | ||
1025 | #endif | ||
1026 | |||
1027 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
1028 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1029 | &bfin_sport0_uart_device, | ||
1030 | #endif | ||
1031 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
1032 | &bfin_sport1_uart_device, | ||
1033 | #endif | ||
1034 | #endif | ||
1035 | }; | ||
1036 | |||
1037 | void __init native_machine_early_platform_add_devices(void) | ||
1038 | { | ||
1039 | printk(KERN_INFO "register early platform devices\n"); | ||
1040 | early_platform_add_devices(cmbf527_early_devices, | ||
1041 | ARRAY_SIZE(cmbf527_early_devices)); | ||
1042 | } | ||
1043 | |||
1017 | void native_machine_restart(char *cmd) | 1044 | void native_machine_restart(char *cmd) |
1018 | { | 1045 | { |
1019 | /* workaround reboot hang when booting from SPI */ | 1046 | /* workaround reboot hang when booting from SPI */ |
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c index a99955d1139..3ff61e6fbe9 100644 --- a/arch/blackfin/mach-bf527/boards/ezbrd.c +++ b/arch/blackfin/mach-bf527/boards/ezbrd.c | |||
@@ -854,6 +854,33 @@ static int __init ezbrd_init(void) | |||
854 | 854 | ||
855 | arch_initcall(ezbrd_init); | 855 | arch_initcall(ezbrd_init); |
856 | 856 | ||
857 | static struct platform_device *ezbrd_early_devices[] __initdata = { | ||
858 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
859 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
860 | &bfin_uart0_device, | ||
861 | #endif | ||
862 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
863 | &bfin_uart1_device, | ||
864 | #endif | ||
865 | #endif | ||
866 | |||
867 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
868 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
869 | &bfin_sport0_uart_device, | ||
870 | #endif | ||
871 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
872 | &bfin_sport1_uart_device, | ||
873 | #endif | ||
874 | #endif | ||
875 | }; | ||
876 | |||
877 | void __init native_machine_early_platform_add_devices(void) | ||
878 | { | ||
879 | printk(KERN_INFO "register early platform devices\n"); | ||
880 | early_platform_add_devices(ezbrd_early_devices, | ||
881 | ARRAY_SIZE(ezbrd_early_devices)); | ||
882 | } | ||
883 | |||
857 | void native_machine_restart(char *cmd) | 884 | void native_machine_restart(char *cmd) |
858 | { | 885 | { |
859 | /* workaround reboot hang when booting from SPI */ | 886 | /* workaround reboot hang when booting from SPI */ |
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index f93323dd5b5..6138b47fbba 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -1099,6 +1099,33 @@ static int __init ezkit_init(void) | |||
1099 | 1099 | ||
1100 | arch_initcall(ezkit_init); | 1100 | arch_initcall(ezkit_init); |
1101 | 1101 | ||
1102 | static struct platform_device *ezkit_early_devices[] __initdata = { | ||
1103 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
1104 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
1105 | &bfin_uart0_device, | ||
1106 | #endif | ||
1107 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
1108 | &bfin_uart1_device, | ||
1109 | #endif | ||
1110 | #endif | ||
1111 | |||
1112 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
1113 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1114 | &bfin_sport0_uart_device, | ||
1115 | #endif | ||
1116 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
1117 | &bfin_sport1_uart_device, | ||
1118 | #endif | ||
1119 | #endif | ||
1120 | }; | ||
1121 | |||
1122 | void __init native_machine_early_platform_add_devices(void) | ||
1123 | { | ||
1124 | printk(KERN_INFO "register early platform devices\n"); | ||
1125 | early_platform_add_devices(ezkit_early_devices, | ||
1126 | ARRAY_SIZE(ezkit_early_devices)); | ||
1127 | } | ||
1128 | |||
1102 | void native_machine_restart(char *cmd) | 1129 | void native_machine_restart(char *cmd) |
1103 | { | 1130 | { |
1104 | /* workaround reboot hang when booting from SPI */ | 1131 | /* workaround reboot hang when booting from SPI */ |
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c index cb3b74f3234..d10c8e8b69c 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 4d9294642f1..842b4fa76ea 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 33ff27a4a47..0592fe0bb8a 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 50392476722..5332c9828a3 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 a60d0369ceb..7349970db97 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 428f724dd08..3e80a795d3c 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 */ |
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c index b4837776b27..c54331282ba 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c | |||
@@ -760,6 +760,33 @@ static int __init cm_bf537e_init(void) | |||
760 | 760 | ||
761 | arch_initcall(cm_bf537e_init); | 761 | arch_initcall(cm_bf537e_init); |
762 | 762 | ||
763 | static struct platform_device *cm_bf537e_early_devices[] __initdata = { | ||
764 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
765 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
766 | &bfin_uart0_device, | ||
767 | #endif | ||
768 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
769 | &bfin_uart1_device, | ||
770 | #endif | ||
771 | #endif | ||
772 | |||
773 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
774 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
775 | &bfin_sport0_uart_device, | ||
776 | #endif | ||
777 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
778 | &bfin_sport1_uart_device, | ||
779 | #endif | ||
780 | #endif | ||
781 | }; | ||
782 | |||
783 | void __init native_machine_early_platform_add_devices(void) | ||
784 | { | ||
785 | printk(KERN_INFO "register early platform devices\n"); | ||
786 | early_platform_add_devices(cm_bf537e_early_devices, | ||
787 | ARRAY_SIZE(cm_bf537e_early_devices)); | ||
788 | } | ||
789 | |||
763 | void bfin_get_ether_addr(char *addr) | 790 | void bfin_get_ether_addr(char *addr) |
764 | { | 791 | { |
765 | random_ether_addr(addr); | 792 | random_ether_addr(addr); |
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c index c6802be65fb..18daacb00b2 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c | |||
@@ -725,6 +725,33 @@ static int __init cm_bf537u_init(void) | |||
725 | 725 | ||
726 | arch_initcall(cm_bf537u_init); | 726 | arch_initcall(cm_bf537u_init); |
727 | 727 | ||
728 | static struct platform_device *cm_bf537u_early_devices[] __initdata = { | ||
729 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
730 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
731 | &bfin_uart0_device, | ||
732 | #endif | ||
733 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
734 | &bfin_uart1_device, | ||
735 | #endif | ||
736 | #endif | ||
737 | |||
738 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
739 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
740 | &bfin_sport0_uart_device, | ||
741 | #endif | ||
742 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
743 | &bfin_sport1_uart_device, | ||
744 | #endif | ||
745 | #endif | ||
746 | }; | ||
747 | |||
748 | void __init native_machine_early_platform_add_devices(void) | ||
749 | { | ||
750 | printk(KERN_INFO "register early platform devices\n"); | ||
751 | early_platform_add_devices(cm_bf537u_early_devices, | ||
752 | ARRAY_SIZE(cm_bf537u_early_devices)); | ||
753 | } | ||
754 | |||
728 | void bfin_get_ether_addr(char *addr) | 755 | void bfin_get_ether_addr(char *addr) |
729 | { | 756 | { |
730 | random_ether_addr(addr); | 757 | random_ether_addr(addr); |
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c index 6403964490d..c489d602c59 100644 --- a/arch/blackfin/mach-bf537/boards/minotaur.c +++ b/arch/blackfin/mach-bf537/boards/minotaur.c | |||
@@ -516,6 +516,33 @@ static int __init minotaur_init(void) | |||
516 | 516 | ||
517 | arch_initcall(minotaur_init); | 517 | arch_initcall(minotaur_init); |
518 | 518 | ||
519 | static struct platform_device *minotaur_early_devices[] __initdata = { | ||
520 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
521 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
522 | &bfin_uart0_device, | ||
523 | #endif | ||
524 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
525 | &bfin_uart1_device, | ||
526 | #endif | ||
527 | #endif | ||
528 | |||
529 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
530 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
531 | &bfin_sport0_uart_device, | ||
532 | #endif | ||
533 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
534 | &bfin_sport1_uart_device, | ||
535 | #endif | ||
536 | #endif | ||
537 | }; | ||
538 | |||
539 | void __init native_machine_early_platform_add_devices(void) | ||
540 | { | ||
541 | printk(KERN_INFO "register early platform devices\n"); | ||
542 | early_platform_add_devices(minotaur_early_devices, | ||
543 | ARRAY_SIZE(minotaur_early_devices)); | ||
544 | } | ||
545 | |||
519 | void native_machine_restart(char *cmd) | 546 | void native_machine_restart(char *cmd) |
520 | { | 547 | { |
521 | /* workaround reboot hang when booting from SPI */ | 548 | /* workaround reboot hang when booting from SPI */ |
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c index 3c36abdf340..f08533d4aee 100644 --- a/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/arch/blackfin/mach-bf537/boards/pnav10.c | |||
@@ -571,6 +571,24 @@ static int __init pnav_init(void) | |||
571 | 571 | ||
572 | arch_initcall(pnav_init); | 572 | arch_initcall(pnav_init); |
573 | 573 | ||
574 | static struct platform_device *stamp_early_devices[] __initdata = { | ||
575 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
576 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
577 | &bfin_uart0_device, | ||
578 | #endif | ||
579 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
580 | &bfin_uart1_device, | ||
581 | #endif | ||
582 | #endif | ||
583 | }; | ||
584 | |||
585 | void __init native_machine_early_platform_add_devices(void) | ||
586 | { | ||
587 | printk(KERN_INFO "register early platform devices\n"); | ||
588 | early_platform_add_devices(stamp_early_devices, | ||
589 | ARRAY_SIZE(stamp_early_devices)); | ||
590 | } | ||
591 | |||
574 | void bfin_get_ether_addr(char *addr) | 592 | void bfin_get_ether_addr(char *addr) |
575 | { | 593 | { |
576 | random_ether_addr(addr); | 594 | random_ether_addr(addr); |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index df4b6b5c08d..3cb20d7efbd 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -1969,6 +1969,34 @@ static int __init stamp_init(void) | |||
1969 | 1969 | ||
1970 | arch_initcall(stamp_init); | 1970 | arch_initcall(stamp_init); |
1971 | 1971 | ||
1972 | |||
1973 | static struct platform_device *stamp_early_devices[] __initdata = { | ||
1974 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
1975 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
1976 | &bfin_uart0_device, | ||
1977 | #endif | ||
1978 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
1979 | &bfin_uart1_device, | ||
1980 | #endif | ||
1981 | #endif | ||
1982 | |||
1983 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
1984 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1985 | &bfin_sport0_uart_device, | ||
1986 | #endif | ||
1987 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
1988 | &bfin_sport1_uart_device, | ||
1989 | #endif | ||
1990 | #endif | ||
1991 | }; | ||
1992 | |||
1993 | void __init native_machine_early_platform_add_devices(void) | ||
1994 | { | ||
1995 | printk(KERN_INFO "register early platform devices\n"); | ||
1996 | early_platform_add_devices(stamp_early_devices, | ||
1997 | ARRAY_SIZE(stamp_early_devices)); | ||
1998 | } | ||
1999 | |||
1972 | void native_machine_restart(char *cmd) | 2000 | void native_machine_restart(char *cmd) |
1973 | { | 2001 | { |
1974 | /* workaround reboot hang when booting from SPI */ | 2002 | /* workaround reboot hang when booting from SPI */ |
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c index 69a2fb80472..59951cdef58 100644 --- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c | |||
@@ -727,6 +727,33 @@ static int __init tcm_bf537_init(void) | |||
727 | 727 | ||
728 | arch_initcall(tcm_bf537_init); | 728 | arch_initcall(tcm_bf537_init); |
729 | 729 | ||
730 | static struct platform_device *cm_bf537_early_devices[] __initdata = { | ||
731 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
732 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
733 | &bfin_uart0_device, | ||
734 | #endif | ||
735 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
736 | &bfin_uart1_device, | ||
737 | #endif | ||
738 | #endif | ||
739 | |||
740 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
741 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
742 | &bfin_sport0_uart_device, | ||
743 | #endif | ||
744 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
745 | &bfin_sport1_uart_device, | ||
746 | #endif | ||
747 | #endif | ||
748 | }; | ||
749 | |||
750 | void __init native_machine_early_platform_add_devices(void) | ||
751 | { | ||
752 | printk(KERN_INFO "register early platform devices\n"); | ||
753 | early_platform_add_devices(cm_bf537_early_devices, | ||
754 | ARRAY_SIZE(cm_bf537_early_devices)); | ||
755 | } | ||
756 | |||
730 | void bfin_get_ether_addr(char *addr) | 757 | void bfin_get_ether_addr(char *addr) |
731 | { | 758 | { |
732 | random_ether_addr(addr); | 759 | random_ether_addr(addr); |
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c index d7c6b9f18b5..20387fe09c6 100644 --- a/arch/blackfin/mach-bf538/boards/ezkit.c +++ b/arch/blackfin/mach-bf538/boards/ezkit.c | |||
@@ -956,3 +956,39 @@ static int __init ezkit_init(void) | |||
956 | } | 956 | } |
957 | 957 | ||
958 | arch_initcall(ezkit_init); | 958 | arch_initcall(ezkit_init); |
959 | |||
960 | static struct platform_device *ezkit_early_devices[] __initdata = { | ||
961 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
962 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
963 | &bfin_uart0_device, | ||
964 | #endif | ||
965 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
966 | &bfin_uart1_device, | ||
967 | #endif | ||
968 | #ifdef CONFIG_SERIAL_BFIN_UART2 | ||
969 | &bfin_uart2_device, | ||
970 | #endif | ||
971 | #endif | ||
972 | |||
973 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
974 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
975 | &bfin_sport0_uart_device, | ||
976 | #endif | ||
977 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
978 | &bfin_sport1_uart_device, | ||
979 | #endif | ||
980 | #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART | ||
981 | &bfin_sport2_uart_device, | ||
982 | #endif | ||
983 | #ifdef CONFIG_SERIAL_BFIN_SPORT3_UART | ||
984 | &bfin_sport3_uart_device, | ||
985 | #endif | ||
986 | #endif | ||
987 | }; | ||
988 | |||
989 | void __init native_machine_early_platform_add_devices(void) | ||
990 | { | ||
991 | printk(KERN_INFO "register early platform devices\n"); | ||
992 | early_platform_add_devices(ezkit_early_devices, | ||
993 | ARRAY_SIZE(ezkit_early_devices)); | ||
994 | } | ||
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c index cb745879219..f60c333fec6 100644 --- a/arch/blackfin/mach-bf548/boards/cm_bf548.c +++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c | |||
@@ -1165,3 +1165,42 @@ static int __init cm_bf548_init(void) | |||
1165 | } | 1165 | } |
1166 | 1166 | ||
1167 | arch_initcall(cm_bf548_init); | 1167 | arch_initcall(cm_bf548_init); |
1168 | |||
1169 | static struct platform_device *cm_bf548_early_devices[] __initdata = { | ||
1170 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
1171 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
1172 | &bfin_uart0_device, | ||
1173 | #endif | ||
1174 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
1175 | &bfin_uart1_device, | ||
1176 | #endif | ||
1177 | #ifdef CONFIG_SERIAL_BFIN_UART2 | ||
1178 | &bfin_uart2_device, | ||
1179 | #endif | ||
1180 | #ifdef CONFIG_SERIAL_BFIN_UART3 | ||
1181 | &bfin_uart3_device, | ||
1182 | #endif | ||
1183 | #endif | ||
1184 | |||
1185 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
1186 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1187 | &bfin_sport0_uart_device, | ||
1188 | #endif | ||
1189 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
1190 | &bfin_sport1_uart_device, | ||
1191 | #endif | ||
1192 | #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART | ||
1193 | &bfin_sport2_uart_device, | ||
1194 | #endif | ||
1195 | #ifdef CONFIG_SERIAL_BFIN_SPORT3_UART | ||
1196 | &bfin_sport3_uart_device, | ||
1197 | #endif | ||
1198 | #endif | ||
1199 | }; | ||
1200 | |||
1201 | void __init native_machine_early_platform_add_devices(void) | ||
1202 | { | ||
1203 | printk(KERN_INFO "register early platform devices\n"); | ||
1204 | early_platform_add_devices(cm_bf548_early_devices, | ||
1205 | ARRAY_SIZE(cm_bf548_early_devices)); | ||
1206 | } | ||
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 97033fea102..b5d8ea18773 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -1390,3 +1390,42 @@ static int __init ezkit_init(void) | |||
1390 | } | 1390 | } |
1391 | 1391 | ||
1392 | arch_initcall(ezkit_init); | 1392 | arch_initcall(ezkit_init); |
1393 | |||
1394 | static struct platform_device *ezkit_early_devices[] __initdata = { | ||
1395 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
1396 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
1397 | &bfin_uart0_device, | ||
1398 | #endif | ||
1399 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
1400 | &bfin_uart1_device, | ||
1401 | #endif | ||
1402 | #ifdef CONFIG_SERIAL_BFIN_UART2 | ||
1403 | &bfin_uart2_device, | ||
1404 | #endif | ||
1405 | #ifdef CONFIG_SERIAL_BFIN_UART3 | ||
1406 | &bfin_uart3_device, | ||
1407 | #endif | ||
1408 | #endif | ||
1409 | |||
1410 | #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE) | ||
1411 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1412 | &bfin_sport0_uart_device, | ||
1413 | #endif | ||
1414 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
1415 | &bfin_sport1_uart_device, | ||
1416 | #endif | ||
1417 | #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART | ||
1418 | &bfin_sport2_uart_device, | ||
1419 | #endif | ||
1420 | #ifdef CONFIG_SERIAL_BFIN_SPORT3_UART | ||
1421 | &bfin_sport3_uart_device, | ||
1422 | #endif | ||
1423 | #endif | ||
1424 | }; | ||
1425 | |||
1426 | void __init native_machine_early_platform_add_devices(void) | ||
1427 | { | ||
1428 | printk(KERN_INFO "register early platform devices\n"); | ||
1429 | early_platform_add_devices(ezkit_early_devices, | ||
1430 | ARRAY_SIZE(ezkit_early_devices)); | ||
1431 | } | ||
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c index 818266f6348..37dd37523ad 100644 --- a/arch/blackfin/mach-bf561/boards/cm_bf561.c +++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c | |||
@@ -547,3 +547,18 @@ static int __init cm_bf561_init(void) | |||
547 | } | 547 | } |
548 | 548 | ||
549 | arch_initcall(cm_bf561_init); | 549 | arch_initcall(cm_bf561_init); |
550 | |||
551 | static struct platform_device *cm_bf561_early_devices[] __initdata = { | ||
552 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
553 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
554 | &bfin_uart0_device, | ||
555 | #endif | ||
556 | #endif | ||
557 | }; | ||
558 | |||
559 | void __init native_machine_early_platform_add_devices(void) | ||
560 | { | ||
561 | printk(KERN_INFO "register early platform devices\n"); | ||
562 | early_platform_add_devices(cm_bf561_early_devices, | ||
563 | ARRAY_SIZE(cm_bf561_early_devices)); | ||
564 | } | ||
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index c59041c513e..c7a5db79f83 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -489,3 +489,18 @@ static int __init ezkit_init(void) | |||
489 | } | 489 | } |
490 | 490 | ||
491 | arch_initcall(ezkit_init); | 491 | arch_initcall(ezkit_init); |
492 | |||
493 | static struct platform_device *ezkit_early_devices[] __initdata = { | ||
494 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
495 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
496 | &bfin_uart0_device, | ||
497 | #endif | ||
498 | #endif | ||
499 | }; | ||
500 | |||
501 | void __init native_machine_early_platform_add_devices(void) | ||
502 | { | ||
503 | printk(KERN_INFO "register early platform devices\n"); | ||
504 | early_platform_add_devices(ezkit_early_devices, | ||
505 | ARRAY_SIZE(ezkit_early_devices)); | ||
506 | } | ||
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c index 6c33397355b..d3017e53686 100644 --- a/arch/blackfin/mach-bf561/boards/tepla.c +++ b/arch/blackfin/mach-bf561/boards/tepla.c | |||
@@ -140,3 +140,18 @@ static int __init tepla_init(void) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | arch_initcall(tepla_init); | 142 | arch_initcall(tepla_init); |
143 | |||
144 | static struct platform_device *tepla_early_devices[] __initdata = { | ||
145 | #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK) | ||
146 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
147 | &bfin_uart0_device, | ||
148 | #endif | ||
149 | #endif | ||
150 | }; | ||
151 | |||
152 | void __init native_machine_early_platform_add_devices(void) | ||
153 | { | ||
154 | printk(KERN_INFO "register early platform devices\n"); | ||
155 | early_platform_add_devices(tepla_early_devices, | ||
156 | ARRAY_SIZE(tepla_early_devices)); | ||
157 | } | ||