Patchwork [1/3] ARM: mx3: Remove unneeded ifdef's from mm-imx3.c

login
register
mail settings
Submitter Fabio Estevam
Date Jan. 20, 2012, 6:43 p.m.
Message ID <1327084990-25402-1-git-send-email-fabio.estevam@freescale.com>
Download mbox | patch
Permalink /patch/137081/
State New
Headers show

Comments

Fabio Estevam - Jan. 20, 2012, 6:43 p.m.
As we are already able to build a kernel that can run on mx31 and mx35, there
is no need for the ifdef's anymore, so remove them.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 arch/arm/mach-imx/mm-imx3.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
Uwe Kleine-König - Jan. 20, 2012, 11:29 p.m.
On Fri, Jan 20, 2012 at 04:43:08PM -0200, Fabio Estevam wrote:
> As we are already able to build a kernel that can run on mx31 and mx35, there
> is no need for the ifdef's anymore, so remove them.
They were introduced in commit 

	87514fc (ARM: imx/mm-imx3: conditionally compile i.MX31 and i.MX35 code)

and the problem was not that we can or cannot do kernels for both mx31
and mx35, but that we also want to do kernels for only one of them. Did
you try to build an mx31-only kernel after your change?

Best regards
Uwe
Fabio Estevam - Jan. 21, 2012, 7:16 p.m.
Hi Uwe,

2012/1/20 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:

> and the problem was not that we can or cannot do kernels for both mx31
> and mx35, but that we also want to do kernels for only one of them. Did
> you try to build an mx31-only kernel after your change?

Ok, just tried it and it fails with:

  LD      .tmp_vmlinux1
arch/arm/mach-imx/built-in.o: In function `imx35_init_early':
mach-mx31_3ds.c:(.init.text+0x50): undefined reference to `mxc_iomux_v3_init'
arch/arm/mach-imx/built-in.o: In function `imx35_soc_init':
mach-mx31_3ds.c:(.init.text+0x12c): undefined reference to `mx35_revision'

I think I can solve this build issue by merging cpu-imx31.c and
cpu-imx35.c into a single file:
cpu-imx3.c, using the same idea as in cpu-imx5.c

Would you like me to do this?

Regards,

Fabio Estevam
Uwe Kleine-König - Jan. 21, 2012, 8:43 p.m.
Hi Fabio,

On Sat, Jan 21, 2012 at 05:16:57PM -0200, Fabio Estevam wrote:
> 2012/1/20 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> 
> > and the problem was not that we can or cannot do kernels for both mx31
> > and mx35, but that we also want to do kernels for only one of them. Did
> > you try to build an mx31-only kernel after your change?
> 
> Ok, just tried it and it fails with:
> 
>   LD      .tmp_vmlinux1
> arch/arm/mach-imx/built-in.o: In function `imx35_init_early':
> mach-mx31_3ds.c:(.init.text+0x50): undefined reference to `mxc_iomux_v3_init'
> arch/arm/mach-imx/built-in.o: In function `imx35_soc_init':
> mach-mx31_3ds.c:(.init.text+0x12c): undefined reference to `mx35_revision'
> 
> I think I can solve this build issue by merging cpu-imx31.c and
> cpu-imx35.c into a single file:
> cpu-imx3.c, using the same idea as in cpu-imx5.c
... or by keeping the #ifdefs :-)

> Would you like me to do this?
I don't care much and pass the question to Sascha.

Best regards
Uwe
Fabio Estevam - Jan. 21, 2012, 8:47 p.m.
2012/1/21 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:

> ... or by keeping the #ifdefs :-)

Yes, let's keep the #ifdefs

>> Would you like me to do this?
> I don't care much and pass the question to Sascha.

Ok, let's drop 1/3 for now.

My main goal in this patch series is patch 3/3 that fixes LPM setting on mx35.

Regards,

Fabio Estevam

Patch

diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index 31807d2..3555e0b 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -111,7 +111,6 @@  void imx3_init_l2x0(void)
 	l2x0_init(l2x0_base, 0x00030024, 0x00000000);
 }
 
-#ifdef CONFIG_SOC_IMX31
 static struct map_desc mx31_io_desc[] __initdata = {
 	imx_map_entry(MX31, X_MEMC, MT_DEVICE),
 	imx_map_entry(MX31, AVIC, MT_DEVICE_NONSHARED),
@@ -176,9 +175,7 @@  void __init imx31_soc_init(void)
 
 	imx_add_imx_sdma("imx31-sdma", MX31_SDMA_BASE_ADDR, MX31_INT_SDMA, &imx31_sdma_pdata);
 }
-#endif /* ifdef CONFIG_SOC_IMX31 */
 
-#ifdef CONFIG_SOC_IMX35
 static struct map_desc mx35_io_desc[] __initdata = {
 	imx_map_entry(MX35, X_MEMC, MT_DEVICE),
 	imx_map_entry(MX35, AVIC, MT_DEVICE_NONSHARED),
@@ -260,4 +257,3 @@  void __init imx35_soc_init(void)
 
 	imx_add_imx_sdma("imx35-sdma", MX35_SDMA_BASE_ADDR, MX35_INT_SDMA, &imx35_sdma_pdata);
 }
-#endif /* ifdef CONFIG_SOC_IMX35 */