lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 2 Mar 2010 19:28:34 +0530
From:	"G, Manjunath Kondaiah" <manjugk@...com>
To:	"S, Venkatraman" <svenkatr@...com>,
	Tony Lindgren <tony@...mide.com>,
	"Raja, Govindraj" <govindraj.raja@...com>,
	Greg KH <greg@...ah.com>,
	"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Kevin Hilman <khilman@...prootsystems.com>,
	Olof Johansson <olof@...om.net>
Subject: RE: [PATCH] serial: Add OMAP high-speed UART driver.

 

> -----Original Message-----
> From: svenkatr@...il.com [mailto:svenkatr@...il.com] On 
> Behalf Of Venkatraman S
> Sent: Tuesday, March 02, 2010 7:16 PM
> To: Tony Lindgren; G, Manjunath Kondaiah; Raja, Govindraj; 
> Greg KH; linux-serial@...r.kernel.org; 
> linux-omap@...r.kernel.org; linux-kernel@...r.kernel.org; 
> Kevin Hilman; Olof Johansson
> Subject: Re: [PATCH] serial: Add OMAP high-speed UART driver.
> 
> On Tue, Mar 2, 2010 at 12:22 PM, Tony Lindgren 
> <tony@...mide.com> wrote:
> > * G, Manjunath Kondaiah <manjugk@...com> [100301 22:24]:
> >>
> >>
> >>
> >> > > > > +     up->uart_dma.prev_rx_dma_pos =
> >> > up->uart_dma.rx_buf_dma_phys;
> >> > > > > +     if (cpu_is_omap44xx())
> >> > > > > +             omap_writel(0, OMAP44XX_DMA4_BASE
> >> > > > > +                     +
> >> > OMAP_DMA4_CDAC(up->uart_dma.rx_dma_channel));
> >> > > > > +     else
> >> > > > > +             omap_writel(0, OMAP34XX_DMA4_BASE
> >> > > > > +                     +
> >> > OMAP_DMA4_CDAC(up->uart_dma.rx_dma_channel));
> >> > > >
> >> > > > NAK. Please don't use omap_read/write for for new 
> code. And do not
> >> > > > tinker with the omap hardware registers directly in 
> the driver.
> >> > > >
> >> > > > This needs to be done properly in
> >> > arch/arm/plat-omap/dma.c instead.
> >> > >
> >> > > Thanks for the suggestion.
> >> > >
> >> > > Currently, dma_read/dma_write are #define's in dma.c which
> >> > cannot be
> >> > > accessed outside dma.c. I don't see any API's in dma.c for
> >> > setting required
> >> > > value for this register?
> >> >
> >> > Hmm isn't this the same as omap_get_dma_dst_pos(int 
> lch)? If you're
> >> > trying do something that's not in dma.c, we can add a 
> new function
> >> > for it.
> >>
> >> The omap_get_dma_dst_pos(int lch) is for read operation in 
> CDAC register.
> >> But, We need to write required value into CDAC register. 
> For this, I propose:
> >>
> >> omap_set_dma_dst_pos(int lch, int value) which does not 
> exist in current dma
> >> driver.
> >
> > OK, it that's needed.
> >
> > Tony
> > --
> CDAC is a shadow register used for monitoring the DMA channel.
>  I think it would be a lot
> simpler if omap_start_dma() always resets CDAC to 0, and the 
> UART driver
> just not set it explicitly.

This seems to be better option than exposing CDAC read/write API
to other drivers since user need to write '0' before starting any DMA
transfer which can be be done in omap_start_dma().

I am wondering how other drivers are using DMA transfer API's without 
resetting CDAC to zero. 

-Manjunath


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ