Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
* Joel Fernandes jo...@ti.com [131129 16:39]: On 11/13/2013 08:35 PM, Tony Lindgren wrote: --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -90,17 +90,6 @@ #define OMAP_MMC_CMDTYPE_AC2 #define OMAP_MMC_CMDTYPE_ADTC 3 -#define OMAP_DMA_MMC_TX21 -#define OMAP_DMA_MMC_RX22 -#define OMAP_DMA_MMC2_TX 54 -#define OMAP_DMA_MMC2_RX 55 - -#define OMAP24XX_DMA_MMC2_TX 47 -#define OMAP24XX_DMA_MMC2_RX 48 -#define OMAP24XX_DMA_MMC1_TX 61 -#define OMAP24XX_DMA_MMC1_RX 62 - - #define DRIVER_NAME mmci-omap /* Specifies how often in millisecs to poll for card status changes @@ -1408,19 +1397,20 @@ static int mmc_omap_probe(struct platform_device *pdev) host-dma_tx_burst = -1; host-dma_rx_burst = -1; - if (mmc_omap2()) - sig = host-id == 0 ? OMAP24XX_DMA_MMC1_TX : OMAP24XX_DMA_MMC2_TX; - else - sig = host-id == 0 ? OMAP_DMA_MMC_TX : OMAP_DMA_MMC2_TX; - host-dma_tx = dma_request_channel(mask, omap_dma_filter_fn, sig); + res = platform_get_resource_byname(pdev, IORESOURCE_DMA, tx); + if (res) + sig = res-start; + host-dma_tx = dma_request_slave_channel_compat(mask, + omap_dma_filter_fn, sig, pdev-dev, tx); Minor comment, since we're moving to DT-only for platforms using this driver (hope I'm right about that), why not just do: dma_request_slave_channel_(pdev-dev, tx); IORESOURCE_DMA is not created by OF layer so I guess no need to call platform_get_resource either. Well this is not the omap_hsmmc.c driver, this is the one for earlier hardware that's available on omap1 and 2420. All the later ones use the omap_hsmmc.c driver instead. So this one we cannot make DT only unless we make mach-omap1 DT only, which is doable, but may never happen because of the effort needed. Most of the effort would be quite trivial, except for the conversion to use the common clock framework. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
* Jarkko Nikula jarkko.nik...@bitmer.com [131128 09:03]: Hi On 11/27/2013 11:37 PM, Tony Lindgren wrote: * Jarkko Nikula jarkko.nik...@bitmer.com [131127 12:55]: Bummer, sounds like some duplicate work could have been avoided :( I suggest resend to Chris and linux-mmc one more time as Chris should pick up the MMC patches in general. Before that should Chris merge your 2 patches in order to avoid couple trivial merge conflicts with my set when linux-omap and mmc are merged? Those are already queued to arm-soc/fixes branch and should hit the mainline tree within next few days, hopefully before -rc2 so it's probably to wait for that for that for further fixes. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
* Jarkko Nikula jarkko.nik...@bitmer.com [131128 08:14]: Hi On 11/27/2013 11:59 PM, Tony Lindgren wrote: * Chris Ball c...@laptop.org [131127 13:48]: Hi, On Wed, Nov 27 2013, Jarkko Nikula wrote: Can you enlighten me what's the proper way to get patches to mmc since I cannot figure out working methodology from MAINTAINERS file? Sorry about this, Jarkko. Since I don't have omap.c hardware, I'm generally going to wait for a Tested-by/Acked-by from someone else on patches like these. We actually have a maintainer already listed for the driver, Jarkko Lavinen jarkko.lavi...@nokia.com. So, maybe the MAINTAINERS section for drivers/mmc/host/omap.c needs an update? Feel free to send me patches to it. Either way, I'll start treating Aaro and Jarkko (Nikula) as maintainers for this driver. Oh, I see. I even didn't check ./scripts/get_maintainer.pl nor check MAINTAINERS file further than main MMC entry as I knew Jarkko L. is not working anymore for Nokia. Sorry, we should have noticed that. Hmm looks like here's a reasonably recent update that we've missed from Jarkko Lavinen to update his email address: http://lkml.org/lkml/2013/10/4/142 I've updated Jarkko Lavinen's address in this mail, we should probably also patch the MAINTAINERS file for that, and then see if Aaro and Jarkko Nikula are interested to be listed there as well. I can volunteer. Not that I know much about mmc but I like to keep my legacy hw still running :-) Sounds good to me, good to hear :) Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
On 11/13/2013 08:35 PM, Tony Lindgren wrote: We are wrongly relying on device id for the DMA configuration which can lead to wrong DMA channel being selected. Fix the issue by using the standard resources like we should. Cc: Chris Ball c...@laptop.org Cc: linux-...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com --- If this looks OK, I'd like to merge this as a fix via arm-soc tree along with the other patches in this series as my later patches depend on patches in this series. --- drivers/mmc/host/omap.c | 32 +++- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index b94f38e..ed56868 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -90,17 +90,6 @@ #define OMAP_MMC_CMDTYPE_AC 2 #define OMAP_MMC_CMDTYPE_ADTC3 -#define OMAP_DMA_MMC_TX 21 -#define OMAP_DMA_MMC_RX 22 -#define OMAP_DMA_MMC2_TX 54 -#define OMAP_DMA_MMC2_RX 55 - -#define OMAP24XX_DMA_MMC2_TX 47 -#define OMAP24XX_DMA_MMC2_RX 48 -#define OMAP24XX_DMA_MMC1_TX 61 -#define OMAP24XX_DMA_MMC1_RX 62 - - #define DRIVER_NAME mmci-omap /* Specifies how often in millisecs to poll for card status changes @@ -1408,19 +1397,20 @@ static int mmc_omap_probe(struct platform_device *pdev) host-dma_tx_burst = -1; host-dma_rx_burst = -1; - if (mmc_omap2()) - sig = host-id == 0 ? OMAP24XX_DMA_MMC1_TX : OMAP24XX_DMA_MMC2_TX; - else - sig = host-id == 0 ? OMAP_DMA_MMC_TX : OMAP_DMA_MMC2_TX; - host-dma_tx = dma_request_channel(mask, omap_dma_filter_fn, sig); + res = platform_get_resource_byname(pdev, IORESOURCE_DMA, tx); + if (res) + sig = res-start; + host-dma_tx = dma_request_slave_channel_compat(mask, + omap_dma_filter_fn, sig, pdev-dev, tx); Minor comment, since we're moving to DT-only for platforms using this driver (hope I'm right about that), why not just do: dma_request_slave_channel_(pdev-dev, tx); IORESOURCE_DMA is not created by OF layer so I guess no need to call platform_get_resource either. thanks, -Joel -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
Hi On 11/27/2013 11:59 PM, Tony Lindgren wrote: * Chris Ball c...@laptop.org [131127 13:48]: Hi, On Wed, Nov 27 2013, Jarkko Nikula wrote: Can you enlighten me what's the proper way to get patches to mmc since I cannot figure out working methodology from MAINTAINERS file? Sorry about this, Jarkko. Since I don't have omap.c hardware, I'm generally going to wait for a Tested-by/Acked-by from someone else on patches like these. We actually have a maintainer already listed for the driver, Jarkko Lavinen jarkko.lavi...@nokia.com. So, maybe the MAINTAINERS section for drivers/mmc/host/omap.c needs an update? Feel free to send me patches to it. Either way, I'll start treating Aaro and Jarkko (Nikula) as maintainers for this driver. Oh, I see. I even didn't check ./scripts/get_maintainer.pl nor check MAINTAINERS file further than main MMC entry as I knew Jarkko L. is not working anymore for Nokia. Sorry, we should have noticed that. Hmm looks like here's a reasonably recent update that we've missed from Jarkko Lavinen to update his email address: http://lkml.org/lkml/2013/10/4/142 I've updated Jarkko Lavinen's address in this mail, we should probably also patch the MAINTAINERS file for that, and then see if Aaro and Jarkko Nikula are interested to be listed there as well. I can volunteer. Not that I know much about mmc but I like to keep my legacy hw still running :-) -- Jarkko -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
Hi On 11/27/2013 11:37 PM, Tony Lindgren wrote: * Jarkko Nikula jarkko.nik...@bitmer.com [131127 12:55]: Bummer, sounds like some duplicate work could have been avoided :( I suggest resend to Chris and linux-mmc one more time as Chris should pick up the MMC patches in general. Before that should Chris merge your 2 patches in order to avoid couple trivial merge conflicts with my set when linux-omap and mmc are merged? -- Jarkko -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
Hi Chris On Tue, 26 Nov 2013 18:33:50 -0500 Chris Ball c...@laptop.org wrote: Hi Tony, On Mon, Nov 18 2013, Tony Lindgren wrote: We are wrongly relying on device id for the DMA configuration which can lead to wrong DMA channel being selected. Fix the issue by using the standard resources like we should. Cc: Chris Ball c...@laptop.org Cc: linux-...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com Feel free to merge via your tree: Acked-by: Chris Ball c...@laptop.org Can you enlighten me what's the proper way to get patches to mmc since I cannot figure out working methodology from MAINTAINERS file? I happened to notice that Tony had this similar patch in linux-omap list I sent first time already September to you and linux-mmc (sorry linux-omap folks, I didn't want to spam multiple lists): http://www.spinics.net/lists/linux-mmc/msg22137.html After that I've resend the set a few times including a fix to user triggable NULL pointer dereference: http://www.spinics.net/lists/linux-mmc/msg22610.html I'm fine if mmc patches should go through other subsystems but at least it should be documented in MAINTAINERS file. -- Jarkko -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
* Jarkko Nikula jarkko.nik...@bitmer.com [131127 12:55]: Hi Chris On Tue, 26 Nov 2013 18:33:50 -0500 Chris Ball c...@laptop.org wrote: Hi Tony, On Mon, Nov 18 2013, Tony Lindgren wrote: We are wrongly relying on device id for the DMA configuration which can lead to wrong DMA channel being selected. Fix the issue by using the standard resources like we should. Cc: Chris Ball c...@laptop.org Cc: linux-...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com Feel free to merge via your tree: Acked-by: Chris Ball c...@laptop.org Can you enlighten me what's the proper way to get patches to mmc since I cannot figure out working methodology from MAINTAINERS file? I happened to notice that Tony had this similar patch in linux-omap list I sent first time already September to you and linux-mmc (sorry linux-omap folks, I didn't want to spam multiple lists): http://www.spinics.net/lists/linux-mmc/msg22137.html After that I've resend the set a few times including a fix to user triggable NULL pointer dereference: http://www.spinics.net/lists/linux-mmc/msg22610.html I'm fine if mmc patches should go through other subsystems but at least it should be documented in MAINTAINERS file. Bummer, sounds like some duplicate work could have been avoided :( I suggest resend to Chris and linux-mmc one more time as Chris should pick up the MMC patches in general. I've been just trying to get things working in general for v3.13-rc series for omaps with device tree based booting and patching all over the place. This is to make it easy for us to just drop the legacy platform based booting for v3.14 while keeping things working. Chris, as far as I'm concerned, Aaro and Jarkko are good people to review and ack the drivers/mmc/omap.c patches, so adding Aaro to Cc as well. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
Hi, On Wed, Nov 27 2013, Jarkko Nikula wrote: Can you enlighten me what's the proper way to get patches to mmc since I cannot figure out working methodology from MAINTAINERS file? Sorry about this, Jarkko. Since I don't have omap.c hardware, I'm generally going to wait for a Tested-by/Acked-by from someone else on patches like these. We actually have a maintainer already listed for the driver, Jarkko Lavinen jarkko.lavi...@nokia.com. So, maybe the MAINTAINERS section for drivers/mmc/host/omap.c needs an update? Feel free to send me patches to it. Either way, I'll start treating Aaro and Jarkko (Nikula) as maintainers for this driver. Thanks! - Chris. -- Chris Ball c...@laptop.org http://printf.net/ -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
* Chris Ball c...@laptop.org [131127 13:48]: Hi, On Wed, Nov 27 2013, Jarkko Nikula wrote: Can you enlighten me what's the proper way to get patches to mmc since I cannot figure out working methodology from MAINTAINERS file? Sorry about this, Jarkko. Since I don't have omap.c hardware, I'm generally going to wait for a Tested-by/Acked-by from someone else on patches like these. We actually have a maintainer already listed for the driver, Jarkko Lavinen jarkko.lavi...@nokia.com. So, maybe the MAINTAINERS section for drivers/mmc/host/omap.c needs an update? Feel free to send me patches to it. Either way, I'll start treating Aaro and Jarkko (Nikula) as maintainers for this driver. Hmm looks like here's a reasonably recent update that we've missed from Jarkko Lavinen to update his email address: http://lkml.org/lkml/2013/10/4/142 I've updated Jarkko Lavinen's address in this mail, we should probably also patch the MAINTAINERS file for that, and then see if Aaro and Jarkko Nikula are interested to be listed there as well. Regards, Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
Hi Tony, On Mon, Nov 18 2013, Tony Lindgren wrote: We are wrongly relying on device id for the DMA configuration which can lead to wrong DMA channel being selected. Fix the issue by using the standard resources like we should. Cc: Chris Ball c...@laptop.org Cc: linux-...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com Feel free to merge via your tree: Acked-by: Chris Ball c...@laptop.org - Chris. -- Chris Ball c...@laptop.org http://printf.net/ -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
* Chris Ball c...@laptop.org [131126 15:35]: Hi Tony, On Mon, Nov 18 2013, Tony Lindgren wrote: We are wrongly relying on device id for the DMA configuration which can lead to wrong DMA channel being selected. Fix the issue by using the standard resources like we should. Cc: Chris Ball c...@laptop.org Cc: linux-...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com Feel free to merge via your tree: Acked-by: Chris Ball c...@laptop.org OK thanks will merge both mmc fixes. Tony -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
* Tony Lindgren t...@atomide.com [131113 18:36]: We are wrongly relying on device id for the DMA configuration which can lead to wrong DMA channel being selected. Fix the issue by using the standard resources like we should. Cc: Chris Ball c...@laptop.org Cc: linux-...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com --- If this looks OK, I'd like to merge this as a fix via arm-soc tree along with the other patches in this series as my later patches depend on patches in this series. Looks like we need sig initialized in this patch to avoid some uninitialized warnings. Regards, Tony From: Tony Lindgren t...@atomide.com Date: Thu, 14 Nov 2013 15:25:06 -0800 Subject: [PATCH] mmc: omap: Fix DMA configuration to not rely on device id We are wrongly relying on device id for the DMA configuration which can lead to wrong DMA channel being selected. Fix the issue by using the standard resources like we should. Cc: Chris Ball c...@laptop.org Cc: linux-...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -90,17 +90,6 @@ #define OMAP_MMC_CMDTYPE_AC2 #define OMAP_MMC_CMDTYPE_ADTC 3 -#define OMAP_DMA_MMC_TX21 -#define OMAP_DMA_MMC_RX22 -#define OMAP_DMA_MMC2_TX 54 -#define OMAP_DMA_MMC2_RX 55 - -#define OMAP24XX_DMA_MMC2_TX 47 -#define OMAP24XX_DMA_MMC2_RX 48 -#define OMAP24XX_DMA_MMC1_TX 61 -#define OMAP24XX_DMA_MMC1_RX 62 - - #define DRIVER_NAME mmci-omap /* Specifies how often in millisecs to poll for card status changes @@ -1331,7 +1320,7 @@ static int mmc_omap_probe(struct platform_device *pdev) struct mmc_omap_host *host = NULL; struct resource *res; dma_cap_mask_t mask; - unsigned sig; + unsigned sig = 0; int i, ret = 0; int irq; @@ -1408,19 +1397,20 @@ static int mmc_omap_probe(struct platform_device *pdev) host-dma_tx_burst = -1; host-dma_rx_burst = -1; - if (mmc_omap2()) - sig = host-id == 0 ? OMAP24XX_DMA_MMC1_TX : OMAP24XX_DMA_MMC2_TX; - else - sig = host-id == 0 ? OMAP_DMA_MMC_TX : OMAP_DMA_MMC2_TX; - host-dma_tx = dma_request_channel(mask, omap_dma_filter_fn, sig); + res = platform_get_resource_byname(pdev, IORESOURCE_DMA, tx); + if (res) + sig = res-start; + host-dma_tx = dma_request_slave_channel_compat(mask, + omap_dma_filter_fn, sig, pdev-dev, tx); if (!host-dma_tx) dev_warn(host-dev, unable to obtain TX DMA engine channel %u\n, sig); - if (mmc_omap2()) - sig = host-id == 0 ? OMAP24XX_DMA_MMC1_RX : OMAP24XX_DMA_MMC2_RX; - else - sig = host-id == 0 ? OMAP_DMA_MMC_RX : OMAP_DMA_MMC2_RX; - host-dma_rx = dma_request_channel(mask, omap_dma_filter_fn, sig); + + res = platform_get_resource_byname(pdev, IORESOURCE_DMA, rx); + if (res) + sig = res-start; + host-dma_rx = dma_request_slave_channel_compat(mask, + omap_dma_filter_fn, sig, pdev-dev, rx); if (!host-dma_rx) dev_warn(host-dev, unable to obtain RX DMA engine channel %u\n, sig); -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/8] mmc: omap: Fix DMA configuration to not rely on device id
We are wrongly relying on device id for the DMA configuration which can lead to wrong DMA channel being selected. Fix the issue by using the standard resources like we should. Cc: Chris Ball c...@laptop.org Cc: linux-...@vger.kernel.org Signed-off-by: Tony Lindgren t...@atomide.com --- If this looks OK, I'd like to merge this as a fix via arm-soc tree along with the other patches in this series as my later patches depend on patches in this series. --- drivers/mmc/host/omap.c | 32 +++- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index b94f38e..ed56868 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -90,17 +90,6 @@ #define OMAP_MMC_CMDTYPE_AC2 #define OMAP_MMC_CMDTYPE_ADTC 3 -#define OMAP_DMA_MMC_TX21 -#define OMAP_DMA_MMC_RX22 -#define OMAP_DMA_MMC2_TX 54 -#define OMAP_DMA_MMC2_RX 55 - -#define OMAP24XX_DMA_MMC2_TX 47 -#define OMAP24XX_DMA_MMC2_RX 48 -#define OMAP24XX_DMA_MMC1_TX 61 -#define OMAP24XX_DMA_MMC1_RX 62 - - #define DRIVER_NAME mmci-omap /* Specifies how often in millisecs to poll for card status changes @@ -1408,19 +1397,20 @@ static int mmc_omap_probe(struct platform_device *pdev) host-dma_tx_burst = -1; host-dma_rx_burst = -1; - if (mmc_omap2()) - sig = host-id == 0 ? OMAP24XX_DMA_MMC1_TX : OMAP24XX_DMA_MMC2_TX; - else - sig = host-id == 0 ? OMAP_DMA_MMC_TX : OMAP_DMA_MMC2_TX; - host-dma_tx = dma_request_channel(mask, omap_dma_filter_fn, sig); + res = platform_get_resource_byname(pdev, IORESOURCE_DMA, tx); + if (res) + sig = res-start; + host-dma_tx = dma_request_slave_channel_compat(mask, + omap_dma_filter_fn, sig, pdev-dev, tx); if (!host-dma_tx) dev_warn(host-dev, unable to obtain TX DMA engine channel %u\n, sig); - if (mmc_omap2()) - sig = host-id == 0 ? OMAP24XX_DMA_MMC1_RX : OMAP24XX_DMA_MMC2_RX; - else - sig = host-id == 0 ? OMAP_DMA_MMC_RX : OMAP_DMA_MMC2_RX; - host-dma_rx = dma_request_channel(mask, omap_dma_filter_fn, sig); + + res = platform_get_resource_byname(pdev, IORESOURCE_DMA, rx); + if (res) + sig = res-start; + host-dma_rx = dma_request_slave_channel_compat(mask, + omap_dma_filter_fn, sig, pdev-dev, rx); if (!host-dma_rx) dev_warn(host-dev, unable to obtain RX DMA engine channel %u\n, sig); -- 1.8.1.1 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html