[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/14] timer: ds1338 persist 12-hour mode selection
From: |
Michael Davidsaver |
Subject: |
[Qemu-devel] [PATCH 03/14] timer: ds1338 persist 12-hour mode selection |
Date: |
Thu, 5 Jul 2018 11:19:50 -0700 |
Need to save HOUR[HOUR12] bit to keep
track of guest selection of 12-hour mode.
Write through current time registers to
achieve this. Will be overwritten
by the next read/latch.
This was only being done in two of three
arms of this conditional block.
Signed-off-by: Michael Davidsaver <address@hidden>
---
hw/timer/ds1338.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/timer/ds1338.c b/hw/timer/ds1338.c
index 7298c5af43..b56db5852e 100644
--- a/hw/timer/ds1338.c
+++ b/hw/timer/ds1338.c
@@ -220,10 +220,8 @@ static int ds1338_send(I2CSlave *i2c, uint8_t data)
value unchanged. */
data = (data & ~CTRL_OSF) | (data & s->nvram[s->ptr] & CTRL_OSF);
- s->nvram[s->ptr] = data;
- } else {
- s->nvram[s->ptr] = data;
}
+ s->nvram[s->ptr] = data;
inc_regptr(s);
return 0;
}
--
2.11.0