linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Serial 8250 DMA Broken on OMAP3630
@ 2019-10-06 17:04 Adam Ford
  2019-10-07  8:17 ` Andy Shevchenko
  2019-10-09 13:43 ` Vignesh Raghavendra
  0 siblings, 2 replies; 8+ messages in thread
From: Adam Ford @ 2019-10-06 17:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Vignesh R, Andy Shevchenko,
	Douglas Anderson, Adam Ford, Tony Lindgren, Yegor Yefremov,
	linux-serial, Linux Kernel Mailing List

Has anyone else had any issues using the CONFIG_SERIAL_8250_DMA on the OMAP?

I can use the DMA on the legacy, omap-serial driver, but when I enable
the DMA on the 8250-omap driver, I get missing frames in Bluetooth.

The older driver seems to have an ISR that seems to address a variety
of items compared to the very tiny ISR for 8250-omap.c.

I am not exactly sure where to start, but if someone has any
suggestions on how I can troubleshoot, please let me know.  As of now,
I have to disable CONFIG_SERIAL_8250_DMA to get the Bluetooth
connected to UART2 operational on a DM3730 at 3,000,000 baud, but it
appears to work just fine after some patches I just submitted for
handling RTS/CTS.  The legacy omap-serial driver works fine with DMA.

adam

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Serial 8250 DMA Broken on OMAP3630
  2019-10-06 17:04 Serial 8250 DMA Broken on OMAP3630 Adam Ford
@ 2019-10-07  8:17 ` Andy Shevchenko
  2019-10-09 13:43 ` Vignesh Raghavendra
  1 sibling, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2019-10-07  8:17 UTC (permalink / raw)
  To: Adam Ford, Sebastian Andrzej Siewior
  Cc: Greg Kroah-Hartman, Jiri Slaby, Vignesh R, Douglas Anderson,
	Tony Lindgren, Yegor Yefremov, linux-serial,
	Linux Kernel Mailing List

On Sun, Oct 06, 2019 at 12:04:47PM -0500, Adam Ford wrote:

I think the best one who may shed a light is bigeasy@ (Cc'ed).

> Has anyone else had any issues using the CONFIG_SERIAL_8250_DMA on the OMAP?
> 
> I can use the DMA on the legacy, omap-serial driver, but when I enable
> the DMA on the 8250-omap driver, I get missing frames in Bluetooth.
> 
> The older driver seems to have an ISR that seems to address a variety
> of items compared to the very tiny ISR for 8250-omap.c.
> 
> I am not exactly sure where to start, but if someone has any
> suggestions on how I can troubleshoot, please let me know.  As of now,
> I have to disable CONFIG_SERIAL_8250_DMA to get the Bluetooth
> connected to UART2 operational on a DM3730 at 3,000,000 baud, but it
> appears to work just fine after some patches I just submitted for
> handling RTS/CTS.  The legacy omap-serial driver works fine with DMA.
> 
> adam

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Serial 8250 DMA Broken on OMAP3630
  2019-10-06 17:04 Serial 8250 DMA Broken on OMAP3630 Adam Ford
  2019-10-07  8:17 ` Andy Shevchenko
@ 2019-10-09 13:43 ` Vignesh Raghavendra
  2019-10-09 14:08   ` Adam Ford
  1 sibling, 1 reply; 8+ messages in thread
From: Vignesh Raghavendra @ 2019-10-09 13:43 UTC (permalink / raw)
  To: Adam Ford, Greg Kroah-Hartman, Jiri Slaby, Andy Shevchenko,
	Douglas Anderson, Tony Lindgren, Yegor Yefremov, linux-serial,
	Linux Kernel Mailing List

Hi Adam,

On 06/10/19 10:34 PM, Adam Ford wrote:
> Has anyone else had any issues using the CONFIG_SERIAL_8250_DMA on the OMAP?
> 
> I can use the DMA on the legacy, omap-serial driver, but when I enable
> the DMA on the 8250-omap driver, I get missing frames in Bluetooth.
> 
> The older driver seems to have an ISR that seems to address a variety
> of items compared to the very tiny ISR for 8250-omap.c.
> 
> I am not exactly sure where to start, but if someone has any
> suggestions on how I can troubleshoot, please let me know.  As of now,
> I have to disable CONFIG_SERIAL_8250_DMA to get the Bluetooth
> connected to UART2 operational on a DM3730 at 3,000,000 baud, but it
> appears to work just fine after some patches I just submitted for
> handling RTS/CTS.  The legacy omap-serial driver works fine with DMA.
> 

Mainline omap-serial does not support DMA (evident from lack of
dmaengine API calls) and therefore is not a regression. So OMAP3 UART
DMA was never tested at least with 8250 driver.
I am not sure enabling UART DMA on OMAP3 would be a trivial job. We need
analyse of whether all erratas workarounds are implemented and see if
there any difference wrt DMA integration itself. Do we know if UART DMA
ever worked on OMAP3 previously?

> adam
> 

-- 
Regards
Vignesh

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Serial 8250 DMA Broken on OMAP3630
  2019-10-09 13:43 ` Vignesh Raghavendra
@ 2019-10-09 14:08   ` Adam Ford
  2019-10-09 17:34     ` Tony Lindgren
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Ford @ 2019-10-09 14:08 UTC (permalink / raw)
  To: Vignesh Raghavendra
  Cc: Greg Kroah-Hartman, Jiri Slaby, Andy Shevchenko,
	Douglas Anderson, Tony Lindgren, Yegor Yefremov, linux-serial,
	Linux Kernel Mailing List

On Wed, Oct 9, 2019 at 8:42 AM Vignesh Raghavendra <vigneshr@ti.com> wrote:
>
> Hi Adam,
>
> On 06/10/19 10:34 PM, Adam Ford wrote:
> > Has anyone else had any issues using the CONFIG_SERIAL_8250_DMA on the OMAP?
> >
> > I can use the DMA on the legacy, omap-serial driver, but when I enable
> > the DMA on the 8250-omap driver, I get missing frames in Bluetooth.
> >
> > The older driver seems to have an ISR that seems to address a variety
> > of items compared to the very tiny ISR for 8250-omap.c.
> >
> > I am not exactly sure where to start, but if someone has any
> > suggestions on how I can troubleshoot, please let me know.  As of now,
> > I have to disable CONFIG_SERIAL_8250_DMA to get the Bluetooth
> > connected to UART2 operational on a DM3730 at 3,000,000 baud, but it
> > appears to work just fine after some patches I just submitted for
> > handling RTS/CTS.  The legacy omap-serial driver works fine with DMA.
> >
>
> Mainline omap-serial does not support DMA (evident from lack of
> dmaengine API calls) and therefore is not a regression. So OMAP3 UART
> DMA was never tested at least with 8250 driver.
> I am not sure enabling UART DMA on OMAP3 would be a trivial job. We need
> analyse of whether all erratas workarounds are implemented and see if
> there any difference wrt DMA integration itself. Do we know if UART DMA
> ever worked on OMAP3 previously?

Can we disable CONFIG_SERIAL_8250_DMA from omap2plus_defconfig?   As
of right now, it's the only way I can use the Bluetooth.  There are
#ifdef's in the 8250-omap driver, so it looks like some of the hooks
are there, but if it's incomplete, it seems like we shouldn't enable
this config option by default yet.

adam
>
> > adam
> >
>
> --
> Regards
> Vignesh

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Serial 8250 DMA Broken on OMAP3630
  2019-10-09 14:08   ` Adam Ford
@ 2019-10-09 17:34     ` Tony Lindgren
  2019-10-09 19:27       ` Adam Ford
  0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2019-10-09 17:34 UTC (permalink / raw)
  To: Adam Ford
  Cc: Vignesh Raghavendra, Greg Kroah-Hartman, Jiri Slaby,
	Andy Shevchenko, Douglas Anderson, Yegor Yefremov, linux-serial,
	Linux Kernel Mailing List

* Adam Ford <aford173@gmail.com> [191009 14:09]:
> On Wed, Oct 9, 2019 at 8:42 AM Vignesh Raghavendra <vigneshr@ti.com> wrote:
> >
> > Hi Adam,
> >
> > On 06/10/19 10:34 PM, Adam Ford wrote:
> > > Has anyone else had any issues using the CONFIG_SERIAL_8250_DMA on the OMAP?
> > >
> > > I can use the DMA on the legacy, omap-serial driver, but when I enable
> > > the DMA on the 8250-omap driver, I get missing frames in Bluetooth.
> > >
> > > The older driver seems to have an ISR that seems to address a variety
> > > of items compared to the very tiny ISR for 8250-omap.c.
> > >
> > > I am not exactly sure where to start, but if someone has any
> > > suggestions on how I can troubleshoot, please let me know.  As of now,
> > > I have to disable CONFIG_SERIAL_8250_DMA to get the Bluetooth
> > > connected to UART2 operational on a DM3730 at 3,000,000 baud, but it
> > > appears to work just fine after some patches I just submitted for
> > > handling RTS/CTS.  The legacy omap-serial driver works fine with DMA.
> > >
> >
> > Mainline omap-serial does not support DMA (evident from lack of
> > dmaengine API calls) and therefore is not a regression. So OMAP3 UART
> > DMA was never tested at least with 8250 driver.
> > I am not sure enabling UART DMA on OMAP3 would be a trivial job. We need
> > analyse of whether all erratas workarounds are implemented and see if
> > there any difference wrt DMA integration itself. Do we know if UART DMA
> > ever worked on OMAP3 previously?
> 
> Can we disable CONFIG_SERIAL_8250_DMA from omap2plus_defconfig?   As
> of right now, it's the only way I can use the Bluetooth.  There are
> #ifdef's in the 8250-omap driver, so it looks like some of the hooks
> are there, but if it's incomplete, it seems like we shouldn't enable
> this config option by default yet.

From what I recall I tested that DMA on omap3 worked fine with runtime
PM for console. Certainly there are issues still remaining though.

If you want to disable dma for a specific port, just delete the
add /delete-property/dma-names for the port in question in your
board specific dts file.

See 8250_omap.c for of_property_count_strings(np, "dma-names").

Regards,

Tony



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Serial 8250 DMA Broken on OMAP3630
  2019-10-09 17:34     ` Tony Lindgren
@ 2019-10-09 19:27       ` Adam Ford
  2019-10-09 20:16         ` Tony Lindgren
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Ford @ 2019-10-09 19:27 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Vignesh Raghavendra, Greg Kroah-Hartman, Jiri Slaby,
	Andy Shevchenko, Douglas Anderson, Yegor Yefremov, linux-serial,
	Linux Kernel Mailing List

On Wed, Oct 9, 2019 at 12:34 PM Tony Lindgren <tony@atomide.com> wrote:
>
> * Adam Ford <aford173@gmail.com> [191009 14:09]:
> > On Wed, Oct 9, 2019 at 8:42 AM Vignesh Raghavendra <vigneshr@ti.com> wrote:
> > >
> > > Hi Adam,
> > >
> > > On 06/10/19 10:34 PM, Adam Ford wrote:
> > > > Has anyone else had any issues using the CONFIG_SERIAL_8250_DMA on the OMAP?
> > > >
> > > > I can use the DMA on the legacy, omap-serial driver, but when I enable
> > > > the DMA on the 8250-omap driver, I get missing frames in Bluetooth.
> > > >
> > > > The older driver seems to have an ISR that seems to address a variety
> > > > of items compared to the very tiny ISR for 8250-omap.c.
> > > >
> > > > I am not exactly sure where to start, but if someone has any
> > > > suggestions on how I can troubleshoot, please let me know.  As of now,
> > > > I have to disable CONFIG_SERIAL_8250_DMA to get the Bluetooth
> > > > connected to UART2 operational on a DM3730 at 3,000,000 baud, but it
> > > > appears to work just fine after some patches I just submitted for
> > > > handling RTS/CTS.  The legacy omap-serial driver works fine with DMA.
> > > >
> > >
> > > Mainline omap-serial does not support DMA (evident from lack of
> > > dmaengine API calls) and therefore is not a regression. So OMAP3 UART
> > > DMA was never tested at least with 8250 driver.
> > > I am not sure enabling UART DMA on OMAP3 would be a trivial job. We need
> > > analyse of whether all erratas workarounds are implemented and see if
> > > there any difference wrt DMA integration itself. Do we know if UART DMA
> > > ever worked on OMAP3 previously?
> >
> > Can we disable CONFIG_SERIAL_8250_DMA from omap2plus_defconfig?   As
> > of right now, it's the only way I can use the Bluetooth.  There are
> > #ifdef's in the 8250-omap driver, so it looks like some of the hooks
> > are there, but if it's incomplete, it seems like we shouldn't enable
> > this config option by default yet.
>
> From what I recall I tested that DMA on omap3 worked fine with runtime
> PM for console. Certainly there are issues still remaining though.
>
> If you want to disable dma for a specific port, just delete the
> add /delete-property/dma-names for the port in question in your
> board specific dts file.
>
> See 8250_omap.c for of_property_count_strings(np, "dma-names").

Thank you.  That seems to have worked.  I'll check the AM3517 when I
have some time to see if it needs the same patch.  For now, I pushed
the patch to the omap mailing list for the Logic PD Torpedo board.

Should we consider removing the OMAP_SERIAL from omap2plus_defconfig
in the 8250 is the preferred driver?  It seems odd to me that both
drivers are enabled.

adam
>
> Regards,
>
> Tony
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Serial 8250 DMA Broken on OMAP3630
  2019-10-09 19:27       ` Adam Ford
@ 2019-10-09 20:16         ` Tony Lindgren
  2019-10-10 14:11           ` Adam Ford
  0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2019-10-09 20:16 UTC (permalink / raw)
  To: Adam Ford
  Cc: Vignesh Raghavendra, Greg Kroah-Hartman, Jiri Slaby,
	Andy Shevchenko, Douglas Anderson, Yegor Yefremov, linux-serial,
	Linux Kernel Mailing List

* Adam Ford <aford173@gmail.com> [191009 19:28]:
> On Wed, Oct 9, 2019 at 12:34 PM Tony Lindgren <tony@atomide.com> wrote:
> > From what I recall I tested that DMA on omap3 worked fine with runtime
> > PM for console. Certainly there are issues still remaining though.
> >
> > If you want to disable dma for a specific port, just delete the
> > add /delete-property/dma-names for the port in question in your
> > board specific dts file.
> >
> > See 8250_omap.c for of_property_count_strings(np, "dma-names").
> 
> Thank you.  That seems to have worked.  I'll check the AM3517 when I
> have some time to see if it needs the same patch.  For now, I pushed
> the patch to the omap mailing list for the Logic PD Torpedo board.
> 
> Should we consider removing the OMAP_SERIAL from omap2plus_defconfig
> in the 8250 is the preferred driver?  It seems odd to me that both
> drivers are enabled.

We have CONFIG_SERIAL_8250_OMAP=y and by default also we have
CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y. With those omap_serial
won't probe.. So yeah I guess for v5.5 we could drop the
option for CONFIG_SERIAL_OMAP for both omap2plus_defconfig and
multi_v7_defconfig.

Regards,

Tony

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Serial 8250 DMA Broken on OMAP3630
  2019-10-09 20:16         ` Tony Lindgren
@ 2019-10-10 14:11           ` Adam Ford
  0 siblings, 0 replies; 8+ messages in thread
From: Adam Ford @ 2019-10-10 14:11 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Vignesh Raghavendra, Greg Kroah-Hartman, Jiri Slaby,
	Andy Shevchenko, Douglas Anderson, Yegor Yefremov, linux-serial,
	Linux Kernel Mailing List

On Wed, Oct 9, 2019 at 3:16 PM Tony Lindgren <tony@atomide.com> wrote:
>
> * Adam Ford <aford173@gmail.com> [191009 19:28]:
> > On Wed, Oct 9, 2019 at 12:34 PM Tony Lindgren <tony@atomide.com> wrote:
> > > From what I recall I tested that DMA on omap3 worked fine with runtime
> > > PM for console. Certainly there are issues still remaining though.
> > >
> > > If you want to disable dma for a specific port, just delete the
> > > add /delete-property/dma-names for the port in question in your
> > > board specific dts file.
> > >
> > > See 8250_omap.c for of_property_count_strings(np, "dma-names").
> >
> > Thank you.  That seems to have worked.  I'll check the AM3517 when I
> > have some time to see if it needs the same patch.  For now, I pushed
> > the patch to the omap mailing list for the Logic PD Torpedo board.
> >
> > Should we consider removing the OMAP_SERIAL from omap2plus_defconfig
> > in the 8250 is the preferred driver?  It seems odd to me that both
> > drivers are enabled.
>
> We have CONFIG_SERIAL_8250_OMAP=y and by default also we have
> CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y. With those omap_serial
> won't probe.. So yeah I guess for v5.5 we could drop the
> option for CONFIG_SERIAL_OMAP for both omap2plus_defconfig and
> multi_v7_defconfig.

Do you want me to push a patch for that, or is that something you want to do?

adam
>
> Regards,
>
> Tony

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-10-10 14:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-06 17:04 Serial 8250 DMA Broken on OMAP3630 Adam Ford
2019-10-07  8:17 ` Andy Shevchenko
2019-10-09 13:43 ` Vignesh Raghavendra
2019-10-09 14:08   ` Adam Ford
2019-10-09 17:34     ` Tony Lindgren
2019-10-09 19:27       ` Adam Ford
2019-10-09 20:16         ` Tony Lindgren
2019-10-10 14:11           ` Adam Ford

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).