adds 3.3 patches and files
[openwrt/openwrt.git] / target / linux / lantiq / patches-3.3 / 0028-MIPS-lantiq-convert-falcon-debug-uart-to-clkdev-api.patch
1 From 7ab075944587e4fe7e2688b1df85452e3d86edb5 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Tue, 21 Feb 2012 14:25:21 +0100
4 Subject: [PATCH 28/70] MIPS: lantiq: convert falcon debug uart to clkdev api
5
6 On Falcon SoCs we have a secondary serial port that can be used to help
7 debug the voice core. For the port to work several clocking bits need to
8 be activated. We convert the code to clkdev api.
9
10 Signed-off-by: John Crispin <blogic@openwrt.org>
11 ---
12 arch/mips/lantiq/falcon/prom.c | 4 +---
13 drivers/tty/serial/lantiq.c | 7 ++++---
14 2 files changed, 5 insertions(+), 6 deletions(-)
15
16 diff --git a/arch/mips/lantiq/falcon/prom.c b/arch/mips/lantiq/falcon/prom.c
17 index f98b389..2a4eea17 100644
18 --- a/arch/mips/lantiq/falcon/prom.c
19 +++ b/arch/mips/lantiq/falcon/prom.c
20 @@ -43,10 +43,8 @@ ltq_soc_setup(void)
21 ltq_register_asc(0);
22 ltq_register_wdt();
23 falcon_register_gpio();
24 - if (register_asc1) {
25 + if (register_asc1)
26 ltq_register_asc(1);
27 - ltq_sysctl_activate(SYSCTL_SYS1, ACTS_ASC1_ACT);
28 - }
29 }
30
31 void __init
32 diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
33 index 1542ad6..82956de 100644
34 --- a/drivers/tty/serial/lantiq.c
35 +++ b/drivers/tty/serial/lantiq.c
36 @@ -117,6 +117,7 @@ static DEFINE_SPINLOCK(ltq_asc_lock);
37
38 struct ltq_uart_port {
39 struct uart_port port;
40 + struct clk *fpiclk;
41 struct clk *clk;
42 unsigned int tx_irq;
43 unsigned int rx_irq;
44 @@ -319,7 +320,7 @@ lqasc_startup(struct uart_port *port)
45 struct ltq_uart_port *ltq_port = to_ltq_uart_port(port);
46 int retval;
47
48 - port->uartclk = clk_get_rate(ltq_port->clk);
49 + port->uartclk = clk_get_rate(ltq_port->fpiclk);
50
51 ltq_w32_mask(ASCCLC_DISS | ASCCLC_RMCMASK, (1 << ASCCLC_RMCOFFSET),
52 port->membase + LTQ_ASC_CLC);
53 @@ -646,7 +647,7 @@ lqasc_console_setup(struct console *co, char *options)
54
55 port = &ltq_port->port;
56
57 - port->uartclk = clk_get_rate(ltq_port->clk);
58 + port->uartclk = clk_get_rate(ltq_port->fpiclk);
59
60 if (options)
61 uart_parse_options(options, &baud, &parity, &bits, &flow);
62 @@ -731,7 +732,7 @@ lqasc_probe(struct platform_device *pdev)
63 port->irq = tx_irq; /* unused, just to be backward-compatibe */
64 port->mapbase = mmres->start;
65
66 - ltq_port->clk = clk;
67 + ltq_port->fpiclk = clk;
68
69 ltq_port->tx_irq = tx_irq;
70 ltq_port->rx_irq = rx_irq;
71 --
72 1.7.9.1
73