[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/14] timer: ds1338 remove vestige of un-modele
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH 10/14] timer: ds1338 remove vestige of un-modeled OSF |
Date: |
Mon, 16 Jul 2018 14:26:26 +1000 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
On Thu, Jul 05, 2018 at 11:19:57AM -0700, Michael Davidsaver wrote:
> Oscillator stop has never been modeled, so the
> Oscillator Stop Flag can never be set.
>
> Signed-off-by: Michael Davidsaver <address@hidden>
Reviewed-by: David Gibson <address@hidden>
> ---
> hw/timer/ds-rtc.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/hw/timer/ds-rtc.c b/hw/timer/ds-rtc.c
> index 3c5781d53c..126566ce1f 100644
> --- a/hw/timer/ds-rtc.c
> +++ b/hw/timer/ds-rtc.c
> @@ -21,8 +21,6 @@
> */
> #define NVRAM_SIZE 64
>
> -#define CTRL_OSF 0x20
> -
> #define TYPE_DSRTC "ds1338"
> #define DSRTC(obj) OBJECT_CHECK(DSRTCState, (obj), TYPE_DSRTC)
>
> @@ -216,13 +214,11 @@ static int dsrtc_send(I2CSlave *i2c, uint8_t data)
> if (s->ptr == R_CTRL) {
> /* Control register. */
>
> - /* Ensure bits 2, 3 and 6 will read back as zero. */
> - data &= 0xB3;
> -
> - /* Attempting to write the OSF flag to logic 1 leaves the
> - value unchanged. */
> - data = (data & ~CTRL_OSF) | (data & s->nvram[s->ptr] & CTRL_OSF);
> -
> + /* Allow guest to set no-op controls for clock out pin and
> + * rate select. Ignore write 1 to clear OSF. We don't model
> + * oscillator stop, so it is never set.
> + */
> + data = data & 0x93;
> }
> s->nvram[s->ptr] = data;
> if (s->ptr <= R_YEAR) {
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH 05/14] timer: ds1338 change write handling and fix wday_offset handling, (continued)
- [Qemu-devel] [PATCH 05/14] timer: ds1338 change write handling and fix wday_offset handling, Michael Davidsaver, 2018/07/05
- [Qemu-devel] [PATCH 06/14] tests: ds-rtc test 12 hour mode, Michael Davidsaver, 2018/07/05
- [Qemu-devel] [PATCH 07/14] tests: ds-rtc test wday offset, Michael Davidsaver, 2018/07/05
- [Qemu-devel] [PATCH 09/14] timer: rename file ds1338.c -> ds-rtc.c, Michael Davidsaver, 2018/07/05
- [Qemu-devel] [PATCH 10/14] timer: ds1338 remove vestige of un-modeled OSF, Michael Davidsaver, 2018/07/05
- Re: [Qemu-devel] [PATCH 10/14] timer: ds1338 remove vestige of un-modeled OSF,
David Gibson <=
- [Qemu-devel] [PATCH 08/14] timer: rename ds1338 -> dsrtc, Michael Davidsaver, 2018/07/05
- [Qemu-devel] [PATCH 12/14] timer: ds-rtc handle CENTURY bit, Michael Davidsaver, 2018/07/05
- [Qemu-devel] [PATCH 13/14] timer: ds-rtc model ds1375, Michael Davidsaver, 2018/07/05
- [Qemu-devel] [PATCH 14/14] tests: drop ds1338-test, Michael Davidsaver, 2018/07/05
- Message not available