[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E607265CB020454880711A6F96C05A03926A9D7A@hasmsx107.ger.corp.intel.com>
Date: Tue, 26 Jul 2016 09:08:31 +0000
From: "Levy, Amir (Jer)" <amir.jer.levy@...el.com>
To: Andreas Noever <andreas.noever@...il.com>
CC: Greg KH <gregkh@...uxfoundation.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
thunderbolt-linux <thunderbolt-linux@...el.com>,
"Westerberg, Mika" <mika.westerberg@...el.com>,
"Winkler, Tomas" <tomas.winkler@...el.com>
Subject: RE: [PATCH v4 2/7] thunderbolt: Updating the register definitions
On Tue, Jul 26 2016, 10:39 AM, Andreas Noever wrote:
> On Mon, Jul 18, 2016 at 12:00 PM, Amir Levy <amir.jer.levy@...el.com>
> wrote:
> > Adding more Thunderbolt(TM) register definitions and some helper
> > macros.
> >
> > Signed-off-by: Amir Levy <amir.jer.levy@...el.com>
> > ---
> > drivers/thunderbolt/nhi_regs.h | 109
> > +++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 109 insertions(+)
> >
> > diff --git a/drivers/thunderbolt/nhi_regs.h
> > b/drivers/thunderbolt/nhi_regs.h index 75cf069..b8e961f 100644
> > --- a/drivers/thunderbolt/nhi_regs.h
> > +++ b/drivers/thunderbolt/nhi_regs.h
> > @@ -9,6 +9,11 @@
> >
> > #include <linux/types.h>
> >
> > +#define NHI_MMIO_BAR 0
> > +
> > +#define TBT_RING_MIN_NUM_BUFFERS 2
> > +#define TBT_RING_MAX_FRAME_SIZE (4 * 1024)
> > +
> > enum ring_flags {
> > RING_FLAG_ISOCH_ENABLE = 1 << 27, /* TX only? */
> > RING_FLAG_E2E_FLOW_CONTROL = 1 << 28, @@ -39,6 +44,33 @@
> > struct ring_desc {
> > u32 time; /* write zero */
> > } __packed;
> >
> > +/**
> > + * struct tbt_buf_desc - TX/RX ring buffer descriptor.
> > + * This is same as struct ring_desc, but without the use of bitfields
> > +and
> > + * with explicit endianity.
> > + */
> > +struct tbt_buf_desc {
> > + __le64 phys;
> > + __le32 attributes;
> > + __le32 time;
> > +};
> Does sharing this file make sense? The style seems to be quite different
> (structs with bitfields vs explicit bit-access). I think I would prefer separate
> register definitions, unless you are reusing a substantial amount (I have not
> checked).
>
I'm using all the macros from the original file, except the struct with the bitfields.
Amir
Powered by blists - more mailing lists