History

dmaengine: pl330: remove pdata based initialization

This driver is now used only on platforms which support device tree, so it is safe to remove legacy platform data based initialization code.

Marek Szyprowski committed 9 years ago

Commit e8bb4671 parent c1ae3cf3 files · +8 −70Browse files

Unified · Split

3 files
  1. arch/arm/plat-samsung/devs.c +0 −1
  2. drivers/dma/pl330.c +8 −34
  3. include/linux/amba/pl330.h +0 −35
arch/arm/plat-samsung/devs.c+0−1
@@ -10,7 +10,6 @@ · 9 unmodified lines
1010 * published by the Free Software Foundation.
1111 */
1212
13−#include <linux/amba/pl330.h>
1413 #include <linux/kernel.h>
1514 #include <linux/types.h>
1615 #include <linux/interrupt.h>
drivers/dma/pl330.c+8−34
@@ -22,7 +22,6 @@ · 21 unmodified lines
2222 #include <linux/dma-mapping.h>
2323 #include <linux/dmaengine.h>
2424 #include <linux/amba/bus.h>
25−#include <linux/amba/pl330.h>
2625 #include <linux/scatterlist.h>
2726 #include <linux/of.h>
2827 #include <linux/of_dma.h>
@@ -2077,18 +2076,6 @@ static void pl330_tasklet(unsigned long data) · 2048 unmodified lines
20772076 }
20782077 }
20792078
2080−bool pl330_filter(struct dma_chan *chan, void *param)
2081−{
2082− u8 *peri_id;
2083−
2084− if (chan->device->dev->driver != &pl330_driver.drv)
2085− return false;
2086−
2087− peri_id = chan->private;
2088− return *peri_id == (unsigned long)param;
2089−}
2090−EXPORT_SYMBOL(pl330_filter);
2091−
20922079 static struct dma_chan *of_dma_pl330_xlate(struct of_phandle_args *dma_spec,
20932080 struct of_dma *ofdma)
20942081 {
@@ -2833,7 +2820,6 @@ static SIMPLE_DEV_PM_OPS(pl330_pm, pl330_suspend, pl330_resume); · 738 unmodified lines
28332820 static int
28342821 pl330_probe(struct amba_device *adev, const struct amba_id *id)
28352822 {
2836− struct dma_pl330_platdata *pdat;
28372823 struct pl330_config *pcfg;
28382824 struct pl330_dmac *pl330;
28392825 struct dma_pl330_chan *pch, *_p;
@@ -2843,8 +2829,6 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) · 3 unmodified lines
28432829 int num_chan;
28442830 struct device_node *np = adev->dev.of_node;
28452831
2846− pdat = dev_get_platdata(&adev->dev);
2847−
28482832 ret = dma_set_mask_and_coherent(&adev->dev, DMA_BIT_MASK(32));
28492833 if (ret)
28502834 return ret;
@@ -2857,7 +2841,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) · 6 unmodified lines
28572841 pd = &pl330->ddma;
28582842 pd->dev = &adev->dev;
28592843
2860− pl330->mcbufsz = pdat ? pdat->mcbuf_sz : 0;
2844+ pl330->mcbufsz = 0;
28612845
28622846 /* get quirk */
28632847 for (i = 0; i < ARRAY_SIZE(of_quirks); i++)
@@ -2901,10 +2885,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) · 37 unmodified lines
29012885 INIT_LIST_HEAD(&pd->channels);
29022886
29032887 /* Initialize channel parameters */
2904− if (pdat)
2905− num_chan = max_t(int, pdat->nr_valid_peri, pcfg->num_chan);
2906− else
2907− num_chan = max_t(int, pcfg->num_peri, pcfg->num_chan);
2888+ num_chan = max_t(int, pcfg->num_peri, pcfg->num_chan);
29082889
29092890 pl330->num_peripherals = num_chan;
29102891
@@ -2916,11 +2897,8 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) · 5 unmodified lines
29162897
29172898 for (i = 0; i < num_chan; i++) {
29182899 pch = &pl330->peripherals[i];
2919− if (!adev->dev.of_node)
2920− pch->chan.private = pdat ? &pdat->peri_id[i] : NULL;
2921− else
2922− pch->chan.private = adev->dev.of_node;
29232900
2901+ pch->chan.private = adev->dev.of_node;
29242902 INIT_LIST_HEAD(&pch->submitted_list);
29252903 INIT_LIST_HEAD(&pch->work_list);
29262904 INIT_LIST_HEAD(&pch->completed_list);
@@ -2933,15 +2911,11 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) · 6 unmodified lines
29332911 list_add_tail(&pch->chan.device_node, &pd->channels);
29342912 }
29352913
2936− if (pdat) {
2937− pd->cap_mask = pdat->cap_mask;
2938− } else {
2939− dma_cap_set(DMA_MEMCPY, pd->cap_mask);
2940− if (pcfg->num_peri) {
2941− dma_cap_set(DMA_SLAVE, pd->cap_mask);
2942− dma_cap_set(DMA_CYCLIC, pd->cap_mask);
2943− dma_cap_set(DMA_PRIVATE, pd->cap_mask);
2944− }
2914+ dma_cap_set(DMA_MEMCPY, pd->cap_mask);
2915+ if (pcfg->num_peri) {
2916+ dma_cap_set(DMA_SLAVE, pd->cap_mask);
2917+ dma_cap_set(DMA_CYCLIC, pd->cap_mask);
2918+ dma_cap_set(DMA_PRIVATE, pd->cap_mask);
29452919 }
29462920
29472921 pd->device_alloc_chan_resources = pl330_alloc_chan_resources;
include/linux/amba/pl330.h+0−35
@@ -1,35 +0,0 @@
1−/* linux/include/linux/amba/pl330.h
2− *
3− * Copyright (C) 2010 Samsung Electronics Co. Ltd.
4− * Jaswinder Singh <jassi.brar@samsung.com>
5− *
6− * This program is free software; you can redistribute it and/or modify
7− * it under the terms of the GNU General Public License as published by
8− * the Free Software Foundation; either version 2 of the License, or
9− * (at your option) any later version.
10− */
11−
12−#ifndef __AMBA_PL330_H_
13−#define __AMBA_PL330_H_
14−
15−#include <linux/dmaengine.h>
16−
17−struct dma_pl330_platdata {
18− /*
19− * Number of valid peripherals connected to DMAC.
20− * This may be different from the value read from
21− * CR0, as the PL330 implementation might have 'holes'
22− * in the peri list or the peri could also be reached
23− * from another DMAC which the platform prefers.
24− */
25− u8 nr_valid_peri;
26− /* Array of valid peripherals */
27− u8 *peri_id;
28− /* Operational capabilities */
29− dma_cap_mask_t cap_mask;
30− /* Bytes to allocate for MC buffer */
31− unsigned mcbuf_sz;
32−};
33−
34−extern bool pl330_filter(struct dma_chan *chan, void *param);
35−#endif /* __AMBA_PL330_H_ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t