From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Peter Hurley <peter@hurleysoftware.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Vinod Koul <vinod.koul@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dmaengine <dmaengine@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Puustinen, Ismo" <ismo.puustinen@intel.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH v1 09/12] serial: 8250_lpss: split LPSS driver to separate module
Date: Mon, 11 Apr 2016 16:09:02 +0300 [thread overview]
Message-ID: <1460380142.6620.75.camel@linux.intel.com> (raw)
In-Reply-To: <57083445.9090009@hurleysoftware.com>
On Fri, 2016-04-08 at 15:44 -0700, Peter Hurley wrote:
> On 04/08/2016 01:17 AM, Andy Shevchenko wrote:
> >
> > On Fri, Apr 8, 2016 at 4:42 AM, Peter Hurley <peter@hurleysoftware.c
> > om> wrote:
> > >
> > > On 04/07/2016 01:37 PM, Andy Shevchenko wrote:
> > > >
> > > > Intes SoCs, such as Braswell, have DesignWare UART. Split out to
> > > > separate
> > > > module which also will be used for Intel Quark later.
> > > What's the rationale?
> > 1. Not poison 8250_pci with too many quirks.
> > 2. They all use same DMA engine, otherwise we might end up in all
> > possible DMA engines included in one file.
> > 3. All of them are actually DesignWare, so, in the future we might
> > share code between 8250_dw and 8250_lpss.
> Just my opinion, but I like to see the rationale in the changelog.
Agreed. Already did locally.
>
> > > And this really isn't a split; this patch introduces a number of
> > > significant
> > > changes from the pci version.
> > Some style changes, yes, but "significant"?
> > For example?
> I'm just pointing out the changelog doesn't really match the
> commit. I'm not suggesting necessarily to redo the series, but just
> more
> adequately reflect the change. See below.
> +struct lpss8250_board {
> > > > + unsigned long freq;
> > > > + unsigned int base_baud;
> > > > + int (*setup)(struct lpss8250 *, struct uart_port *p);
> > > > +};
> > > New concept.
> > > +struct lpss8250 {
> > > > + int line;
> > > > + struct lpss8250_board *board;
> > > > +
> > > > + /* DMA parameters */
> > > > + struct uart_8250_dma dma;
> > > > + struct dw_dma_slave dma_param;
> > > > + u8 dma_maxburst;
> > > > +};
> > > > +static int byt_serial_setup(struct lpss8250 *lpss, struct
> > > > uart_port *port)
> > > This would have been much easier to review if you had simply moved
> > > it here
> > > and done the rework in a follow-on patch.
> > I didn't quite get this one.
> Well, just comparing byt_serial_setup() from the two versions:
> 1) dma setup is in a completely separate function
> 2) the tx & rx dma parameters are folded together
> 3) the port setup is split out
> 4) introduction of struct lpss8250
> ...
>
> >
> > How series should look like?
> I would have just moved byt_serial_setup() without any of the other
> changes
> except perhaps replacing pciserial_board with lpss8250_board, and
> then made the other changes on top before the Quark patches.
>
> There is no changelog describing the purpose of struct lpss8250_board,
> or
> struct lpss8250. Or of the dma changes. Or why dma_maxburst was
> parameterized.
> ...
>
> Naturally, I can figure all of that out on my own, but it would have
> been
> better to read your reasoning.
>
> It looks alot of work to split out now, so I guess what's done is
> done, and I'll
> just review this *really* carefully. But imagine if you hadn't wrote
> it, and
> were reviewing this: it's very difficult to mentally separate out the
> changes
> and keep track of them while reviewing. Side-by-side diff is nearly
> useless...
>
I sent new version, please, review.
> > > >
> > > > + ret = lpss->board->setup(lpss, &uart.port);
> > > > + if (ret)
> > > > + return ret;
> > > > + }
> > > > +
> > > > + ret = lpss8250_dma_setup(lpss, &uart);
> > > > + if (ret)
> > > > + return ret;
> > > I would fold this call into board setup which avoids the
> > > ugliness when this error pathway is reworked in the
> > > follow-on patches.
> > Each of them?
> I'm assuming there's just the two: byt_serial_setup()
> and qrk_serial_setup()?
For now yes.
>
> Did I overlook something? Perhaps I missed some design goal?
Nope.
But I still prefer to have separate _dma_setup() helper. I didn't see
too much ugliness in the next patches.
> > > > + .probe = lpss8250_probe,
> > > > + .remove = lpss8250_remove,
> > > No power management?
> > PCI does the trick, no *special* power management treatment
> > required, yes.
> I realized that later this am; sorry about that.
> [Maybe just put a small note in the changelog about that though?]
OK.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2016-04-11 13:09 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-07 20:37 [PATCH v1 00/12] serial: 8250: split LPSS to 8250_lpss, enable DMA on Quark Andy Shevchenko
2016-04-07 20:37 ` [PATCH v1 01/12] dmaengine: dw: keep copy of custom slave config in dwc Andy Shevchenko
2016-04-07 20:37 ` [PATCH v1 02/12] dmaengine: dw: provide probe(), remove() stubs for users Andy Shevchenko
2016-04-07 20:37 ` [PATCH v1 03/12] dmaengine: dw: set polarity of handshake interface Andy Shevchenko
2016-04-07 20:37 ` [PATCH v1 04/12] dmaengine: dw: override LLP support if asked in platform data Andy Shevchenko
2016-04-07 20:37 ` [PATCH v1 05/12] serial: 8250_dma: switch to new dmaengine_terminate_* API Andy Shevchenko
2016-04-07 23:55 ` Peter Hurley
2016-04-07 20:37 ` [PATCH v1 06/12] serial: 8250_dma: stop ongoing RX DMA on exception Andy Shevchenko
2016-04-07 23:54 ` Peter Hurley
2016-04-08 8:07 ` Andy Shevchenko
2016-04-08 23:20 ` Peter Hurley
2016-04-07 20:37 ` [PATCH v1 07/12] serial: 8250_dma: adjust DMA address of the UART Andy Shevchenko
2016-04-08 0:24 ` Peter Hurley
2016-04-07 20:37 ` [PATCH v1 08/12] serial: 8250: enable AFE on ports where FIFO is 16 bytes Andy Shevchenko
2016-04-07 23:43 ` Peter Hurley
2016-04-07 20:37 ` [PATCH v1 09/12] serial: 8250_lpss: split LPSS driver to separate module Andy Shevchenko
2016-04-08 1:42 ` Peter Hurley
2016-04-08 8:17 ` Andy Shevchenko
2016-04-08 22:44 ` Peter Hurley
2016-04-11 13:09 ` Andy Shevchenko [this message]
2016-04-07 20:37 ` [PATCH v1 10/12] serial: 8250_lpss: move Quark code from PCI driver Andy Shevchenko
2016-04-07 20:37 ` [PATCH v1 11/12] serial: 8250_lpss: enable MSI for Intel Quark Andy Shevchenko
2016-04-07 20:37 ` [PATCH v1 12/12] serial: 8250_lpss: enable DMA on Intel Quark UART Andy Shevchenko
2016-04-11 15:33 ` Bryan O'Donoghue
2016-04-11 15:51 ` Andy Shevchenko
2016-04-11 16:05 ` Andy Shevchenko
2016-04-12 16:25 ` Bryan O'Donoghue
2016-04-12 16:50 ` Andy Shevchenko
2016-04-13 11:22 ` Bryan O'Donoghue
2016-04-13 12:03 ` Andy Shevchenko
2016-04-13 14:34 ` Bryan O'Donoghue
2016-04-13 14:48 ` Andy Shevchenko
2016-04-13 15:24 ` Bryan O'Donoghue
2016-04-09 16:53 ` [PATCH v1 00/12] serial: 8250: split LPSS to 8250_lpss, enable DMA on Quark Bryan O'Donoghue
2016-04-09 17:48 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460380142.6620.75.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=ismo.puustinen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.