diff options
Diffstat (limited to 'arch/mn10300/kernel/gdb-io-ttysm.c')
-rw-r--r-- | arch/mn10300/kernel/gdb-io-ttysm.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/mn10300/kernel/gdb-io-ttysm.c b/arch/mn10300/kernel/gdb-io-ttysm.c index a560bbc3137d..97dfda23342c 100644 --- a/arch/mn10300/kernel/gdb-io-ttysm.c +++ b/arch/mn10300/kernel/gdb-io-ttysm.c | |||
@@ -58,9 +58,12 @@ void __init gdbstub_io_init(void) | |||
58 | gdbstub_io_set_baud(115200); | 58 | gdbstub_io_set_baud(115200); |
59 | 59 | ||
60 | /* we want to get serial receive interrupts */ | 60 | /* we want to get serial receive interrupts */ |
61 | set_intr_level(gdbstub_port->rx_irq, GxICR_LEVEL_0); | 61 | set_intr_level(gdbstub_port->rx_irq, |
62 | set_intr_level(gdbstub_port->tx_irq, GxICR_LEVEL_0); | 62 | NUM2GxICR_LEVEL(CONFIG_GDBSTUB_IRQ_LEVEL)); |
63 | set_intr_stub(EXCEP_IRQ_LEVEL0, gdbstub_io_rx_handler); | 63 | set_intr_level(gdbstub_port->tx_irq, |
64 | NUM2GxICR_LEVEL(CONFIG_GDBSTUB_IRQ_LEVEL)); | ||
65 | set_intr_stub(NUM2EXCEP_IRQ_LEVEL(CONFIG_GDBSTUB_IRQ_LEVEL), | ||
66 | gdbstub_io_rx_handler); | ||
64 | 67 | ||
65 | *gdbstub_port->rx_icr |= GxICR_ENABLE; | 68 | *gdbstub_port->rx_icr |= GxICR_ENABLE; |
66 | tmp = *gdbstub_port->rx_icr; | 69 | tmp = *gdbstub_port->rx_icr; |
@@ -84,12 +87,7 @@ void __init gdbstub_io_init(void) | |||
84 | tmp = *gdbstub_port->_control; | 87 | tmp = *gdbstub_port->_control; |
85 | 88 | ||
86 | /* permit level 0 IRQs only */ | 89 | /* permit level 0 IRQs only */ |
87 | asm volatile( | 90 | local_change_intr_mask_level(NUM2EPSW_IM(CONFIG_GDBSTUB_IRQ_LEVEL + 1)); |
88 | " and %0,epsw \n" | ||
89 | " or %1,epsw \n" | ||
90 | : | ||
91 | : "i"(~EPSW_IM), "i"(EPSW_IE|EPSW_IM_1) | ||
92 | ); | ||
93 | } | 91 | } |
94 | 92 | ||
95 | /* | 93 | /* |
@@ -184,6 +182,9 @@ int gdbstub_io_rx_char(unsigned char *_ch, int nonblock) | |||
184 | { | 182 | { |
185 | unsigned ix; | 183 | unsigned ix; |
186 | u8 ch, st; | 184 | u8 ch, st; |
185 | #if defined(CONFIG_MN10300_WD_TIMER) | ||
186 | int cpu; | ||
187 | #endif | ||
187 | 188 | ||
188 | *_ch = 0xff; | 189 | *_ch = 0xff; |
189 | 190 | ||
@@ -201,8 +202,9 @@ try_again: | |||
201 | if (nonblock) | 202 | if (nonblock) |
202 | return -EAGAIN; | 203 | return -EAGAIN; |
203 | #ifdef CONFIG_MN10300_WD_TIMER | 204 | #ifdef CONFIG_MN10300_WD_TIMER |
204 | watchdog_alert_counter = 0; | 205 | for (cpu = 0; cpu < NR_CPUS; cpu++) |
205 | #endif /* CONFIG_MN10300_WD_TIMER */ | 206 | watchdog_alert_counter[cpu] = 0; |
207 | #endif | ||
206 | goto try_again; | 208 | goto try_again; |
207 | } | 209 | } |
208 | 210 | ||