* Re: [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface
@ 2016-05-06 15:48 Maarten Brock
2016-05-06 18:08 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Maarten Brock @ 2016-05-06 15:48 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Andy Shevchenko, Bryan O'Donoghue, Peter Hurley, linux-serial,
Vinod Koul, linux-kernel, dmaengine, Greg Kroah-Hartman,
Puustinen, Ismo, Heikki Krogerus
----- Original Message -----
From: Andy Shevchenko [mailto:andy.shevchenko@gmail.com]
To: Maarten Brock [mailto:m.brock@vanmierlo.com]
Cc: Andy Shevchenko [mailto:andriy.shevchenko@linux.intel.com], Bryan O'Donoghue [mailto:pure.logic@nexus-software.ie], Peter Hurley [mailto:peter@hurleysoftware.com], linux-serial@vger.kernel.org [mailto:linux-serial@vger.kernel.org], Vinod Koul [mailto:vinod.koul@intel.com], linux-kernel@vger.kernel.org [mailto:linux-kernel@vger.kernel.org], dmaengine [mailto:dmaengine@vger.kernel.org], Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org], Puustinen, Ismo [mailto:ismo.puustinen@intel.com], Heikki Krogerus [mailto:heikki.krogerus@linux.intel.com]
Sent: Fri, 06 May 2016 13:38:44 +0200
Subject: Re: [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface
> On Fri, May 6, 2016 at 2:20 PM, Maarten Brock <m.brock@vanmierlo.com> wrote:
> >> > >
> >> > > + bool polarity;
> >> > So this variable is not very intuitively named.
> >>
> >> There is a help above. This is a property of the Synopsys DesignWare DMA
> >> engine. Anyone familiar with datasheet easily understands this.
> >>
> >> >
> >> > You end up setting somepointer->polarity = true; in a later patch.
> >> >
> >> > Since you're respining a V4 I'd suggest a name that describes a little
> >> > bit better than polarity. Setting polarity = true is a little bit
> >> > liked being asked "you you like ice-cream or apple pie" and then
> >> > saying "yes please".
> >>
> >> It's about handshake interface polarity, so, what about hs_polarity?
> >
> > So it means: handshake has polarity (true) or handshake has no polarity
> > (omnidirectional?) (false), right?
>
> It means that handshake polarity _signal_ is inverted (true) or
> default (false) in terms of hardware gates.
Would it not be better then to name it handshake_inverted ? That is
something you can ask and answer with true or false.
Maarten
> --
> With Best Regards,
> Andy Shevchenko
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface
2016-05-06 15:48 [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface Maarten Brock
@ 2016-05-06 18:08 ` Andy Shevchenko
0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2016-05-06 18:08 UTC (permalink / raw)
To: Maarten Brock, Andy Shevchenko
Cc: Bryan O'Donoghue, Peter Hurley, linux-serial, Vinod Koul,
linux-kernel, dmaengine, Greg Kroah-Hartman, Puustinen, Ismo,
Heikki Krogerus
On Fri, 2016-05-06 at 17:48 +0200, Maarten Brock wrote:
> + bool polarity;
> > > > > So this variable is not very intuitively named.
> > > > There is a help above. This is a property of the Synopsys
> > > > DesignWare DMA
> > > > engine. Anyone familiar with datasheet easily understands this.
> > > >
> > > > >
> > > > >
> > > > > You end up setting somepointer->polarity = true; in a later
> > > > > patch.
> > > > >
> > > > > Since you're respining a V4 I'd suggest a name that describes
> > > > > a little
> > > > > bit better than polarity. Setting polarity = true is a little
> > > > > bit
> > > > > liked being asked "you you like ice-cream or apple pie" and
> > > > > then
> > > > > saying "yes please".
> > > > It's about handshake interface polarity, so, what about
> > > > hs_polarity?
> > > So it means: handshake has polarity (true) or handshake has no
> > > polarity
> > > (omnidirectional?) (false), right?
> > It means that handshake polarity _signal_ is inverted (true) or
> > default (false) in terms of hardware gates.
> Would it not be better then to name it handshake_inverted ? That is
> something you can ask and answer with true or false.
>
I would stick for now with hs_polarity as agreed with Bryan. Without
specification any (more or less short) name will suck anyway.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface
@ 2016-05-06 11:20 Maarten Brock
2016-05-06 11:38 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Maarten Brock @ 2016-05-06 11:20 UTC (permalink / raw)
To: Andy Shevchenko, Bryan O'Donoghue, Peter Hurley, linux-serial,
Vinod Koul, linux-kernel, dmaengine, Greg Kroah-Hartman,
ismo.puustinen, Heikki Krogerus
----- Original Message -----
From: Andy Shevchenko [mailto:andriy.shevchenko@linux.intel.com]
To: Bryan O'Donoghue [mailto:pure.logic@nexus-software.ie], Peter Hurley [mailto:peter@hurleysoftware.com], linux-serial@vger.kernel.org, Vinod Koul [mailto:vinod.koul@intel.com], linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org], ismo.puustinen@intel.com, Heikki Krogerus [mailto:heikki.krogerus@linux.intel.com]
Sent: Fri, 06 May 2016 12:42:00 +0200
Subject: Re: [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface
> On Thu, 2016-05-05 at 18:54 +0100, Bryan O'Donoghue wrote:
> > On Wed, 2016-04-27 at 16:48 +0300, Andy Shevchenko wrote:
> > >
> > > + bool polarity;
> > So this variable is not very intuitively named.
>
> There is a help above. This is a property of the Synopsys DesignWare DMA
> engine. Anyone familiar with datasheet easily understands this.
>
> >
> > You end up setting somepointer->polarity = true; in a later patch.
> >
> > Since you're respining a V4 I'd suggest a name that describes a little
> > bit better than polarity. Setting polarity = true is a little bit
> > liked being asked "you you like ice-cream or apple pie" and then
> > saying "yes please".
>
> It's about handshake interface polarity, so, what about hs_polarity?
So it means: handshake has polarity (true) or handshake has no polarity
(omnidirectional?) (false), right?
Maarten
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface
2016-05-06 11:20 Maarten Brock
@ 2016-05-06 11:38 ` Andy Shevchenko
0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2016-05-06 11:38 UTC (permalink / raw)
To: Maarten Brock
Cc: Andy Shevchenko, Bryan O'Donoghue, Peter Hurley,
linux-serial@vger.kernel.org, Vinod Koul,
linux-kernel@vger.kernel.org, dmaengine, Greg Kroah-Hartman,
Puustinen, Ismo, Heikki Krogerus
On Fri, May 6, 2016 at 2:20 PM, Maarten Brock <m.brock@vanmierlo.com> wrote:
>> > >
>> > > + bool polarity;
>> > So this variable is not very intuitively named.
>>
>> There is a help above. This is a property of the Synopsys DesignWare DMA
>> engine. Anyone familiar with datasheet easily understands this.
>>
>> >
>> > You end up setting somepointer->polarity = true; in a later patch.
>> >
>> > Since you're respining a V4 I'd suggest a name that describes a little
>> > bit better than polarity. Setting polarity = true is a little bit
>> > liked being asked "you you like ice-cream or apple pie" and then
>> > saying "yes please".
>>
>> It's about handshake interface polarity, so, what about hs_polarity?
>
> So it means: handshake has polarity (true) or handshake has no polarity
> (omnidirectional?) (false), right?
It means that handshake polarity _signal_ is inverted (true) or
default (false) in terms of hardware gates.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 00/11] serial: 8250: split LPSS to 8250_lpss, enable DMA on Quark
@ 2016-04-27 13:48 Andy Shevchenko
2016-04-27 13:48 ` [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2016-04-27 13:48 UTC (permalink / raw)
To: Bryan O'Donoghue, Peter Hurley, linux-serial, Vinod Koul,
linux-kernel, dmaengine, Greg Kroah-Hartman, ismo.puustinen,
Heikki Krogerus
Cc: Andy Shevchenko
This is combined series of two things:
- split out the Intel LPSS specific driver from 8250_pci into 8250_lpss
- enable DMA support on Intel Quark UART
The patch has been tested on few Intel SoCs / platforms. In any case I would
like to ask Bryan to do independent test.
This is targeting serial subsystem, thus it would be nice to get and Ack from
Vinod first. Moreover, the series depends on [1] that is now under review. On
the other hand Vinod proposed to take it through dma-slave tree. Greg?
That's why I asked Vinod to create immutable tag / branch for the [1] and the
dependants (at least one more, which is sata_dwc_460ex) can use it.
The series can be reached in the branch located at [2].
[1] http://www.spinics.net/lists/kernel/msg2244475.html
[2] https://bitbucket.org/andy-shev/linux/branch/topic%2Fdw%2Fqrk
Since v2:
- add tags
- rebase on top of new version of [1]
Since v1:
- address most of Peter's comments (mostly changelog to patch 8)
- add tag to patch 5
- drop patch 6 from the series to be separately dealt with
Andy Shevchenko (11):
dmaengine: dw: keep copy of custom slave config in dwc
dmaengine: dw: provide probe(), remove() stubs for users
dmaengine: dw: set polarity of handshake interface
dmaengine: dw: override LLP support if asked in platform data
serial: 8250_dma: switch to new dmaengine_terminate_* API
serial: 8250_dma: adjust DMA address of the UART
serial: 8250: enable AFE on ports where FIFO is 16 bytes
serial: 8250_lpss: split LPSS driver to separate module
serial: 8250_lpss: move Quark code from PCI driver
serial: 8250_lpss: enable MSI for Intel Quark
serial: 8250_lpss: enable DMA on Intel Quark UART
drivers/dma/dw/core.c | 41 ++---
drivers/dma/dw/regs.h | 5 +-
drivers/tty/serial/8250/8250.h | 5 +
drivers/tty/serial/8250/8250_dma.c | 14 +-
drivers/tty/serial/8250/8250_lpss.c | 344 +++++++++++++++++++++++++++++++++++
drivers/tty/serial/8250/8250_pci.c | 242 +-----------------------
drivers/tty/serial/8250/8250_port.c | 9 +-
drivers/tty/serial/8250/Kconfig | 14 +-
drivers/tty/serial/8250/Makefile | 1 +
include/linux/dma/dw.h | 5 +
include/linux/platform_data/dma-dw.h | 4 +
11 files changed, 413 insertions(+), 271 deletions(-)
create mode 100644 drivers/tty/serial/8250/8250_lpss.c
--
2.8.0.rc3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface
2016-04-27 13:48 [PATCH v3 00/11] serial: 8250: split LPSS to 8250_lpss, enable DMA on Quark Andy Shevchenko
@ 2016-04-27 13:48 ` Andy Shevchenko
2016-05-05 17:54 ` Bryan O'Donoghue
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2016-04-27 13:48 UTC (permalink / raw)
To: Bryan O'Donoghue, Peter Hurley, linux-serial, Vinod Koul,
linux-kernel, dmaengine, Greg Kroah-Hartman, ismo.puustinen,
Heikki Krogerus
Cc: Andy Shevchenko
Intel Quark UART uses DesignWare DMA IP. Though the DMA IP is connected in such
way that handshake interface uses inverted polarity. We have to provide a
possibility to set this in the DMA driver when configuring a channel.
Introduce a new member of custom slave configuration called 'polarity' and set
active low polarity in case this value is 'true'.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/dma/dw/core.c | 2 ++
include/linux/platform_data/dma-dw.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
index 81b06df..9c7bc7a 100644
--- a/drivers/dma/dw/core.c
+++ b/drivers/dma/dw/core.c
@@ -150,6 +150,8 @@ static void dwc_initialize(struct dw_dma_chan *dwc)
cfghi |= DWC_CFGH_DST_PER(dwc->dws.dst_id);
cfghi |= DWC_CFGH_SRC_PER(dwc->dws.src_id);
+ cfglo |= dwc->dws.polarity ? DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL : 0;
+
channel_writel(dwc, CFG_LO, cfglo);
channel_writel(dwc, CFG_HI, cfghi);
diff --git a/include/linux/platform_data/dma-dw.h b/include/linux/platform_data/dma-dw.h
index d15d8ba..192f3a2 100644
--- a/include/linux/platform_data/dma-dw.h
+++ b/include/linux/platform_data/dma-dw.h
@@ -23,6 +23,7 @@
* @dst_id: dst request line
* @m_master: memory master for transfers on allocated channel
* @p_master: peripheral master for transfers on allocated channel
+ * @polarity: set active low polarity of handshake interface
*/
struct dw_dma_slave {
struct device *dma_dev;
@@ -30,6 +31,7 @@ struct dw_dma_slave {
u8 dst_id;
u8 m_master;
u8 p_master;
+ bool polarity;
};
/**
--
2.8.0.rc3
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface
2016-04-27 13:48 ` [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface Andy Shevchenko
@ 2016-05-05 17:54 ` Bryan O'Donoghue
2016-05-06 10:42 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Bryan O'Donoghue @ 2016-05-05 17:54 UTC (permalink / raw)
To: Andy Shevchenko, Peter Hurley, linux-serial, Vinod Koul,
linux-kernel, dmaengine, Greg Kroah-Hartman, ismo.puustinen,
Heikki Krogerus
On Wed, 2016-04-27 at 16:48 +0300, Andy Shevchenko wrote:
> + bool polarity;
So this variable is not very intuitively named.
You end up setting somepointer->polarity = true; in a later patch.
Since you're respining a V4 I'd suggest a name that describes a little
bit better than polarity. Setting polarity = true is a little bit liked
being asked "you you like ice-cream or apple pie" and then saying "yes
please".
---
bod
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface
2016-05-05 17:54 ` Bryan O'Donoghue
@ 2016-05-06 10:42 ` Andy Shevchenko
2016-05-06 11:10 ` Bryan O'Donoghue
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2016-05-06 10:42 UTC (permalink / raw)
To: Bryan O'Donoghue, Peter Hurley, linux-serial, Vinod Koul,
linux-kernel, dmaengine, Greg Kroah-Hartman, ismo.puustinen,
Heikki Krogerus
On Thu, 2016-05-05 at 18:54 +0100, Bryan O'Donoghue wrote:
> On Wed, 2016-04-27 at 16:48 +0300, Andy Shevchenko wrote:
> >
> > + bool polarity;
> So this variable is not very intuitively named.
There is a help above. This is a property of the Synopsys DesignWare DMA
engine. Anyone familiar with datasheet easily understands this.
>
> You end up setting somepointer->polarity = true; in a later patch.
>
> Since you're respining a V4 I'd suggest a name that describes a little
> bit better than polarity. Setting polarity = true is a little bit
> liked
> being asked "you you like ice-cream or apple pie" and then saying "yes
> please".
It's about handshake interface polarity, so, what about hs_polarity?
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface
2016-05-06 10:42 ` Andy Shevchenko
@ 2016-05-06 11:10 ` Bryan O'Donoghue
0 siblings, 0 replies; 8+ messages in thread
From: Bryan O'Donoghue @ 2016-05-06 11:10 UTC (permalink / raw)
To: Andy Shevchenko, Peter Hurley, linux-serial, Vinod Koul,
linux-kernel, dmaengine, Greg Kroah-Hartman, ismo.puustinen,
Heikki Krogerus
On Fri, 2016-05-06 at 13:42 +0300, Andy Shevchenko wrote:
> It's about handshake interface polarity, so, what about hs_polarity?
Works for me.
---
bod
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-05-06 18:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-06 15:48 [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface Maarten Brock
2016-05-06 18:08 ` Andy Shevchenko
-- strict thread matches above, loose matches on Subject: below --
2016-05-06 11:20 Maarten Brock
2016-05-06 11:38 ` Andy Shevchenko
2016-04-27 13:48 [PATCH v3 00/11] serial: 8250: split LPSS to 8250_lpss, enable DMA on Quark Andy Shevchenko
2016-04-27 13:48 ` [PATCH v3 03/11] dmaengine: dw: set polarity of handshake interface Andy Shevchenko
2016-05-05 17:54 ` Bryan O'Donoghue
2016-05-06 10:42 ` Andy Shevchenko
2016-05-06 11:10 ` Bryan O'Donoghue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).