summaryrefslogtreecommitdiffstats
path: root/arch/mips/lantiq/xway/clk.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke.mehrtens@lantiq.com>2015-10-28 23:37:33 +0100
committerRalf Baechle <ralf@linux-mips.org>2015-11-11 08:37:06 +0100
commit18a3af60fcb6c0f2948e4e2922d3fcaeb1d74c64 (patch)
treed7196f1804217256c663070a3c9f656b8d3de408 /arch/mips/lantiq/xway/clk.c
parentb5a03d0cb32c35f7ca9a042f01c1de14daaeeb11 (diff)
downloadlinux-18a3af60fcb6c0f2948e4e2922d3fcaeb1d74c64.tar.bz2
MIPS: Lantiq: Fix pp32 clock on vr9
The vendor code uses different clock values for this clock. Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> Acked-by: John Crispin <blogic@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11384/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lantiq/xway/clk.c')
-rw-r--r--arch/mips/lantiq/xway/clk.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/mips/lantiq/xway/clk.c b/arch/mips/lantiq/xway/clk.c
index 55fd1508fb11..d372a600a9ad 100644
--- a/arch/mips/lantiq/xway/clk.c
+++ b/arch/mips/lantiq/xway/clk.c
@@ -175,15 +175,18 @@ unsigned long ltq_vr9_fpi_hz(void)
unsigned long ltq_vr9_pp32_hz(void)
{
- unsigned int clksys = (ltq_cgu_r32(CGU_SYS) >> 16) & 3;
+ unsigned int clksys = (ltq_cgu_r32(CGU_SYS) >> 16) & 0x7;
unsigned long clk;
switch (clksys) {
+ case 0:
+ clk = CLOCK_500M;
+ break;
case 1:
- clk = CLOCK_450M;
+ clk = CLOCK_432M;
break;
case 2:
- clk = CLOCK_300M;
+ clk = CLOCK_288M;
break;
default:
clk = CLOCK_500M;