17 #include <linux/module.h>
18 #include <linux/kernel.h>
22 #include <asm/cputype.h>
31 static unsigned int omap_revision;
32 static const char *cpu_rev;
59 pr_err(
"Cannot detect omap type!\n");
74 #define OMAP_TAP_IDCODE 0x0204
75 #define OMAP_TAP_DIE_ID_0 0x0218
76 #define OMAP_TAP_DIE_ID_1 0x021C
77 #define OMAP_TAP_DIE_ID_2 0x0220
78 #define OMAP_TAP_DIE_ID_3 0x0224
80 #define OMAP_TAP_DIE_ID_44XX_0 0x0200
81 #define OMAP_TAP_DIE_ID_44XX_1 0x0208
82 #define OMAP_TAP_DIE_ID_44XX_2 0x020c
83 #define OMAP_TAP_DIE_ID_44XX_3 0x0210
85 #define read_tap_reg(reg) __raw_readl(tap_base + (reg))
95 { .hawkeye = 0xb5d9, .dev = 0x0, .type = 0x24200024 },
96 { .hawkeye = 0xb5d9, .dev = 0x1, .type = 0x24201024 },
97 { .hawkeye = 0xb5d9, .dev = 0x2, .type = 0x24202024 },
98 { .hawkeye = 0xb5d9, .dev = 0x4, .type = 0x24220024 },
99 { .hawkeye = 0xb5d9, .dev = 0x8, .type = 0x24230024 },
100 { .hawkeye = 0xb68a, .dev = 0x0, .type = 0x24300024 },
104 static u16 tap_prod_id;
132 hawkeye = (idcode >> 12) & 0xffff;
133 rev = (idcode >> 28) & 0x0f;
134 dev_type = (prod_id >> 16) & 0x0f;
137 pr_debug(
"OMAP_TAP_IDCODE 0x%08x REV %i HAWKEYE 0x%04x MANF %03x\n",
138 idcode, rev, hawkeye, (idcode >> 1) & 0x7ff);
140 pr_debug(
"OMAP_TAP_DIE_ID_1: 0x%08x DEV_REV: %i\n",
144 pr_debug(
"OMAP_TAP_PROD_ID_0: 0x%08x DEV_TYPE: %i\n",
149 if (hawkeye == omap_ids[i].hawkeye)
159 if (dev_type == omap_ids[j].
dev)
164 pr_err(
"Unknown OMAP device type. Handling it as OMAP%04x\n",
165 omap_ids[i].
type >> 16);
175 #define OMAP3_SHOW_FEATURE(feat) \
176 if (omap3_has_ ##feat()) \
179 static void __init omap3_cpuinfo(
void)
181 const char *cpu_name;
191 cpu_name =
"OMAP3630";
193 cpu_name = (omap3_has_sgx()) ?
"AM3517" :
"AM3505";
200 }
else if (omap3_has_iva() && omap3_has_sgx()) {
202 cpu_name =
"OMAP3430/3530";
203 }
else if (omap3_has_iva()) {
204 cpu_name =
"OMAP3525";
205 }
else if (omap3_has_sgx()) {
206 cpu_name =
"OMAP3515";
208 cpu_name =
"OMAP3503";
212 pr_info(
"%s ES%s (", cpu_name, cpu_rev);
224 #define OMAP3_CHECK_FEATURE(status,feat) \
225 if (((status & OMAP3_ ##feat## _MASK) \
226 >> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) { \
227 omap_features |= OMAP3_HAS_ ##feat; \
283 switch ((si_type & (3 << 16)) >> 16) {
315 if ((((cpuid >> 4) & 0xfff) == 0xc08) && ((cpuid & 0xf) == 0x0)) {
328 hawkeye = (idcode >> 12) & 0xffff;
329 rev = (idcode >> 28) & 0xff;
440 pr_warn(
"Warning: unknown chip type; assuming OMAP3630ES1.2\n");
456 hawkeye = (idcode >> 12) & 0xffff;
457 rev = (idcode >> 28) & 0xf;
463 if (!rev && (hawkeye != 0xb94e) && (hawkeye != 0xb975)) {
465 rev = (idcode & 0xf) - 1;
527 hawkeye = (idcode >> 12) & 0xffff;
528 rev = (idcode >> 28) & 0xff;
564 omap_revision = omap2_globals->
class;
565 tap_base = omap2_globals->
tap;
568 tap_prod_id = 0x0210;
570 tap_prod_id = 0x0208;