Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-17 Thread Sascha Hauer
On Mon, Feb 17, 2014 at 10:02:48AM +0100, Paul Bolle wrote:
> On Mon, 2014-02-17 at 08:43 +0400, Alexander Shiyan wrote:
> > It seems that even in the current state, Kconfig for i.MX contains an error.
> > As a start, we should rename ARCH_MX1ADS to MACH_MX1ADS first.

No. Have a look at arch/arm/tools/mach-types:

mxlads  MACH_MXLADS MXLADS  1851
mx1ads  ARCH_MX1ADS MX1ADS  160

And what gen-mach-types makes from it:

#ifdef CONFIG_MACH_MXLADS
# ifdef machine_arch_type
#  undef machine_arch_type
#  define machine_arch_type __machine_arch_type
# else
#  define machine_arch_type MACH_TYPE_MXLADS
# endif
# define machine_is_mxlads()(machine_arch_type == MACH_TYPE_MXLADS)
#else
# define machine_is_mxlads()(0)
#endif

#ifdef CONFIG_ARCH_MX1ADS
# ifdef machine_arch_type
#  undef machine_arch_type
#  define machine_arch_type __machine_arch_type
# else
#  define machine_arch_type MACH_TYPE_MX1ADS
# endif
# define machine_is_mx1ads()(machine_arch_type == MACH_TYPE_MX1ADS)
#else
# define machine_is_mx1ads()(0)
#endif

So machine_is_mx1ads() can only ever evaluate to true when
CONFIG_ARCH_MX1ADS is set and machine_is_mxlads() can only evaluate to true
when CONFIG_MACH_MXLADS is set.

Whether to use ARCH or MACH simply depends on what Russell has in the
machine registry database for a given board.

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-17 Thread Paul Bolle
On Mon, 2014-02-17 at 08:43 +0400, Alexander Shiyan wrote:
> It seems that even in the current state, Kconfig for i.MX contains an error.
> As a start, we should rename ARCH_MX1ADS to MACH_MX1ADS first.

Last year I admitted that I didn't entirely grasped the differences
between "arch", "platform", and "machine" in the arch/arm universe[1].
Perhaps someone could help me understand why it's better to use
MACH_MX1ADS here.

Paul Bolle


[1] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2013-May/038204.html

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-17 Thread Paul Bolle
On Mon, 2014-02-17 at 08:43 +0400, Alexander Shiyan wrote:
 It seems that even in the current state, Kconfig for i.MX contains an error.
 As a start, we should rename ARCH_MX1ADS to MACH_MX1ADS first.

Last year I admitted that I didn't entirely grasped the differences
between arch, platform, and machine in the arch/arm universe[1].
Perhaps someone could help me understand why it's better to use
MACH_MX1ADS here.

Paul Bolle


[1] 
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2013-May/038204.html

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-17 Thread Sascha Hauer
On Mon, Feb 17, 2014 at 10:02:48AM +0100, Paul Bolle wrote:
 On Mon, 2014-02-17 at 08:43 +0400, Alexander Shiyan wrote:
  It seems that even in the current state, Kconfig for i.MX contains an error.
  As a start, we should rename ARCH_MX1ADS to MACH_MX1ADS first.

No. Have a look at arch/arm/tools/mach-types:

mxlads  MACH_MXLADS MXLADS  1851
mx1ads  ARCH_MX1ADS MX1ADS  160

And what gen-mach-types makes from it:

#ifdef CONFIG_MACH_MXLADS
# ifdef machine_arch_type
#  undef machine_arch_type
#  define machine_arch_type __machine_arch_type
# else
#  define machine_arch_type MACH_TYPE_MXLADS
# endif
# define machine_is_mxlads()(machine_arch_type == MACH_TYPE_MXLADS)
#else
# define machine_is_mxlads()(0)
#endif

#ifdef CONFIG_ARCH_MX1ADS
# ifdef machine_arch_type
#  undef machine_arch_type
#  define machine_arch_type __machine_arch_type
# else
#  define machine_arch_type MACH_TYPE_MX1ADS
# endif
# define machine_is_mx1ads()(machine_arch_type == MACH_TYPE_MX1ADS)
#else
# define machine_is_mx1ads()(0)
#endif

So machine_is_mx1ads() can only ever evaluate to true when
CONFIG_ARCH_MX1ADS is set and machine_is_mxlads() can only evaluate to true
when CONFIG_MACH_MXLADS is set.

Whether to use ARCH or MACH simply depends on what Russell has in the
machine registry database for a given board.

Sascha

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Alexander Shiyan
Воскресенье, 16 февраля 2014, 21:35 +01:00 от Paul Bolle :
> On Sun, 2014-02-16 at 23:21 +0400, Alexander Shiyan wrote:
> > Воскресенье, 16 февраля 2014, 20:12 +01:00 от Paul Bolle
> :
> > > On Sun, 2014-02-16 at 23:06 +0400, Alexander Shiyan wrote:
> > > > Kconfig selects MACH_MXLADS, this enables machine_arch_type
> > > > from include/generated/mach-types.h which used for machine_is_xx()
> macro,
> > > > so if multiple boards is defined in the kernel, this cause to incorrect
> > > matching.
> > > 
> > > But, as I stated in the commit explanation, there are no users of
> > > machine_is_mxlads().
> > 
> > If you have MXLADS and FOO boards support in the kernel (for example)
> > and you want to start MXLADS version, your machine_is_FOO() will be
> positive,
> > since machine_arch_type will be constant value FOO in this case.
> 
> I think it might be helpful - for people trying to understand this
> thread - to add a quote from https://lkml.org/lkml/2013/3/8/473 :
> So, the result is that:
> - de-selected platforms have their if (machine_is_xxx()) { } optimised
> out of the kernel.
> - for a kernel built targetting one platform, all the
> if (machine_is_xxx()) tests are optimised away, leaving only the
> relevant code behind.
> - otherwise, we get the _appropriate_ conditional code for the
> configuration generated.
> 
> Back to the issue at hand: without my patch ARCH_MX1ADS selects
> MACH_MXLADS. So it seems in this case people will have to select
> ARCH_MX1ADS besides selecting FOO. Wouldn't that solve this problem?
> Note that the MACH_MXLADS is now basically meant to be selected by
> ARCH_MX1ADS and not set directly anyway.

It seems that even in the current state, Kconfig for i.MX contains an error.
As a start, we should rename ARCH_MX1ADS to MACH_MX1ADS first.

---


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Paul Bolle
On Sun, 2014-02-16 at 23:21 +0400, Alexander Shiyan wrote:
> Воскресенье, 16 февраля 2014, 20:12 +01:00 от Paul Bolle :
> > On Sun, 2014-02-16 at 23:06 +0400, Alexander Shiyan wrote:
> > > Kconfig selects MACH_MXLADS, this enables machine_arch_type
> > > from include/generated/mach-types.h which used for machine_is_xx() macro,
> > > so if multiple boards is defined in the kernel, this cause to incorrect
> > matching.
> > 
> > But, as I stated in the commit explanation, there are no users of
> > machine_is_mxlads().
> 
> If you have MXLADS and FOO boards support in the kernel (for example)
> and you want to start MXLADS version, your machine_is_FOO() will be positive,
> since machine_arch_type will be constant value FOO in this case.

I think it might be helpful - for people trying to understand this
thread - to add a quote from https://lkml.org/lkml/2013/3/8/473 :
So, the result is that:
- de-selected platforms have their if (machine_is_xxx()) { } optimised
  out of the kernel.
- for a kernel built targetting one platform, all the
  if (machine_is_xxx()) tests are optimised away, leaving only the
  relevant code behind.
- otherwise, we get the _appropriate_ conditional code for the
  configuration generated.

Back to the issue at hand: without my patch ARCH_MX1ADS selects
MACH_MXLADS. So it seems in this case people will have to select
ARCH_MX1ADS besides selecting FOO. Wouldn't that solve this problem?
Note that the MACH_MXLADS is now basically meant to be selected by
ARCH_MX1ADS and not set directly anyway.


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Alexander Shiyan
Воскресенье, 16 февраля 2014, 20:12 +01:00 от Paul Bolle :
> On Sun, 2014-02-16 at 23:06 +0400, Alexander Shiyan wrote:
> > Kconfig selects MACH_MXLADS, this enables machine_arch_type
> > from include/generated/mach-types.h which used for machine_is_xx() macro,
> > so if multiple boards is defined in the kernel, this cause to incorrect
> matching.
> 
> But, as I stated in the commit explanation, there are no users of
> machine_is_mxlads().

If you have MXLADS and FOO boards support in the kernel (for example)
and you want to start MXLADS version, your machine_is_FOO() will be positive,
since machine_arch_type will be constant value FOO in this case.

---


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Paul Bolle
On Sun, 2014-02-16 at 23:06 +0400, Alexander Shiyan wrote:
> Kconfig selects MACH_MXLADS, this enables machine_arch_type
> from include/generated/mach-types.h which used for machine_is_xx() macro,
> so if multiple boards is defined in the kernel, this cause to incorrect 
> matching.

But, as I stated in the commit explanation, there are no users of
machine_is_mxlads().

> Russel, Arnd, fixme.

What does that mean?


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Alexander Shiyan
Воскресенье, 16 февраля 2014, 19:43 +01:00 от Paul Bolle :
> On Sun, 2014-02-16 at 22:16 +0400, Alexander Shiyan wrote:
> > Воскресенье, 16 февраля 2014, 19:03 +01:00 от Paul Bolle
> :
> > > The Kconfig symbol MACH_MXLADS was added in v2.6.29. It has never been
> > > used. Setting it has no effect. There are no calls for
> > > machine_is_mxlads(). This symbol can safely be removed.
> > > 
> > > Signed-off-by: Paul Bolle 
> > 
> > This is used by mach-mx1ads.c
> 
> How is it used?

Kconfig selects MACH_MXLADS, this enables machine_arch_type
from include/generated/mach-types.h which used for machine_is_xx() macro,
so if multiple boards is defined in the kernel, this cause to incorrect 
matching.
Russel, Arnd, fixme.

---
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a���
0��h���i

Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Paul Bolle
On Sun, 2014-02-16 at 22:16 +0400, Alexander Shiyan wrote:
> Воскресенье, 16 февраля 2014, 19:03 +01:00 от Paul Bolle :
> > The Kconfig symbol MACH_MXLADS was added in v2.6.29. It has never been
> > used. Setting it has no effect. There are no calls for
> > machine_is_mxlads(). This symbol can safely be removed.
> > 
> > Signed-off-by: Paul Bolle 
> 
> This is used by mach-mx1ads.c

How is it used?


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Alexander Shiyan
Воскресенье, 16 февраля 2014, 19:03 +01:00 от Paul Bolle :
> The Kconfig symbol MACH_MXLADS was added in v2.6.29. It has never been
> used. Setting it has no effect. There are no calls for
> machine_is_mxlads(). This symbol can safely be removed.
> 
> Signed-off-by: Paul Bolle 

This is used by mach-mx1ads.c

---
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a���
0��h���i

[PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Paul Bolle
The Kconfig symbol MACH_MXLADS was added in v2.6.29. It has never been
used. Setting it has no effect. There are no calls for
machine_is_mxlads(). This symbol can safely be removed.

Signed-off-by: Paul Bolle 
---
Tested with "git grep".

 arch/arm/mach-imx/Kconfig | 4 
 1 file changed, 4 deletions(-)

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 33567aa..f564be8 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -144,14 +144,10 @@ configSOC_IMX51
 if ARCH_MULTI_V4T
 
 comment "MX1 platforms:"
-config MACH_MXLADS
-   bool
-
 config ARCH_MX1ADS
bool "MX1ADS platform"
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
-   select MACH_MXLADS
select SOC_IMX1
help
  Say Y here if you are using Motorola MX1ADS/MXLADS boards
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Paul Bolle
The Kconfig symbol MACH_MXLADS was added in v2.6.29. It has never been
used. Setting it has no effect. There are no calls for
machine_is_mxlads(). This symbol can safely be removed.

Signed-off-by: Paul Bolle pebo...@tiscali.nl
---
Tested with git grep.

 arch/arm/mach-imx/Kconfig | 4 
 1 file changed, 4 deletions(-)

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 33567aa..f564be8 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -144,14 +144,10 @@ configSOC_IMX51
 if ARCH_MULTI_V4T
 
 comment MX1 platforms:
-config MACH_MXLADS
-   bool
-
 config ARCH_MX1ADS
bool MX1ADS platform
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
-   select MACH_MXLADS
select SOC_IMX1
help
  Say Y here if you are using Motorola MX1ADS/MXLADS boards
-- 
1.8.5.3

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Alexander Shiyan
Воскресенье, 16 февраля 2014, 19:03 +01:00 от Paul Bolle pebo...@tiscali.nl:
 The Kconfig symbol MACH_MXLADS was added in v2.6.29. It has never been
 used. Setting it has no effect. There are no calls for
 machine_is_mxlads(). This symbol can safely be removed.
 
 Signed-off-by: Paul Bolle pebo...@tiscali.nl

This is used by mach-mx1ads.c

---
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf��^jǫy�m��@A�a���
0��h���i

Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Paul Bolle
On Sun, 2014-02-16 at 22:16 +0400, Alexander Shiyan wrote:
 Воскресенье, 16 февраля 2014, 19:03 +01:00 от Paul Bolle pebo...@tiscali.nl:
  The Kconfig symbol MACH_MXLADS was added in v2.6.29. It has never been
  used. Setting it has no effect. There are no calls for
  machine_is_mxlads(). This symbol can safely be removed.
  
  Signed-off-by: Paul Bolle pebo...@tiscali.nl
 
 This is used by mach-mx1ads.c

How is it used?


Paul Bolle

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Alexander Shiyan
Воскресенье, 16 февраля 2014, 19:43 +01:00 от Paul Bolle pebo...@tiscali.nl:
 On Sun, 2014-02-16 at 22:16 +0400, Alexander Shiyan wrote:
  Воскресенье, 16 февраля 2014, 19:03 +01:00 от Paul Bolle
 pebo...@tiscali.nl:
   The Kconfig symbol MACH_MXLADS was added in v2.6.29. It has never been
   used. Setting it has no effect. There are no calls for
   machine_is_mxlads(). This symbol can safely be removed.
   
   Signed-off-by: Paul Bolle pebo...@tiscali.nl
  
  This is used by mach-mx1ads.c
 
 How is it used?

Kconfig selects MACH_MXLADS, this enables machine_arch_type
from include/generated/mach-types.h which used for machine_is_xx() macro,
so if multiple boards is defined in the kernel, this cause to incorrect 
matching.
Russel, Arnd, fixme.

---
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf��^jǫy�m��@A�a���
0��h���i

Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Paul Bolle
On Sun, 2014-02-16 at 23:06 +0400, Alexander Shiyan wrote:
 Kconfig selects MACH_MXLADS, this enables machine_arch_type
 from include/generated/mach-types.h which used for machine_is_xx() macro,
 so if multiple boards is defined in the kernel, this cause to incorrect 
 matching.

But, as I stated in the commit explanation, there are no users of
machine_is_mxlads().

 Russel, Arnd, fixme.

What does that mean?


Paul Bolle

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Alexander Shiyan
Воскресенье, 16 февраля 2014, 20:12 +01:00 от Paul Bolle pebo...@tiscali.nl:
 On Sun, 2014-02-16 at 23:06 +0400, Alexander Shiyan wrote:
  Kconfig selects MACH_MXLADS, this enables machine_arch_type
  from include/generated/mach-types.h which used for machine_is_xx() macro,
  so if multiple boards is defined in the kernel, this cause to incorrect
 matching.
 
 But, as I stated in the commit explanation, there are no users of
 machine_is_mxlads().

If you have MXLADS and FOO boards support in the kernel (for example)
and you want to start MXLADS version, your machine_is_FOO() will be positive,
since machine_arch_type will be constant value FOO in this case.

---


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Paul Bolle
On Sun, 2014-02-16 at 23:21 +0400, Alexander Shiyan wrote:
 Воскресенье, 16 февраля 2014, 20:12 +01:00 от Paul Bolle pebo...@tiscali.nl:
  On Sun, 2014-02-16 at 23:06 +0400, Alexander Shiyan wrote:
   Kconfig selects MACH_MXLADS, this enables machine_arch_type
   from include/generated/mach-types.h which used for machine_is_xx() macro,
   so if multiple boards is defined in the kernel, this cause to incorrect
  matching.
  
  But, as I stated in the commit explanation, there are no users of
  machine_is_mxlads().
 
 If you have MXLADS and FOO boards support in the kernel (for example)
 and you want to start MXLADS version, your machine_is_FOO() will be positive,
 since machine_arch_type will be constant value FOO in this case.

I think it might be helpful - for people trying to understand this
thread - to add a quote from https://lkml.org/lkml/2013/3/8/473 :
So, the result is that:
- de-selected platforms have their if (machine_is_xxx()) { } optimised
  out of the kernel.
- for a kernel built targetting one platform, all the
  if (machine_is_xxx()) tests are optimised away, leaving only the
  relevant code behind.
- otherwise, we get the _appropriate_ conditional code for the
  configuration generated.

Back to the issue at hand: without my patch ARCH_MX1ADS selects
MACH_MXLADS. So it seems in this case people will have to select
ARCH_MX1ADS besides selecting FOO. Wouldn't that solve this problem?
Note that the MACH_MXLADS is now basically meant to be selected by
ARCH_MX1ADS and not set directly anyway.


Paul Bolle

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] arm: imx: remove MACH_MXLADS

2014-02-16 Thread Alexander Shiyan
Воскресенье, 16 февраля 2014, 21:35 +01:00 от Paul Bolle pebo...@tiscali.nl:
 On Sun, 2014-02-16 at 23:21 +0400, Alexander Shiyan wrote:
  Воскресенье, 16 февраля 2014, 20:12 +01:00 от Paul Bolle
 pebo...@tiscali.nl:
   On Sun, 2014-02-16 at 23:06 +0400, Alexander Shiyan wrote:
Kconfig selects MACH_MXLADS, this enables machine_arch_type
from include/generated/mach-types.h which used for machine_is_xx()
 macro,
so if multiple boards is defined in the kernel, this cause to incorrect
   matching.
   
   But, as I stated in the commit explanation, there are no users of
   machine_is_mxlads().
  
  If you have MXLADS and FOO boards support in the kernel (for example)
  and you want to start MXLADS version, your machine_is_FOO() will be
 positive,
  since machine_arch_type will be constant value FOO in this case.
 
 I think it might be helpful - for people trying to understand this
 thread - to add a quote from https://lkml.org/lkml/2013/3/8/473 :
 So, the result is that:
 - de-selected platforms have their if (machine_is_xxx()) { } optimised
 out of the kernel.
 - for a kernel built targetting one platform, all the
 if (machine_is_xxx()) tests are optimised away, leaving only the
 relevant code behind.
 - otherwise, we get the _appropriate_ conditional code for the
 configuration generated.
 
 Back to the issue at hand: without my patch ARCH_MX1ADS selects
 MACH_MXLADS. So it seems in this case people will have to select
 ARCH_MX1ADS besides selecting FOO. Wouldn't that solve this problem?
 Note that the MACH_MXLADS is now basically meant to be selected by
 ARCH_MX1ADS and not set directly anyway.

It seems that even in the current state, Kconfig for i.MX contains an error.
As a start, we should rename ARCH_MX1ADS to MACH_MX1ADS first.

---