diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:15 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:15 -0400 |
commit | 10cc3529072d5415fb040018a8a99aa7a60190b6 (patch) | |
tree | fe07fb5112c9c34c2aecfac982155307bc168f07 /arch/mips/vr41xx/common/bcu.c | |
parent | aeffdbbaff133b0c3989e20af5baa091d3d0b409 (diff) |
[MIPS] Allow hardwiring of the CPU type to a single type for optimization.
This saves a few k on systems which only ever ship with a single CPU type.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/vr41xx/common/bcu.c')
-rw-r--r-- | arch/mips/vr41xx/common/bcu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/mips/vr41xx/common/bcu.c b/arch/mips/vr41xx/common/bcu.c index ff272b2e8395..d77c330a0d59 100644 --- a/arch/mips/vr41xx/common/bcu.c +++ b/arch/mips/vr41xx/common/bcu.c | |||
@@ -70,7 +70,7 @@ EXPORT_SYMBOL_GPL(vr41xx_get_tclock_frequency); | |||
70 | 70 | ||
71 | static inline uint16_t read_clkspeed(void) | 71 | static inline uint16_t read_clkspeed(void) |
72 | { | 72 | { |
73 | switch (current_cpu_data.cputype) { | 73 | switch (current_cpu_type()) { |
74 | case CPU_VR4111: | 74 | case CPU_VR4111: |
75 | case CPU_VR4121: return readw(CLKSPEEDREG_TYPE1); | 75 | case CPU_VR4121: return readw(CLKSPEEDREG_TYPE1); |
76 | case CPU_VR4122: | 76 | case CPU_VR4122: |
@@ -88,7 +88,7 @@ static inline unsigned long calculate_pclock(uint16_t clkspeed) | |||
88 | { | 88 | { |
89 | unsigned long pclock = 0; | 89 | unsigned long pclock = 0; |
90 | 90 | ||
91 | switch (current_cpu_data.cputype) { | 91 | switch (current_cpu_type()) { |
92 | case CPU_VR4111: | 92 | case CPU_VR4111: |
93 | case CPU_VR4121: | 93 | case CPU_VR4121: |
94 | pclock = 18432000 * 64; | 94 | pclock = 18432000 * 64; |
@@ -138,7 +138,7 @@ static inline unsigned long calculate_vtclock(uint16_t clkspeed, unsigned long p | |||
138 | { | 138 | { |
139 | unsigned long vtclock = 0; | 139 | unsigned long vtclock = 0; |
140 | 140 | ||
141 | switch (current_cpu_data.cputype) { | 141 | switch (current_cpu_type()) { |
142 | case CPU_VR4111: | 142 | case CPU_VR4111: |
143 | /* The NEC VR4111 doesn't have the VTClock. */ | 143 | /* The NEC VR4111 doesn't have the VTClock. */ |
144 | break; | 144 | break; |
@@ -180,7 +180,7 @@ static inline unsigned long calculate_tclock(uint16_t clkspeed, unsigned long pc | |||
180 | { | 180 | { |
181 | unsigned long tclock = 0; | 181 | unsigned long tclock = 0; |
182 | 182 | ||
183 | switch (current_cpu_data.cputype) { | 183 | switch (current_cpu_type()) { |
184 | case CPU_VR4111: | 184 | case CPU_VR4111: |
185 | if (!(clkspeed & DIV2B)) | 185 | if (!(clkspeed & DIV2B)) |
186 | tclock = pclock / 2; | 186 | tclock = pclock / 2; |