* arm, am1808: using mmc1 controller and dma @ 2011-12-02 7:35 Heiko Schocher 2011-12-02 8:34 ` Rajashekhara, Sudhakar 0 siblings, 1 reply; 5+ messages in thread From: Heiko Schocher @ 2011-12-02 7:35 UTC (permalink / raw) To: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/ Cc: Chris Ball, Wolfgang Denk, Kevin Hilman, linux-mmc-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA, Jarkko Lavinen Hello, trying Linux 3.2.0-rc3 on an am1808 based board using MMCSD1 controller, and facing problems with using DMA. Deactivating use_dma=0 in the davinci_mmc controller and mmc works in pio mode without problems. So there are no hardware problems, pinmux is ok, psc are all on. Tried this on the AM1808 evalboard TMDXEXP1808L, and Linux 3.1 works with DMA without problems. Difference: On the AM1808 Evalboard TMDXEXP1808L MMCSD0 controller is used on my am1808 based board MMCSD1! Debugging in code and found, that on the am1808 evalboard I get on startup (first DMA access): CMD13, arg 0x00000000, R1/R5/R6/R7 response a status back in mmc_davinci_irq(): TRNDNE (0x1000) Transfer done RSPDNE (0x0004) Response succesfully has received DATDNE (0x0001) The data has been fully transmitted On the am1808 based board with using MMCSD1 I get: CMD13, arg 0x00000000, R1/R5/R6/R7 response TRNDNE (0x1000) Transfer done DRRDY (0x0400) MMCDRR is ready New data arrived and can be read by cpu or dma RSPDNE (0x0004) Response succesfully has received after that command, I see no more mmc accesses ... some ideas? Looking in the sprufu5.pdf (AM18x ARM Microprocessor Enhanced Direct Memory Access (EDMA3) Controller" chapter "2.6 Event, Channel, and PaRAM Mapping": "Most of the DMA channels are tied to a specific hardware peripheral event, thus allowing transfers to be triggered by events from device peripherals or external hardware." The mapping is defined in the device specific manual http://www.ti.com/lit/ds/sprs653b/sprs653b.pdf chapter "5.9.1 EDMA3 Channel Synchronization Events" and there I found: EDMA0 Controller Event 16 MMCSD0 Receive EDMA0 Controller Event 17 MMCSD0 Transmit EDMA1 Controller Event 28 MMCSD1 Receive EDMA1 Controller Event 29 MMCSD1 Transmit The Linux 3.1 Code is using EDMA1 Controller Event 28 MMCSD1 Receive EDMA1 Controller Event 29 MMCSD1 Transmit as events for the MMCSD1 controller ... so, this should be ok ... I see no more differences between MMCSD0 and MMCSD1 ... maybe I miss something? Have somebody running an am1808 based board with using MMCSD controller 1? bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: arm, am1808: using mmc1 controller and dma 2011-12-02 7:35 arm, am1808: using mmc1 controller and dma Heiko Schocher @ 2011-12-02 8:34 ` Rajashekhara, Sudhakar 2011-12-02 8:55 ` Heiko Schocher 0 siblings, 1 reply; 5+ messages in thread From: Rajashekhara, Sudhakar @ 2011-12-02 8:34 UTC (permalink / raw) To: hs@denx.de, davinci-linux-open-source@linux.davincidsp.com Cc: Wolfgang Denk, linux-mmc@vger.kernel.org, Chris Ball, Jarkko Lavinen, linux-omap@vger.kernel.org, Vipin Bhandari, Kumar, Purushotam, Kevin Hilman Hi, On Fri, Dec 02, 2011 at 13:05:22, Heiko Schocher wrote: > Hello, > > trying Linux 3.2.0-rc3 on an am1808 based board using MMCSD1 controller, > and facing problems with using DMA. Deactivating use_dma=0 in the > davinci_mmc controller and mmc works in pio mode without problems. > So there are no hardware problems, pinmux is ok, psc are all on. > Please refer to the discussion at [1] where similar issue was discussed. Go through the entire thread. In the patch posted by Juha in this link, I see that except for the below hunk all others are integrated. @@ -1508,7 +1506,7 @@ static int __init edma_probe(struct platform_device *pdev) * started by the codec engine will not cause audio defects. */ for (i = 0; i < edma_info[j]->num_channels; i++) - map_dmach_queue(j, i, EVENTQ_1); + map_dmach_queue(j, i, edma_info[j]->default_queue); queue_tc_mapping = info[j].queue_tc_mapping; queue_priority_mapping = info[j].queue_priority_mapping; Can you check whether the above patch fixes your issue? [1] http://www.mail-archive.com/davinci-linux-open-source@linux.davincidsp.com/msg17926.html Thanks, Sudhakar ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: arm, am1808: using mmc1 controller and dma 2011-12-02 8:34 ` Rajashekhara, Sudhakar @ 2011-12-02 8:55 ` Heiko Schocher 2011-12-02 9:00 ` Rajashekhara, Sudhakar 0 siblings, 1 reply; 5+ messages in thread From: Heiko Schocher @ 2011-12-02 8:55 UTC (permalink / raw) To: Rajashekhara, Sudhakar Cc: davinci-linux-open-source@linux.davincidsp.com, Wolfgang Denk, linux-mmc@vger.kernel.org, Chris Ball, Jarkko Lavinen, linux-omap@vger.kernel.org, Vipin Bhandari, Kumar, Purushotam, Kevin Hilman Hello Rajashekhara, Sudhakar, Rajashekhara, Sudhakar wrote: > Hi, > > On Fri, Dec 02, 2011 at 13:05:22, Heiko Schocher wrote: >> Hello, >> >> trying Linux 3.2.0-rc3 on an am1808 based board using MMCSD1 controller, >> and facing problems with using DMA. Deactivating use_dma=0 in the >> davinci_mmc controller and mmc works in pio mode without problems. >> So there are no hardware problems, pinmux is ok, psc are all on. >> > > Please refer to the discussion at [1] where similar issue was discussed. Go through the Oh, sorry, missed this! Thanks for the hint! > entire thread. In the patch posted by Juha in this link, I see that except for the below > hunk all others are integrated. > > @@ -1508,7 +1506,7 @@ static int __init edma_probe(struct platform_device *pdev) > * started by the codec engine will not cause audio defects. > */ > for (i = 0; i < edma_info[j]->num_channels; i++) > - map_dmach_queue(j, i, EVENTQ_1); > + map_dmach_queue(j, i, edma_info[j]->default_queue); > > queue_tc_mapping = info[j].queue_tc_mapping; > queue_priority_mapping = info[j].queue_priority_mapping; > > Can you check whether the above patch fixes your issue? Yuhu! that works for me! But I had to fix it a little, because "edma_info" is now named "info". Here my diff: diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c index da90103..e10a251 100644 --- a/arch/arm/mach-davinci/dma.c +++ b/arch/arm/mach-davinci/dma.c @@ -1513,7 +1513,7 @@ static int __init edma_probe(struct platform_device *pdev) * started by the codec engine will not cause audio defects. */ for (i = 0; i < edma_cc[j]->num_channels; i++) - map_dmach_queue(j, i, EVENTQ_1); + map_dmach_queue(j, i, info[j]->default_queue); queue_tc_mapping = info[j]->queue_tc_mapping; queue_priority_mapping = info[j]->queue_priority_mapping; > [1] http://www.mail-archive.com/davinci-linux-open-source@linux.davincidsp.com/msg17926.html Do you prepare a patch, or should I send it? bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: arm, am1808: using mmc1 controller and dma 2011-12-02 8:55 ` Heiko Schocher @ 2011-12-02 9:00 ` Rajashekhara, Sudhakar 2011-12-02 9:19 ` Heiko Schocher 0 siblings, 1 reply; 5+ messages in thread From: Rajashekhara, Sudhakar @ 2011-12-02 9:00 UTC (permalink / raw) To: hs@denx.de Cc: davinci-linux-open-source@linux.davincidsp.com, Wolfgang Denk, linux-mmc@vger.kernel.org, Chris Ball, Jarkko Lavinen, linux-omap@vger.kernel.org, Vipin Bhandari, Kumar, Purushotam, Kevin Hilman Hi, On Fri, Dec 02, 2011 at 14:25:48, Heiko Schocher wrote: > Hello Rajashekhara, Sudhakar, > > Rajashekhara, Sudhakar wrote: > > Hi, > > > > On Fri, Dec 02, 2011 at 13:05:22, Heiko Schocher wrote: > >> Hello, > >> > >> trying Linux 3.2.0-rc3 on an am1808 based board using MMCSD1 controller, > >> and facing problems with using DMA. Deactivating use_dma=0 in the > >> davinci_mmc controller and mmc works in pio mode without problems. > >> So there are no hardware problems, pinmux is ok, psc are all on. > >> > > > > Please refer to the discussion at [1] where similar issue was discussed. Go through the [...] > > Yuhu! that works for me! But I had to fix it a little, because "edma_info" > is now named "info". Here my diff: > Yup, this patch was on an older version. > diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c > index da90103..e10a251 100644 > --- a/arch/arm/mach-davinci/dma.c > +++ b/arch/arm/mach-davinci/dma.c > @@ -1513,7 +1513,7 @@ static int __init edma_probe(struct platform_device *pdev) > * started by the codec engine will not cause audio defects. > */ > for (i = 0; i < edma_cc[j]->num_channels; i++) > - map_dmach_queue(j, i, EVENTQ_1); > + map_dmach_queue(j, i, info[j]->default_queue); > > queue_tc_mapping = info[j]->queue_tc_mapping; > queue_priority_mapping = info[j]->queue_priority_mapping; > > > [1] http://www.mail-archive.com/davinci-linux-open-source@linux.davincidsp.com/msg17926.html > > Do you prepare a patch, or should I send it? > You can go ahead and submit the patch but Juha was the person who found out this issue. Thanks, Sudhakar ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: arm, am1808: using mmc1 controller and dma 2011-12-02 9:00 ` Rajashekhara, Sudhakar @ 2011-12-02 9:19 ` Heiko Schocher 0 siblings, 0 replies; 5+ messages in thread From: Heiko Schocher @ 2011-12-02 9:19 UTC (permalink / raw) To: juha.kuikka Cc: Rajashekhara, Sudhakar, davinci-linux-open-source@linux.davincidsp.com, Wolfgang Denk, linux-mmc@vger.kernel.org, Chris Ball, Jarkko Lavinen, linux-omap@vger.kernel.org, Vipin Bhandari, Kumar, Purushotam, Kevin Hilman Hello Juha, Rajashekhara, Sudhakar wrote: > Hi, > > On Fri, Dec 02, 2011 at 14:25:48, Heiko Schocher wrote: >> Hello Rajashekhara, Sudhakar, >> >> Rajashekhara, Sudhakar wrote: >>> Hi, >>> >>> On Fri, Dec 02, 2011 at 13:05:22, Heiko Schocher wrote: >>>> Hello, >>>> >>>> trying Linux 3.2.0-rc3 on an am1808 based board using MMCSD1 controller, >>>> and facing problems with using DMA. Deactivating use_dma=0 in the >>>> davinci_mmc controller and mmc works in pio mode without problems. >>>> So there are no hardware problems, pinmux is ok, psc are all on. >>>> >>> Please refer to the discussion at [1] where similar issue was discussed. Go through the > > [...] > >> Yuhu! that works for me! But I had to fix it a little, because "edma_info" >> is now named "info". Here my diff: >> > > Yup, this patch was on an older version. > >> diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c >> index da90103..e10a251 100644 >> --- a/arch/arm/mach-davinci/dma.c >> +++ b/arch/arm/mach-davinci/dma.c >> @@ -1513,7 +1513,7 @@ static int __init edma_probe(struct platform_device *pdev) >> * started by the codec engine will not cause audio defects. >> */ >> for (i = 0; i < edma_cc[j]->num_channels; i++) >> - map_dmach_queue(j, i, EVENTQ_1); >> + map_dmach_queue(j, i, info[j]->default_queue); >> >> queue_tc_mapping = info[j]->queue_tc_mapping; >> queue_priority_mapping = info[j]->queue_priority_mapping; >> >>> [1] http://www.mail-archive.com/davinci-linux-open-source@linux.davincidsp.com/msg17926.html >> Do you prepare a patch, or should I send it? >> > > You can go ahead and submit the patch but Juha was the person who found out this issue. Juha, can you post this patch, or is it ok for you, if I post it with your "Reported-by" and "Signed-off-by"? bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-12-02 9:20 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-12-02 7:35 arm, am1808: using mmc1 controller and dma Heiko Schocher 2011-12-02 8:34 ` Rajashekhara, Sudhakar 2011-12-02 8:55 ` Heiko Schocher 2011-12-02 9:00 ` Rajashekhara, Sudhakar 2011-12-02 9:19 ` Heiko Schocher
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.