[U-Boot] [PATCH next 1/3] mx6: soc: Move mxs_dma_init() into the mxs nand driver
Stefano Babic
sbabic at denx.de
Fri Jun 30 08:51:13 UTC 2017
Hi Vanessa, hi Fabio,
On 29/06/2017 14:33, Vanessa Maegima wrote:
> From: Fabio Estevam <fabio.estevam at nxp.com>
>
> 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 at nxp.com>
> ---
> arch/arm/cpu/armv7/mx6/soc.c | 5 -----
> drivers/mtd/nand/mxs_nand.c | 1 +
> 2 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
> index 2bedbdb..ecbc3b2 100644
> --- a/arch/arm/cpu/armv7/mx6/soc.c
> +++ b/arch/arm/cpu/armv7/mx6/soc.c
> @@ -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;
> diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
> index 9200544..5aa3608 100644
> --- a/drivers/mtd/nand/mxs_nand.c
> +++ b/drivers/mtd/nand/mxs_nand.c
> @@ -1114,6 +1114,7 @@ int mxs_nand_init(struct mxs_nand_info *info)
> }
>
> /* Init the DMA controller. */
> + mxs_dma_init();
But if this is the case, should we not also add a dependency in Kconfig
for NAND_MXS, selecting automatically APBH_DMA ?
config NAND_MXS
bool "MXS NAND support"
depends on MX6 || MX7
+ select APBH_DMA
> for (j = MXS_DMA_CHANNEL_AHB_APBH_GPMI0;
> j <= MXS_DMA_CHANNEL_AHB_APBH_GPMI7; j++) {
> ret = mxs_dma_init_channel(j);
>
Best regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list