1
From 0660adb9c76b4e1d887a2a1a890ec2d38414676f Mon Sep 17 00:00:00 2001
2
From: Peter Maydell <peter.maydell@linaro.org>
3
Date: Mon, 18 Feb 2013 16:58:25 +0000
4
Subject: [PATCH 16/69] hw/omap_tap.c: Return correct ID register values for
7
Add/correct the ID register values returned for OMAP3.
8
In particular, the OMAP3 PRODUCTION_ID register was not
9
modelled correctly: it is a 128 bit register spanning
10
four words 0x208..0x214. (There appears to be a typo in
11
the OMAP35xx TRM about this; however the OMAP36xx TRM
12
is clearer and experimentation shows that the 35xx behaves the
15
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
17
hw/misc/omap_tap.c | 61 +++++++++++++++++++++++++++++++++++++++++++++---------
18
1 file changed, 51 insertions(+), 10 deletions(-)
20
diff --git a/hw/misc/omap_tap.c b/hw/misc/omap_tap.c
21
index 99b70d5..5a6436a 100644
22
--- a/hw/misc/omap_tap.c
23
+++ b/hw/misc/omap_tap.c
24
@@ -41,13 +41,20 @@ static uint64_t omap_tap_read(void *opaque, hwaddr addr,
26
return 0x5b68a02f; /* ES 2.2 */
28
- return 0x1b7ae02f; /* ES 2 */
29
+ return 0x4b7ae02f; /* ES 3.1 */
31
+ return 0x1b89102f; /* ES 1.1 */
33
- hw_error("%s: Bad mpu model\n", __FUNCTION__);
34
+ hw_error("%s: Bad mpu model\n", __func__);
37
- case 0x208: /* PRODUCTION_ID_reg for OMAP2 */
38
- case 0x210: /* PRODUCTION_ID_reg for OMAP3 */
39
+ /* For OMAP2 there is a two word PRODUCTION_ID register at
41
+ * For OMAP3 there is a four word PRODUCTION_ID register at
45
+ case 0x208: /* PRODUCTION_ID_reg bits 0-31 */
46
switch (s->mpu_model) {
48
return 0x000254f0; /* POP ESHS2.1.1 in N91/93/95, ES2 in N800 */
49
@@ -58,12 +65,13 @@ static uint64_t omap_tap_read(void *opaque, hwaddr addr,
57
- hw_error("%s: Bad mpu model\n", __FUNCTION__);
58
+ hw_error("%s: Bad mpu model\n", __func__);
63
+ case 0x20c: /* PRODUCTION_ID bits 32-63 */
64
switch (s->mpu_model) {
67
@@ -72,10 +80,43 @@ static uint64_t omap_tap_read(void *opaque, hwaddr addr,
69
return 0xcafeb68a; /* ES 2.2 */
71
- return 0xcafeb7ae; /* ES 2 */
75
+ hw_error("%s: Bad mpu model\n", __func__);
78
+ case 0x210: /* PRODUCTION_ID reg bits 64-95 (OMAP3 only) */
79
+ switch (s->mpu_model) {
84
+ /* OMAP3 only, break out to bad-register path */
90
+ hw_error("%s: Bad mpu model\n", __func__);
93
+ case 0x214: /* PRODUCTION_ID bits 96-127 (OMAP3 only) */
94
+ switch (s->mpu_model) {
99
+ /* OMAP3 only, break out to bad-register path */
102
+ return 0xcafeb7ae; /* ES 2.x/3.0 */
104
+ return 0xcafeb891; /* ES 1.0/1.1 */
106
- hw_error("%s: Bad mpu model\n", __FUNCTION__);
107
+ hw_error("%s: Bad mpu model\n", __func__);
111
case 0x218: /* DIE_ID_reg */
112
return ('Q' << 24) | ('E' << 16) | ('M' << 8) | ('U' << 0);