Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54367
b: refs/heads/master
c: 1534a3b
h: refs/heads/master
i:
  54365: b17157d
  54363: aef50b9
  54359: e0d57b6
  54351: 3067974
  54335: 602210d
v: v3
  • Loading branch information
dmitry pervushin authored and Paul Mundt committed May 7, 2007
1 parent c0c7db5 commit e81ee8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1929cb340b74904c130fdf3de3fe5bbedb68a5aa
refs/heads/master: 1534a3b3dc1cbab006f0add253be1b095d738b82
12 changes: 9 additions & 3 deletions trunk/drivers/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ struct sci_port {
/* Break timer */
struct timer_list break_timer;
int break_flag;

/* Port clock */
struct clk *clk;
};

#ifdef CONFIG_SH_KGDB
Expand Down Expand Up @@ -955,6 +958,8 @@ static int sci_startup(struct uart_port *port)
if (s->enable)
s->enable(port);

s->clk = clk_get(NULL, "module_clk");

sci_request_irq(s);
sci_start_tx(port);
sci_start_rx(port, 1);
Expand All @@ -972,6 +977,9 @@ static void sci_shutdown(struct uart_port *port)

if (s->disable)
s->disable(port);

clk_put(s->clk);
s->clk = NULL;
}

static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
Expand All @@ -990,9 +998,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
default:
{
#if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64)
struct clk *clk = clk_get(NULL, "module_clk");
t = SCBRR_VALUE(baud, clk_get_rate(clk));
clk_put(clk);
t = SCBRR_VALUE(baud, clk_get_rate(s->clk));
#else
t = SCBRR_VALUE(baud);
#endif
Expand Down

0 comments on commit e81ee8b

Please sign in to comment.