Re: [PATCH 6/6] omap3: beagle: get rid of unused omap2/omap4 specific code/data

2010-12-21 Thread Menon, Nishanth
On Tue, Dec 21, 2010 at 12:20, Thomas Petazzoni
thomas.petazz...@free-electrons.com wrote:

 From: Thomas Petazzoni tpetazz...@ti.com

 Using the new condsections infrastructure, get rid of the unused
 code/data for OMAP2 and OMAP4 when booting on BeagleBoard OMAP3.

 Signed-off-by: Thomas Petazzoni t-petazz...@ti.com
 ---
  arch/arm/mach-omap2/board-omap3beagle.c |    4 
  1 files changed, 4 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
 b/arch/arm/mach-omap2/board-omap3beagle.c
 index 14f4224..900964a 100644
 --- a/arch/arm/mach-omap2/board-omap3beagle.c
 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
 @@ -23,6 +23,7 @@
  #include linux/gpio.h
  #include linux/input.h
  #include linux/gpio_keys.h
 +#include linux/condsections.h

  #include linux/mtd/mtd.h
  #include linux/mtd/partitions.h
 @@ -581,6 +582,9 @@ static void __init omap3_beagle_init(void)
        omap_mux_init_signal(sdrc_cke1, OMAP_PIN_OUTPUT);

        beagle_display_init();
 +
 +       free_unused_cond_section(omap2);
 +       free_unused_cond_section(omap4);

Potentially a dumb idea: given that silicon wont change after boot,
cant we make it independent of the board file - I mean some common
file with cpu_is check and free of conditional sections accordingly?

Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 6/6] omap3: beagle: get rid of unused omap2/omap4 specific code/data

2010-12-21 Thread Thomas Petazzoni
On Tue, 21 Dec 2010 13:15:23 -0600
Menon, Nishanth n...@ti.com wrote:

 Potentially a dumb idea: given that silicon wont change after boot,
 cant we make it independent of the board file - I mean some common
 file with cpu_is check and free of conditional sections accordingly?

Yes, definitely. The current location in the BeagleBoard board code was
just to make a quick test. It belongs somewhere in the CPU detection
code.

Thanks for your feedback!

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html