Message ID | fd2181374ca1cdefccb8b388aa13465051227a49.1457470980.git.alistair.francis@xilinx.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Alistair Francis <alistair.francis@xilinx.com> writes: > 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 <peter.crosthwaite@xilinx.com> > Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> > --- > V3: > - Remove unused flags option > > include/hw/register.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/hw/register.h b/include/hw/register.h > index 726a914..bc2c96a 100644 > --- a/include/hw/register.h > +++ b/include/hw/register.h > @@ -39,6 +39,11 @@ typedef struct RegisterInfoArray RegisterInfoArray; > * allowing this function to modify the value before return to the client. > */ > > +#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; Without any other context I'm unsure of how these defines are going to be used. Are these just bits at the bottom of an address? Nothing in this patch series uses them so I suggest you drop this patch for now. -- Alex Bennée
On Tue, Mar 22, 2016 at 10:42 AM, Alex Bennée <alex.bennee@linaro.org> wrote: > > Alistair Francis <alistair.francis@xilinx.com> writes: > >> 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 <peter.crosthwaite@xilinx.com> >> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> >> --- >> V3: >> - Remove unused flags option >> >> include/hw/register.h | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/include/hw/register.h b/include/hw/register.h >> index 726a914..bc2c96a 100644 >> --- a/include/hw/register.h >> +++ b/include/hw/register.h >> @@ -39,6 +39,11 @@ typedef struct RegisterInfoArray RegisterInfoArray; >> * allowing this function to modify the value before return to the client. >> */ >> >> +#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; > > Without any other context I'm unsure of how these defines are going to > be used. Are these just bits at the bottom of an address? > > Nothing in this patch series uses them so I suggest you drop this patch > for now. Agreed. I will drop this patch. Thanks, Alistair > > -- > Alex Bennée >
diff --git a/include/hw/register.h b/include/hw/register.h index 726a914..bc2c96a 100644 --- a/include/hw/register.h +++ b/include/hw/register.h @@ -39,6 +39,11 @@ typedef struct RegisterInfoArray RegisterInfoArray; * allowing this function to modify the value before return to the client. */ +#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;