[PATCH 4/6] ARM: mxc: don't allow to compile together i.MX51 and i.MX53

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Tue Apr 12 17:20:50 EDT 2011


Hi Russell,

On Tue, Apr 12, 2011 at 09:53:44PM +0100, Russell King - ARM Linux wrote:
> On Tue, Apr 12, 2011 at 10:37:30PM +0200, Uwe Kleine-König wrote:
> > > #if !defined(CONFIG_ARM_PATCH_PHYS_VIRT)
> > > #if CONFIG_ARCH_MX1 + CONFIG_MACH_MX21 + ... > 1
> > > #error Invalid configuration - unable to handle different phys base addresses
> > > #endif
> > Same problem (and I guess it yields some cpp warnings about
> > CONFIG_ARCH_MX1 not being defined for an i.MX21-only build, but I didn't
> > test).
> 
> Well then,
> 
> #if (CONFIG_ARCH_MX1 | CONFIG_MACH_MX21) + (...) + ... > 1
> 
> where each group of | cover those which share the same phys base.
Well, the idea was to auto-catch a mismatch somehow. If I have to know
the exact groups I can better put the needed logic into mxc's Kconfig
file.
 
> No idea what those are because each MX SoC hides its phys base behind
> some SoC private definition.  This is definitely a case where more
Apart from defining PLAT_PHYS_OFFSET these symbols are used in the
machine files to define .boot_params. This is better than repeating the
bare numbers, isn't it?

> preprocessor junk reduces the code readability and makes it harder to
> understand.  Removal of preprocessor indirection sounds like a candidate
> for the consolidation effort to me.
I didn't intend to continue to try catching this error. The current
arch/arm/plat-mxc/include/mach/memory.h looks ok for me. I assume you
concur?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the linux-arm-kernel mailing list