diff options
author | Tom Rini <trini@ti.com> | 2013-02-12 10:18:31 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-02-12 10:18:31 -0500 |
commit | 951c6baaf44c7fd4335b75fb92840d4e42c94927 (patch) | |
tree | 6a09cce20c4f3affb7b500d018eb84f848e42c20 /drivers/dma/apbh_dma.c | |
parent | 58864ddc7276ca7403ddbb716da5853638f37519 (diff) | |
parent | fd8e1c3866578d87ed14a04a59faae341fd415df (diff) | |
download | u-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.c | 10 |
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; } |