0031-MIPS-lantiq-convert-falcon-debug-uart-to-clkdev-api.patch 2.0 KB

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