Re: [QUERY] Behavior of spi slave memories w.r.t chip select signal.
On Fri, May 13, 2011 at 09:22:57AM +0530, viresh kumar wrote: On 05/11/2011 09:37 AM, viresh kumar wrote: Actually i am seeing a different behavior by some of the spi memories, like m25p10. If there is a delay between read_sts_reg command and dummy bytes, then 0xFF is returned in response. If there is no delay then transfer always passes. 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: polling, interrupt, dma. No, not that exact issue. I've seen with the Synopsys DesignWare controller that the fifo emptying causing cs to drop can result in all 0's being read back from a m25p80, but not all 1's. Jamie -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: [QUERY] Behavior of spi slave memories w.r.t chip select signal.
On 05/13/2011 12:24 PM, Linus Walleij wrote: 2011/5/13 viresh kumar viresh.ku...@st.com: 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: polling, interrupt, dma. Not really. I'll throw in a few people on CC and see if they have some hints. Thanks guys. Issue is solved now, data must be latched on Rising Edge and i have passed phase as falling edge. -- viresh -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
[PATCH] spi/amba-pl022: work in polling or interrupt mode if pl022_dma_probe fails
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 viresh.ku...@st.com --- drivers/spi/amba-pl022.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) 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(struct pl022 *pl022) pl022-master_info-dma_filter, pl022-master_info-dma_rx_param); if (!pl022-dma_rx_channel) { - dev_err(pl022-adev-dev, no RX DMA channel!\n); + dev_warn(pl022-adev-dev, no RX DMA channel!\n); goto err_no_rxchan; } @@ -1071,13 +1071,13 @@ static int __init pl022_dma_probe(struct pl022 *pl022) pl022-master_info-dma_filter, pl022-master_info-dma_tx_param); if (!pl022-dma_tx_channel) { - dev_err(pl022-adev-dev, no TX DMA channel!\n); + dev_warn(pl022-adev-dev, no TX DMA channel!\n); goto err_no_txchan; } pl022-dummypage = kmalloc(PAGE_SIZE, GFP_KERNEL); if (!pl022-dummypage) { - dev_err(pl022-adev-dev, no DMA dummypage!\n); + dev_warn(pl022-adev-dev, no DMA dummypage!\n); goto err_no_dummypage; } @@ -1093,6 +1093,8 @@ err_no_txchan: dma_release_channel(pl022-dma_rx_channel); pl022-dma_rx_channel = NULL; err_no_rxchan: + dev_warn(pl022-adev-dev, + Failed to work in dma mode, work without dma!\n); return -ENODEV; } @@ -2107,7 +2109,7 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id) if (platform_info-enable_dma) { status = pl022_dma_probe(pl022); if (status != 0) - goto err_no_dma; + platform_info-enable_dma = 0; } /* Initialize and start queue */ @@ -2143,7 +2145,6 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id) err_init_queue: destroy_queue(pl022); pl022_dma_remove(pl022); - err_no_dma: free_irq(adev-irq[0], pl022); err_no_irq: clk_put(pl022-clk); -- 1.7.2.2 -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
[QUERY] amba/pl022: DMA channel allocation always fail.
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, instead of allocating them at probe. But in that case too i am not sure, that this issue will be solved. As, if spi slave device is added from board file, then it will also try to transfer data as soon as spi driver is up. So that too may be called before dma_probe(). -- viresh -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: [PATCH] spi/amba-pl022: work in polling or interrupt mode if pl022_dma_probe fails
On 5/13/11, Viresh Kumar viresh.ku...@st.com 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(struct pl022 *pl022) pl022-master_info-dma_filter, pl022-master_info-dma_rx_param); if (!pl022-dma_rx_channel) { - dev_err(pl022-adev-dev, no RX DMA channel!\n); + dev_warn(pl022-adev-dev, no RX DMA channel!\n); Sorry, this must be dev_dbg goto err_no_rxchan; } @@ -1071,13 +1071,13 @@ static int __init pl022_dma_probe(struct pl022 *pl022) pl022-master_info-dma_filter, pl022-master_info-dma_tx_param); if (!pl022-dma_tx_channel) { - dev_err(pl022-adev-dev, no TX DMA channel!\n); + dev_warn(pl022-adev-dev, no TX DMA channel!\n); dev_dbg goto err_no_txchan; } pl022-dummypage = kmalloc(PAGE_SIZE, GFP_KERNEL); if (!pl022-dummypage) { - dev_err(pl022-adev-dev, no DMA dummypage!\n); + dev_warn(pl022-adev-dev, no DMA dummypage!\n); dev_dbg goto err_no_dummypage; } @@ -1093,6 +1093,8 @@ err_no_txchan: dma_release_channel(pl022-dma_rx_channel); pl022-dma_rx_channel = NULL; err_no_rxchan: + dev_warn(pl022-adev-dev, dev_err + Failed to work in dma mode, work without dma!\n); return -ENODEV; } Will resend patch on Monday. Till that time, please see if this patch with mentioned changes is acceptable or not. -- viresh -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: [PATCH] spi/amba-pl022: work in polling or interrupt mode if pl022_dma_probe fails
2011/5/13 Viresh Kumar viresh.ku...@st.com: 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. Sure why not! Acked-by: Linus Walleij linus.wall...@linaro.org Yours, Linus Walleij -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
Re: [QUERY] amba/pl022: DMA channel allocation always fail.
2011/5/13 viresh kumar viresh.ku...@st.com: 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? If you check drivers/dma/ste_dma40.c you can see that our solution was to simply move the DMA engine to arch_initcall(). Which sort of makes sense for a DMA engine. Does this work for dw_dmac.c? One idea is allocate DMA channel as and when required, instead of allocating them at probe. But in that case too i am not sure, that this issue will be solved. For the serial port I've added a real funny tweak to queue the ports and add DMA later since these are initialized very early. Check in drivers/tty/serial/amba-pl011.c Hope this helps, Linus Walleij -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
863新产品开发成功与失败因素分析
┌─┬─┬─┬─┬─┬─┬─┬─┬─┐ │F┆ ┆=┆优┆择┆根┆ ┆ ┆f│ │Z┆ ┆=┆化┆产┆据┆ ┆ ┆Q│ │F┆ ┆资┆的┆品┆企┆ ┆ ┆7│ │J┆ ┆料┆三┆开┆业┆ ┆ ┆X│ │V┆ ┆见┆个┆发┆的┆ ┆ ┆0│ │P┆ ┆附┆模┆管┆实┆ ┆ ┆Q│ │S┆ ┆w┆式┆6┆际┆ ┆ ┆A│ │G┆ ┆件┆.┆理┆情┆ ┆ ┆J│ │ ┆ ┆.┆=┆体┆况┆ ┆ ┆j│ │ ┆ ┆ ┆=┆系┆选┆ ┆ ┆ │ └─┴─┴─┴─┴─┴─┴─┴─┴─┘-- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general
[SPAM] Ne manquez pas cette offre exceptionnelle
-- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general