diff options
| -rw-r--r-- | drivers/dma/shdma.c | 11 | ||||
| -rw-r--r-- | drivers/dma/shdma.h | 1 | ||||
| -rw-r--r-- | include/linux/sh_dma.h | 1 |
3 files changed, 11 insertions, 2 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 40900c1cee9a..9412de3ef899 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
| @@ -181,17 +181,19 @@ static void dmae_set_reg(struct sh_dmae_chan *sh_chan, struct sh_dmae_regs *hw) | |||
| 181 | 181 | ||
| 182 | static void dmae_start(struct sh_dmae_chan *sh_chan) | 182 | static void dmae_start(struct sh_dmae_chan *sh_chan) |
| 183 | { | 183 | { |
| 184 | struct sh_dmae_device *shdev = to_sh_dev(sh_chan); | ||
| 184 | u32 chcr = chcr_read(sh_chan); | 185 | u32 chcr = chcr_read(sh_chan); |
| 185 | 186 | ||
| 186 | chcr |= CHCR_DE | CHCR_IE; | 187 | chcr |= CHCR_DE | shdev->chcr_ie_bit; |
| 187 | chcr_write(sh_chan, chcr & ~CHCR_TE); | 188 | chcr_write(sh_chan, chcr & ~CHCR_TE); |
| 188 | } | 189 | } |
| 189 | 190 | ||
| 190 | static void dmae_halt(struct sh_dmae_chan *sh_chan) | 191 | static void dmae_halt(struct sh_dmae_chan *sh_chan) |
| 191 | { | 192 | { |
| 193 | struct sh_dmae_device *shdev = to_sh_dev(sh_chan); | ||
| 192 | u32 chcr = chcr_read(sh_chan); | 194 | u32 chcr = chcr_read(sh_chan); |
| 193 | 195 | ||
| 194 | chcr &= ~(CHCR_DE | CHCR_TE | CHCR_IE); | 196 | chcr &= ~(CHCR_DE | CHCR_TE | shdev->chcr_ie_bit); |
| 195 | chcr_write(sh_chan, chcr); | 197 | chcr_write(sh_chan, chcr); |
| 196 | } | 198 | } |
| 197 | 199 | ||
| @@ -1157,6 +1159,11 @@ static int __init sh_dmae_probe(struct platform_device *pdev) | |||
| 1157 | else | 1159 | else |
| 1158 | shdev->chcr_offset = CHCR; | 1160 | shdev->chcr_offset = CHCR; |
| 1159 | 1161 | ||
| 1162 | if (pdata->chcr_ie_bit) | ||
| 1163 | shdev->chcr_ie_bit = pdata->chcr_ie_bit; | ||
| 1164 | else | ||
| 1165 | shdev->chcr_ie_bit = CHCR_IE; | ||
| 1166 | |||
| 1160 | platform_set_drvdata(pdev, shdev); | 1167 | platform_set_drvdata(pdev, shdev); |
| 1161 | 1168 | ||
| 1162 | pm_runtime_enable(&pdev->dev); | 1169 | pm_runtime_enable(&pdev->dev); |
diff --git a/drivers/dma/shdma.h b/drivers/dma/shdma.h index 6f064cad6c0f..dc56576f9fdb 100644 --- a/drivers/dma/shdma.h +++ b/drivers/dma/shdma.h | |||
| @@ -48,6 +48,7 @@ struct sh_dmae_device { | |||
| 48 | u32 __iomem *chan_reg; | 48 | u32 __iomem *chan_reg; |
| 49 | u16 __iomem *dmars; | 49 | u16 __iomem *dmars; |
| 50 | unsigned int chcr_offset; | 50 | unsigned int chcr_offset; |
| 51 | u32 chcr_ie_bit; | ||
| 51 | }; | 52 | }; |
| 52 | 53 | ||
| 53 | #define to_sh_chan(chan) container_of(chan, struct sh_dmae_chan, common) | 54 | #define to_sh_chan(chan) container_of(chan, struct sh_dmae_chan, common) |
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h index 41fe4c2d6481..96803aa7b6bd 100644 --- a/include/linux/sh_dma.h +++ b/include/linux/sh_dma.h | |||
| @@ -63,6 +63,7 @@ struct sh_dmae_pdata { | |||
| 63 | int ts_shift_num; | 63 | int ts_shift_num; |
| 64 | u16 dmaor_init; | 64 | u16 dmaor_init; |
| 65 | unsigned int chcr_offset; | 65 | unsigned int chcr_offset; |
| 66 | u32 chcr_ie_bit; | ||
| 66 | }; | 67 | }; |
| 67 | 68 | ||
| 68 | /* DMA register */ | 69 | /* DMA register */ |
