Message ID | 1345601849-23474-2-git-send-email-marex@denx.de |
---|---|
State | Accepted |
Commit | 1375f044d96f31987b0f4d3feb1fb01205939f3b |
Delegated to: | Stefano Babic |
Headers | show |
On Tue, Aug 21, 2012 at 11:17 PM, Marek Vasut <marex@denx.de> wrote: > int mxs_dma_go(int chan) > { > - uint32_t timeout = 10000; > + uint32_t timeout = 10000000; Should we use a proper timeout mechanism instead? Reagards, Fabio Estevam
Dear Fabio Estevam, > On Tue, Aug 21, 2012 at 11:17 PM, Marek Vasut <marex@denx.de> wrote: > > int mxs_dma_go(int chan) > > { > > > > - uint32_t timeout = 10000; > > + uint32_t timeout = 10000000; > > Should we use a proper timeout mechanism instead? What would that be? I think 10 seconds is more than plenty for now. > Reagards, > > Fabio Estevam Best regards, Marek Vasut
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c index ca5a32f..37a941c 100644 --- a/drivers/dma/apbh_dma.c +++ b/drivers/dma/apbh_dma.c @@ -526,7 +526,7 @@ static int mxs_dma_wait_complete(uint32_t timeout, unsigned int chan) */ int mxs_dma_go(int chan) { - uint32_t timeout = 10000; + uint32_t timeout = 10000000; int ret; LIST_HEAD(tmp_desc_list);
Load from SPI flash can create a long DMA chain, which can take long time to transfer. Change the DMA timeout to roughly 10s to prevent such long chains misreporting errors. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Stefano Babic <sbabic@denx.de> --- drivers/dma/apbh_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)