]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
mx6: soc: Move mxs_dma_init() into the mxs nand driver
authorFabio Estevam <fabio.estevam@nxp.com>
Thu, 29 Jun 2017 12:33:44 +0000 (09:33 -0300)
committerStefano Babic <sbabic@denx.de>
Wed, 12 Jul 2017 07:44:22 +0000 (09:44 +0200)
Currently the following build error is seen when a board using MMC SPL
is built and the MXS nand driver is also selected:

arch/arm/cpu/armv7/built-in.o: In function `arch_cpu_init':
arch/arm/cpu/armv7/mx6/soc.c:432: undefined reference to 'mxs_dma_init'

On mx6 the only user of mxs_dma_init() is the mxs nand driver, so
move it there.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
arch/arm/cpu/armv7/mx6/soc.c
drivers/mtd/nand/mxs_nand.c

index b881766487050690ace98060695c6eacc2f3039c..832ef251b8c63dc36a17f27e6bafac4c7d92a7f8 100644 (file)
@@ -427,11 +427,6 @@ int arch_cpu_init(void)
 
        imx_set_wdog_powerdown(false); /* Disable PDE bit of WMCR register */
 
-#ifdef CONFIG_APBH_DMA
-       /* Start APBH DMA */
-       mxs_dma_init();
-#endif
-
        init_src();
 
        return 0;
index 92005448d2eeef16007bd089efe5c6a76541b72d..5aa36082dd708484851dfd9eb8da891950c0a051 100644 (file)
@@ -1114,6 +1114,7 @@ int mxs_nand_init(struct mxs_nand_info *info)
        }
 
        /* Init the DMA controller. */
+       mxs_dma_init();
        for (j = MXS_DMA_CHANNEL_AHB_APBH_GPMI0;
                j <= MXS_DMA_CHANNEL_AHB_APBH_GPMI7; j++) {
                ret = mxs_dma_init_channel(j);