diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-09-18 07:33:00 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-10-29 16:24:09 -0400 |
commit | 8eae19ccaeb5f519fc413c9646398a77dfbfa201 (patch) | |
tree | 14628746c7eb3d3dc3dc410f1a741668f929b10d | |
parent | 2224de9d152b6fd9faa0df49cf55ca97eab772fa (diff) |
MIPS: BCM47XX: Fix detected clock on Asus WL520GC and WL520GU
The Asus WL520GC and WL520GU are based on the BCM5354 and clocked at
200MHz, but they do not have a clkfreq nvram variable set to the
correct value. This adds a workaround for these devices.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5843/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/bcm47xx/time.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/mips/bcm47xx/time.c b/arch/mips/bcm47xx/time.c index 5e5d797fa90a..2c85d9254b5e 100644 --- a/arch/mips/bcm47xx/time.c +++ b/arch/mips/bcm47xx/time.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/time.h> | 28 | #include <asm/time.h> |
29 | #include <bcm47xx.h> | 29 | #include <bcm47xx.h> |
30 | #include <bcm47xx_nvram.h> | 30 | #include <bcm47xx_nvram.h> |
31 | #include <bcm47xx_board.h> | ||
31 | 32 | ||
32 | void __init plat_time_init(void) | 33 | void __init plat_time_init(void) |
33 | { | 34 | { |
@@ -35,6 +36,7 @@ void __init plat_time_init(void) | |||
35 | u16 chip_id = 0; | 36 | u16 chip_id = 0; |
36 | char buf[10]; | 37 | char buf[10]; |
37 | int len; | 38 | int len; |
39 | enum bcm47xx_board board = bcm47xx_board_get(); | ||
38 | 40 | ||
39 | /* | 41 | /* |
40 | * Use deterministic values for initial counter interrupt | 42 | * Use deterministic values for initial counter interrupt |
@@ -64,6 +66,15 @@ void __init plat_time_init(void) | |||
64 | hz = 100000000; | 66 | hz = 100000000; |
65 | } | 67 | } |
66 | 68 | ||
69 | switch (board) { | ||
70 | case BCM47XX_BOARD_ASUS_WL520GC: | ||
71 | case BCM47XX_BOARD_ASUS_WL520GU: | ||
72 | hz = 100000000; | ||
73 | break; | ||
74 | default: | ||
75 | break; | ||
76 | } | ||
77 | |||
67 | if (!hz) | 78 | if (!hz) |
68 | hz = 100000000; | 79 | hz = 100000000; |
69 | 80 | ||