diff options
author | Magnus Damm <damm@opensource.se> | 2010-03-19 00:46:38 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-03-23 04:19:30 -0400 |
commit | 4bab9d426e6dbd9ea09330919a33d35d5faab400 (patch) | |
tree | cb78032733f4a45e8b36719b70854cc567b56b55 | |
parent | ae6be51ed01d6c4aaf249a207b4434bc7785853b (diff) |
dmaengine: shdma: Remove sh_dmae_slave_chan_id enum
This patch replaces the sh_dmae_slave_chan_id enum
with an unsigned int. The purpose of this chainge is
to make it possible to separate the slave id enums
from the dmaengine header.
The slave id enums varies with processor model, so in
the future it makes sense to put these in the processor
specific headers together with the pinmux enums.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/include/asm/dmaengine.h | 6 | ||||
-rw-r--r-- | arch/sh/include/asm/siu.h | 8 | ||||
-rw-r--r-- | drivers/dma/shdma.c | 8 | ||||
-rw-r--r-- | drivers/serial/sh-sci.c | 4 | ||||
-rw-r--r-- | include/linux/serial_sci.h | 4 |
5 files changed, 15 insertions, 15 deletions
diff --git a/arch/sh/include/asm/dmaengine.h b/arch/sh/include/asm/dmaengine.h index bf2f30cf0a27..568e991442b0 100644 --- a/arch/sh/include/asm/dmaengine.h +++ b/arch/sh/include/asm/dmaengine.h | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | #define SH_DMAC_MAX_CHANNELS 6 | 18 | #define SH_DMAC_MAX_CHANNELS 6 |
19 | 19 | ||
20 | enum sh_dmae_slave_chan_id { | 20 | enum { |
21 | SHDMA_SLAVE_SCIF0_TX, | 21 | SHDMA_SLAVE_SCIF0_TX, |
22 | SHDMA_SLAVE_SCIF0_RX, | 22 | SHDMA_SLAVE_SCIF0_RX, |
23 | SHDMA_SLAVE_SCIF1_TX, | 23 | SHDMA_SLAVE_SCIF1_TX, |
@@ -38,7 +38,7 @@ enum sh_dmae_slave_chan_id { | |||
38 | }; | 38 | }; |
39 | 39 | ||
40 | struct sh_dmae_slave_config { | 40 | struct sh_dmae_slave_config { |
41 | enum sh_dmae_slave_chan_id slave_id; | 41 | unsigned int slave_id; |
42 | dma_addr_t addr; | 42 | dma_addr_t addr; |
43 | u32 chcr; | 43 | u32 chcr; |
44 | char mid_rid; | 44 | char mid_rid; |
@@ -68,7 +68,7 @@ struct device; | |||
68 | 68 | ||
69 | /* Used by slave DMA clients to request DMA to/from a specific peripheral */ | 69 | /* Used by slave DMA clients to request DMA to/from a specific peripheral */ |
70 | struct sh_dmae_slave { | 70 | struct sh_dmae_slave { |
71 | enum sh_dmae_slave_chan_id slave_id; /* Set by the platform */ | 71 | unsigned int slave_id; /* Set by the platform */ |
72 | struct device *dma_dev; /* Set by the platform */ | 72 | struct device *dma_dev; /* Set by the platform */ |
73 | struct sh_dmae_slave_config *config; /* Set by the driver */ | 73 | struct sh_dmae_slave_config *config; /* Set by the driver */ |
74 | }; | 74 | }; |
diff --git a/arch/sh/include/asm/siu.h b/arch/sh/include/asm/siu.h index f1b1e6944a5f..e8d4142baf59 100644 --- a/arch/sh/include/asm/siu.h +++ b/arch/sh/include/asm/siu.h | |||
@@ -17,10 +17,10 @@ struct device; | |||
17 | 17 | ||
18 | struct siu_platform { | 18 | struct siu_platform { |
19 | struct device *dma_dev; | 19 | struct device *dma_dev; |
20 | enum sh_dmae_slave_chan_id dma_slave_tx_a; | 20 | unsigned int dma_slave_tx_a; |
21 | enum sh_dmae_slave_chan_id dma_slave_rx_a; | 21 | unsigned int dma_slave_rx_a; |
22 | enum sh_dmae_slave_chan_id dma_slave_tx_b; | 22 | unsigned int dma_slave_tx_b; |
23 | enum sh_dmae_slave_chan_id dma_slave_rx_b; | 23 | unsigned int dma_slave_rx_b; |
24 | }; | 24 | }; |
25 | 25 | ||
26 | #endif /* ASM_SIU_H */ | 26 | #endif /* ASM_SIU_H */ |
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 5d17e09cb625..e5588f4868ca 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
@@ -266,7 +266,7 @@ static struct sh_desc *sh_dmae_get_desc(struct sh_dmae_chan *sh_chan) | |||
266 | } | 266 | } |
267 | 267 | ||
268 | static struct sh_dmae_slave_config *sh_dmae_find_slave( | 268 | static struct sh_dmae_slave_config *sh_dmae_find_slave( |
269 | struct sh_dmae_chan *sh_chan, enum sh_dmae_slave_chan_id slave_id) | 269 | struct sh_dmae_chan *sh_chan, struct sh_dmae_slave *param) |
270 | { | 270 | { |
271 | struct dma_device *dma_dev = sh_chan->common.device; | 271 | struct dma_device *dma_dev = sh_chan->common.device; |
272 | struct sh_dmae_device *shdev = container_of(dma_dev, | 272 | struct sh_dmae_device *shdev = container_of(dma_dev, |
@@ -274,11 +274,11 @@ static struct sh_dmae_slave_config *sh_dmae_find_slave( | |||
274 | struct sh_dmae_pdata *pdata = shdev->pdata; | 274 | struct sh_dmae_pdata *pdata = shdev->pdata; |
275 | int i; | 275 | int i; |
276 | 276 | ||
277 | if ((unsigned)slave_id >= SHDMA_SLAVE_NUMBER) | 277 | if (param->slave_id >= SHDMA_SLAVE_NUMBER) |
278 | return NULL; | 278 | return NULL; |
279 | 279 | ||
280 | for (i = 0; i < pdata->slave_num; i++) | 280 | for (i = 0; i < pdata->slave_num; i++) |
281 | if (pdata->slave[i].slave_id == slave_id) | 281 | if (pdata->slave[i].slave_id == param->slave_id) |
282 | return pdata->slave + i; | 282 | return pdata->slave + i; |
283 | 283 | ||
284 | return NULL; | 284 | return NULL; |
@@ -299,7 +299,7 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan) | |||
299 | if (param) { | 299 | if (param) { |
300 | struct sh_dmae_slave_config *cfg; | 300 | struct sh_dmae_slave_config *cfg; |
301 | 301 | ||
302 | cfg = sh_dmae_find_slave(sh_chan, param->slave_id); | 302 | cfg = sh_dmae_find_slave(sh_chan, param); |
303 | if (!cfg) | 303 | if (!cfg) |
304 | return -EINVAL; | 304 | return -EINVAL; |
305 | 305 | ||
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index f7b9aff88f4a..2d9a06db83b5 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -90,8 +90,8 @@ struct sci_port { | |||
90 | struct dma_chan *chan_rx; | 90 | struct dma_chan *chan_rx; |
91 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | 91 | #ifdef CONFIG_SERIAL_SH_SCI_DMA |
92 | struct device *dma_dev; | 92 | struct device *dma_dev; |
93 | enum sh_dmae_slave_chan_id slave_tx; | 93 | unsigned int slave_tx; |
94 | enum sh_dmae_slave_chan_id slave_rx; | 94 | unsigned int slave_rx; |
95 | struct dma_async_tx_descriptor *desc_tx; | 95 | struct dma_async_tx_descriptor *desc_tx; |
96 | struct dma_async_tx_descriptor *desc_rx[2]; | 96 | struct dma_async_tx_descriptor *desc_rx[2]; |
97 | dma_cookie_t cookie_tx; | 97 | dma_cookie_t cookie_tx; |
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h index 193d4bfe42ff..f5364a1de68b 100644 --- a/include/linux/serial_sci.h +++ b/include/linux/serial_sci.h | |||
@@ -33,8 +33,8 @@ struct plat_sci_port { | |||
33 | char *clk; /* clock string */ | 33 | char *clk; /* clock string */ |
34 | struct device *dma_dev; | 34 | struct device *dma_dev; |
35 | #ifdef CONFIG_SERIAL_SH_SCI_DMA | 35 | #ifdef CONFIG_SERIAL_SH_SCI_DMA |
36 | enum sh_dmae_slave_chan_id dma_slave_tx; | 36 | unsigned int dma_slave_tx; |
37 | enum sh_dmae_slave_chan_id dma_slave_rx; | 37 | unsigned int dma_slave_rx; |
38 | #endif | 38 | #endif |
39 | }; | 39 | }; |
40 | 40 | ||