[PATCH 1/6] spi/spi-pl022: Resolve formatting issues

2011-08-09 Thread Viresh Kumar
There were few formatting related issues in code. This patch fixes them. Fixes include: - Remove extra blank lines - align code to 80 cols - combine several lines to one line - Replace multiple spaces with tabs - Remove spaces before labels Signed-off-by: Viresh Kumar viresh.ku...@st.com ---

[PATCH 5/6] spi/spi-pl022: Call pl022_dma_remove(pl022) only if enable_dma is true

2011-08-09 Thread Viresh Kumar
pl022_dma_remove() should be called only if enable_dma is true. There is no point calling it when pl022_dma_probe() is not called, which again depends on enable_dma. Signed-off-by: Viresh Kumar viresh.ku...@st.com --- drivers/spi/spi-pl022.c |8 ++-- 1 files changed, 6 insertions(+), 2

[PATCH 0/6] spi/spi-pl022 fixes

2011-08-09 Thread Viresh Kumar
: commit 9be355da3bae9feb09cdaf80c3ab560f1f0172cb Author: Stephen Rothwell s...@canb.auug.org.au Date: Tue Aug 9 13:30:19 2011 +1000 Add linux-next specific files for 20110809 Signed-off-by: Stephen Rothwell s...@canb.auug.org.au Looking forward to see your view on the patchset. Viresh

[PATCH 3/6] spi/spi-pl022: Don't allocate more sg than required.

2011-08-09 Thread Viresh Kumar
In routine configure_dma(), if transfer-len = PAGE_SIZE, then pages is one more than required. While leads to one more sg getting allocated. This is wrong. Correct this to allocate correct number of sg. Signed-off-by: Viresh Kumar viresh.ku...@st.com --- drivers/spi/spi-pl022.c |3 ++- 1

[PATCH 6/6] spi/spi-pl022: Request/free DMA channels as and when required.

2011-08-09 Thread Viresh Kumar
Currently we request DMA channels at probe time and free them at remove. They are always occupied, irrespective of their usage. They must be allocated when they are required and must be freed after we are done with transfers. So that they can be used by other users. Signed-off-by: Viresh Kumar

[PATCH 2/6] spi/spi-pl022: Use GFP_NOWAIT for allocation from tasklet

2011-08-09 Thread Viresh Kumar
tasklets don't allow invocation to sleeping routines. In configure_dma() routine, sg_alloc_table() was called with GFP_KERNEL flag and so this causes crash when called from tasklet. Replace GFP_KERNEL with GFP_NOWAIT to get this fixed. Signed-off-by: Viresh Kumar viresh.ku...@st.com ---

Re: [PATCH 2/6] spi/spi-pl022: Use GFP_NOWAIT for allocation from tasklet

2011-08-09 Thread Jassi Brar
On Tue, Aug 9, 2011 at 4:35 PM, Viresh Kumar viresh.ku...@st.com wrote: tasklets don't allow invocation to sleeping routines. In configure_dma() routine, sg_alloc_table() was called with GFP_KERNEL flag and so this causes crash when called from tasklet. Replace GFP_KERNEL with GFP_NOWAIT to

Re: [PATCH 0/6] spi/spi-pl022 fixes

2011-08-09 Thread Linus Walleij
over following patch: commit 9be355da3bae9feb09cdaf80c3ab560f1f0172cb Author: Stephen Rothwell s...@canb.auug.org.au Date:   Tue Aug 9 13:30:19 2011 +1000    Add linux-next specific files for 20110809 They all work perfectly well on top of v3.1-rc1, please use mainline kernel tags as patch base

Re: [PATCH 2/6] spi/spi-pl022: Use GFP_NOWAIT for allocation from tasklet

2011-08-09 Thread viresh kumar
On 08/09/2011 04:56 PM, Jassi Brar wrote: Since this could be called from when we actually need the transfer start, maybe we could try harder using GFP_ATOMIC instead ? Yes. Will do it. -- viresh -- uberSVN's rich

Re: [PATCH 4/6] spi/spi-pl022: calculate_effective_freq() must set rate = requested rate

2011-08-09 Thread viresh kumar
[Probably you missed reply-all by mistake, so adding them again] On 08/10/2011 01:34 AM, Linus Walleij wrote: On Tue, Aug 9, 2011 at 1:05 PM, Viresh Kumar viresh.ku...@st.com wrote: There were few issues with calculate_effective_freq() routine: - It was returning first rate found = requested

Re: [PATCH 0/6] spi/spi-pl022 fixes

2011-08-09 Thread viresh kumar
. So that Grant can pick them up. I have rebased them on linux-next/master over following patch: commit 9be355da3bae9feb09cdaf80c3ab560f1f0172cb Author: Stephen Rothwell s...@canb.auug.org.au Date: Tue Aug 9 13:30:19 2011 +1000 Add linux-next specific files for 20110809 They all