From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aORjU-0001k1-0t for qemu-devel@nongnu.org; Wed, 27 Jan 2016 10:10:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aORjM-0003pf-8C for qemu-devel@nongnu.org; Wed, 27 Jan 2016 10:10:07 -0500 Received: from greensocs.com ([193.104.36.180]:52658) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aORjL-0003pJ-Tx for qemu-devel@nongnu.org; Wed, 27 Jan 2016 10:10:00 -0500 References: From: KONRAD Frederic Message-ID: <56A8DDC5.3040100@greensocs.com> Date: Wed, 27 Jan 2016 16:09:57 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 04/16] register: Add support for decoding information List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alistair Francis , qemu-devel@nongnu.org Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, crosthwaitepeter@gmail.com, afaerber@suse.de, edgar.iglesias@gmail.com Le 19/01/2016 23:35, Alistair Francis a =E9crit : > From: Peter Crosthwaite > > Allow defining of optional address decoding information in register > definitions. This is useful for clients that want to associate > registers with specific addresses. > > Signed-off-by: Peter Crosthwaite > Signed-off-by: Alistair Francis > --- > changed since v4: > Remove extraneous unused defintions. > > include/hw/register.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/hw/register.h b/include/hw/register.h > index a3c41db..90c0185 100644 > --- a/include/hw/register.h > +++ b/include/hw/register.h > @@ -54,6 +54,11 @@ typedef struct RegisterAccessError { > * allowing this function to modify the value before return to the cl= ient. > */ > =20 > +#define REG_DECODE_READ (1 << 0) > +#define REG_DECODE_WRITE (1 << 1) > +#define REG_DECODE_EXECUTE (1 << 2) > +#define REG_DECODE_RW (REG_DECODE_READ | REG_DECODE_WRITE) > + > struct RegisterAccessInfo { > const char *name; > uint64_t ro; > @@ -71,6 +76,11 @@ struct RegisterAccessInfo { > void (*post_write)(RegisterInfo *reg, uint64_t val); > =20 > uint64_t (*post_read)(RegisterInfo *reg, uint64_t val); > + > + struct { > + hwaddr addr; > + uint8_t flags; > + } decode; is that used somewhere? Fred > }; > =20 > /**