14 #include <linux/module.h>
15 #include <linux/kernel.h>
22 #include <mach/hardware.h>
26 #define OMAP_DIE_ID_0 0xfffe1800
27 #define OMAP_DIE_ID_1 0xfffe1804
28 #define OMAP_PRODUCTION_ID_0 0xfffe2000
29 #define OMAP_PRODUCTION_ID_1 0xfffe2004
30 #define OMAP32_ID_0 0xfffed400
31 #define OMAP32_ID_1 0xfffed404
40 static unsigned int omap_revision;
44 { .jtag_id = 0xb574, .die_rev = 0x2, .omap_id = 0x03310315, .type = 0x03100000},
45 { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300100},
46 { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300300},
47 { .jtag_id = 0xb62c, .die_rev = 0x1, .omap_id = 0x03320500, .type = 0x08500000},
48 { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 0x15100000},
49 { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x16100000},
50 { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 0x16110000},
51 { .jtag_id = 0xb576, .die_rev = 0x3, .omap_id = 0x03320100, .type = 0x16100c00},
52 { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320200, .type = 0x16100d00},
53 { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
54 { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
55 { .jtag_id = 0xb576, .die_rev = 0x1, .omap_id = 0x03320100, .type = 0x16110000},
56 { .jtag_id = 0xb58c, .die_rev = 0x2, .omap_id = 0x03320200, .type = 0x16110b00},
57 { .jtag_id = 0xb58c, .die_rev = 0x3, .omap_id = 0x03320200, .type = 0x16110c00},
58 { .jtag_id = 0xb65f, .die_rev = 0x0, .omap_id = 0x03320400, .type = 0x16212300},
59 { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320400, .type = 0x16212300},
60 { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320500, .type = 0x16212300},
61 { .jtag_id = 0xb5f7, .die_rev = 0x0, .omap_id = 0x03330000, .type = 0x17100000},
62 { .jtag_id = 0xb5f7, .die_rev = 0x1, .omap_id = 0x03330100, .type = 0x17100000},
63 { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 0x17100000},
88 if (((prod_id >> 20) == 0) || (prod_id == omap_id))
97 prod_id = ((omap_id >> 12) & 0xffff);
108 static u8 __init omap_get_die_rev(
void)
115 if (((die_rev >> 12) & 0xffff) == omap_get_jtag_id())
118 die_rev = (die_rev >> 17) & 0xf;
135 jtag_id = omap_get_jtag_id();
136 die_rev = omap_get_die_rev();
159 if (jtag_id == (omap_ids[i].jtag_id)) {
160 omap_revision = omap_ids[
i].type;
167 if (jtag_id == omap_ids[i].jtag_id && die_rev == omap_ids[i].die_rev) {
168 omap_revision = omap_ids[
i].type;
175 if (jtag_id == omap_ids[i].jtag_id
176 && die_rev == omap_ids[i].die_rev
177 && omap_id == omap_ids[i].omap_id) {
178 omap_revision = omap_ids[
i].type;
184 cpu_type = omap_revision >> 24;
189 omap_revision |= 0x07;
193 omap_revision |= 0x15;
197 omap_revision |= 0x16;
204 if ((omap_revision >> 8) & 0xff)