diff options
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/au1000.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-au1x00/au1000.h b/arch/mips/include/asm/mach-au1x00/au1000.h index fceeca883359..2dc87d3b0428 100644 --- a/arch/mips/include/asm/mach-au1x00/au1000.h +++ b/arch/mips/include/asm/mach-au1x00/au1000.h | |||
@@ -130,6 +130,37 @@ static inline int au1xxx_cpu_needs_config_od(void) | |||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
132 | 132 | ||
133 | #define ALCHEMY_CPU_UNKNOWN -1 | ||
134 | #define ALCHEMY_CPU_AU1000 0 | ||
135 | #define ALCHEMY_CPU_AU1500 1 | ||
136 | #define ALCHEMY_CPU_AU1100 2 | ||
137 | #define ALCHEMY_CPU_AU1550 3 | ||
138 | #define ALCHEMY_CPU_AU1200 4 | ||
139 | |||
140 | static inline int alchemy_get_cputype(void) | ||
141 | { | ||
142 | switch (read_c0_prid() & 0xffff0000) { | ||
143 | case 0x00030000: | ||
144 | return ALCHEMY_CPU_AU1000; | ||
145 | break; | ||
146 | case 0x01030000: | ||
147 | return ALCHEMY_CPU_AU1500; | ||
148 | break; | ||
149 | case 0x02030000: | ||
150 | return ALCHEMY_CPU_AU1100; | ||
151 | break; | ||
152 | case 0x03030000: | ||
153 | return ALCHEMY_CPU_AU1550; | ||
154 | break; | ||
155 | case 0x04030000: | ||
156 | case 0x05030000: | ||
157 | return ALCHEMY_CPU_AU1200; | ||
158 | break; | ||
159 | } | ||
160 | |||
161 | return ALCHEMY_CPU_UNKNOWN; | ||
162 | } | ||
163 | |||
133 | /* arch/mips/au1000/common/clocks.c */ | 164 | /* arch/mips/au1000/common/clocks.c */ |
134 | extern void set_au1x00_speed(unsigned int new_freq); | 165 | extern void set_au1x00_speed(unsigned int new_freq); |
135 | extern unsigned int get_au1x00_speed(void); | 166 | extern unsigned int get_au1x00_speed(void); |