summaryrefslogtreecommitdiff
path: root/drivers/dma/apbh_dma.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-02-12 10:18:31 -0500
committerTom Rini <trini@ti.com>2013-02-12 10:18:31 -0500
commit951c6baaf44c7fd4335b75fb92840d4e42c94927 (patch)
tree6a09cce20c4f3affb7b500d018eb84f848e42c20 /drivers/dma/apbh_dma.c
parent58864ddc7276ca7403ddbb716da5853638f37519 (diff)
parentfd8e1c3866578d87ed14a04a59faae341fd415df (diff)
downloadu-boot-imx-951c6baaf44c7fd4335b75fb92840d4e42c94927.zip
u-boot-imx-951c6baaf44c7fd4335b75fb92840d4e42c94927.tar.gz
u-boot-imx-951c6baaf44c7fd4335b75fb92840d4e42c94927.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'drivers/dma/apbh_dma.c')
-rw-r--r--drivers/dma/apbh_dma.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c
index 37a941c..0c1cd83 100644
--- a/drivers/dma/apbh_dma.c
+++ b/drivers/dma/apbh_dma.c
@@ -223,13 +223,19 @@ static int mxs_dma_reset(int channel)
struct mxs_apbh_regs *apbh_regs =
(struct mxs_apbh_regs *)MXS_APBH_BASE;
int ret;
+#if defined(CONFIG_MX23)
+ uint32_t setreg = (uint32_t)(&apbh_regs->hw_apbh_ctrl0_set);
+ uint32_t offset = APBH_CTRL0_RESET_CHANNEL_OFFSET;
+#elif defined(CONFIG_MX28)
+ uint32_t setreg = (uint32_t)(&apbh_regs->hw_apbh_channel_ctrl_set);
+ uint32_t offset = APBH_CHANNEL_CTRL_RESET_CHANNEL_OFFSET;
+#endif
ret = mxs_dma_validate_chan(channel);
if (ret)
return ret;
- writel(1 << (channel + APBH_CHANNEL_CTRL_RESET_CHANNEL_OFFSET),
- &apbh_regs->hw_apbh_channel_ctrl_set);
+ writel(1 << (channel + offset), setreg);
return 0;
}