Skip to content

Commit

Permalink
ARM: imx: only call l2x0_init if it's available
Browse files Browse the repository at this point in the history
This fixes a build failure with CONFIG_CACHE_L2X0=n:

	arch/arm/mach-imx/built-in.o: In function `imx3_init_l2x0':
	imx53-dt.c:(.init.text+0x190): undefined reference to `l2x0_init'
	make[2]: *** [.tmp_vmlinux1] Error 1
	make[1]: *** [sub-make] Error 2
	make: *** [all] Error 2

When the l2 cache isn't enabled the quirk introduced in
9524705 (MX35: Fix bogus L2 cache settings) doesn't need to be done
either.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Uwe Kleine-König authored and Sascha Hauer committed May 29, 2012
1 parent 1064f88 commit f90da3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-imx/mm-imx3.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ static void __iomem *imx3_ioremap_caller(unsigned long phys_addr, size_t size,

void __init imx3_init_l2x0(void)
{
#ifdef CONFIG_CACHE_L2X0
void __iomem *l2x0_base;
void __iomem *clkctl_base;

Expand Down Expand Up @@ -110,6 +111,7 @@ void __init imx3_init_l2x0(void)
}

l2x0_init(l2x0_base, 0x00030024, 0x00000000);
#endif
}

#ifdef CONFIG_SOC_IMX31
Expand Down

0 comments on commit f90da3c

Please sign in to comment.