001-4.15-02-MIPS-BCM63XX-provide-periph-clock-as-refclk-for-uart.patch 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. From d0322bf7bebe87012b4f95c85be6b5ba0cb6f344 Mon Sep 17 00:00:00 2001
  2. From: Jonas Gorski <[email protected]>
  3. Date: Sun, 16 Jul 2017 12:31:44 +0200
  4. Subject: [PATCH V2 2/8] MIPS: BCM63XX: provide periph clock as refclk for uart
  5. Add a lookup as "refclk" to describe its function for the uarts.
  6. Reviewed-by: Florian Fainelli <[email protected]>
  7. Signed-off-by: Jonas Gorski <[email protected]>
  8. ---
  9. arch/mips/bcm63xx/clk.c | 13 +++++++++++++
  10. 1 file changed, 13 insertions(+)
  11. --- a/arch/mips/bcm63xx/clk.c
  12. +++ b/arch/mips/bcm63xx/clk.c
  13. @@ -359,6 +359,8 @@ EXPORT_SYMBOL_GPL(clk_round_rate);
  14. static struct clk_lookup bcm3368_clks[] = {
  15. /* fixed rate clocks */
  16. CLKDEV_INIT(NULL, "periph", &clk_periph),
  17. + CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
  18. + CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
  19. /* gated clocks */
  20. CLKDEV_INIT(NULL, "enet0", &clk_enet0),
  21. CLKDEV_INIT(NULL, "enet1", &clk_enet1),
  22. @@ -372,6 +374,8 @@ static struct clk_lookup bcm3368_clks[]
  23. static struct clk_lookup bcm6328_clks[] = {
  24. /* fixed rate clocks */
  25. CLKDEV_INIT(NULL, "periph", &clk_periph),
  26. + CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
  27. + CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
  28. /* gated clocks */
  29. CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
  30. CLKDEV_INIT(NULL, "usbh", &clk_usbh),
  31. @@ -383,6 +387,7 @@ static struct clk_lookup bcm6328_clks[]
  32. static struct clk_lookup bcm6338_clks[] = {
  33. /* fixed rate clocks */
  34. CLKDEV_INIT(NULL, "periph", &clk_periph),
  35. + CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
  36. /* gated clocks */
  37. CLKDEV_INIT(NULL, "enet0", &clk_enet0),
  38. CLKDEV_INIT(NULL, "enet1", &clk_enet1),
  39. @@ -395,6 +400,7 @@ static struct clk_lookup bcm6338_clks[]
  40. static struct clk_lookup bcm6345_clks[] = {
  41. /* fixed rate clocks */
  42. CLKDEV_INIT(NULL, "periph", &clk_periph),
  43. + CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
  44. /* gated clocks */
  45. CLKDEV_INIT(NULL, "enet0", &clk_enet0),
  46. CLKDEV_INIT(NULL, "enet1", &clk_enet1),
  47. @@ -407,6 +413,7 @@ static struct clk_lookup bcm6345_clks[]
  48. static struct clk_lookup bcm6348_clks[] = {
  49. /* fixed rate clocks */
  50. CLKDEV_INIT(NULL, "periph", &clk_periph),
  51. + CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
  52. /* gated clocks */
  53. CLKDEV_INIT(NULL, "enet0", &clk_enet0),
  54. CLKDEV_INIT(NULL, "enet1", &clk_enet1),
  55. @@ -419,6 +426,8 @@ static struct clk_lookup bcm6348_clks[]
  56. static struct clk_lookup bcm6358_clks[] = {
  57. /* fixed rate clocks */
  58. CLKDEV_INIT(NULL, "periph", &clk_periph),
  59. + CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
  60. + CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
  61. /* gated clocks */
  62. CLKDEV_INIT(NULL, "enet0", &clk_enet0),
  63. CLKDEV_INIT(NULL, "enet1", &clk_enet1),
  64. @@ -432,6 +441,8 @@ static struct clk_lookup bcm6358_clks[]
  65. static struct clk_lookup bcm6362_clks[] = {
  66. /* fixed rate clocks */
  67. CLKDEV_INIT(NULL, "periph", &clk_periph),
  68. + CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
  69. + CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
  70. /* gated clocks */
  71. CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
  72. CLKDEV_INIT(NULL, "usbh", &clk_usbh),
  73. @@ -445,6 +456,8 @@ static struct clk_lookup bcm6362_clks[]
  74. static struct clk_lookup bcm6368_clks[] = {
  75. /* fixed rate clocks */
  76. CLKDEV_INIT(NULL, "periph", &clk_periph),
  77. + CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
  78. + CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
  79. /* gated clocks */
  80. CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
  81. CLKDEV_INIT(NULL, "usbh", &clk_usbh),