Skip to content

Commit

Permalink
MIPS: lantiq: the detection of the gpe clock is broken
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Crispin authored and Ralf Baechle committed Nov 24, 2014
1 parent 1732786 commit eb5dbd2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions arch/mips/lantiq/falcon/sysctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,11 @@ static void falcon_gpe_enable(void)
if (status & (1 << (GPPC_OFFSET + 1)))
return;

if (status_r32(STATUS_CONFIG) == 0)
freq = (status_r32(STATUS_CONFIG) &
GPEFREQ_MASK) >>
GPEFREQ_OFFSET;
if (freq == 0)
freq = 1; /* use 625MHz on unfused chip */
else
freq = (status_r32(STATUS_CONFIG) &
GPEFREQ_MASK) >>
GPEFREQ_OFFSET;

/* apply new frequency */
sysctl_w32_mask(SYSCTL_SYS1, 7 << (GPPC_OFFSET + 1),
Expand Down

0 comments on commit eb5dbd2

Please sign in to comment.