diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2013-02-18 16:58:25 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-05-03 21:21:58 +0100 |
commit | 5f56d9a39f530583aa64cec057703cda20eac4ac (patch) | |
tree | 141a05c151cd1a711955ef04e8481feddef74ea3 | |
parent | c2df9434c043db4f828b440b11c243fcd0a9362f (diff) |
hw/omap_tap.c: Return correct ID register values for OMAP3
Add/correct the ID register values returned for OMAP3.
In particular, the OMAP3 PRODUCTION_ID register was not
modelled correctly: it is a 128 bit register spanning
four words 0x208..0x214. (There appears to be a typo in
the OMAP35xx TRM about this; however the OMAP36xx TRM
is clearer and experimentation shows that the 35xx behaves the
same way.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/misc/omap_tap.c | 61 |
1 files changed, 51 insertions, 10 deletions
diff --git a/hw/misc/omap_tap.c b/hw/misc/omap_tap.c index 6f02bb9e4..545da82b6 100644 --- a/hw/misc/omap_tap.c +++ b/hw/misc/omap_tap.c @@ -41,13 +41,20 @@ static uint64_t omap_tap_read(void *opaque, hwaddr addr, case omap2430: return 0x5b68a02f; /* ES 2.2 */ case omap3430: - return 0x1b7ae02f; /* ES 2 */ + return 0x4b7ae02f; /* ES 3.1 */ + case omap3630: + return 0x1b89102f; /* ES 1.1 */ default: - hw_error("%s: Bad mpu model\n", __FUNCTION__); + hw_error("%s: Bad mpu model\n", __func__); } - case 0x208: /* PRODUCTION_ID_reg for OMAP2 */ - case 0x210: /* PRODUCTION_ID_reg for OMAP3 */ + /* For OMAP2 there is a two word PRODUCTION_ID register at + * 0x208..0x210. + * For OMAP3 there is a four word PRODUCTION_ID register at + * 0x208..0x214. + */ + + case 0x208: /* PRODUCTION_ID_reg bits 0-31 */ switch (s->mpu_model) { case omap2420: return 0x000254f0; /* POP ESHS2.1.1 in N91/93/95, ES2 in N800 */ @@ -58,12 +65,13 @@ static uint64_t omap_tap_read(void *opaque, hwaddr addr, case omap2430: return 0x000000f0; case omap3430: - return 0x000000f0; + case omap3630: + return 0x0; default: - hw_error("%s: Bad mpu model\n", __FUNCTION__); + hw_error("%s: Bad mpu model\n", __func__); } - - case 0x20c: + break; + case 0x20c: /* PRODUCTION_ID bits 32-63 */ switch (s->mpu_model) { case omap2420: case omap2422: @@ -72,10 +80,43 @@ static uint64_t omap_tap_read(void *opaque, hwaddr addr, case omap2430: return 0xcafeb68a; /* ES 2.2 */ case omap3430: - return 0xcafeb7ae; /* ES 2 */ + case omap3630: + return 0x0; + default: + hw_error("%s: Bad mpu model\n", __func__); + } + break; + case 0x210: /* PRODUCTION_ID reg bits 64-95 (OMAP3 only) */ + switch (s->mpu_model) { + case omap2420: + case omap2422: + case omap2423: + case omap2430: + /* OMAP3 only, break out to bad-register path */ + break; + case omap3430: + case omap3630: + return 0x000f00f0; + default: + hw_error("%s: Bad mpu model\n", __func__); + } + break; + case 0x214: /* PRODUCTION_ID bits 96-127 (OMAP3 only) */ + switch (s->mpu_model) { + case omap2420: + case omap2422: + case omap2423: + case omap2430: + /* OMAP3 only, break out to bad-register path */ + break; + case omap3430: + return 0xcafeb7ae; /* ES 2.x/3.0 */ + case omap3630: + return 0xcafeb891; /* ES 1.0/1.1 */ default: - hw_error("%s: Bad mpu model\n", __FUNCTION__); + hw_error("%s: Bad mpu model\n", __func__); } + break; case 0x218: /* DIE_ID_reg */ return ('Q' << 24) | ('E' << 16) | ('M' << 8) | ('U' << 0); |