From 96666a39aed47c8c643dc7c6a6e15e314e63f42b Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 8 Apr 2012 17:34:46 +0000 Subject: DMA: Split the APBH DMA init into block and channel init This fixes the issue where mxs_dma_init() was called either twice or never, without introducing any new init hooks. The idea is to allow each and every device using the APBH DMA block to configure and request only the channels it uses, instead of making it call init for all the channels as is now. The common DMA block init part, which only configures the block, is then called from CPUs arch_cpu_init() call. NOTE: This patch depends on: http://patchwork.ozlabs.org/patch/150957/ Signed-off-by: Marek Vasut Cc: Stefano Babic Cc: Wolfgang Denk Cc: Detlev Zundel Cc: Fabio Estevam Tested-by: Fabio Estevam --- drivers/mmc/mxsmmc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/mmc') diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c index dfceaef95..35c6bdabb 100644 --- a/drivers/mmc/mxsmmc.c +++ b/drivers/mmc/mxsmmc.c @@ -338,6 +338,7 @@ int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int)) (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE; struct mmc *mmc = NULL; struct mxsmmc_priv *priv = NULL; + int ret; mmc = malloc(sizeof(struct mmc)); if (!mmc) @@ -356,6 +357,10 @@ int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int)) return -ENOMEM; } + ret = mxs_dma_init_channel(id); + if (ret) + return ret; + priv->mmc_is_wp = wp; priv->id = id; switch (id) { -- cgit v1.2.3-70-g09d2