clk_freq is used uninitialized in pl022_setup routine. This patch
fix compilation warning for using uninitialized variable
Signed-off-by: Viresh Kumar
---
drivers/spi/amba-pl022.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi
Hello,
Following is what i understood after reading m25p80 driver and spi master
drivers in drivers/spi folder.
"chip_select signal controls start and end of transfer. For ex: if we have to
read
status reg of spi memory, then we use write_and_then_read() routine. which
writes
0x9F in one spi t
On 05/11/2011 12:47 PM, Jamie Iles wrote:
> What SPI controller are you using? I've seen a similar issue with the
> Synopsys DesignWare SPI controller where the controller manages the chip
> select itself, and once the FIFO is emptied the CS goes away, but the
> flash chip requires it to stay h
On 05/11/2011 09:37 AM, viresh kumar wrote:
>
> Hello,
>
> Following is what i understood after reading m25p80 driver and spi master
> drivers in drivers/spi folder.
>
> "chip_select signal controls start and end of transfer. For ex: if we have to
> read
> statu
On 05/13/2011 12:24 PM, Linus Walleij wrote:
> 2011/5/13 viresh kumar :
>> Linus, Jamie,
>>
>> Have you ever seen this kind of issue? Which spi slave memories did you used
>> for testing?
>> I am using standard pl0022 and m25p80 driver. Tried in all modes: poll
If pl022_dma_probe fails, we can try to transfer data in polling or interrupt
mode. Also, set platform_info->enable_dma to 0, so that no other code tries to
use dma.
Signed-off-by: Viresh Kumar
---
drivers/spi/amba-pl022.c | 11 ++-
1 files changed, 6 insertions(+), 5 deleti
Linus,
amba/pl022 and my dma driver dw_dmac.c, both have registered init() routines
with subsys_initcall(). Now at bootup, spi boots up before DMA and so DMA
channels are never available at spi probe.
What should be done to solve this issue?
One idea is allocate DMA channel as and when required,
On 5/13/11, Viresh Kumar wrote:
> diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
> index 08de58e..82b98b8 100644
> --- a/drivers/spi/amba-pl022.c
> +++ b/drivers/spi/amba-pl022.c
> @@ -1063,7 +1063,7 @@ static int __init pl022_dma_probe(stru
If pl022_dma_probe fails, we can try to transfer data in polling or interrupt
mode. Also, set platform_info->enable_dma to 0, so that no other code tries to
use dma.
Signed-off-by: Viresh Kumar
Acked-by: Linus Walleij
---
drivers/spi/amba-pl022.c | 11 ++-
1 files changed
On 05/13/2011 08:01 PM, Linus Walleij wrote:
> 2011/5/13 viresh kumar :
>
>> amba/pl022 and my dma driver dw_dmac.c, both have registered init() routines
>> with subsys_initcall(). Now at bootup, spi boots up before DMA and so DMA
>> channels are never available at spi pro
On 05/16/2011 04:34 PM, Russell King - ARM Linux wrote:
> On Mon, May 16, 2011 at 09:40:10AM +0530, Viresh Kumar wrote:
>> > If pl022_dma_probe fails, we can try to transfer data in polling or
>> > interrupt
>> > mode. Also, set platform_info->enable_dma to 0, so
On 05/16/2011 09:40 AM, Viresh KUMAR wrote:
> If pl022_dma_probe fails, we can try to transfer data in polling or interrupt
> mode. Also, set platform_info->enable_dma to 0, so that no other code tries to
> use dma.
>
> Signed-off-by: Viresh Kumar
> Acked-by: Linus Walleij
Hi Linus,
I am preparing few patches for spi-pl022 for "Allocating DMA channels as and
when required".
And i found something strange.
When we have many transfers in a single message, following routines are called
in
specified order:
tasklet_schedule(pump_transfers)
pump_transfers(unsigned lon
On 08/03/2011 08:28 PM, Linus Walleij wrote:
>> > Here, allocation is requested with GFP_KERNEL flag, from a tasklet.
>> > Which gives following crash logs:
> What happens if you replace it with GFP_NOWAIT?
>
> That should work for everybody.
>
> Or you could remove the tasklet allover and replac
On 08/04/2011 03:46 PM, Linus Walleij wrote:
> No maybe not, my test cases are for single messages, and on production
> systems we mainly use IRQ-driven traffic. I need to have these
> tests added I believe :-/
>
> If you fix this up it will be much appreciated!
Ya I am fixing this up. I have res
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
---
drivers/spi/spi-pl022
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
---
drivers/spi/spi-pl022.c |8 ++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff
:
commit 9be355da3bae9feb09cdaf80c3ab560f1f0172cb
Author: Stephen Rothwell
Date: Tue Aug 9 13:30:19 2011 +1000
Add linux-next specific files for 20110809
Signed-off-by: Stephen Rothwell
Looking forward to see your view on the patchset.
Viresh Kumar (6):
spi/spi-pl022: Resolve
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
---
drivers/spi/spi-pl022.c |3 ++-
1 files changed
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
possible to get more closer rate.
This patch fixes these two issues, with some reformatting inside the code.
This also creates a macro to calculate prescaled rate based on spi's rate,
cpsdvsr and scr.
Signed-off-by: Viresh Kumar
---
drivers/spi/s
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
---
drivers/spi/spi-pl
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 s
[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 wrote:
>
>> There were few issues with calculate_effective_freq() routine:
>> - It was returning first rate found >
On 08/10/2011 01:40 AM, Linus Walleij wrote:
> On Tue, Aug 9, 2011 at 1:05 PM, Viresh Kumar wrote:
>
>> This patchset mainly covers following fixes:
>> - formatting related issues
>> - Passing GFP_NOWAIT for sg allocation from tasklet
>> - Fixing calculate_effectiv
since V1:
- Replace GFP_NOWAIT with GFP_ATOMIC
- Wrote inline routine spi_rate instead of macro
Viresh Kumar (6):
spi/spi-pl022: Resolve formatting issues
spi/spi-pl022: Use GFP_ATOMIC for allocation from tasklet
spi/spi-pl022: Don't allocate more sg than required.
spi/spi-
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_ATOMIC to get this fixed.
Signed-off-by: Viresh Kumar
Tested-by: Linus Wa
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
Tested-by: Linus Walleij
possible to get more closer rate.
This patch fixes these two issues, with some reformatting inside the code. This
also creates a inline routine to calculate prescaled rate based on spi's rate,
cpsdvsr and scr.
Signed-off-by: Viresh Kumar
Tested-by: Linus Walleij
---
drivers/spi/s
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
Tested-by: Linus Walleij
---
drivers/spi/spi-pl022.c |
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
Tested-by: Linus Walleij
---
drivers/spi/spi-pl022.c |8 ++--
1 files changed, 6 insertions
On 08/10/2011 02:30 PM, Russell King - ARM Linux wrote:
>> > 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.
> Which DMA engine driver requires this?
>
dw_dmac.c
> Normally, when we have DMA eng
On 08/10/2011 02:24 PM, Russell King - ARM Linux wrote:
> It would be far better for this to be:
>
> pages = DIV_ROUND_UP(pl022->cur_transfer->len, PAGE_SIZE);
>
> The compiler will probably optimize it to the same code anyway.
I thought of it too, but missed to update code. Thanks.
--
v
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
On 08/10/2011 03:31 PM, Koul, Vinod wrote:
> And on your patch, are you able to dynamically assign the channels for
> platform? What is the intended usage? (as Russell articulated it is bad
> to dynamically assign channel for something like uart)
Are you talking about channels or DMA request lines
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
Tested-by: Linus Walleij
---
drivers/spi/spi-pl022.c |
On 08/10/2011 05:12 PM, Sergei Shtylyov wrote:
>> > - pages = (pl022->cur_transfer->len>> PAGE_SHIFT) + 1;
>> > + pages = ((pl022->cur_transfer->len + (1 << PAGE_SHIFT) - 1)
>> > + >> PAGE_SHIFT);
> No need for parens around the rvalue.
Oops, that was a mistake. Anyway i h
On 8/10/2011 2:20 PM, Viresh KUMAR wrote:
> Hi Grant,
>
> I have added Tested-by: Linus Walleij on all
> patches.
>
> This patchset mainly covers following fixes:
> - formatting related issues
> - Passing GFP_ATOMIC for sg allocation from tasklet
> - Fixing calcula
On 9/1/2011 4:26 PM, Linus Walleij wrote:
> I agree. Acked-by: Linus Walleij for
> all except 6/6, it's probably just as possible to keep the channel handle
> taken in the driver if we modify the affected DMA driver instead.
> This would be better for performance I think.
Hi Grant,
Any updates o
spi_master_get_devdata(spi->master);
> unsigned int bits = spi->bits_per_word;
Reviewed-by: Viresh Kumar
--
viresh
--
All the data continuously generated in your IT infrastructure contains a
definitive recor
t; + /* disable the SPI/SSP operation */
> + writew((readw(SSP_CR1(pl022->virtbase)) &
> + (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase));
> +
> + /* This message is completed, so let's turn off the clock! */
> clk_disable(pl022->clk
> }
>
> - amba_vcore_enable(adev);
> - amba_pclk_enable(adev);
> - load_ssp_default_config(pl022);
> - amba_pclk_disable(adev);
> - amba_vcore_disable(adev);
> dev
On 11/9/2011 4:08 PM, Linus WALLEIJ wrote:
> + /* default is to enable all interrupts except RX -
> + * this will be enabled once TX is complete
> + */
Other than fixing this multiline comment, everything other looks fine.
Reviewed-by: Viresh Kumar
-
spi_master_get_devdata(spi->master);
> unsigned int bits = spi->bits_per_word;
Reviewed-by: Viresh Kumar
--
viresh
--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
mp;
> + (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase));
> +
> /* This message is completed, so let's turn off the clocks & power */
> pm_runtime_put(&pl022->adev->dev);
> }
Reviewed-by: Viresh Kumar
--
viresh
-
On 11/9/2011 4:09 PM, Linus WALLEIJ wrote:
> From: Virupax Sadashivpetimath
>
> The loading of the default configuration before suspending has
> been in the driver since its inception, but it is not really
> needed. Especially so since we take to all the trouble of
> enabling and disabling power
On 11/9/2011 4:09 PM, Linus WALLEIJ wrote:
> From: Chris Blair
> diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> index bffad2a..2e3522d 100644
> --- a/drivers/spi/spi-pl022.c
> +++ b/drivers/spi/spi-pl022.c
> @@ -512,13 +512,6 @@ static void giveback(struct pl022 *pl022)
>
suspends the device. A setting of 0
> + * indicates no delay and the device will be suspended immediately.
> */
> struct pl022_ssp_controller {
> u16 bus_id;
> @@ -246,6 +249,7 @@ struct pl022_ssp_controller {
> bool (*dma_filter)(struct dma_chan *chan, void *filte
2310,6 @@ static int pl022_suspend(struct device *dev)
> return status;
> }
>
> - amba_vcore_enable(pl022->adev);
> - amba_pclk_enable(pl022->adev);
> - load_ssp_default_config(pl022);
> - amba_pclk_disable(pl022->adev);
> - amba_vcore_disa
ingle line code inside {}.
Don't we get them anymore?
Reviewed-by: Viresh Kumar
--
viresh
--
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application pe
; if (set_up_next_transfer(pl022, pl022->cur_transfer)) {
> /* Error path */
> pl022->cur_msg->state = STATE_ERROR;
> @@ -1445,7 +1445,8 @@ static void do_polling_transfer(struct pl022 *pl022)
> } else {
> /* STAT
p; !pl022->busy)
> - queue_work(pl022->workqueue, &pl022->pump_messages);
> + queue_kthread_work(&pl022->kworker, &pl022->pump_messages);
>
> spin_unlock_irqrestore(&pl022->queue_lock, flags);
> re
linux/pl022.h uses definitions like, u8, u16, etc, which have dependency of
types.h file, which isn't included in it. So, we get compilation warnings.
This patch includes types.h there to fix these warnings.
Signed-off-by: Viresh Kumar
---
include/linux/amba/pl022.h |2 ++
1 files ch
"a standard pl022 can only handle "
> - "1 <= n <= 16 bit words\n");
> + "4 <= n <= 16 bit words\n");
> status = -ENOTSUPP;
> goto err_config_params;
> }
Reviewed
sha Shenoy
Signed-off-by: Viresh Kumar
---
drivers/spi/spi-pl022.c | 10 --
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 09c925a..99d5f6d 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -166
calculate_effective_freq() was still not optimized and there were cases when it
returned without error and with values of cpsr and scr as zero.
Also, the variable named found is not used well.
This patch targets to optimize and correct this routine. Tested for SPEAr.
Signed-off-by: Viresh Kumar
On 4/19/2012 2:44 PM, Viresh KUMAR wrote:
> calculate_effective_freq() was still not optimized and there were cases when
> it
> returned without error and with values of cpsr and scr as zero.
>
> Also, the variable named found is not used well.
>
> This patch targets to
spi_register_master() calls of_register_spi_devices() to register spi devices.
This routine expects master->dev.of_node to be a valid pointer. This is
responsibility of master driver to fill this field, which wasn't done for pl022.
Fix it to get devices added to pl022.
Signed-off-by: Vire
On 19 August 2012 03:56, Linus Walleij wrote:
> On Sat, Aug 18, 2012 at 4:25 AM, Viresh Kumar
> wrote:
>
> > spi_register_master() calls of_register_spi_devices() to register spi
> devices.
> > This routine expects master->dev.of_node to be a valid pointer. This is
&
On Mon, Sep 17, 2012 at 4:07 PM, Vipul Kumar Samar
wrote:
> clk_{un}prepare is mandatory for platforms using common clock framework. Add
> clk_{un}prepare() support for spi-pl022 runtime PM.
You are not calling these routines in actualy patch.. Fix commit log and add my
Reviewed-by.
> Signed-off
On Mon, Sep 17, 2012 at 7:09 PM, Linus Walleij wrote:
> This driver does clk_prepare/unprepare at probe
> and removed, so I guess what you're trying to say is that
> on your platform the clk_unprepare() process context call
> is needed to save power?
>
> Please elaborate...
Hi Linus,
Yes, we don
On Tue, Sep 18, 2012 at 5:20 PM, Linus Walleij wrote:
> On Tue, Sep 18, 2012 at 6:09 AM, viresh kumar wrote:
>
>> Yes, we don't need to call prepare() again atleast for SPEAr. You are
>> correct.
>> I saw the driver after a long time :)
>
> I'm asking be
On Wed, Sep 26, 2012 at 5:49 PM, Mark Brown
wrote:
> On Wed, Sep 26, 2012 at 02:17:36PM +0200, Linus Walleij wrote:
>> On Wed, Sep 26, 2012 at 1:24 PM, Vipul Kumar Samar
>
>> > SPI functional clock must be disalble/enable in non RTPM suspend/resume
>> > hooks. Currently it is only done for RTPM ca
On Tue, Jun 4, 2013 at 3:13 AM, Scott Jiang wrote:
> diff --git a/drivers/spi/spi-bfin6xx.c b/drivers/spi/spi-bfin6xx.c
> +#include
Why do you need this?
--
Get 100% visibility into Java/.NET code with AppDynamics Lite
64 matches
Mail list logo