diff options
Diffstat (limited to 'drivers/serial/sh-sci.c')
-rw-r--r-- | drivers/serial/sh-sci.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index e5cf57f482cf..1f89496d530e 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -78,8 +78,10 @@ struct sci_port { | |||
78 | struct timer_list break_timer; | 78 | struct timer_list break_timer; |
79 | int break_flag; | 79 | int break_flag; |
80 | 80 | ||
81 | #if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) | ||
81 | /* Port clock */ | 82 | /* Port clock */ |
82 | struct clk *clk; | 83 | struct clk *clk; |
84 | #endif | ||
83 | }; | 85 | }; |
84 | 86 | ||
85 | #ifdef CONFIG_SH_KGDB | 87 | #ifdef CONFIG_SH_KGDB |
@@ -958,7 +960,9 @@ static int sci_startup(struct uart_port *port) | |||
958 | if (s->enable) | 960 | if (s->enable) |
959 | s->enable(port); | 961 | s->enable(port); |
960 | 962 | ||
963 | #if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) | ||
961 | s->clk = clk_get(NULL, "module_clk"); | 964 | s->clk = clk_get(NULL, "module_clk"); |
965 | #endif | ||
962 | 966 | ||
963 | sci_request_irq(s); | 967 | sci_request_irq(s); |
964 | sci_start_tx(port); | 968 | sci_start_tx(port); |
@@ -978,8 +982,10 @@ static void sci_shutdown(struct uart_port *port) | |||
978 | if (s->disable) | 982 | if (s->disable) |
979 | s->disable(port); | 983 | s->disable(port); |
980 | 984 | ||
985 | #if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) | ||
981 | clk_put(s->clk); | 986 | clk_put(s->clk); |
982 | s->clk = NULL; | 987 | s->clk = NULL; |
988 | #endif | ||
983 | } | 989 | } |
984 | 990 | ||
985 | static void sci_set_termios(struct uart_port *port, struct ktermios *termios, | 991 | static void sci_set_termios(struct uart_port *port, struct ktermios *termios, |
@@ -1231,6 +1237,11 @@ static int __init serial_console_setup(struct console *co, char *options) | |||
1231 | 1237 | ||
1232 | port->type = serial_console_port->type; | 1238 | port->type = serial_console_port->type; |
1233 | 1239 | ||
1240 | #if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) | ||
1241 | if (!serial_console_port->clk) | ||
1242 | serial_console_port->clk = clk_get(NULL, "module_clk"); | ||
1243 | #endif | ||
1244 | |||
1234 | if (port->flags & UPF_IOREMAP) | 1245 | if (port->flags & UPF_IOREMAP) |
1235 | sci_config_port(port, 0); | 1246 | sci_config_port(port, 0); |
1236 | 1247 | ||