qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4/4] hw/ds1338.c: Handle stuck bits and preserve


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 4/4] hw/ds1338.c: Handle stuck bits and preserve CH
Date: Tue, 4 Dec 2012 18:01:50 +0000

On 2 December 2012 17:22, Antoine Mathys <address@hidden> wrote:
> Preserve the CH bit when updating the time.
>
> Per the datasheet, some bits in the first eight registers must always read
> back as zero. These registers can be written in two ways:
> 1. By ourselves when we update the registers with the current time.
> 2. By user request
> Even though (1) is not supposed to set these bits it is safer to check
> anyway. In order not to duplicate this logic I thus chose to enforce it at
> read time.
> Note that currently we don't preserve what the user sends in (2). We will
> have to once we support stopping the clock (CH bit).

This patch is trying to do two things at once, which makes
it very hard to review. Please split it.

I'm also not convinced it's worth doing bit masking after
updating the time -- if that's wrong then we're returning
wrong values anyway and non-zero RAZ fields is the least
of our problems.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]