aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/id.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/id.c')
-rw-r--r--arch/arm/mach-omap2/id.c53
1 files changed, 44 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 2537090aa33..37efb869692 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -31,7 +31,7 @@
31static struct omap_chip_id omap_chip; 31static struct omap_chip_id omap_chip;
32static unsigned int omap_revision; 32static unsigned int omap_revision;
33 33
34u32 omap3_features; 34u32 omap_features;
35 35
36unsigned int omap_rev(void) 36unsigned int omap_rev(void)
37{ 37{
@@ -183,14 +183,14 @@ static void __init omap24xx_check_revision(void)
183#define OMAP3_CHECK_FEATURE(status,feat) \ 183#define OMAP3_CHECK_FEATURE(status,feat) \
184 if (((status & OMAP3_ ##feat## _MASK) \ 184 if (((status & OMAP3_ ##feat## _MASK) \
185 >> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) { \ 185 >> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) { \
186 omap3_features |= OMAP3_HAS_ ##feat; \ 186 omap_features |= OMAP3_HAS_ ##feat; \
187 } 187 }
188 188
189static void __init omap3_check_features(void) 189static void __init omap3_check_features(void)
190{ 190{
191 u32 status; 191 u32 status;
192 192
193 omap3_features = 0; 193 omap_features = 0;
194 194
195 status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS); 195 status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS);
196 196
@@ -200,11 +200,11 @@ static void __init omap3_check_features(void)
200 OMAP3_CHECK_FEATURE(status, NEON); 200 OMAP3_CHECK_FEATURE(status, NEON);
201 OMAP3_CHECK_FEATURE(status, ISP); 201 OMAP3_CHECK_FEATURE(status, ISP);
202 if (cpu_is_omap3630()) 202 if (cpu_is_omap3630())
203 omap3_features |= OMAP3_HAS_192MHZ_CLK; 203 omap_features |= OMAP3_HAS_192MHZ_CLK;
204 if (!cpu_is_omap3505() && !cpu_is_omap3517()) 204 if (!cpu_is_omap3505() && !cpu_is_omap3517())
205 omap3_features |= OMAP3_HAS_IO_WAKEUP; 205 omap_features |= OMAP3_HAS_IO_WAKEUP;
206 206
207 omap3_features |= OMAP3_HAS_SDRC; 207 omap_features |= OMAP3_HAS_SDRC;
208 208
209 /* 209 /*
210 * TODO: Get additional info (where applicable) 210 * TODO: Get additional info (where applicable)
@@ -212,9 +212,34 @@ static void __init omap3_check_features(void)
212 */ 212 */
213} 213}
214 214
215static void __init omap4_check_features(void)
216{
217 u32 si_type;
218
219 if (cpu_is_omap443x())
220 omap_features |= OMAP4_HAS_MPU_1GHZ;
221
222
223 if (cpu_is_omap446x()) {
224 si_type =
225 read_tap_reg(OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_1);
226 switch ((si_type & (3 << 16)) >> 16) {
227 case 2:
228 /* High performance device */
229 omap_features |= OMAP4_HAS_MPU_1_5GHZ;
230 break;
231 case 1:
232 default:
233 /* Standard device */
234 omap_features |= OMAP4_HAS_MPU_1_2GHZ;
235 break;
236 }
237 }
238}
239
215static void __init ti816x_check_features(void) 240static void __init ti816x_check_features(void)
216{ 241{
217 omap3_features = OMAP3_HAS_NEON; 242 omap_features = OMAP3_HAS_NEON;
218} 243}
219 244
220static void __init omap3_check_revision(void) 245static void __init omap3_check_revision(void)
@@ -344,10 +369,10 @@ static void __init omap4_check_revision(void)
344 rev = (idcode >> 28) & 0xf; 369 rev = (idcode >> 28) & 0xf;
345 370
346 /* 371 /*
347 * Few initial ES2.0 samples IDCODE is same as ES1.0 372 * Few initial 4430 ES2.0 samples IDCODE is same as ES1.0
348 * Use ARM register to detect the correct ES version 373 * Use ARM register to detect the correct ES version
349 */ 374 */
350 if (!rev) { 375 if (!rev && (hawkeye != 0xb94e)) {
351 idcode = read_cpuid(CPUID_ID); 376 idcode = read_cpuid(CPUID_ID);
352 rev = (idcode & 0xf) - 1; 377 rev = (idcode & 0xf) - 1;
353 } 378 }
@@ -377,6 +402,15 @@ static void __init omap4_check_revision(void)
377 omap_chip.oc |= CHIP_IS_OMAP4430ES2_2; 402 omap_chip.oc |= CHIP_IS_OMAP4430ES2_2;
378 } 403 }
379 break; 404 break;
405 case 0xb94e:
406 switch (rev) {
407 case 0:
408 default:
409 omap_revision = OMAP4460_REV_ES1_0;
410 omap_chip.oc |= CHIP_IS_OMAP4460ES1_0;
411 break;
412 }
413 break;
380 default: 414 default:
381 /* Unknown default to latest silicon rev as default */ 415 /* Unknown default to latest silicon rev as default */
382 omap_revision = OMAP4430_REV_ES2_2; 416 omap_revision = OMAP4430_REV_ES2_2;
@@ -518,6 +552,7 @@ void __init omap2_check_revision(void)
518 return; 552 return;
519 } else if (cpu_is_omap44xx()) { 553 } else if (cpu_is_omap44xx()) {
520 omap4_check_revision(); 554 omap4_check_revision();
555 omap4_check_features();
521 return; 556 return;
522 } else { 557 } else {
523 pr_err("OMAP revision unknown, please fix!\n"); 558 pr_err("OMAP revision unknown, please fix!\n");