RE: [RFC PATCH 01/13] ARM: davinci: move private EDMA API to arm/common

2012-09-23 Thread Hebbar, Gururaja
On Thu, Sep 20, 2012 at 20:13:34, Porter, Matt wrote:
> Move mach-davinci/dma.c to common/edma.c so it can be used
> by OMAP (specifically AM33xx atm) as well. This just moves
> the private EDMA API but does not support OMAP.
> 
> Signed-off-by: Matt Porter 
> ---
>  arch/arm/Kconfig   |1 +
>  arch/arm/common/Kconfig|3 +
>  arch/arm/common/Makefile   |1 +
>  arch/arm/common/edma.c | 1588 
> 
>  arch/arm/include/asm/mach/edma.h   |  267 +
>  arch/arm/mach-davinci/Makefile |2 +-
>  arch/arm/mach-davinci/devices.c|3 +-
>  arch/arm/mach-davinci/dm355.c  |2 +-
>  arch/arm/mach-davinci/dm365.c  |2 +-
>  arch/arm/mach-davinci/dm644x.c |2 +-
>  arch/arm/mach-davinci/dm646x.c |2 +-
>  arch/arm/mach-davinci/dma.c| 1588 
> 


>  arch/arm/mach-davinci/include/mach/asp.h   |2 +-

This will clash with patch "ASoC/ARM: Davinci: McASP: split asp header
into platform and audio specific" queued in ASoC tree by Mark Brown 
tree (Auio - ASoC Tree)

I forgot to mention this last time.  Sorry

>  arch/arm/mach-davinci/include/mach/da8xx.h |3 +-
>  arch/arm/mach-davinci/include/mach/edma.h  |  267 -
>  arch/arm/mach-davinci/include/mach/spi.h   |2 +-
>  arch/arm/plat-omap/Kconfig |1 +
>  17 files changed, 1872 insertions(+), 1864 deletions(-)
>  create mode 100644 arch/arm/common/edma.c
>  create mode 100644 arch/arm/include/asm/mach/edma.h
>  delete mode 100644 arch/arm/mach-davinci/dma.c
>  delete mode 100644 arch/arm/mach-davinci/include/mach/edma.h
> 
...snip...
...snip...


Regards, 
Gururaja

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [RFC PATCH 01/13] ARM: davinci: move private EDMA API to arm/common

2012-09-21 Thread Russell King - ARM Linux
On Fri, Sep 21, 2012 at 02:34:46PM -0400, Matt Porter wrote:
> On Fri, Sep 21, 2012 at 10:42:05AM +0100, Russell King wrote:
> > Here's the pertinant question: "is it platform data?"  Looking at the
> > file, it appears to be internal data structures and register definitions
> > for the driver itself.  Therefore, it isn't platform data, and it
> > shouldn't be living separately from the driver.
> > 
> > If the driver itself only makes use of the data structures, the data
> > structures should be defined either within the driver, or a header file
> > co-located next to the driver itself.  The same goes for register
> > definitions too.
> > 
> > The only structure that I can find which isn't internal to the driver
> > is struct edma_soc_info, struct edma_rsv_info, and the enum dma_event_q.
> > Those can go to include/linux/platform_data, but the rest should not.
> 
> Ok, but is it ok to keep the actual private EDMA API portion in
> arch/arm/include/asm/mach/? It's not a problem to move the internal
> portions to a local include and that pdata to the appropriate place.

Move the platform data parts to include/linux/platform_data.
Move the driver specific parts to be either in the .c file for the
driver, or in a .h file _along_ _side_ the .c file.

Private data for drivers should be kept as close to the driver as
possible, whether that be in the same .c file as the driver itself,
or a header co-located with the .c file.

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [RFC PATCH 01/13] ARM: davinci: move private EDMA API to arm/common

2012-09-21 Thread Matt Porter
On Fri, Sep 21, 2012 at 10:42:05AM +0100, Russell King wrote:
> On Fri, Sep 21, 2012 at 09:33:42AM +, Hebbar, Gururaja wrote:
> > On Fri, Sep 21, 2012 at 14:59:23, Russell King - ARM Linux wrote:
> > > On Thu, Sep 20, 2012 at 10:43:34AM -0400, Matt Porter wrote:
> > > > Move mach-davinci/dma.c to common/edma.c so it can be used
> > > > by OMAP (specifically AM33xx atm) as well. This just moves
> > > > the private EDMA API but does not support OMAP.
> > > > 
> > > > Signed-off-by: Matt Porter 
> > > > ---
> > > >  arch/arm/Kconfig   |1 +
> > > >  arch/arm/common/Kconfig|3 +
> > > >  arch/arm/common/Makefile   |1 +
> > > >  arch/arm/common/edma.c | 1588 
> > > > 
> > > >  arch/arm/include/asm/mach/edma.h   |  267 +
> > > 
> > > asm/mach should not be used as a dumping ground for platform header files.
> > > It is there to provide the interfaces between generic ARM architecture
> > > code and platform code.  (At least four files that are there at the
> > > moment need to be moved out of there - patch series to follow...)
> > 
> > Can this be moved to include/linux/platform_data/ ?
> 
> Here's the pertinant question: "is it platform data?"  Looking at the
> file, it appears to be internal data structures and register definitions
> for the driver itself.  Therefore, it isn't platform data, and it
> shouldn't be living separately from the driver.
> 
> If the driver itself only makes use of the data structures, the data
> structures should be defined either within the driver, or a header file
> co-located next to the driver itself.  The same goes for register
> definitions too.
> 
> The only structure that I can find which isn't internal to the driver
> is struct edma_soc_info, struct edma_rsv_info, and the enum dma_event_q.
> Those can go to include/linux/platform_data, but the rest should not.

Ok, but is it ok to keep the actual private EDMA API portion in
arch/arm/include/asm/mach/? It's not a problem to move the internal
portions to a local include and that pdata to the appropriate place.
We still need a place independent of mach-davinci and mach-omap2 to
keep that portion of the include. I suppose it could be put in with
the dmaengine wrapper's include/linux/edma.h but I hate to clutter
that up when the private API will go away later.

-Matt

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [RFC PATCH 01/13] ARM: davinci: move private EDMA API to arm/common

2012-09-21 Thread Matt Porter
On Fri, Sep 21, 2012 at 07:10:52AM +, Hebbar, Gururaja wrote:
> On Thu, Sep 20, 2012 at 20:13:34, Porter, Matt wrote:
> > Move mach-davinci/dma.c to common/edma.c so it can be used
> > by OMAP (specifically AM33xx atm) as well. This just moves
> > the private EDMA API but does not support OMAP.
> > 
> > Signed-off-by: Matt Porter 
> > ---
> >  arch/arm/Kconfig   |1 +
> >  arch/arm/common/Kconfig|3 +
> >  arch/arm/common/Makefile   |1 +
> >  arch/arm/common/edma.c | 1588 
> > 
> >  arch/arm/include/asm/mach/edma.h   |  267 +
> >  arch/arm/mach-davinci/Makefile |2 +-
> >  arch/arm/mach-davinci/devices.c|3 +-
> >  arch/arm/mach-davinci/dm355.c  |2 +-
> >  arch/arm/mach-davinci/dm365.c  |2 +-
> >  arch/arm/mach-davinci/dm644x.c |2 +-
> >  arch/arm/mach-davinci/dm646x.c |2 +-
> >  arch/arm/mach-davinci/dma.c| 1588 
> > 
> 
> 
> Please use –M option, while generating patches via git-format-patch. 
> This reduces the patch size if files are copied/renamed/moved.

Yes, I didn't notice until the arm kernel list caught the >100k post.
Will take care of this in v2.

-Matt

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [RFC PATCH 01/13] ARM: davinci: move private EDMA API to arm/common

2012-09-21 Thread Russell King - ARM Linux
On Fri, Sep 21, 2012 at 09:33:42AM +, Hebbar, Gururaja wrote:
> On Fri, Sep 21, 2012 at 14:59:23, Russell King - ARM Linux wrote:
> > On Thu, Sep 20, 2012 at 10:43:34AM -0400, Matt Porter wrote:
> > > Move mach-davinci/dma.c to common/edma.c so it can be used
> > > by OMAP (specifically AM33xx atm) as well. This just moves
> > > the private EDMA API but does not support OMAP.
> > > 
> > > Signed-off-by: Matt Porter 
> > > ---
> > >  arch/arm/Kconfig   |1 +
> > >  arch/arm/common/Kconfig|3 +
> > >  arch/arm/common/Makefile   |1 +
> > >  arch/arm/common/edma.c | 1588 
> > > 
> > >  arch/arm/include/asm/mach/edma.h   |  267 +
> > 
> > asm/mach should not be used as a dumping ground for platform header files.
> > It is there to provide the interfaces between generic ARM architecture
> > code and platform code.  (At least four files that are there at the
> > moment need to be moved out of there - patch series to follow...)
> 
> Can this be moved to include/linux/platform_data/ ?

Here's the pertinant question: "is it platform data?"  Looking at the
file, it appears to be internal data structures and register definitions
for the driver itself.  Therefore, it isn't platform data, and it
shouldn't be living separately from the driver.

If the driver itself only makes use of the data structures, the data
structures should be defined either within the driver, or a header file
co-located next to the driver itself.  The same goes for register
definitions too.

The only structure that I can find which isn't internal to the driver
is struct edma_soc_info, struct edma_rsv_info, and the enum dma_event_q.
Those can go to include/linux/platform_data, but the rest should not.

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


RE: [RFC PATCH 01/13] ARM: davinci: move private EDMA API to arm/common

2012-09-21 Thread Hebbar, Gururaja
On Fri, Sep 21, 2012 at 14:59:23, Russell King - ARM Linux wrote:
> On Thu, Sep 20, 2012 at 10:43:34AM -0400, Matt Porter wrote:
> > Move mach-davinci/dma.c to common/edma.c so it can be used
> > by OMAP (specifically AM33xx atm) as well. This just moves
> > the private EDMA API but does not support OMAP.
> > 
> > Signed-off-by: Matt Porter 
> > ---
> >  arch/arm/Kconfig   |1 +
> >  arch/arm/common/Kconfig|3 +
> >  arch/arm/common/Makefile   |1 +
> >  arch/arm/common/edma.c | 1588 
> > 
> >  arch/arm/include/asm/mach/edma.h   |  267 +
> 
> asm/mach should not be used as a dumping ground for platform header files.
> It is there to provide the interfaces between generic ARM architecture
> code and platform code.  (At least four files that are there at the
> moment need to be moved out of there - patch series to follow...)

Can this be moved to include/linux/platform_data/ ?

> ___
> Davinci-linux-open-source mailing list
> davinci-linux-open-sou...@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> 


Regards, 
Gururaja

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [RFC PATCH 01/13] ARM: davinci: move private EDMA API to arm/common

2012-09-21 Thread Russell King - ARM Linux
On Thu, Sep 20, 2012 at 10:43:34AM -0400, Matt Porter wrote:
> Move mach-davinci/dma.c to common/edma.c so it can be used
> by OMAP (specifically AM33xx atm) as well. This just moves
> the private EDMA API but does not support OMAP.
> 
> Signed-off-by: Matt Porter 
> ---
>  arch/arm/Kconfig   |1 +
>  arch/arm/common/Kconfig|3 +
>  arch/arm/common/Makefile   |1 +
>  arch/arm/common/edma.c | 1588 
> 
>  arch/arm/include/asm/mach/edma.h   |  267 +

asm/mach should not be used as a dumping ground for platform header files.
It is there to provide the interfaces between generic ARM architecture
code and platform code.  (At least four files that are there at the
moment need to be moved out of there - patch series to follow...)

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


RE: [RFC PATCH 01/13] ARM: davinci: move private EDMA API to arm/common

2012-09-21 Thread Hebbar, Gururaja
On Thu, Sep 20, 2012 at 20:13:34, Porter, Matt wrote:
> Move mach-davinci/dma.c to common/edma.c so it can be used
> by OMAP (specifically AM33xx atm) as well. This just moves
> the private EDMA API but does not support OMAP.
> 
> Signed-off-by: Matt Porter 
> ---
>  arch/arm/Kconfig   |1 +
>  arch/arm/common/Kconfig|3 +
>  arch/arm/common/Makefile   |1 +
>  arch/arm/common/edma.c | 1588 
> 
>  arch/arm/include/asm/mach/edma.h   |  267 +
>  arch/arm/mach-davinci/Makefile |2 +-
>  arch/arm/mach-davinci/devices.c|3 +-
>  arch/arm/mach-davinci/dm355.c  |2 +-
>  arch/arm/mach-davinci/dm365.c  |2 +-
>  arch/arm/mach-davinci/dm644x.c |2 +-
>  arch/arm/mach-davinci/dm646x.c |2 +-
>  arch/arm/mach-davinci/dma.c| 1588 
> 


Please use –M option, while generating patches via git-format-patch. 
This reduces the patch size if files are copied/renamed/moved.

>  arch/arm/mach-davinci/include/mach/asp.h   |2 +-
>  arch/arm/mach-davinci/include/mach/da8xx.h |3 +-
>  arch/arm/mach-davinci/include/mach/edma.h  |  267 -
>  arch/arm/mach-davinci/include/mach/spi.h   |2 +-
>  arch/arm/plat-omap/Kconfig |1 +
>  17 files changed, 1872 insertions(+), 1864 deletions(-)
>  create mode 100644 arch/arm/common/edma.c
>  create mode 100644 arch/arm/include/asm/mach/edma.h
>  delete mode 100644 arch/arm/mach-davinci/dma.c
>  delete mode 100644 arch/arm/mach-davinci/include/mach/edma.h
> 

...snip...
...snip...
...snip...

>  
> -- 
> 1.7.9.5
> 
> ___
> Davinci-linux-open-source mailing list
> davinci-linux-open-sou...@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> 


Regards, 
Gururaja

--
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general