dmaengine: Tidy up dma_parms
Subsystems (8)
cover dmaengine: Tidy up dma_parms
Just a bit of trivial housekeeping now that it's no longer necessary for platform and AMBA devices to allocate their own dma_parms. Feel free to squash patches if desired.
I have no idea why I'm spending my own Thursday evening on this, but apparently the itch has to be scratched :)
Robin.
Robin Murphy (9):
dmaengine: axi-dmac: Drop local dma_parms
dmaengine: bcm2835: Drop local dma_parms
dmaengine: imx-dma: Drop local dma_parms
dmaengine: imx-sdma: Drop local dma_parms
dmaengine: mxs: Drop local dma_parms
dmaengine: rcar-dmac: Drop local dma_parms
dmaengine: ste_dma40: Drop local dma_parms
dmaengine: qcom: bam_dma: Drop local dma_parms
dmaengine: pl330: Drop local dma_parms
drivers/dma/bcm2835-dma.c | 3 --- drivers/dma/dma-axi-dmac.c | 3 --- drivers/dma/imx-dma.c | 2 -- drivers/dma/imx-sdma.c | 2 -- drivers/dma/mxs-dma.c | 2 -- drivers/dma/pl330.c | 5 ----- drivers/dma/qcom/bam_dma.c | 2 -- drivers/dma/sh/rcar-dmac.c | 2 -- drivers/dma/ste_dma40.c | 3 --- 9 files changed, 24 deletions(-)
Signature · 1 line
2.28.0.dirty
PATCH 1/9 dmaengine: axi-dmac: Drop local dma_parms
Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one.
--- drivers/dma/dma-axi-dmac.c | 3 --- 1 file changed, 3 deletions(-)
drivers/dma/dma-axi-dmac.c +0 -3
@@ -134,8 +134,6 @@ struct axi_dmac {struct dma_device dma_dev;struct axi_dmac_chan chan; - -struct device_dma_parameters dma_parms; };static struct axi_dmac *chan_to_axi_dmac (struct axi_dmac_chan *chan)
@@ -868,7 +866,6 @@ static int axi_dmac_probe(struct platform_device *pdev) }of_node_put (of_channels); - pdev->dev.dma_parms = &dmac->dma_parms;dma_set_max_seg_size (&pdev->dev,UINT_MAX ); dma_dev = &dmac->dma_dev;
Signature · 1 line
2.28.0.dirty
PATCH 2/9 dmaengine: bcm2835: Drop local dma_parms
In reply to Robin MurphySince commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one.
--- drivers/dma/bcm2835-dma.c | 3 --- 1 file changed, 3 deletions(-)
drivers/dma/bcm2835-dma.c +0 -3
@@ -41,14 +41,12 @@* struct bcm2835_dmadev - BCM2835 DMA controller * @ddev: DMA device * @base: base address of register map -* @dma_parms: DMA parameters (to convey 1 GByte max segment size to clients) * @zero_page: bus address of zero page (to detect transactions copying from * zero page and avoid accessing memory if so) */ struct bcm2835_dmadev {struct dma_device ddev;void __iomem *base; -struct device_dma_parameters dma_parms;dma_addr_t zero_page; };
@@ -902,7 +900,6 @@ static int bcm2835_dma_probe(struct platform_device *pdev)if (!od)return -ENOMEM ; - pdev->dev.dma_parms = &od->dma_parms;dma_set_max_seg_size (&pdev->dev,0x3FFFFFFF ); res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );
Signature · 1 line
2.28.0.dirty
PATCH 3/9 dmaengine: imx-dma: Drop local dma_parms
In reply to Robin MurphySince commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one.
--- drivers/dma/imx-dma.c | 2 -- 1 file changed, 2 deletions(-)
drivers/dma/imx-dma.c +0 -2
@@ -173,7 +173,6 @@ enum imx_dma_type {struct imxdma_engine {struct device *dev; -struct device_dma_parameters dma_parms;struct dma_device dma_device;void __iomem *base;struct clk *dma_ahb;
@@ -1196,7 +1195,6 @@ static int __init imxdma_probe(struct platform_device *pdev)platform_set_drvdata (pdev, imxdma); imxdma->dma_device.copy_align =DMAENGINE_ALIGN_4_BYTES ; - imxdma->dma_device.dev->dma_parms = &imxdma->dma_parms;dma_set_max_seg_size (imxdma->dma_device.dev,0xffffff ); ret =dma_async_device_register (&imxdma->dma_device);
Signature · 1 line
2.28.0.dirty
PATCH 4/9 dmaengine: imx-sdma: Drop local dma_parms
In reply to Robin MurphySince commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one.
--- drivers/dma/imx-sdma.c | 2 -- 1 file changed, 2 deletions(-)
drivers/dma/imx-sdma.c +0 -2
@@ -426,7 +426,6 @@ struct sdma_driver_data {struct sdma_engine {struct device *dev; -struct device_dma_parameters dma_parms;struct sdma_channel channel[MAX_DMA_CHANNELS ];struct sdma_channel_control *channel_control;void __iomem *regs;
@@ -2118,7 +2117,6 @@ static int sdma_probe(struct platform_device *pdev) sdma->dma_device.residue_granularity =DMA_RESIDUE_GRANULARITY_SEGMENT ; sdma->dma_device.device_prep_dma_memcpy = sdma_prep_memcpy; sdma->dma_device.device_issue_pending = sdma_issue_pending; - sdma->dma_device.dev->dma_parms = &sdma->dma_parms; sdma->dma_device.copy_align =2 ;dma_set_max_seg_size (sdma->dma_device.dev,SDMA_BD_MAX_CNT );
Signature · 1 line
2.28.0.dirty
PATCH 5/9 dmaengine: mxs: Drop local dma_parms
In reply to Robin MurphySince commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one.
--- drivers/dma/mxs-dma.c | 2 -- 1 file changed, 2 deletions(-)
drivers/dma/mxs-dma.c +0 -2
@@ -141,7 +141,6 @@ struct mxs_dma_engine {void __iomem *base;struct clk *clk;struct dma_device dma_device; -struct device_dma_parameters dma_parms;struct mxs_dma_chan mxs_chans[MXS_DMA_CHANNELS ];struct platform_device *pdev;unsigned int nr_channels;
@@ -829,7 +828,6 @@ static int __init mxs_dma_probe(struct platform_device *pdev) mxs_dma->dma_device.dev = &pdev->dev;/* mxs_dma gets 65535 bytes maximum sg size */ - mxs_dma->dma_device.dev->dma_parms = &mxs_dma->dma_parms;dma_set_max_seg_size (mxs_dma->dma_device.dev,MAX_XFER_BYTES ); mxs_dma->dma_device.device_alloc_chan_resources = mxs_dma_alloc_chan_resources;
Signature · 1 line
2.28.0.dirty
PATCH 6/9 dmaengine: rcar-dmac: Drop local dma_parms
In reply to Robin MurphySince commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one.
--- drivers/dma/sh/rcar-dmac.c | 2 -- 1 file changed, 2 deletions(-)
drivers/dma/sh/rcar-dmac.c +0 -2
@@ -199,7 +199,6 @@ struct rcar_dmac {struct dma_device engine;struct device *dev;void __iomem *iomem; -struct device_dma_parameters parms;unsigned int n_channels;struct rcar_dmac_chan *channels;
@@ -1845,7 +1844,6 @@ static int rcar_dmac_probe(struct platform_device *pdev) dmac->dev = &pdev->dev;platform_set_drvdata (pdev, dmac); - dmac->dev->dma_parms = &dmac->parms;dma_set_max_seg_size (dmac->dev,RCAR_DMATCR_MASK );dma_set_mask_and_coherent (dmac->dev,DMA_BIT_MASK (40 ));
Signature · 1 line
2.28.0.dirty
PATCH 7/9 dmaengine: ste_dma40: Drop local dma_parms
In reply to Robin MurphySince commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one.
--- drivers/dma/ste_dma40.c | 3 --- 1 file changed, 3 deletions(-)
drivers/dma/ste_dma40.c +0 -3
@@ -535,7 +535,6 @@ struct d40_gen_dmac {* mode" allocated physical channels. * @num_log_chans: The number of logical channels. Calculated from * num_phy_chans. -* @dma_parms: DMA parameters for the channel * @dma_both: dma_device channels that can do both memcpy and slave transfers. * @dma_slave: dma_device channels that can do only do slave transfers. * @dma_memcpy: dma_device channels that can do only do memcpy transfers.
@@ -577,7 +576,6 @@ struct d40_base {int num_memcpy_chans;int num_phy_chans;int num_log_chans; -struct device_dma_parameters dma_parms;struct dma_device dma_both;struct dma_device dma_slave;struct dma_device dma_memcpy;
@@ -3641,7 +3639,6 @@ static int __init d40_probe(struct platform_device *pdev)if (ret) goto destroy_cache; - base->dev->dma_parms = &base->dma_parms; ret =dma_set_max_seg_size (base->dev,STEDMA40_MAX_SEG_SIZE );if (ret) {d40_err (&pdev->dev,"Failed to set dma max seg size\n" );
Signature · 1 line
2.28.0.dirty
PATCH 8/9 dmaengine: qcom: bam_dma: Drop local dma_parms
In reply to Robin MurphySince commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms for platform devices"), struct platform_device already provides a dma_parms structure, so we can save allocating another one.
--- drivers/dma/qcom/bam_dma.c | 2 -- 1 file changed, 2 deletions(-)
drivers/dma/qcom/bam_dma.c +0 -2
@@ -381,7 +381,6 @@ struct bam_device {void __iomem *regs;struct device *dev;struct dma_device common; -struct device_dma_parameters dma_parms;struct bam_chan *channels;u32 num_channels;u32 num_ees;
@@ -1316,7 +1315,6 @@ static int bam_dma_probe(struct platform_device *pdev)/* set max dma segment size */ bdev->common.dev = bdev->dev; - bdev->common.dev->dma_parms = &bdev->dma_parms; ret =dma_set_max_seg_size (bdev->common.dev,BAM_FIFO_SIZE );if (ret) {dev_err (bdev->dev,"cannot set maximum segment size\n" );
Signature · 1 line
2.28.0.dirty
PATCH 9/9 dmaengine: pl330: Drop local dma_parms
In reply to Robin MurphySince commit f458488425f1 ("amba: Initialize dma_parms for amba devices"), struct amba_device already provides a dma_parms structure, so we can save allocating another one.
--- drivers/dma/pl330.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/dma/pl330.c +0 -5
@@ -460,9 +460,6 @@ struct pl330_dmac {/* DMA-Engine Device */ struct dma_device ddma; -/* Holds info about sg limitations */ -struct device_dma_parameters dma_parms; -/* Pool of descriptors available for the DMAC's channels */ struct list_head desc_pool;/* To protect desc_pool manipulation */
@@ -3158,8 +3155,6 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) } } - adev->dev.dma_parms = &pl330->dma_parms; -/* * This is the limit for transfers with a buswidth of 1, larger * buswidths will have larger limits.
Signature · 1 line
2.28.0.dirty
Quoted 3 lines · Robin Murphy
Just a bit of trivial housekeeping now that it's no longer necessary for platform and AMBA devices to allocate their own
dma_parms. Feel free to squash patches if desired.
Applied all, thanks
Quoted 3 lines
I have no idea why I'm spending my own Thursday evening on this, but apparently the itch has to be scratched :)
And looking at diffstat and good itch scratched :-)
Quoted 1 line
9 files changed, 24 deletions(-)
Signature · 6 lines
~Vinod _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel