* [PATCH v2 1/2] mtd: nand: omap2: Support parsing dma channel information from DT
2016-05-04 18:34 [PATCH v2 0/2] mtd: nand: omap2: Add EDMA support for NAND DMA prefetch Franklin S Cooper Jr
@ 2016-05-04 18:34 ` Franklin S Cooper Jr
2016-05-04 18:34 ` [PATCH v2 2/2] ARM: OMAP2+: Update GPMC and NAND DT binding documentation Franklin S Cooper Jr
2016-05-30 9:09 ` [PATCH v2 0/2] mtd: nand: omap2: Add EDMA support for NAND DMA prefetch Boris Brezillon
2 siblings, 0 replies; 4+ messages in thread
From: Franklin S Cooper Jr @ 2016-05-04 18:34 UTC (permalink / raw)
To: robh+dt, boris.brezillon, richard, dwmw2, computersforpeace,
rogerq, tony, devicetree, linux-kernel, linux-mtd, vigneshr,
nsekhar
Cc: Franklin S Cooper Jr
Switch from dma_request_channel to allow passing dma channel
information from DT rather than hardcoding a value.
Also provide a handle to the GPMC's dev so it can be used to parse the DMA
channel information within the GPMC's DT node.
Performance Numbers via mtd_speedtest now that EDMA based prefetch works:
AM335x Performance numbers:
DMA
CPULOAD Write: 54% Read: 35%
page write speed -23% (vs non dma)
page read speed -35% (vs non dma)
NO DMA (prefetch-polled)
CPULOAD Write: 98% Read: 98%
AM437x Performance numbers:
DMA
CPU LOAD Write: 56% Read: 36%
page write speed -16% (vs non dma)
page read speed -22% (vs non dma)
NO DMA (prefetch-polled)
CPULOAD Write: 93% Read: 93%
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
---
drivers/mtd/nand/omap2.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 08e1588..83b9091 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -118,8 +118,6 @@
#define PREFETCH_STATUS_FIFO_CNT(val) ((val >> 24) & 0x7F)
#define STATUS_BUFF_EMPTY 0x00000001
-#define OMAP24XX_DMA_GPMC 4
-
#define SECTOR_BYTES 512
/* 4 bit padding to make byte aligned, 56 = 52 + 4 */
#define BCH4_BIT_PAD 4
@@ -1808,7 +1806,6 @@ static int omap_nand_probe(struct platform_device *pdev)
struct nand_chip *nand_chip;
int err;
dma_cap_mask_t mask;
- unsigned sig;
struct resource *res;
struct device *dev = &pdev->dev;
int min_oobbytes = BADBLOCK_MARKER_LENGTH;
@@ -1921,8 +1918,8 @@ static int omap_nand_probe(struct platform_device *pdev)
case NAND_OMAP_PREFETCH_DMA:
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
- sig = OMAP24XX_DMA_GPMC;
- info->dma = dma_request_channel(mask, omap_dma_filter_fn, &sig);
+ info->dma = dma_request_chan(pdev->dev.parent, "rxtx");
+
if (!info->dma) {
dev_err(&pdev->dev, "DMA engine request failed\n");
err = -ENXIO;
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] ARM: OMAP2+: Update GPMC and NAND DT binding documentation
2016-05-04 18:34 [PATCH v2 0/2] mtd: nand: omap2: Add EDMA support for NAND DMA prefetch Franklin S Cooper Jr
2016-05-04 18:34 ` [PATCH v2 1/2] mtd: nand: omap2: Support parsing dma channel information from DT Franklin S Cooper Jr
@ 2016-05-04 18:34 ` Franklin S Cooper Jr
2016-05-30 9:09 ` [PATCH v2 0/2] mtd: nand: omap2: Add EDMA support for NAND DMA prefetch Boris Brezillon
2 siblings, 0 replies; 4+ messages in thread
From: Franklin S Cooper Jr @ 2016-05-04 18:34 UTC (permalink / raw)
To: robh+dt, boris.brezillon, richard, dwmw2, computersforpeace,
rogerq, tony, devicetree, linux-kernel, linux-mtd, vigneshr,
nsekhar
Cc: Franklin S Cooper Jr
Add additional details to the GPMC NAND documentation to clarify
what is needed to enable NAND DMA prefetch.
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
---
Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt | 7 ++++++-
Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt b/Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
index 21055e2..c1359f4 100644
--- a/Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
+++ b/Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
@@ -46,6 +46,10 @@ Required properties:
0 maps to GPMC_WAIT0 pin.
- gpio-cells: Must be set to 2
+Required properties when using NAND prefetch dma:
+ - dmas GPMC NAND prefetch dma channel
+ - dma-names Must be set to "rxtx"
+
Timing properties for child nodes. All are optional and default to 0.
- gpmc,sync-clk-ps: Minimum clock period for synchronous mode, in picoseconds
@@ -137,7 +141,8 @@ Example for an AM33xx board:
ti,hwmods = "gpmc";
reg = <0x50000000 0x2000>;
interrupts = <100>;
-
+ dmas = <&edma 52 0>;
+ dma-names = "rxtx";
gpmc,num-cs = <8>;
gpmc,num-waitpins = <2>;
#address-cells = <2>;
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
index 3ee7e20..174f68c 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -39,7 +39,7 @@ Optional properties:
"prefetch-polled" Prefetch polled mode (default)
"polled" Polled mode, without prefetch
- "prefetch-dma" Prefetch enabled sDMA mode
+ "prefetch-dma" Prefetch enabled DMA mode
"prefetch-irq" Prefetch enabled irq mode
- elm_id: <deprecated> use "ti,elm-id" instead
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] mtd: nand: omap2: Add EDMA support for NAND DMA prefetch
2016-05-04 18:34 [PATCH v2 0/2] mtd: nand: omap2: Add EDMA support for NAND DMA prefetch Franklin S Cooper Jr
2016-05-04 18:34 ` [PATCH v2 1/2] mtd: nand: omap2: Support parsing dma channel information from DT Franklin S Cooper Jr
2016-05-04 18:34 ` [PATCH v2 2/2] ARM: OMAP2+: Update GPMC and NAND DT binding documentation Franklin S Cooper Jr
@ 2016-05-30 9:09 ` Boris Brezillon
2 siblings, 0 replies; 4+ messages in thread
From: Boris Brezillon @ 2016-05-30 9:09 UTC (permalink / raw)
To: Franklin S Cooper Jr
Cc: robh+dt, richard, dwmw2, computersforpeace, rogerq, tony,
devicetree, linux-kernel, linux-mtd, vigneshr, nsekhar
Hi Franklin,
On Wed, 4 May 2016 13:34:42 -0500
Franklin S Cooper Jr <fcooper@ti.com> wrote:
> This patchset includes the required patches to enable NAND DMA prefetch
> support when using the EDMA.
>
> This patchset depends on my previous patchset to enable NAND DMA prefetch
> using the SDMA and Roger's GPMC and NAND rework. Both of these patchsets
> are apart of Boris' NAND next patch. Therefore, these patches are also
> built on top of this branch.
>
> Also the following patches that fixes GPMC's DMA property are required
> and pulled into other trees but are not currently apart of the above
> branch:
> https://patchwork.ozlabs.org/patch/596014/
> https://patchwork.ozlabs.org/patch/596012/
Applied.
Thanks,
Boris
>
> Version 2 changes:
> Switched to the new dma_request_chan api which is now preferred.
> Add performance numbers to the commit.
>
> Franklin S Cooper Jr (2):
> mtd: nand: omap2: Support parsing dma channel information from DT
> ARM: OMAP2+: Update GPMC and NAND DT binding documentation
>
> Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt | 7 ++++++-
> Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +-
> drivers/mtd/nand/omap2.c | 7 ++-----
> 3 files changed, 9 insertions(+), 7 deletions(-)
>
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread