summaryrefslogtreecommitdiffstats
path: root/arch/mips/ralink
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2016-12-20 13:12:41 -0500
committerRalf Baechle <ralf@linux-mips.org>2017-01-03 10:34:47 -0500
commit2517caf19dbfac3b39f2db5500c5fd03c4370e81 (patch)
treeab3c132c1c7fae3dc4f6e686acf891058896a27d /arch/mips/ralink
parent4f79ddec04229c966326d90cc3cfd414401dea22 (diff)
MIPS: ralink: Add missing I2C and I2S clocks.
This patch adds two additional clocks required by the audio interface of the SoCs. Signed-off-by: John Crispin <john@phrozen.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/14897/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ralink')
-rw-r--r--arch/mips/ralink/mt7620.c5
-rw-r--r--arch/mips/ralink/rt288x.c1
-rw-r--r--arch/mips/ralink/rt305x.c2
-rw-r--r--arch/mips/ralink/rt3883.c2
4 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c
index 3c7c9bf57bf3..6f0fdfd1e32a 100644
--- a/arch/mips/ralink/mt7620.c
+++ b/arch/mips/ralink/mt7620.c
@@ -509,6 +509,7 @@ void __init ralink_clk_init(void)
509 unsigned long sys_rate; 509 unsigned long sys_rate;
510 unsigned long dram_rate; 510 unsigned long dram_rate;
511 unsigned long periph_rate; 511 unsigned long periph_rate;
512 unsigned long pcmi2s_rate;
512 513
513 xtal_rate = mt7620_get_xtal_rate(); 514 xtal_rate = mt7620_get_xtal_rate();
514 515
@@ -523,6 +524,7 @@ void __init ralink_clk_init(void)
523 cpu_rate = MHZ(575); 524 cpu_rate = MHZ(575);
524 dram_rate = sys_rate = cpu_rate / 3; 525 dram_rate = sys_rate = cpu_rate / 3;
525 periph_rate = MHZ(40); 526 periph_rate = MHZ(40);
527 pcmi2s_rate = MHZ(480);
526 528
527 ralink_clk_add("10000d00.uartlite", periph_rate); 529 ralink_clk_add("10000d00.uartlite", periph_rate);
528 ralink_clk_add("10000e00.uartlite", periph_rate); 530 ralink_clk_add("10000e00.uartlite", periph_rate);
@@ -534,6 +536,7 @@ void __init ralink_clk_init(void)
534 dram_rate = mt7620_get_dram_rate(pll_rate); 536 dram_rate = mt7620_get_dram_rate(pll_rate);
535 sys_rate = mt7620_get_sys_rate(cpu_rate); 537 sys_rate = mt7620_get_sys_rate(cpu_rate);
536 periph_rate = mt7620_get_periph_rate(xtal_rate); 538 periph_rate = mt7620_get_periph_rate(xtal_rate);
539 pcmi2s_rate = periph_rate;
537 540
538 pr_debug(RFMT("XTAL") RFMT("CPU_PLL") RFMT("PLL"), 541 pr_debug(RFMT("XTAL") RFMT("CPU_PLL") RFMT("PLL"),
539 RINT(xtal_rate), RFRAC(xtal_rate), 542 RINT(xtal_rate), RFRAC(xtal_rate),
@@ -555,6 +558,8 @@ void __init ralink_clk_init(void)
555 ralink_clk_add("cpu", cpu_rate); 558 ralink_clk_add("cpu", cpu_rate);
556 ralink_clk_add("10000100.timer", periph_rate); 559 ralink_clk_add("10000100.timer", periph_rate);
557 ralink_clk_add("10000120.watchdog", periph_rate); 560 ralink_clk_add("10000120.watchdog", periph_rate);
561 ralink_clk_add("10000900.i2c", periph_rate);
562 ralink_clk_add("10000a00.i2s", pcmi2s_rate);
558 ralink_clk_add("10000b00.spi", sys_rate); 563 ralink_clk_add("10000b00.spi", sys_rate);
559 ralink_clk_add("10000b40.spi", sys_rate); 564 ralink_clk_add("10000b40.spi", sys_rate);
560 ralink_clk_add("10000c00.uartlite", periph_rate); 565 ralink_clk_add("10000c00.uartlite", periph_rate);
diff --git a/arch/mips/ralink/rt288x.c b/arch/mips/ralink/rt288x.c
index 285796e6d75c..eeabd5119891 100644
--- a/arch/mips/ralink/rt288x.c
+++ b/arch/mips/ralink/rt288x.c
@@ -75,6 +75,7 @@ void __init ralink_clk_init(void)
75 ralink_clk_add("300100.timer", cpu_rate / 2); 75 ralink_clk_add("300100.timer", cpu_rate / 2);
76 ralink_clk_add("300120.watchdog", cpu_rate / 2); 76 ralink_clk_add("300120.watchdog", cpu_rate / 2);
77 ralink_clk_add("300500.uart", cpu_rate / 2); 77 ralink_clk_add("300500.uart", cpu_rate / 2);
78 ralink_clk_add("300900.i2c", cpu_rate / 2);
78 ralink_clk_add("300c00.uartlite", cpu_rate / 2); 79 ralink_clk_add("300c00.uartlite", cpu_rate / 2);
79 ralink_clk_add("400000.ethernet", cpu_rate / 2); 80 ralink_clk_add("400000.ethernet", cpu_rate / 2);
80 ralink_clk_add("480000.wmac", wmac_rate); 81 ralink_clk_add("480000.wmac", wmac_rate);
diff --git a/arch/mips/ralink/rt305x.c b/arch/mips/ralink/rt305x.c
index c8a28c4bf29e..f0b5ac444556 100644
--- a/arch/mips/ralink/rt305x.c
+++ b/arch/mips/ralink/rt305x.c
@@ -200,6 +200,8 @@ void __init ralink_clk_init(void)
200 200
201 ralink_clk_add("cpu", cpu_rate); 201 ralink_clk_add("cpu", cpu_rate);
202 ralink_clk_add("sys", sys_rate); 202 ralink_clk_add("sys", sys_rate);
203 ralink_clk_add("10000900.i2c", uart_rate);
204 ralink_clk_add("10000a00.i2s", uart_rate);
203 ralink_clk_add("10000b00.spi", sys_rate); 205 ralink_clk_add("10000b00.spi", sys_rate);
204 ralink_clk_add("10000b40.spi", sys_rate); 206 ralink_clk_add("10000b40.spi", sys_rate);
205 ralink_clk_add("10000100.timer", wdt_rate); 207 ralink_clk_add("10000100.timer", wdt_rate);
diff --git a/arch/mips/ralink/rt3883.c b/arch/mips/ralink/rt3883.c
index 4cef9162bd9b..141c597ec324 100644
--- a/arch/mips/ralink/rt3883.c
+++ b/arch/mips/ralink/rt3883.c
@@ -108,6 +108,8 @@ void __init ralink_clk_init(void)
108 ralink_clk_add("10000100.timer", sys_rate); 108 ralink_clk_add("10000100.timer", sys_rate);
109 ralink_clk_add("10000120.watchdog", sys_rate); 109 ralink_clk_add("10000120.watchdog", sys_rate);
110 ralink_clk_add("10000500.uart", 40000000); 110 ralink_clk_add("10000500.uart", 40000000);
111 ralink_clk_add("10000900.i2c", 40000000);
112 ralink_clk_add("10000a00.i2s", 40000000);
111 ralink_clk_add("10000b00.spi", sys_rate); 113 ralink_clk_add("10000b00.spi", sys_rate);
112 ralink_clk_add("10000b40.spi", sys_rate); 114 ralink_clk_add("10000b40.spi", sys_rate);
113 ralink_clk_add("10000c00.uartlite", 40000000); 115 ralink_clk_add("10000c00.uartlite", 40000000);