patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / drivers / serial / sh-sci.c
index 14d5c8a..f5f3e08 100644 (file)
@@ -758,7 +758,8 @@ static int sci_notifier(struct notifier_block *self, unsigned long phase, void *
        struct cpufreq_freqs *freqs = p;
        int i;
 
-       if (phase == CPUFREQ_POSTCHANGE) {
+       if ((phase == CPUFREQ_POSTCHANGE) ||
+           (phase == CPUFREQ_RESUMECHANGE)){
                for (i = 0; i < SCI_NPORTS; i++) {
                        struct uart_port *port = &sci_ports[i];
 
@@ -904,14 +905,14 @@ static int sci_startup(struct uart_port *port)
 {
        struct sci_port *s = &sci_ports[port->line];
 
-       sci_request_irq(s);
-       sci_start_tx(port, 1);
-       sci_start_rx(port, 1);
-
 #if defined(__H8300S__)
        h8300_sci_enable(port, sci_enable);
 #endif
 
+       sci_request_irq(s);
+       sci_start_tx(port, 1);
+       sci_start_rx(port, 1);
+
        return 0;
 }
 
@@ -1328,6 +1329,7 @@ static int __init serial_console_setup(struct console *co, char *options)
        int bits = 8;
        int parity = 'n';
        int flow = 'n';
+       int ret;
 
        if (co->index >= SCI_NPORTS)
                co->index = 0;
@@ -1344,11 +1346,20 @@ static int __init serial_console_setup(struct console *co, char *options)
        port->uartclk = current_cpu_data.module_clock * 16;
 #else
        port->uartclk = CONFIG_CPU_CLOCK;
+#endif
+#if defined(__H8300S__)
+       h8300_sci_enable(port, sci_enable);
 #endif
        if (options)
                uart_parse_options(options, &baud, &parity, &bits, &flow);
 
-       return uart_set_options(port, co, baud, parity, bits, flow);
+       ret = uart_set_options(port, co, baud, parity, bits, flow);
+#if defined(__H8300H__) || defined(__H8300S__)
+       /* disable rx interrupt */
+       if (ret == 0)
+               sci_stop_rx(port);
+#endif
+       return ret;
 }
 
 static struct console serial_console = {