diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-03 05:09:42 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-03 05:09:42 -0400 |
| commit | aa4f608478acb7ed69dfcff4f3c404100b78ac49 (patch) | |
| tree | fa647976f80598156ec1c193f3dd90c3529516ae | |
| parent | 286e050bc07a5ffcd7497e686c09b986d5ae6c6d (diff) | |
| parent | df66834a43c461de2565c45d815288ba1c0def37 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k fix from Geert Uytterhoeven:
"A boot lock-up on Mac, also destined for stable"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k/mac: Fix unexpected interrupt with CONFIG_EARLY_PRINTK
| -rw-r--r-- | arch/m68k/kernel/head.S | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index d197e7ff62c5..ac85f16534af 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S | |||
| @@ -2752,11 +2752,9 @@ func_return get_new_page | |||
| 2752 | #ifdef CONFIG_MAC | 2752 | #ifdef CONFIG_MAC |
| 2753 | 2753 | ||
| 2754 | L(scc_initable_mac): | 2754 | L(scc_initable_mac): |
| 2755 | .byte 9,12 /* Reset */ | ||
| 2756 | .byte 4,0x44 /* x16, 1 stopbit, no parity */ | 2755 | .byte 4,0x44 /* x16, 1 stopbit, no parity */ |
| 2757 | .byte 3,0xc0 /* receiver: 8 bpc */ | 2756 | .byte 3,0xc0 /* receiver: 8 bpc */ |
| 2758 | .byte 5,0xe2 /* transmitter: 8 bpc, assert dtr/rts */ | 2757 | .byte 5,0xe2 /* transmitter: 8 bpc, assert dtr/rts */ |
| 2759 | .byte 9,0 /* no interrupts */ | ||
| 2760 | .byte 10,0 /* NRZ */ | 2758 | .byte 10,0 /* NRZ */ |
| 2761 | .byte 11,0x50 /* use baud rate generator */ | 2759 | .byte 11,0x50 /* use baud rate generator */ |
| 2762 | .byte 12,1,13,0 /* 38400 baud */ | 2760 | .byte 12,1,13,0 /* 38400 baud */ |
| @@ -2899,6 +2897,7 @@ func_start serial_init,%d0/%d1/%a0/%a1 | |||
| 2899 | is_not_mac(L(serial_init_not_mac)) | 2897 | is_not_mac(L(serial_init_not_mac)) |
| 2900 | 2898 | ||
| 2901 | #ifdef SERIAL_DEBUG | 2899 | #ifdef SERIAL_DEBUG |
| 2900 | |||
| 2902 | /* You may define either or both of these. */ | 2901 | /* You may define either or both of these. */ |
| 2903 | #define MAC_USE_SCC_A /* Modem port */ | 2902 | #define MAC_USE_SCC_A /* Modem port */ |
| 2904 | #define MAC_USE_SCC_B /* Printer port */ | 2903 | #define MAC_USE_SCC_B /* Printer port */ |
| @@ -2908,9 +2907,21 @@ func_start serial_init,%d0/%d1/%a0/%a1 | |||
| 2908 | #define mac_scc_cha_b_data_offset 0x4 | 2907 | #define mac_scc_cha_b_data_offset 0x4 |
| 2909 | #define mac_scc_cha_a_data_offset 0x6 | 2908 | #define mac_scc_cha_a_data_offset 0x6 |
| 2910 | 2909 | ||
| 2910 | #if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B) | ||
| 2911 | movel %pc@(L(mac_sccbase)),%a0 | ||
| 2912 | /* Reset SCC device */ | ||
| 2913 | moveb #9,%a0@(mac_scc_cha_a_ctrl_offset) | ||
| 2914 | moveb #0xc0,%a0@(mac_scc_cha_a_ctrl_offset) | ||
| 2915 | /* Wait for 5 PCLK cycles, which is about 68 CPU cycles */ | ||
| 2916 | /* 5 / 3.6864 MHz = approx. 1.36 us = 68 / 50 MHz */ | ||
| 2917 | movel #35,%d0 | ||
| 2918 | 5: | ||
| 2919 | subq #1,%d0 | ||
| 2920 | jne 5b | ||
| 2921 | #endif | ||
| 2922 | |||
| 2911 | #ifdef MAC_USE_SCC_A | 2923 | #ifdef MAC_USE_SCC_A |
| 2912 | /* Initialize channel A */ | 2924 | /* Initialize channel A */ |
| 2913 | movel %pc@(L(mac_sccbase)),%a0 | ||
| 2914 | lea %pc@(L(scc_initable_mac)),%a1 | 2925 | lea %pc@(L(scc_initable_mac)),%a1 |
| 2915 | 5: moveb %a1@+,%d0 | 2926 | 5: moveb %a1@+,%d0 |
| 2916 | jmi 6f | 2927 | jmi 6f |
| @@ -2922,9 +2933,6 @@ func_start serial_init,%d0/%d1/%a0/%a1 | |||
| 2922 | 2933 | ||
| 2923 | #ifdef MAC_USE_SCC_B | 2934 | #ifdef MAC_USE_SCC_B |
| 2924 | /* Initialize channel B */ | 2935 | /* Initialize channel B */ |
| 2925 | #ifndef MAC_USE_SCC_A /* Load mac_sccbase only if needed */ | ||
| 2926 | movel %pc@(L(mac_sccbase)),%a0 | ||
| 2927 | #endif /* MAC_USE_SCC_A */ | ||
| 2928 | lea %pc@(L(scc_initable_mac)),%a1 | 2936 | lea %pc@(L(scc_initable_mac)),%a1 |
| 2929 | 7: moveb %a1@+,%d0 | 2937 | 7: moveb %a1@+,%d0 |
| 2930 | jmi 8f | 2938 | jmi 8f |
| @@ -2933,6 +2941,7 @@ func_start serial_init,%d0/%d1/%a0/%a1 | |||
| 2933 | jra 7b | 2941 | jra 7b |
| 2934 | 8: | 2942 | 8: |
| 2935 | #endif /* MAC_USE_SCC_B */ | 2943 | #endif /* MAC_USE_SCC_B */ |
| 2944 | |||
| 2936 | #endif /* SERIAL_DEBUG */ | 2945 | #endif /* SERIAL_DEBUG */ |
| 2937 | 2946 | ||
| 2938 | jra L(serial_init_done) | 2947 | jra L(serial_init_done) |
| @@ -3006,17 +3015,17 @@ func_start serial_putc,%d0/%d1/%a0/%a1 | |||
| 3006 | 3015 | ||
| 3007 | #ifdef SERIAL_DEBUG | 3016 | #ifdef SERIAL_DEBUG |
| 3008 | 3017 | ||
| 3009 | #ifdef MAC_USE_SCC_A | 3018 | #if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B) |
| 3010 | movel %pc@(L(mac_sccbase)),%a1 | 3019 | movel %pc@(L(mac_sccbase)),%a1 |
| 3020 | #endif | ||
| 3021 | |||
| 3022 | #ifdef MAC_USE_SCC_A | ||
| 3011 | 3: btst #2,%a1@(mac_scc_cha_a_ctrl_offset) | 3023 | 3: btst #2,%a1@(mac_scc_cha_a_ctrl_offset) |
| 3012 | jeq 3b | 3024 | jeq 3b |
| 3013 | moveb %d0,%a1@(mac_scc_cha_a_data_offset) | 3025 | moveb %d0,%a1@(mac_scc_cha_a_data_offset) |
| 3014 | #endif /* MAC_USE_SCC_A */ | 3026 | #endif /* MAC_USE_SCC_A */ |
| 3015 | 3027 | ||
| 3016 | #ifdef MAC_USE_SCC_B | 3028 | #ifdef MAC_USE_SCC_B |
| 3017 | #ifndef MAC_USE_SCC_A /* Load mac_sccbase only if needed */ | ||
| 3018 | movel %pc@(L(mac_sccbase)),%a1 | ||
| 3019 | #endif /* MAC_USE_SCC_A */ | ||
| 3020 | 4: btst #2,%a1@(mac_scc_cha_b_ctrl_offset) | 3029 | 4: btst #2,%a1@(mac_scc_cha_b_ctrl_offset) |
| 3021 | jeq 4b | 3030 | jeq 4b |
| 3022 | moveb %d0,%a1@(mac_scc_cha_b_data_offset) | 3031 | moveb %d0,%a1@(mac_scc_cha_b_data_offset) |
