[PATCH 4/6] ARM: mxc: don't allow to compile together i.MX51 and i.MX53
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Apr 12 16:27:34 EDT 2011
On Tue, Apr 12, 2011 at 11:54:46AM +0200, Uwe Kleine-König wrote:
> #if !defined(CONFIG_ARM_PATCH_PHYS_VIRT)
> # if defined CONFIG_ARCH_MX1
> # define PLAT_PHYS_OFFSET MX1_PHYS_OFFSET
> # endif
> # if defined CONFIG_MACH_MX21 && (!defined(PLAT_PHYS_OFFSET) || PLAT_PHYS_OFFSET != MX21_PHYS_OFFSET)
> # define PLAT_PHYS_OFFSET MX21_PHYS_OFFSET
> # endif
> # if defined CONFIG_ARCH_MX25 && (!defined(PLAT_PHYS_OFFSET) || PLAT_PHYS_OFFSET != MX25_PHYS_OFFSET)
> # define PLAT_PHYS_OFFSET MX25_PHYS_OFFSET
> # endif
And what's wrong with:
#if !defined(CONFIG_ARM_PATCH_PHYS_VIRT)
#ifdef CONFIG_ARCH_MX1
#ifdef PLAT_PHYS_OFFSET
#error Invalid configuration - PLAT_PHYS_OFFSET already defined
#endif
#define PLAT_PHYS_OFFSET MX1_PHYS_OFFSET
#endif
#ifdef CONFIG_MACH_MX21
#ifdef PLAT_PHYS_OFFSET
#error Invalid configuration - PLAT_PHYS_OFFSET already defined
#endif
#define PLAT_PHYS_OFFSET MX21_PHYS_OFFSET
#endif
...
#endif
?
Or this _may_ work:
#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
...
#endif
More information about the linux-arm-kernel
mailing list