aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-03-30 16:37:15 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-03-30 16:37:15 +0100
commitb471d5549188d01730131a322c4d154585ba1e60 (patch)
treea591d8f004ac1a80c9dff7eab34dae81df6454b9 /hw
parent4a0ba67c77a425436e867fcbb8c513b44d7e7d6e (diff)
parentb9e3f1579a4b06fc63dfa8cdb68df1c58eeb0cf1 (diff)
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210330' into staging
* net/npcm7xx_emc.c: Fix handling of receiving packets when RSDR not set * hw/display/xlnx_dp: Free FIFOs adding xlnx_dp_finalize() * hw/arm/smmuv3: Drop unused CDM_VALID() and is_cd_valid() * target/arm: Make number of counters in PMCR follow the CPU * hw/timer/renesas_tmr: Add default-case asserts in read_tcnt() # gpg: Signature made Tue 30 Mar 2021 14:23:33 BST # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20210330: hw/timer/renesas_tmr: Add default-case asserts in read_tcnt() target/arm: Make number of counters in PMCR follow the CPU hw/arm/smmuv3: Drop unused CDM_VALID() and is_cd_valid() hw/display/xlnx_dp: Free FIFOs adding xlnx_dp_finalize() net/npcm7xx_emc.c: Fix handling of receiving packets when RSDR not set Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/arm/smmuv3-internal.h7
-rw-r--r--hw/display/xlnx_dp.c9
-rw-r--r--hw/net/npcm7xx_emc.c4
-rw-r--r--hw/timer/renesas_tmr.c4
4 files changed, 16 insertions, 8 deletions
diff --git a/hw/arm/smmuv3-internal.h b/hw/arm/smmuv3-internal.h
index b6f7e53b7c..3dac5766ca 100644
--- a/hw/arm/smmuv3-internal.h
+++ b/hw/arm/smmuv3-internal.h
@@ -595,13 +595,6 @@ static inline int pa_range(STE *ste)
#define CD_A(x) extract32((x)->word[1], 14, 1)
#define CD_AARCH64(x) extract32((x)->word[1], 9 , 1)
-#define CDM_VALID(x) ((x)->word[0] & 0x1)
-
-static inline int is_cd_valid(SMMUv3State *s, STE *ste, CD *cd)
-{
- return CD_VALID(cd);
-}
-
/**
* tg2granule - Decodes the CD translation granule size field according
* to the ttbr in use
diff --git a/hw/display/xlnx_dp.c b/hw/display/xlnx_dp.c
index c56e6ec593..4fd6aeb18b 100644
--- a/hw/display/xlnx_dp.c
+++ b/hw/display/xlnx_dp.c
@@ -1260,6 +1260,14 @@ static void xlnx_dp_init(Object *obj)
fifo8_create(&s->tx_fifo, 16);
}
+static void xlnx_dp_finalize(Object *obj)
+{
+ XlnxDPState *s = XLNX_DP(obj);
+
+ fifo8_destroy(&s->tx_fifo);
+ fifo8_destroy(&s->rx_fifo);
+}
+
static void xlnx_dp_realize(DeviceState *dev, Error **errp)
{
XlnxDPState *s = XLNX_DP(dev);
@@ -1359,6 +1367,7 @@ static const TypeInfo xlnx_dp_info = {
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(XlnxDPState),
.instance_init = xlnx_dp_init,
+ .instance_finalize = xlnx_dp_finalize,
.class_init = xlnx_dp_class_init,
};
diff --git a/hw/net/npcm7xx_emc.c b/hw/net/npcm7xx_emc.c
index 714a742ba7..7c892f820f 100644
--- a/hw/net/npcm7xx_emc.c
+++ b/hw/net/npcm7xx_emc.c
@@ -702,7 +702,9 @@ static void npcm7xx_emc_write(void *opaque, hwaddr offset,
!(value & REG_MCMDR_RXON)) {
emc->regs[REG_MGSTA] |= REG_MGSTA_RXHA;
}
- if (!(value & REG_MCMDR_RXON)) {
+ if (value & REG_MCMDR_RXON) {
+ emc->rx_active = true;
+ } else {
emc_halt_rx(emc, 0);
}
break;
diff --git a/hw/timer/renesas_tmr.c b/hw/timer/renesas_tmr.c
index eed39917fe..d96002e1ee 100644
--- a/hw/timer/renesas_tmr.c
+++ b/hw/timer/renesas_tmr.c
@@ -146,6 +146,8 @@ static uint16_t read_tcnt(RTMRState *tmr, unsigned size, int ch)
case CSS_CASCADING:
tcnt[1] = tmr->tcnt[1];
break;
+ default:
+ g_assert_not_reached();
}
switch (FIELD_EX8(tmr->tccr[0], TCCR, CSS)) {
case CSS_INTERNAL:
@@ -159,6 +161,8 @@ static uint16_t read_tcnt(RTMRState *tmr, unsigned size, int ch)
case CSS_EXTERNAL: /* QEMU doesn't implement this */
tcnt[0] = tmr->tcnt[0];
break;
+ default:
+ g_assert_not_reached();
}
} else {
tcnt[0] = tmr->tcnt[0];