diff options
Diffstat (limited to 'drivers/tty/serial/s3c2410.c')
-rw-r--r-- | drivers/tty/serial/s3c2410.c | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/drivers/tty/serial/s3c2410.c b/drivers/tty/serial/s3c2410.c index b1d7e7c1849d..e668a9d2bbc9 100644 --- a/drivers/tty/serial/s3c2410.c +++ b/drivers/tty/serial/s3c2410.c | |||
@@ -25,31 +25,6 @@ | |||
25 | 25 | ||
26 | #include "samsung.h" | 26 | #include "samsung.h" |
27 | 27 | ||
28 | static int s3c2410_serial_setsource(struct uart_port *port, | ||
29 | struct s3c24xx_uart_clksrc *clk) | ||
30 | { | ||
31 | unsigned long ucon = rd_regl(port, S3C2410_UCON); | ||
32 | |||
33 | if (strcmp(clk->name, "uclk") == 0) | ||
34 | ucon |= S3C2410_UCON_UCLK; | ||
35 | else | ||
36 | ucon &= ~S3C2410_UCON_UCLK; | ||
37 | |||
38 | wr_regl(port, S3C2410_UCON, ucon); | ||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | static int s3c2410_serial_getsource(struct uart_port *port, | ||
43 | struct s3c24xx_uart_clksrc *clk) | ||
44 | { | ||
45 | unsigned long ucon = rd_regl(port, S3C2410_UCON); | ||
46 | |||
47 | clk->divisor = 1; | ||
48 | clk->name = (ucon & S3C2410_UCON_UCLK) ? "uclk" : "pclk"; | ||
49 | |||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | static int s3c2410_serial_resetport(struct uart_port *port, | 28 | static int s3c2410_serial_resetport(struct uart_port *port, |
54 | struct s3c2410_uartcfg *cfg) | 29 | struct s3c2410_uartcfg *cfg) |
55 | { | 30 | { |
@@ -77,8 +52,10 @@ static struct s3c24xx_uart_info s3c2410_uart_inf = { | |||
77 | .tx_fifofull = S3C2410_UFSTAT_TXFULL, | 52 | .tx_fifofull = S3C2410_UFSTAT_TXFULL, |
78 | .tx_fifomask = S3C2410_UFSTAT_TXMASK, | 53 | .tx_fifomask = S3C2410_UFSTAT_TXMASK, |
79 | .tx_fifoshift = S3C2410_UFSTAT_TXSHIFT, | 54 | .tx_fifoshift = S3C2410_UFSTAT_TXSHIFT, |
80 | .get_clksrc = s3c2410_serial_getsource, | 55 | .def_clk_sel = S3C2410_UCON_CLKSEL0, |
81 | .set_clksrc = s3c2410_serial_setsource, | 56 | .num_clks = 2, |
57 | .clksel_mask = S3C2410_UCON_CLKMASK, | ||
58 | .clksel_shift = S3C2410_UCON_CLKSHIFT, | ||
82 | .reset_port = s3c2410_serial_resetport, | 59 | .reset_port = s3c2410_serial_resetport, |
83 | }; | 60 | }; |
84 | 61 | ||