lkml.org 
[lkml]   [2016]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v6 2/8] thunderbolt: Updating the register definitions
Date
On Sun, Sep 11 2016, 03:02 AM, Andreas Noever wrote:
> On Mon, Aug 1, 2016 at 2:23 PM, Amir Levy <amir.jer.levy@intel.com> wrote:
> > Adding more Thunderbolt(TM) register definitions and some helper
> > macros.
>
> Thinking about this again I would prefer it if you would put your definitions
> into a separate file under icm/ (even if there is some duplication). The style
> (bitfields vs. genmask) is different between the drivers and for a reader it is
> difficult to find out what is actually supposed to be used by the two drivers
> (ring_desc vs tbt_buf_desc or the ring RING_INT_EN/DISABLE macros in the
> header file vs. ring_interrupt_active in nhi.c).
>
> This would also completely separate the two drivers.
>
> Andreas
>

I'm also in favor of completely separating the drivers, but is it the right thing to do with the register definitions
when the underlying registers layout is exactly the same?

Note that bitfields are not so recommended when you care about the format/order of bits, like in the ring descriptor.

Amir
\
 
 \ /
  Last update: 2016-09-17 09:59    [W:0.065 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site