Re: [PATCH v2 0/3] Add support for using external dma in SDHCI
Hi Faiz, Many thanks for testing this. On Thu, 29 Nov 2018 at 00:59, Rizvi, Mohammad Faiz Abbas wrote: > > + Mark Brown > > Chunyan, > > On 11/21/2018 5:17 PM, Faiz Abbas wrote: > > Hi Chunyan, > > > > On 12/11/18 12:56 PM, Chunyan Zhang wrote: > >> Currently the generic SDHCI code in the Linux kernel supports the SD > >> standard DMA integrated into the host controller but does not have any > >> support for external DMA controllers implemented using dmaengine meaning > >> that custom code is needed for any systems that use a generic DMA > >> controller with SDHCI which in practice means any SDHCI controller that > >> doesn't have an integrated DMA controller so we should have this as a > >> generic feature. > >> > >> There are already a number of controller specific drivers that have > >> dmaengine > >> code, and some could use sdhci.c actually, but needed to implement > >> mmc_ops->request() > >> in their specific driver for sending command with external dma using > >> dmaengine > >> framework, with this patchset, them will take advantage of the generic > >> support. > >> TI's omap controller is the case as an example. > >> > >> Any comments are very appreciated. > >> > > > > This is great. It helps us move am335x and am43xx platforms to > > sdhci-omap. What platforms have you tested this on? > > > > Gentle ping on this. I tried testing these with an am335x-evm board. In > their current condition, the card fails to enumerate altogether. The > changes suggested by Adrian should fix this. Let me know when you post a v3. I addressed Adrian's comments, and posted a new patch under 1/3 of the last patch series, if this patch can be verified workable, I will send another new patchset also add your tested-by. Thanks, Chunyan > > Thanks, > Faiz
Re: [PATCH v2 0/3] Add support for using external dma in SDHCI
Hi Faiz, Many thanks for testing this. On Thu, 29 Nov 2018 at 00:59, Rizvi, Mohammad Faiz Abbas wrote: > > + Mark Brown > > Chunyan, > > On 11/21/2018 5:17 PM, Faiz Abbas wrote: > > Hi Chunyan, > > > > On 12/11/18 12:56 PM, Chunyan Zhang wrote: > >> Currently the generic SDHCI code in the Linux kernel supports the SD > >> standard DMA integrated into the host controller but does not have any > >> support for external DMA controllers implemented using dmaengine meaning > >> that custom code is needed for any systems that use a generic DMA > >> controller with SDHCI which in practice means any SDHCI controller that > >> doesn't have an integrated DMA controller so we should have this as a > >> generic feature. > >> > >> There are already a number of controller specific drivers that have > >> dmaengine > >> code, and some could use sdhci.c actually, but needed to implement > >> mmc_ops->request() > >> in their specific driver for sending command with external dma using > >> dmaengine > >> framework, with this patchset, them will take advantage of the generic > >> support. > >> TI's omap controller is the case as an example. > >> > >> Any comments are very appreciated. > >> > > > > This is great. It helps us move am335x and am43xx platforms to > > sdhci-omap. What platforms have you tested this on? > > > > Gentle ping on this. I tried testing these with an am335x-evm board. In > their current condition, the card fails to enumerate altogether. The > changes suggested by Adrian should fix this. Let me know when you post a v3. I addressed Adrian's comments, and posted a new patch under 1/3 of the last patch series, if this patch can be verified workable, I will send another new patchset also add your tested-by. Thanks, Chunyan > > Thanks, > Faiz
Re: [PATCH v2 0/3] Add support for using external dma in SDHCI
+ Mark Brown Chunyan, On 11/21/2018 5:17 PM, Faiz Abbas wrote: Hi Chunyan, On 12/11/18 12:56 PM, Chunyan Zhang wrote: Currently the generic SDHCI code in the Linux kernel supports the SD standard DMA integrated into the host controller but does not have any support for external DMA controllers implemented using dmaengine meaning that custom code is needed for any systems that use a generic DMA controller with SDHCI which in practice means any SDHCI controller that doesn't have an integrated DMA controller so we should have this as a generic feature. There are already a number of controller specific drivers that have dmaengine code, and some could use sdhci.c actually, but needed to implement mmc_ops->request() in their specific driver for sending command with external dma using dmaengine framework, with this patchset, them will take advantage of the generic support. TI's omap controller is the case as an example. Any comments are very appreciated. This is great. It helps us move am335x and am43xx platforms to sdhci-omap. What platforms have you tested this on? Gentle ping on this. I tried testing these with an am335x-evm board. In their current condition, the card fails to enumerate altogether. The changes suggested by Adrian should fix this. Let me know when you post a v3. Thanks, Faiz
Re: [PATCH v2 0/3] Add support for using external dma in SDHCI
+ Mark Brown Chunyan, On 11/21/2018 5:17 PM, Faiz Abbas wrote: Hi Chunyan, On 12/11/18 12:56 PM, Chunyan Zhang wrote: Currently the generic SDHCI code in the Linux kernel supports the SD standard DMA integrated into the host controller but does not have any support for external DMA controllers implemented using dmaengine meaning that custom code is needed for any systems that use a generic DMA controller with SDHCI which in practice means any SDHCI controller that doesn't have an integrated DMA controller so we should have this as a generic feature. There are already a number of controller specific drivers that have dmaengine code, and some could use sdhci.c actually, but needed to implement mmc_ops->request() in their specific driver for sending command with external dma using dmaengine framework, with this patchset, them will take advantage of the generic support. TI's omap controller is the case as an example. Any comments are very appreciated. This is great. It helps us move am335x and am43xx platforms to sdhci-omap. What platforms have you tested this on? Gentle ping on this. I tried testing these with an am335x-evm board. In their current condition, the card fails to enumerate altogether. The changes suggested by Adrian should fix this. Let me know when you post a v3. Thanks, Faiz
Re: [PATCH v2 0/3] Add support for using external dma in SDHCI
Hi Chunyan, On 12/11/18 12:56 PM, Chunyan Zhang wrote: > Currently the generic SDHCI code in the Linux kernel supports the SD > standard DMA integrated into the host controller but does not have any > support for external DMA controllers implemented using dmaengine meaning > that custom code is needed for any systems that use a generic DMA > controller with SDHCI which in practice means any SDHCI controller that > doesn't have an integrated DMA controller so we should have this as a > generic feature. > > There are already a number of controller specific drivers that have dmaengine > code, and some could use sdhci.c actually, but needed to implement > mmc_ops->request() > in their specific driver for sending command with external dma using dmaengine > framework, with this patchset, them will take advantage of the generic > support. > TI's omap controller is the case as an example. > > Any comments are very appreciated. > This is great. It helps us move am335x and am43xx platforms to sdhci-omap. What platforms have you tested this on? Thanks, Faiz
Re: [PATCH v2 0/3] Add support for using external dma in SDHCI
Hi Chunyan, On 12/11/18 12:56 PM, Chunyan Zhang wrote: > Currently the generic SDHCI code in the Linux kernel supports the SD > standard DMA integrated into the host controller but does not have any > support for external DMA controllers implemented using dmaengine meaning > that custom code is needed for any systems that use a generic DMA > controller with SDHCI which in practice means any SDHCI controller that > doesn't have an integrated DMA controller so we should have this as a > generic feature. > > There are already a number of controller specific drivers that have dmaengine > code, and some could use sdhci.c actually, but needed to implement > mmc_ops->request() > in their specific driver for sending command with external dma using dmaengine > framework, with this patchset, them will take advantage of the generic > support. > TI's omap controller is the case as an example. > > Any comments are very appreciated. > This is great. It helps us move am335x and am43xx platforms to sdhci-omap. What platforms have you tested this on? Thanks, Faiz
[PATCH v2 0/3] Add support for using external dma in SDHCI
Currently the generic SDHCI code in the Linux kernel supports the SD standard DMA integrated into the host controller but does not have any support for external DMA controllers implemented using dmaengine meaning that custom code is needed for any systems that use a generic DMA controller with SDHCI which in practice means any SDHCI controller that doesn't have an integrated DMA controller so we should have this as a generic feature. There are already a number of controller specific drivers that have dmaengine code, and some could use sdhci.c actually, but needed to implement mmc_ops->request() in their specific driver for sending command with external dma using dmaengine framework, with this patchset, them will take advantage of the generic support. TI's omap controller is the case as an example. Any comments are very appreciated. Thanks, Chunyan Changes from v1 (https://lkml.org/lkml/2018/11/5/110): (The code on patch 1/3 only was revised) * Address comments from Arnd: - Release channel when failed to request it unconditionally; - Skip warning message if get EPROBE_DEFER; * Address Andrian's comments: - Replace extdma with external_dma; - Add release dma resources in sdhci_cleanup_host() and sdhci_remove_host(); - Release dma resources once dmaengine_submit() failed. - Put rx/tx_chan in struct sdhci_host, and removed unused structure. * Fall back to the DMA/PIO which standard SDHCI supports, if sdhci_external_dma_setup() or sdhci_external_dma_init failed; Chunyan Zhang (3): mmc: sdhci: add support for using external DMA devices mmc: sdhci-omap: Add using external dma dt-bindings: sdhci-omap: Add example for using external dma .../devicetree/bindings/mmc/sdhci-omap.txt | 7 + drivers/mmc/host/Kconfig | 13 ++ drivers/mmc/host/sdhci-omap.c | 7 + drivers/mmc/host/sdhci.c | 181 - drivers/mmc/host/sdhci.h | 8 + 5 files changed, 215 insertions(+), 1 deletion(-) -- 2.7.4
[PATCH v2 0/3] Add support for using external dma in SDHCI
Currently the generic SDHCI code in the Linux kernel supports the SD standard DMA integrated into the host controller but does not have any support for external DMA controllers implemented using dmaengine meaning that custom code is needed for any systems that use a generic DMA controller with SDHCI which in practice means any SDHCI controller that doesn't have an integrated DMA controller so we should have this as a generic feature. There are already a number of controller specific drivers that have dmaengine code, and some could use sdhci.c actually, but needed to implement mmc_ops->request() in their specific driver for sending command with external dma using dmaengine framework, with this patchset, them will take advantage of the generic support. TI's omap controller is the case as an example. Any comments are very appreciated. Thanks, Chunyan Changes from v1 (https://lkml.org/lkml/2018/11/5/110): (The code on patch 1/3 only was revised) * Address comments from Arnd: - Release channel when failed to request it unconditionally; - Skip warning message if get EPROBE_DEFER; * Address Andrian's comments: - Replace extdma with external_dma; - Add release dma resources in sdhci_cleanup_host() and sdhci_remove_host(); - Release dma resources once dmaengine_submit() failed. - Put rx/tx_chan in struct sdhci_host, and removed unused structure. * Fall back to the DMA/PIO which standard SDHCI supports, if sdhci_external_dma_setup() or sdhci_external_dma_init failed; Chunyan Zhang (3): mmc: sdhci: add support for using external DMA devices mmc: sdhci-omap: Add using external dma dt-bindings: sdhci-omap: Add example for using external dma .../devicetree/bindings/mmc/sdhci-omap.txt | 7 + drivers/mmc/host/Kconfig | 13 ++ drivers/mmc/host/sdhci-omap.c | 7 + drivers/mmc/host/sdhci.c | 181 - drivers/mmc/host/sdhci.h | 8 + 5 files changed, 215 insertions(+), 1 deletion(-) -- 2.7.4