aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lantiq
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-10-10 17:37:52 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 01:45:18 -0500
commiteb5dbd22b619c01ff15b58b27c8e3409cfc7a20e (patch)
tree93d8f9ad4dc0ebd5311b5a80a56d226eaa21b4d3 /arch/mips/lantiq
parent17327862f3107b3a2a8ddd586f6b488b3ae37a13 (diff)
MIPS: lantiq: the detection of the gpe clock is broken
The code to detect unfused SoCs was broken due to missing register masking. Signed-off-by: Thomas Langer <thomas.langer@lantiq.com> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/8049/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lantiq')
-rw-r--r--arch/mips/lantiq/falcon/sysctrl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/mips/lantiq/falcon/sysctrl.c b/arch/mips/lantiq/falcon/sysctrl.c
index 468ffa043607..7e74760cf2bd 100644
--- a/arch/mips/lantiq/falcon/sysctrl.c
+++ b/arch/mips/lantiq/falcon/sysctrl.c
@@ -147,12 +147,11 @@ static void falcon_gpe_enable(void)
147 if (status & (1 << (GPPC_OFFSET + 1))) 147 if (status & (1 << (GPPC_OFFSET + 1)))
148 return; 148 return;
149 149
150 if (status_r32(STATUS_CONFIG) == 0) 150 freq = (status_r32(STATUS_CONFIG) &
151 GPEFREQ_MASK) >>
152 GPEFREQ_OFFSET;
153 if (freq == 0)
151 freq = 1; /* use 625MHz on unfused chip */ 154 freq = 1; /* use 625MHz on unfused chip */
152 else
153 freq = (status_r32(STATUS_CONFIG) &
154 GPEFREQ_MASK) >>
155 GPEFREQ_OFFSET;
156 155
157 /* apply new frequency */ 156 /* apply new frequency */
158 sysctl_w32_mask(SYSCTL_SYS1, 7 << (GPPC_OFFSET + 1), 157 sysctl_w32_mask(SYSCTL_SYS1, 7 << (GPPC_OFFSET + 1),