From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCPIm-0005cE-Af for qemu-devel@nongnu.org; Mon, 04 Mar 2013 01:55:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCPIl-0002Ck-Aj for qemu-devel@nongnu.org; Mon, 04 Mar 2013 01:55:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50509) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCPIl-0002Bt-2y for qemu-devel@nongnu.org; Mon, 04 Mar 2013 01:55:11 -0500 Message-ID: <51344546.7080306@redhat.com> Date: Mon, 04 Mar 2013 07:55:02 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <11e3c93f4c64bda4ef46ec9de8dd8b4fa88b3ec5.1362290776.git.peter.crosthwaite@xilinx.com> In-Reply-To: <11e3c93f4c64bda4ef46ec9de8dd8b4fa88b3ec5.1362290776.git.peter.crosthwaite@xilinx.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v1 2/4] bitops: Add UInt32StateInfo and helper functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org > +/** > + * A descriptor for a Uint32 that is part of guest accessible device state > + * @ro: whether or not the bit is read-only state comming out of reset > + * @w1c: bits with the common write 1 to clear semantic. > + * @nw0: bits that cant be written with a 0 by the guest (sticky 1) > + * @nw1: bits that cant be written with a 1 by the guest (sticky 0) Why these? reset=0 + ro=1 equals nw1=1 reset=1 + ro=1 equals nw0=1 > + * @width: width of the uint32t. Only the @width least significant bits are > + * valid. All others are silent Read-as-reset/WI. That's kida redundant with "ro" too. I'd do it the other way around btw: Specify the writable bits instead of the read-only ones. width=8 easily be written as wmask=0xff then. cheers, Gerd