RE: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Thu, Oct 18, 2012 at 18:56:39, Porter, Matt wrote: ...snip... ...snip... ...snip... > > This series adds DMA Engine support for AM33xx, which uses > an EDMA DMAC. The EDMA DMAC has been previously supported by only > a private API implementation (much like the situation with OMAP > DMA) found on the DaVinci family of SoCs. > > The series applies on top of 3.7-rc1 and the following patches: > > - GPMC fails to reserve memory fix: > http://www.spinics.net/lists/linux-omap/msg79675.html > - TPS65910 regulator fix: > https://patchwork.kernel.org/patch/1593651/ > - dmaengine DT support from Vinod's dmaengine_dt branch in > git://git.infradead.org/users/vkoul/slave-dma.git since > 027478851791df751176398be02a3b1c5f6aa824 > > The approach taken is similar to how OMAP DMA is being converted to > DMA Engine support. With the functional EDMA private API already > existing in mach-davinci/dma.c, we first move that to an ARM common > area so it can be shared. Adding DT and runtime PM support to the > private EDMA API implementation allows it to run on AM33xx. AM33xx > *only* boots using DT so we leverage Jon's generic DT DMA helpers to > register EDMA DMAC with the of_dma framework and then add support > for calling the dma_request_slave_channel() API to both the mmc > and spi drivers. > > With this series both BeagleBone and the AM335x EVM have working > MMC and SPI support. > > This is tested on BeagleBone with a SPI framebuffer driver and MMC > rootfs. A trivial gpio DMA event misc driver was used to test the > crossbar DMA event support. It is also tested on the AM335x EVM > with the onboard SPI flash and MMC rootfs. The branch at > https://github.com/ohporter/linux/tree/edma-dmaengine-v3 has the > complete series, dependencies, and some test drivers/defconfigs. > > Regression testing was done on AM180x-EVM (which also makes use > of the EDMA dmaengine driver and the EDMA private API) using SD, > SPI flash, and the onboard audio supported by the ASoC Davinci > driver. Since you have tested MMC, and probably will be adding Audio support for AM335x as well, I believe you will also be adding Pin-mux support for both the modules. Can you share your plan to release the next version? I have few patches pending for AM335x Audio (DT related). Thanks in advance Regards Gururaja > > After this series, the plan is to convert the last in-tree user > of the private EDMA API (davinci-pcm/mcasp) and then eliminate > the private EDMA API by folding its functionality into > drivers/dma/edma.c. > > Matt Porter (16): > dmaengine: edma: fix slave config dependency on direction > ARM: davinci: move private EDMA API to arm/common > ARM: edma: remove unused transfer controller handlers > ARM: edma: add DT and runtime PM support for AM33XX > ARM: edma: add AM33XX crossbar event support > dmaengine: edma: enable build for AM33XX > dmaengine: edma: Add TI EDMA device tree binding > ARM: dts: add AM33XX EDMA support > dmaengine: add dma_request_slave_channel_compat() > mmc: omap_hsmmc: convert to dma_request_slave_channel_compat() > mmc: omap_hsmmc: limit max_segs with the EDMA DMAC > mmc: omap_hsmmc: add generic DMA request support to the DT binding > ARM: dts: add AM33XX MMC support > spi: omap2-mcspi: convert to dma_request_slave_channel_compat() > spi: omap2-mcspi: add generic DMA request support to the DT binding > ARM: dts: add AM33XX SPI support > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Thu, Oct 18, 2012 at 18:56:39, Porter, Matt wrote: ...snip... ...snip... ...snip... This series adds DMA Engine support for AM33xx, which uses an EDMA DMAC. The EDMA DMAC has been previously supported by only a private API implementation (much like the situation with OMAP DMA) found on the DaVinci family of SoCs. The series applies on top of 3.7-rc1 and the following patches: - GPMC fails to reserve memory fix: http://www.spinics.net/lists/linux-omap/msg79675.html - TPS65910 regulator fix: https://patchwork.kernel.org/patch/1593651/ - dmaengine DT support from Vinod's dmaengine_dt branch in git://git.infradead.org/users/vkoul/slave-dma.git since 027478851791df751176398be02a3b1c5f6aa824 The approach taken is similar to how OMAP DMA is being converted to DMA Engine support. With the functional EDMA private API already existing in mach-davinci/dma.c, we first move that to an ARM common area so it can be shared. Adding DT and runtime PM support to the private EDMA API implementation allows it to run on AM33xx. AM33xx *only* boots using DT so we leverage Jon's generic DT DMA helpers to register EDMA DMAC with the of_dma framework and then add support for calling the dma_request_slave_channel() API to both the mmc and spi drivers. With this series both BeagleBone and the AM335x EVM have working MMC and SPI support. This is tested on BeagleBone with a SPI framebuffer driver and MMC rootfs. A trivial gpio DMA event misc driver was used to test the crossbar DMA event support. It is also tested on the AM335x EVM with the onboard SPI flash and MMC rootfs. The branch at https://github.com/ohporter/linux/tree/edma-dmaengine-v3 has the complete series, dependencies, and some test drivers/defconfigs. Regression testing was done on AM180x-EVM (which also makes use of the EDMA dmaengine driver and the EDMA private API) using SD, SPI flash, and the onboard audio supported by the ASoC Davinci driver. Since you have tested MMC, and probably will be adding Audio support for AM335x as well, I believe you will also be adding Pin-mux support for both the modules. Can you share your plan to release the next version? I have few patches pending for AM335x Audio (DT related). Thanks in advance Regards Gururaja After this series, the plan is to convert the last in-tree user of the private EDMA API (davinci-pcm/mcasp) and then eliminate the private EDMA API by folding its functionality into drivers/dma/edma.c. Matt Porter (16): dmaengine: edma: fix slave config dependency on direction ARM: davinci: move private EDMA API to arm/common ARM: edma: remove unused transfer controller handlers ARM: edma: add DT and runtime PM support for AM33XX ARM: edma: add AM33XX crossbar event support dmaengine: edma: enable build for AM33XX dmaengine: edma: Add TI EDMA device tree binding ARM: dts: add AM33XX EDMA support dmaengine: add dma_request_slave_channel_compat() mmc: omap_hsmmc: convert to dma_request_slave_channel_compat() mmc: omap_hsmmc: limit max_segs with the EDMA DMAC mmc: omap_hsmmc: add generic DMA request support to the DT binding ARM: dts: add AM33XX MMC support spi: omap2-mcspi: convert to dma_request_slave_channel_compat() spi: omap2-mcspi: add generic DMA request support to the DT binding ARM: dts: add AM33XX SPI support -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Thu, Oct 18, 2012 at 6:26 AM, Matt Porter wrote: > Changes since v2: > - Rebased on 3.7-rc1 > - Fixed bug in DT/pdata parsing first found by Gururaja > that turned out to be masked by some toolchains > - Dropped unused mach-omap2/devices.c hsmmc patch > - Added AM33XX crossbar DMA event mux support > - Added am335x-evm support > > Changes since v1: > - Rebased on top of mainline from 12250d8 > - Dropped the feature removal schedule patch > - Implemented dma_request_slave_channel_compat() and > converted the mmc and spi drivers to use it > - Dropped unneeded #address-cells and #size-cells from > EDMA DT support > - Moved private EDMA header to linux/platform_data/ and > removed some unneeded definitions > - Fixed parsing of optional properties > > TODO: > - Add dmaengine support for per-channel caps so the > hack to set the maximum segments can be replaced with > a query to the dmaengine driver > > This series adds DMA Engine support for AM33xx, which uses > an EDMA DMAC. The EDMA DMAC has been previously supported by only > a private API implementation (much like the situation with OMAP > DMA) found on the DaVinci family of SoCs. This pretty far along and looks great. Reviewed-by: russ.d...@ti.com > The series applies on top of 3.7-rc1 and the following patches: > > - GPMC fails to reserve memory fix: > http://www.spinics.net/lists/linux-omap/msg79675.html > - TPS65910 regulator fix: > https://patchwork.kernel.org/patch/1593651/ > - dmaengine DT support from Vinod's dmaengine_dt branch in > git://git.infradead.org/users/vkoul/slave-dma.git since > 027478851791df751176398be02a3b1c5f6aa824 > > The approach taken is similar to how OMAP DMA is being converted to > DMA Engine support. With the functional EDMA private API already > existing in mach-davinci/dma.c, we first move that to an ARM common > area so it can be shared. Adding DT and runtime PM support to the > private EDMA API implementation allows it to run on AM33xx. AM33xx > *only* boots using DT so we leverage Jon's generic DT DMA helpers to > register EDMA DMAC with the of_dma framework and then add support > for calling the dma_request_slave_channel() API to both the mmc > and spi drivers. > > With this series both BeagleBone and the AM335x EVM have working > MMC and SPI support. > > This is tested on BeagleBone with a SPI framebuffer driver and MMC > rootfs. A trivial gpio DMA event misc driver was used to test the > crossbar DMA event support. It is also tested on the AM335x EVM > with the onboard SPI flash and MMC rootfs. The branch at > https://github.com/ohporter/linux/tree/edma-dmaengine-v3 has the > complete series, dependencies, and some test drivers/defconfigs. > > Regression testing was done on AM180x-EVM (which also makes use > of the EDMA dmaengine driver and the EDMA private API) using SD, > SPI flash, and the onboard audio supported by the ASoC Davinci > driver. > > After this series, the plan is to convert the last in-tree user > of the private EDMA API (davinci-pcm/mcasp) and then eliminate > the private EDMA API by folding its functionality into > drivers/dma/edma.c. > > Matt Porter (16): > dmaengine: edma: fix slave config dependency on direction > ARM: davinci: move private EDMA API to arm/common > ARM: edma: remove unused transfer controller handlers > ARM: edma: add DT and runtime PM support for AM33XX > ARM: edma: add AM33XX crossbar event support > dmaengine: edma: enable build for AM33XX > dmaengine: edma: Add TI EDMA device tree binding > ARM: dts: add AM33XX EDMA support > dmaengine: add dma_request_slave_channel_compat() > mmc: omap_hsmmc: convert to dma_request_slave_channel_compat() > mmc: omap_hsmmc: limit max_segs with the EDMA DMAC > mmc: omap_hsmmc: add generic DMA request support to the DT binding > ARM: dts: add AM33XX MMC support > spi: omap2-mcspi: convert to dma_request_slave_channel_compat() > spi: omap2-mcspi: add generic DMA request support to the DT binding > ARM: dts: add AM33XX SPI support > > Documentation/devicetree/bindings/dma/ti-edma.txt | 51 + > .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 25 +- > Documentation/devicetree/bindings/spi/omap-spi.txt | 27 +- > arch/arm/Kconfig |1 + > arch/arm/boot/dts/am335x-bone.dts | 23 + > arch/arm/boot/dts/am335x-evm.dts | 15 + > arch/arm/boot/dts/am33xx.dtsi | 101 ++ > arch/arm/common/Kconfig|3 + > arch/arm/common/Makefile |1 + > arch/arm/common/edma.c | 1841 > > arch/arm/mach-davinci/Makefile |2 +- > arch/arm/mach-davinci/board-da830-evm.c|
Re: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Thu, Oct 18, 2012 at 6:26 AM, Matt Porter mpor...@ti.com wrote: Changes since v2: - Rebased on 3.7-rc1 - Fixed bug in DT/pdata parsing first found by Gururaja that turned out to be masked by some toolchains - Dropped unused mach-omap2/devices.c hsmmc patch - Added AM33XX crossbar DMA event mux support - Added am335x-evm support Changes since v1: - Rebased on top of mainline from 12250d8 - Dropped the feature removal schedule patch - Implemented dma_request_slave_channel_compat() and converted the mmc and spi drivers to use it - Dropped unneeded #address-cells and #size-cells from EDMA DT support - Moved private EDMA header to linux/platform_data/ and removed some unneeded definitions - Fixed parsing of optional properties TODO: - Add dmaengine support for per-channel caps so the hack to set the maximum segments can be replaced with a query to the dmaengine driver This series adds DMA Engine support for AM33xx, which uses an EDMA DMAC. The EDMA DMAC has been previously supported by only a private API implementation (much like the situation with OMAP DMA) found on the DaVinci family of SoCs. This pretty far along and looks great. Reviewed-by: russ.d...@ti.com The series applies on top of 3.7-rc1 and the following patches: - GPMC fails to reserve memory fix: http://www.spinics.net/lists/linux-omap/msg79675.html - TPS65910 regulator fix: https://patchwork.kernel.org/patch/1593651/ - dmaengine DT support from Vinod's dmaengine_dt branch in git://git.infradead.org/users/vkoul/slave-dma.git since 027478851791df751176398be02a3b1c5f6aa824 The approach taken is similar to how OMAP DMA is being converted to DMA Engine support. With the functional EDMA private API already existing in mach-davinci/dma.c, we first move that to an ARM common area so it can be shared. Adding DT and runtime PM support to the private EDMA API implementation allows it to run on AM33xx. AM33xx *only* boots using DT so we leverage Jon's generic DT DMA helpers to register EDMA DMAC with the of_dma framework and then add support for calling the dma_request_slave_channel() API to both the mmc and spi drivers. With this series both BeagleBone and the AM335x EVM have working MMC and SPI support. This is tested on BeagleBone with a SPI framebuffer driver and MMC rootfs. A trivial gpio DMA event misc driver was used to test the crossbar DMA event support. It is also tested on the AM335x EVM with the onboard SPI flash and MMC rootfs. The branch at https://github.com/ohporter/linux/tree/edma-dmaengine-v3 has the complete series, dependencies, and some test drivers/defconfigs. Regression testing was done on AM180x-EVM (which also makes use of the EDMA dmaengine driver and the EDMA private API) using SD, SPI flash, and the onboard audio supported by the ASoC Davinci driver. After this series, the plan is to convert the last in-tree user of the private EDMA API (davinci-pcm/mcasp) and then eliminate the private EDMA API by folding its functionality into drivers/dma/edma.c. Matt Porter (16): dmaengine: edma: fix slave config dependency on direction ARM: davinci: move private EDMA API to arm/common ARM: edma: remove unused transfer controller handlers ARM: edma: add DT and runtime PM support for AM33XX ARM: edma: add AM33XX crossbar event support dmaengine: edma: enable build for AM33XX dmaengine: edma: Add TI EDMA device tree binding ARM: dts: add AM33XX EDMA support dmaengine: add dma_request_slave_channel_compat() mmc: omap_hsmmc: convert to dma_request_slave_channel_compat() mmc: omap_hsmmc: limit max_segs with the EDMA DMAC mmc: omap_hsmmc: add generic DMA request support to the DT binding ARM: dts: add AM33XX MMC support spi: omap2-mcspi: convert to dma_request_slave_channel_compat() spi: omap2-mcspi: add generic DMA request support to the DT binding ARM: dts: add AM33XX SPI support Documentation/devicetree/bindings/dma/ti-edma.txt | 51 + .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 25 +- Documentation/devicetree/bindings/spi/omap-spi.txt | 27 +- arch/arm/Kconfig |1 + arch/arm/boot/dts/am335x-bone.dts | 23 + arch/arm/boot/dts/am335x-evm.dts | 15 + arch/arm/boot/dts/am33xx.dtsi | 101 ++ arch/arm/common/Kconfig|3 + arch/arm/common/Makefile |1 + arch/arm/common/edma.c | 1841 arch/arm/mach-davinci/Makefile |2 +- arch/arm/mach-davinci/board-da830-evm.c|4 +- arch/arm/mach-davinci/board-da850-evm.c|8 +-
RE: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Fri, Oct 19, 2012 at 22:16:15, Porter, Matt wrote: > On Fri, Oct 19, 2012 at 12:02:42PM +, Bedia, Vaibhav wrote: > > On Fri, Oct 19, 2012 at 16:45:58, Porter, Matt wrote: > > > On Fri, Oct 19, 2012 at 10:26:20AM +, Bedia, Vaibhav wrote: > > [...] > > > > > > > > I didn't see all the patches that you posted on edma-dmaengine-v3 > > > > but I do seem them on edma-dmaengine-am33xx-v3 branch. > > > > > > I see I referenced the wrong branch in the cover letter. Thanks for > > > testing and noticing this. Sorry to make you hunt for the correct > > > branch in that repo. ;) > > > > > > > No problem. > > > > > https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-v3 > > > is indeed the correct branch for those wanting to pull this in or > > > grab some of the not-to-be-merged drivers I used for testing. > > > > > > > I added a couple of patches to enable earlyprintk and build the DTB > > > > appended kernel image uImage-dtb.am335x-evm > > > > > > > > Here's what i see > > > > > > > > [...] > > > > > > > > > > > > > [0.175354] edma: probe of 4900.edma failed with error -16 > > > > > > I missed an uninitialized pdata case in the bug fixes mentioned in > > > the changelog and the folks previously failing the same way didn't > > > hit the case I suspect you are hitting. Can you try this and let me > > > know how it works? > > > > > > > That doesn't help :( > > Ok, so I dumped my Linaro toolchain which was masking this issue that > you got unlucky with on EVM, whereas I was lucky. Switching toolchains I > was able to reproduce the problem. Pantelis Antoniou suggested some > changes and the following fixes this issue for me...verified on both > BeagleBone and EVM. Let me know if that works on your end and I'll > incorporate some version of it in the next update. Heh I would not have suspected the toolchain so early ;) > > diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c > index b761b7a..6ed394f 100644 > --- a/arch/arm/common/edma.c > +++ b/arch/arm/common/edma.c > @@ -1598,6 +1598,8 @@ static struct of_dma_filter_info edma_filter_info = { > static int __init edma_probe(struct platform_device *pdev) > { > struct edma_soc_info**info = pdev->dev.platform_data; > + struct edma_soc_info*ninfo[EDMA_MAX_CC] = {NULL, NULL}; > + struct edma_soc_infotmpinfo; > s8 (*queue_priority_mapping)[2]; > s8 (*queue_tc_mapping)[2]; > int i, j, off, ln, found = 0; > @@ -1614,15 +1616,13 @@ static int __init edma_probe(struct platform_device > *pdev) > charirq_name[10]; > struct device_node *node = pdev->dev.of_node; > struct device *dev = >dev; > - struct edma_soc_info*pdata; > int ret; > > if (node) { > - pdata = devm_kzalloc(dev, > - sizeof(struct edma_soc_info), > - GFP_KERNEL); > - edma_of_parse_dt(dev, node, pdata); > - info = > + info = ninfo; > + edma_of_parse_dt(dev, node, ); > + info[0] = > + > dma_cap_set(DMA_SLAVE, edma_filter_info.dma_cap); > of_dma_controller_register(dev->of_node, > of_dma_simple_xlate, > With the above diff, the kernel boots fine on the EVM. > > Looking at the original crash log, I suspect something is not correct > > with the irq portion, probably in the DT or the driver. > > > > "genirq: Flags mismatch irq 28. (edma) vs. (edma)" > > > > The warning below that is coming due to fail case in edma_probe not tracking > > the request_irq status properly and but IMO that's a separate issue. > > It is a separate issue, indeed. My ideal goal was to avoid changing > anything in this existing davinci dma implementation, that's why the > error paths were unmodified. Since I'm having to rework a few more things > I'll look at those and generate an improved version. > > Russ Dill also made some good simplification/cleanup suggestions for the > of parsing on irc which I'll incorporate in the next version. Ok, sounds good. Regards, Vaibhav -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Fri, Oct 19, 2012 at 22:16:15, Porter, Matt wrote: On Fri, Oct 19, 2012 at 12:02:42PM +, Bedia, Vaibhav wrote: On Fri, Oct 19, 2012 at 16:45:58, Porter, Matt wrote: On Fri, Oct 19, 2012 at 10:26:20AM +, Bedia, Vaibhav wrote: [...] I didn't see all the patches that you posted on edma-dmaengine-v3 but I do seem them on edma-dmaengine-am33xx-v3 branch. I see I referenced the wrong branch in the cover letter. Thanks for testing and noticing this. Sorry to make you hunt for the correct branch in that repo. ;) No problem. https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-v3 is indeed the correct branch for those wanting to pull this in or grab some of the not-to-be-merged drivers I used for testing. I added a couple of patches to enable earlyprintk and build the DTB appended kernel image uImage-dtb.am335x-evm Here's what i see [...] snip [0.175354] edma: probe of 4900.edma failed with error -16 I missed an uninitialized pdata case in the bug fixes mentioned in the changelog and the folks previously failing the same way didn't hit the case I suspect you are hitting. Can you try this and let me know how it works? That doesn't help :( Ok, so I dumped my Linaro toolchain which was masking this issue that you got unlucky with on EVM, whereas I was lucky. Switching toolchains I was able to reproduce the problem. Pantelis Antoniou suggested some changes and the following fixes this issue for me...verified on both BeagleBone and EVM. Let me know if that works on your end and I'll incorporate some version of it in the next update. Heh I would not have suspected the toolchain so early ;) diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index b761b7a..6ed394f 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c @@ -1598,6 +1598,8 @@ static struct of_dma_filter_info edma_filter_info = { static int __init edma_probe(struct platform_device *pdev) { struct edma_soc_info**info = pdev-dev.platform_data; + struct edma_soc_info*ninfo[EDMA_MAX_CC] = {NULL, NULL}; + struct edma_soc_infotmpinfo; s8 (*queue_priority_mapping)[2]; s8 (*queue_tc_mapping)[2]; int i, j, off, ln, found = 0; @@ -1614,15 +1616,13 @@ static int __init edma_probe(struct platform_device *pdev) charirq_name[10]; struct device_node *node = pdev-dev.of_node; struct device *dev = pdev-dev; - struct edma_soc_info*pdata; int ret; if (node) { - pdata = devm_kzalloc(dev, - sizeof(struct edma_soc_info), - GFP_KERNEL); - edma_of_parse_dt(dev, node, pdata); - info = pdata; + info = ninfo; + edma_of_parse_dt(dev, node, tmpinfo); + info[0] = tmpinfo; + dma_cap_set(DMA_SLAVE, edma_filter_info.dma_cap); of_dma_controller_register(dev-of_node, of_dma_simple_xlate, With the above diff, the kernel boots fine on the EVM. Looking at the original crash log, I suspect something is not correct with the irq portion, probably in the DT or the driver. genirq: Flags mismatch irq 28. (edma) vs. (edma) The warning below that is coming due to fail case in edma_probe not tracking the request_irq status properly and but IMO that's a separate issue. It is a separate issue, indeed. My ideal goal was to avoid changing anything in this existing davinci dma implementation, that's why the error paths were unmodified. Since I'm having to rework a few more things I'll look at those and generate an improved version. Russ Dill also made some good simplification/cleanup suggestions for the of parsing on irc which I'll incorporate in the next version. Ok, sounds good. Regards, Vaibhav -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Fri, Oct 19, 2012 at 12:02:42PM +, Bedia, Vaibhav wrote: > On Fri, Oct 19, 2012 at 16:45:58, Porter, Matt wrote: > > On Fri, Oct 19, 2012 at 10:26:20AM +, Bedia, Vaibhav wrote: > [...] > > > > > > I didn't see all the patches that you posted on edma-dmaengine-v3 > > > but I do seem them on edma-dmaengine-am33xx-v3 branch. > > > > I see I referenced the wrong branch in the cover letter. Thanks for > > testing and noticing this. Sorry to make you hunt for the correct > > branch in that repo. ;) > > > > No problem. > > > https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-v3 > > is indeed the correct branch for those wanting to pull this in or > > grab some of the not-to-be-merged drivers I used for testing. > > > > > I added a couple of patches to enable earlyprintk and build the DTB > > > appended kernel image uImage-dtb.am335x-evm > > > > > > Here's what i see > > > > > > [...] > > > > > > > > > [0.175354] edma: probe of 4900.edma failed with error -16 > > > > I missed an uninitialized pdata case in the bug fixes mentioned in > > the changelog and the folks previously failing the same way didn't > > hit the case I suspect you are hitting. Can you try this and let me > > know how it works? > > > > That doesn't help :( Ok, so I dumped my Linaro toolchain which was masking this issue that you got unlucky with on EVM, whereas I was lucky. Switching toolchains I was able to reproduce the problem. Pantelis Antoniou suggested some changes and the following fixes this issue for me...verified on both BeagleBone and EVM. Let me know if that works on your end and I'll incorporate some version of it in the next update. diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index b761b7a..6ed394f 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c @@ -1598,6 +1598,8 @@ static struct of_dma_filter_info edma_filter_info = { static int __init edma_probe(struct platform_device *pdev) { struct edma_soc_info**info = pdev->dev.platform_data; + struct edma_soc_info*ninfo[EDMA_MAX_CC] = {NULL, NULL}; + struct edma_soc_infotmpinfo; s8 (*queue_priority_mapping)[2]; s8 (*queue_tc_mapping)[2]; int i, j, off, ln, found = 0; @@ -1614,15 +1616,13 @@ static int __init edma_probe(struct platform_device *pdev) charirq_name[10]; struct device_node *node = pdev->dev.of_node; struct device *dev = >dev; - struct edma_soc_info*pdata; int ret; if (node) { - pdata = devm_kzalloc(dev, -sizeof(struct edma_soc_info), -GFP_KERNEL); - edma_of_parse_dt(dev, node, pdata); - info = + info = ninfo; + edma_of_parse_dt(dev, node, ); + info[0] = + dma_cap_set(DMA_SLAVE, edma_filter_info.dma_cap); of_dma_controller_register(dev->of_node, of_dma_simple_xlate, > Looking at the original crash log, I suspect something is not correct > with the irq portion, probably in the DT or the driver. > > "genirq: Flags mismatch irq 28. (edma) vs. (edma)" > > The warning below that is coming due to fail case in edma_probe not tracking > the request_irq status properly and but IMO that's a separate issue. It is a separate issue, indeed. My ideal goal was to avoid changing anything in this existing davinci dma implementation, that's why the error paths were unmodified. Since I'm having to rework a few more things I'll look at those and generate an improved version. Russ Dill also made some good simplification/cleanup suggestions for the of parsing on irc which I'll incorporate in the next version. -Matt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Fri, Oct 19, 2012 at 16:45:58, Porter, Matt wrote: > On Fri, Oct 19, 2012 at 10:26:20AM +, Bedia, Vaibhav wrote: [...] > > > > I didn't see all the patches that you posted on edma-dmaengine-v3 > > but I do seem them on edma-dmaengine-am33xx-v3 branch. > > I see I referenced the wrong branch in the cover letter. Thanks for > testing and noticing this. Sorry to make you hunt for the correct > branch in that repo. ;) > No problem. > https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-v3 > is indeed the correct branch for those wanting to pull this in or > grab some of the not-to-be-merged drivers I used for testing. > > > I added a couple of patches to enable earlyprintk and build the DTB > > appended kernel image uImage-dtb.am335x-evm > > > > Here's what i see > > > > [...] > > > > > [0.175354] edma: probe of 4900.edma failed with error -16 > > I missed an uninitialized pdata case in the bug fixes mentioned in > the changelog and the folks previously failing the same way didn't > hit the case I suspect you are hitting. Can you try this and let me > know how it works? > That doesn't help :( Looking at the original crash log, I suspect something is not correct with the irq portion, probably in the DT or the driver. "genirq: Flags mismatch irq 28. (edma) vs. (edma)" The warning below that is coming due to fail case in edma_probe not tracking the request_irq status properly and but IMO that's a separate issue. BTW, I am trying this on the EVM. Regards, Vaibhav -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Fri, Oct 19, 2012 at 10:26:20AM +, Bedia, Vaibhav wrote: > Hi Matt, > > On Thu, Oct 18, 2012 at 18:56:39, Porter, Matt wrote: > > Changes since v2: > > - Rebased on 3.7-rc1 > > - Fixed bug in DT/pdata parsing first found by Gururaja > > that turned out to be masked by some toolchains > > - Dropped unused mach-omap2/devices.c hsmmc patch > > - Added AM33XX crossbar DMA event mux support > > - Added am335x-evm support > > > > Changes since v1: > > - Rebased on top of mainline from 12250d8 > > - Dropped the feature removal schedule patch > > - Implemented dma_request_slave_channel_compat() and > > converted the mmc and spi drivers to use it > > - Dropped unneeded #address-cells and #size-cells from > > EDMA DT support > > - Moved private EDMA header to linux/platform_data/ and > > removed some unneeded definitions > > - Fixed parsing of optional properties > > > > TODO: > > - Add dmaengine support for per-channel caps so the > > hack to set the maximum segments can be replaced with > > a query to the dmaengine driver > > > > This series adds DMA Engine support for AM33xx, which uses > > an EDMA DMAC. The EDMA DMAC has been previously supported by only > > a private API implementation (much like the situation with OMAP > > DMA) found on the DaVinci family of SoCs. > > > > The series applies on top of 3.7-rc1 and the following patches: > > > > - GPMC fails to reserve memory fix: > > http://www.spinics.net/lists/linux-omap/msg79675.html > > - TPS65910 regulator fix: > > https://patchwork.kernel.org/patch/1593651/ > > - dmaengine DT support from Vinod's dmaengine_dt branch in > > git://git.infradead.org/users/vkoul/slave-dma.git since > > 027478851791df751176398be02a3b1c5f6aa824 > > > > The approach taken is similar to how OMAP DMA is being converted to > > DMA Engine support. With the functional EDMA private API already > > existing in mach-davinci/dma.c, we first move that to an ARM common > > area so it can be shared. Adding DT and runtime PM support to the > > private EDMA API implementation allows it to run on AM33xx. AM33xx > > *only* boots using DT so we leverage Jon's generic DT DMA helpers to > > register EDMA DMAC with the of_dma framework and then add support > > for calling the dma_request_slave_channel() API to both the mmc > > and spi drivers. > > > > With this series both BeagleBone and the AM335x EVM have working > > MMC and SPI support. > > > > This is tested on BeagleBone with a SPI framebuffer driver and MMC > > rootfs. A trivial gpio DMA event misc driver was used to test the > > crossbar DMA event support. It is also tested on the AM335x EVM > > with the onboard SPI flash and MMC rootfs. The branch at > > https://github.com/ohporter/linux/tree/edma-dmaengine-v3 has the > > complete series, dependencies, and some test drivers/defconfigs. > > > > I didn't see all the patches that you posted on edma-dmaengine-v3 > but I do seem them on edma-dmaengine-am33xx-v3 branch. I see I referenced the wrong branch in the cover letter. Thanks for testing and noticing this. Sorry to make you hunt for the correct branch in that repo. ;) https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-v3 is indeed the correct branch for those wanting to pull this in or grab some of the not-to-be-merged drivers I used for testing. > I added a couple of patches to enable earlyprintk and build the DTB > appended kernel image uImage-dtb.am335x-evm > > Here's what i see > > [...] > [0.175354] edma: probe of 4900.edma failed with error -16 I missed an uninitialized pdata case in the bug fixes mentioned in the changelog and the folks previously failing the same way didn't hit the case I suspect you are hitting. Can you try this and let me know how it works? Thanks, Matt diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index b761b7a..b43b327 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c @@ -1619,7 +1619,7 @@ static int __init edma_probe(struct platform_device *pdev) if (node) { pdata = devm_kzalloc(dev, -sizeof(struct edma_soc_info), +EDMA_MAX_CC*sizeof(struct edma_soc_info), GFP_KERNEL); edma_of_parse_dt(dev, node, pdata); info = -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
Hi Matt, On Thu, Oct 18, 2012 at 18:56:39, Porter, Matt wrote: > Changes since v2: > - Rebased on 3.7-rc1 > - Fixed bug in DT/pdata parsing first found by Gururaja > that turned out to be masked by some toolchains > - Dropped unused mach-omap2/devices.c hsmmc patch > - Added AM33XX crossbar DMA event mux support > - Added am335x-evm support > > Changes since v1: > - Rebased on top of mainline from 12250d8 > - Dropped the feature removal schedule patch > - Implemented dma_request_slave_channel_compat() and > converted the mmc and spi drivers to use it > - Dropped unneeded #address-cells and #size-cells from > EDMA DT support > - Moved private EDMA header to linux/platform_data/ and > removed some unneeded definitions > - Fixed parsing of optional properties > > TODO: > - Add dmaengine support for per-channel caps so the > hack to set the maximum segments can be replaced with > a query to the dmaengine driver > > This series adds DMA Engine support for AM33xx, which uses > an EDMA DMAC. The EDMA DMAC has been previously supported by only > a private API implementation (much like the situation with OMAP > DMA) found on the DaVinci family of SoCs. > > The series applies on top of 3.7-rc1 and the following patches: > > - GPMC fails to reserve memory fix: > http://www.spinics.net/lists/linux-omap/msg79675.html > - TPS65910 regulator fix: > https://patchwork.kernel.org/patch/1593651/ > - dmaengine DT support from Vinod's dmaengine_dt branch in > git://git.infradead.org/users/vkoul/slave-dma.git since > 027478851791df751176398be02a3b1c5f6aa824 > > The approach taken is similar to how OMAP DMA is being converted to > DMA Engine support. With the functional EDMA private API already > existing in mach-davinci/dma.c, we first move that to an ARM common > area so it can be shared. Adding DT and runtime PM support to the > private EDMA API implementation allows it to run on AM33xx. AM33xx > *only* boots using DT so we leverage Jon's generic DT DMA helpers to > register EDMA DMAC with the of_dma framework and then add support > for calling the dma_request_slave_channel() API to both the mmc > and spi drivers. > > With this series both BeagleBone and the AM335x EVM have working > MMC and SPI support. > > This is tested on BeagleBone with a SPI framebuffer driver and MMC > rootfs. A trivial gpio DMA event misc driver was used to test the > crossbar DMA event support. It is also tested on the AM335x EVM > with the onboard SPI flash and MMC rootfs. The branch at > https://github.com/ohporter/linux/tree/edma-dmaengine-v3 has the > complete series, dependencies, and some test drivers/defconfigs. > I didn't see all the patches that you posted on edma-dmaengine-v3 but I do seem them on edma-dmaengine-am33xx-v3 branch. I added a couple of patches to enable earlyprintk and build the DTB appended kernel image uImage-dtb.am335x-evm Here's what i see [...] [0.128831] regulator-dummy: no parameters [0.130793] NET: Registered protocol family 16 [0.131694] DMA: preallocated 256 KiB pool for atomic coherent allocations [0.133030] omap-gpmc omap-gpmc: GPMC revision 6.0 [0.153136] platform 4900.edma: alias fck already exists [0.153176] platform 4900.edma: alias fck already exists [0.153199] platform 4900.edma: alias fck already exists [0.158184] OMAP GPIO hardware version 0.1 [0.172844] No ATAGs? [0.172868] hw-breakpoint: debug architecture 0x4 unsupported. [0.174282] genirq: Flags mismatch irq 28. (edma) vs. (edma) [0.174536] [ cut here ] [0.174576] WARNING: at kernel/irq/manage.c:1211 __free_irq+0x9c/0x1c0() [0.174586] Trying to free already-free IRQ 28 [0.174596] Modules linked in: [0.174645] [] (unwind_backtrace+0x0/0xf0) from [] (warn_slowpath_common+0x4c/0x64) [0.174668] [] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_fmt+0x30/0x40) [0.174688] [] (warn_slowpath_fmt+0x30/0x40) from [] (__free_irq+0x9c/0x1c0) [0.174708] [] (__free_irq+0x9c/0x1c0) from [] (free_irq+0x4c/0xa8) [0.174739] [] (free_irq+0x4c/0xa8) from [] (edma_probe+0x93c/0xa24) [0.174770] [] (edma_probe+0x93c/0xa24) from [] (platform_drv_probe+0x18/0x1c) [0.174793] [] (platform_drv_probe+0x18/0x1c) from [] (driver_probe_device+0x84/0x224) [0.174814] [] (driver_probe_device+0x84/0x224) from [] (__driver_attach+0x94/0x98) [0.174834] [] (__driver_attach+0x94/0x98) from [] (bus_for_each_dev+0x50/0x7c) [0.174854] [] (bus_for_each_dev+0x50/0x7c) from [] (bus_add_driver+0xa0/0x240) [0.174874] [] (bus_add_driver+0xa0/0x240) from [] (driver_register+0x78/0x144) [0.174896] [] (driver_register+0x78/0x144) from [] (platform_driver_probe+0x18/0x9c) [0.174918] [] (platform_driver_probe+0x18/0x9c) from []
RE: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
Hi Matt, On Thu, Oct 18, 2012 at 18:56:39, Porter, Matt wrote: Changes since v2: - Rebased on 3.7-rc1 - Fixed bug in DT/pdata parsing first found by Gururaja that turned out to be masked by some toolchains - Dropped unused mach-omap2/devices.c hsmmc patch - Added AM33XX crossbar DMA event mux support - Added am335x-evm support Changes since v1: - Rebased on top of mainline from 12250d8 - Dropped the feature removal schedule patch - Implemented dma_request_slave_channel_compat() and converted the mmc and spi drivers to use it - Dropped unneeded #address-cells and #size-cells from EDMA DT support - Moved private EDMA header to linux/platform_data/ and removed some unneeded definitions - Fixed parsing of optional properties TODO: - Add dmaengine support for per-channel caps so the hack to set the maximum segments can be replaced with a query to the dmaengine driver This series adds DMA Engine support for AM33xx, which uses an EDMA DMAC. The EDMA DMAC has been previously supported by only a private API implementation (much like the situation with OMAP DMA) found on the DaVinci family of SoCs. The series applies on top of 3.7-rc1 and the following patches: - GPMC fails to reserve memory fix: http://www.spinics.net/lists/linux-omap/msg79675.html - TPS65910 regulator fix: https://patchwork.kernel.org/patch/1593651/ - dmaengine DT support from Vinod's dmaengine_dt branch in git://git.infradead.org/users/vkoul/slave-dma.git since 027478851791df751176398be02a3b1c5f6aa824 The approach taken is similar to how OMAP DMA is being converted to DMA Engine support. With the functional EDMA private API already existing in mach-davinci/dma.c, we first move that to an ARM common area so it can be shared. Adding DT and runtime PM support to the private EDMA API implementation allows it to run on AM33xx. AM33xx *only* boots using DT so we leverage Jon's generic DT DMA helpers to register EDMA DMAC with the of_dma framework and then add support for calling the dma_request_slave_channel() API to both the mmc and spi drivers. With this series both BeagleBone and the AM335x EVM have working MMC and SPI support. This is tested on BeagleBone with a SPI framebuffer driver and MMC rootfs. A trivial gpio DMA event misc driver was used to test the crossbar DMA event support. It is also tested on the AM335x EVM with the onboard SPI flash and MMC rootfs. The branch at https://github.com/ohporter/linux/tree/edma-dmaengine-v3 has the complete series, dependencies, and some test drivers/defconfigs. I didn't see all the patches that you posted on edma-dmaengine-v3 but I do seem them on edma-dmaengine-am33xx-v3 branch. I added a couple of patches to enable earlyprintk and build the DTB appended kernel image uImage-dtb.am335x-evm Here's what i see [...] [0.128831] regulator-dummy: no parameters [0.130793] NET: Registered protocol family 16 [0.131694] DMA: preallocated 256 KiB pool for atomic coherent allocations [0.133030] omap-gpmc omap-gpmc: GPMC revision 6.0 [0.153136] platform 4900.edma: alias fck already exists [0.153176] platform 4900.edma: alias fck already exists [0.153199] platform 4900.edma: alias fck already exists [0.158184] OMAP GPIO hardware version 0.1 [0.172844] No ATAGs? [0.172868] hw-breakpoint: debug architecture 0x4 unsupported. [0.174282] genirq: Flags mismatch irq 28. (edma) vs. (edma) [0.174536] [ cut here ] [0.174576] WARNING: at kernel/irq/manage.c:1211 __free_irq+0x9c/0x1c0() [0.174586] Trying to free already-free IRQ 28 [0.174596] Modules linked in: [0.174645] [c001b0e0] (unwind_backtrace+0x0/0xf0) from [c0042900] (warn_slowpath_common+0x4c/0x64) [0.174668] [c0042900] (warn_slowpath_common+0x4c/0x64) from [c00429ac] (warn_slowpath_fmt+0x30/0x40) [0.174688] [c00429ac] (warn_slowpath_fmt+0x30/0x40) from [c00a8298] (__free_irq+0x9c/0x1c0) [0.174708] [c00a8298] (__free_irq+0x9c/0x1c0) from [c00a8408] (free_irq+0x4c/0xa8) [0.174739] [c00a8408] (free_irq+0x4c/0xa8) from [c07976ec] (edma_probe+0x93c/0xa24) [0.174770] [c07976ec] (edma_probe+0x93c/0xa24) from [c03226d4] (platform_drv_probe+0x18/0x1c) [0.174793] [c03226d4] (platform_drv_probe+0x18/0x1c) from [c0321494] (driver_probe_device+0x84/0x224) [0.174814] [c0321494] (driver_probe_device+0x84/0x224) from [c03216c8] (__driver_attach+0x94/0x98) [0.174834] [c03216c8] (__driver_attach+0x94/0x98) from [c031fd60] (bus_for_each_dev+0x50/0x7c) [0.174854] [c031fd60] (bus_for_each_dev+0x50/0x7c) from [c0320bc4] (bus_add_driver+0xa0/0x240) [0.174874] [c0320bc4] (bus_add_driver+0xa0/0x240) from [c0321bfc] (driver_register+0x78/0x144) [0.174896] [c0321bfc]
Re: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Fri, Oct 19, 2012 at 10:26:20AM +, Bedia, Vaibhav wrote: Hi Matt, On Thu, Oct 18, 2012 at 18:56:39, Porter, Matt wrote: Changes since v2: - Rebased on 3.7-rc1 - Fixed bug in DT/pdata parsing first found by Gururaja that turned out to be masked by some toolchains - Dropped unused mach-omap2/devices.c hsmmc patch - Added AM33XX crossbar DMA event mux support - Added am335x-evm support Changes since v1: - Rebased on top of mainline from 12250d8 - Dropped the feature removal schedule patch - Implemented dma_request_slave_channel_compat() and converted the mmc and spi drivers to use it - Dropped unneeded #address-cells and #size-cells from EDMA DT support - Moved private EDMA header to linux/platform_data/ and removed some unneeded definitions - Fixed parsing of optional properties TODO: - Add dmaengine support for per-channel caps so the hack to set the maximum segments can be replaced with a query to the dmaengine driver This series adds DMA Engine support for AM33xx, which uses an EDMA DMAC. The EDMA DMAC has been previously supported by only a private API implementation (much like the situation with OMAP DMA) found on the DaVinci family of SoCs. The series applies on top of 3.7-rc1 and the following patches: - GPMC fails to reserve memory fix: http://www.spinics.net/lists/linux-omap/msg79675.html - TPS65910 regulator fix: https://patchwork.kernel.org/patch/1593651/ - dmaengine DT support from Vinod's dmaengine_dt branch in git://git.infradead.org/users/vkoul/slave-dma.git since 027478851791df751176398be02a3b1c5f6aa824 The approach taken is similar to how OMAP DMA is being converted to DMA Engine support. With the functional EDMA private API already existing in mach-davinci/dma.c, we first move that to an ARM common area so it can be shared. Adding DT and runtime PM support to the private EDMA API implementation allows it to run on AM33xx. AM33xx *only* boots using DT so we leverage Jon's generic DT DMA helpers to register EDMA DMAC with the of_dma framework and then add support for calling the dma_request_slave_channel() API to both the mmc and spi drivers. With this series both BeagleBone and the AM335x EVM have working MMC and SPI support. This is tested on BeagleBone with a SPI framebuffer driver and MMC rootfs. A trivial gpio DMA event misc driver was used to test the crossbar DMA event support. It is also tested on the AM335x EVM with the onboard SPI flash and MMC rootfs. The branch at https://github.com/ohporter/linux/tree/edma-dmaengine-v3 has the complete series, dependencies, and some test drivers/defconfigs. I didn't see all the patches that you posted on edma-dmaengine-v3 but I do seem them on edma-dmaengine-am33xx-v3 branch. I see I referenced the wrong branch in the cover letter. Thanks for testing and noticing this. Sorry to make you hunt for the correct branch in that repo. ;) https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-v3 is indeed the correct branch for those wanting to pull this in or grab some of the not-to-be-merged drivers I used for testing. I added a couple of patches to enable earlyprintk and build the DTB appended kernel image uImage-dtb.am335x-evm Here's what i see [...] snip [0.175354] edma: probe of 4900.edma failed with error -16 I missed an uninitialized pdata case in the bug fixes mentioned in the changelog and the folks previously failing the same way didn't hit the case I suspect you are hitting. Can you try this and let me know how it works? Thanks, Matt diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index b761b7a..b43b327 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c @@ -1619,7 +1619,7 @@ static int __init edma_probe(struct platform_device *pdev) if (node) { pdata = devm_kzalloc(dev, -sizeof(struct edma_soc_info), +EDMA_MAX_CC*sizeof(struct edma_soc_info), GFP_KERNEL); edma_of_parse_dt(dev, node, pdata); info = pdata; -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Fri, Oct 19, 2012 at 16:45:58, Porter, Matt wrote: On Fri, Oct 19, 2012 at 10:26:20AM +, Bedia, Vaibhav wrote: [...] I didn't see all the patches that you posted on edma-dmaengine-v3 but I do seem them on edma-dmaengine-am33xx-v3 branch. I see I referenced the wrong branch in the cover letter. Thanks for testing and noticing this. Sorry to make you hunt for the correct branch in that repo. ;) No problem. https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-v3 is indeed the correct branch for those wanting to pull this in or grab some of the not-to-be-merged drivers I used for testing. I added a couple of patches to enable earlyprintk and build the DTB appended kernel image uImage-dtb.am335x-evm Here's what i see [...] snip [0.175354] edma: probe of 4900.edma failed with error -16 I missed an uninitialized pdata case in the bug fixes mentioned in the changelog and the folks previously failing the same way didn't hit the case I suspect you are hitting. Can you try this and let me know how it works? That doesn't help :( Looking at the original crash log, I suspect something is not correct with the irq portion, probably in the DT or the driver. genirq: Flags mismatch irq 28. (edma) vs. (edma) The warning below that is coming due to fail case in edma_probe not tracking the request_irq status properly and but IMO that's a separate issue. BTW, I am trying this on the EVM. Regards, Vaibhav -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC PATCH v3 00/16] DMA Engine support for AM33XX
On Fri, Oct 19, 2012 at 12:02:42PM +, Bedia, Vaibhav wrote: On Fri, Oct 19, 2012 at 16:45:58, Porter, Matt wrote: On Fri, Oct 19, 2012 at 10:26:20AM +, Bedia, Vaibhav wrote: [...] I didn't see all the patches that you posted on edma-dmaengine-v3 but I do seem them on edma-dmaengine-am33xx-v3 branch. I see I referenced the wrong branch in the cover letter. Thanks for testing and noticing this. Sorry to make you hunt for the correct branch in that repo. ;) No problem. https://github.com/ohporter/linux/tree/edma-dmaengine-am33xx-v3 is indeed the correct branch for those wanting to pull this in or grab some of the not-to-be-merged drivers I used for testing. I added a couple of patches to enable earlyprintk and build the DTB appended kernel image uImage-dtb.am335x-evm Here's what i see [...] snip [0.175354] edma: probe of 4900.edma failed with error -16 I missed an uninitialized pdata case in the bug fixes mentioned in the changelog and the folks previously failing the same way didn't hit the case I suspect you are hitting. Can you try this and let me know how it works? That doesn't help :( Ok, so I dumped my Linaro toolchain which was masking this issue that you got unlucky with on EVM, whereas I was lucky. Switching toolchains I was able to reproduce the problem. Pantelis Antoniou suggested some changes and the following fixes this issue for me...verified on both BeagleBone and EVM. Let me know if that works on your end and I'll incorporate some version of it in the next update. diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c index b761b7a..6ed394f 100644 --- a/arch/arm/common/edma.c +++ b/arch/arm/common/edma.c @@ -1598,6 +1598,8 @@ static struct of_dma_filter_info edma_filter_info = { static int __init edma_probe(struct platform_device *pdev) { struct edma_soc_info**info = pdev-dev.platform_data; + struct edma_soc_info*ninfo[EDMA_MAX_CC] = {NULL, NULL}; + struct edma_soc_infotmpinfo; s8 (*queue_priority_mapping)[2]; s8 (*queue_tc_mapping)[2]; int i, j, off, ln, found = 0; @@ -1614,15 +1616,13 @@ static int __init edma_probe(struct platform_device *pdev) charirq_name[10]; struct device_node *node = pdev-dev.of_node; struct device *dev = pdev-dev; - struct edma_soc_info*pdata; int ret; if (node) { - pdata = devm_kzalloc(dev, -sizeof(struct edma_soc_info), -GFP_KERNEL); - edma_of_parse_dt(dev, node, pdata); - info = pdata; + info = ninfo; + edma_of_parse_dt(dev, node, tmpinfo); + info[0] = tmpinfo; + dma_cap_set(DMA_SLAVE, edma_filter_info.dma_cap); of_dma_controller_register(dev-of_node, of_dma_simple_xlate, Looking at the original crash log, I suspect something is not correct with the irq portion, probably in the DT or the driver. genirq: Flags mismatch irq 28. (edma) vs. (edma) The warning below that is coming due to fail case in edma_probe not tracking the request_irq status properly and but IMO that's a separate issue. It is a separate issue, indeed. My ideal goal was to avoid changing anything in this existing davinci dma implementation, that's why the error paths were unmodified. Since I'm having to rework a few more things I'll look at those and generate an improved version. Russ Dill also made some good simplification/cleanup suggestions for the of parsing on irc which I'll incorporate in the next version. -Matt -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/