diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-04-21 11:36:49 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-26 02:50:50 -0400 |
commit | 5bac942db3d2c4738df04104240d65a5d1eaec6a (patch) | |
tree | 253c75407764fc5cb3483283941b14a99fad389a /include/linux/sh_dma.h | |
parent | 6b6b18e62cfba44ce7b6489c7100f12b199232d7 (diff) |
SH: constify multiple DMA related objects and references to them
Lists of DMA channels and slaves are not changed, make them constant. Besides,
SH7724 channel and slave configuration of both DMA controllers is identical,
remove the extra copy of the configuration data.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/linux/sh_dma.h')
-rw-r--r-- | include/linux/sh_dma.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h index cdaaff424211..b08cd4efa15c 100644 --- a/include/linux/sh_dma.h +++ b/include/linux/sh_dma.h | |||
@@ -17,7 +17,7 @@ | |||
17 | struct sh_dmae_slave { | 17 | struct sh_dmae_slave { |
18 | unsigned int slave_id; /* Set by the platform */ | 18 | unsigned int slave_id; /* Set by the platform */ |
19 | struct device *dma_dev; /* Set by the platform */ | 19 | struct device *dma_dev; /* Set by the platform */ |
20 | struct sh_dmae_slave_config *config; /* Set by the driver */ | 20 | const struct sh_dmae_slave_config *config; /* Set by the driver */ |
21 | }; | 21 | }; |
22 | 22 | ||
23 | struct sh_dmae_regs { | 23 | struct sh_dmae_regs { |
@@ -36,6 +36,7 @@ struct sh_desc { | |||
36 | int chunks; | 36 | int chunks; |
37 | int mark; | 37 | int mark; |
38 | }; | 38 | }; |
39 | |||
39 | struct sh_dmae_slave_config { | 40 | struct sh_dmae_slave_config { |
40 | unsigned int slave_id; | 41 | unsigned int slave_id; |
41 | dma_addr_t addr; | 42 | dma_addr_t addr; |
@@ -50,15 +51,15 @@ struct sh_dmae_channel { | |||
50 | }; | 51 | }; |
51 | 52 | ||
52 | struct sh_dmae_pdata { | 53 | struct sh_dmae_pdata { |
53 | struct sh_dmae_slave_config *slave; | 54 | const struct sh_dmae_slave_config *slave; |
54 | int slave_num; | 55 | int slave_num; |
55 | struct sh_dmae_channel *channel; | 56 | const struct sh_dmae_channel *channel; |
56 | int channel_num; | 57 | int channel_num; |
57 | unsigned int ts_low_shift; | 58 | unsigned int ts_low_shift; |
58 | unsigned int ts_low_mask; | 59 | unsigned int ts_low_mask; |
59 | unsigned int ts_high_shift; | 60 | unsigned int ts_high_shift; |
60 | unsigned int ts_high_mask; | 61 | unsigned int ts_high_mask; |
61 | unsigned int *ts_shift; | 62 | const unsigned int *ts_shift; |
62 | int ts_shift_num; | 63 | int ts_shift_num; |
63 | u16 dmaor_init; | 64 | u16 dmaor_init; |
64 | }; | 65 | }; |