aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-12-08 13:51:50 +0100
committerAlexander Graf <agraf@suse.de>2012-12-14 13:12:56 +0100
commitdbbbfd6058dda61f57d1f72133aa54eb27330411 (patch)
tree9373b89a5136b3853d3bfffc4c233fa125174859 /hw
parentd0b7263134dfd4d487698b639f2069951f3fdb26 (diff)
openpic: make brr1 model specific
Now that we can properly distinguish between openpic model differences, let's move brr1 out of the raven code path. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw')
-rw-r--r--hw/openpic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/openpic.c b/hw/openpic.c
index 591b2917ed..5bf16ea0a0 100644
--- a/hw/openpic.c
+++ b/hw/openpic.c
@@ -206,6 +206,7 @@ typedef struct OpenPICState {
uint32_t tifr_reset;
uint32_t ipvp_reset;
uint32_t ide_reset;
+ uint32_t brr1;
/* Sub-regions */
MemoryRegion sub_io_mem[7];
@@ -784,7 +785,7 @@ static uint32_t openpic_cpu_read_internal(void *opaque, hwaddr addr,
addr &= 0xFF0;
switch (addr) {
case 0x00: /* Block Revision Register1 (BRR1) */
- retval = FSL_BRR1_IPID | FSL_BRR1_IPMJ | FSL_BRR1_IPMN;
+ retval = opp->brr1;
break;
case 0x80: /* PCTP */
retval = dst->pctp;
@@ -1082,6 +1083,7 @@ static int openpic_init(SysBusDevice *dev)
opp->max_irq = FSL_MPIC_20_MAX_IRQ;
opp->irq_ipi0 = FSL_MPIC_20_IPI_IRQ;
opp->irq_tim0 = FSL_MPIC_20_TMR_IRQ;
+ opp->brr1 = FSL_BRR1_IPID | FSL_BRR1_IPMJ | FSL_BRR1_IPMN;
list = list_be;
break;
case OPENPIC_MODEL_RAVEN:
@@ -1095,6 +1097,7 @@ static int openpic_init(SysBusDevice *dev)
opp->max_irq = RAVEN_MAX_IRQ;
opp->irq_ipi0 = RAVEN_IPI_IRQ;
opp->irq_tim0 = RAVEN_TMR_IRQ;
+ opp->brr1 = -1;
list = list_le;
/* Only UP supported today */