RE: [PATCH] arm/dt: Add SoC detection macros

2011-09-19 Thread Allen Martin
What I'm saying is that in that scenario it should not be necessary to edit the kernel to invent new SoC types, and then teach it that Tegra4 is mostly the same as Tegra3. That information should all be encoded into the DT rather than the C code in the kernel. So, I think adding this SoC

Re: [PATCH] arm/dt: Add SoC detection macros

2011-09-18 Thread Jean-Christophe PLAGNIOL-VILLARD
On 22:56 Sat 17 Sep , Arnd Bergmann wrote: On Saturday 17 September 2011 20:19:07 Jean-Christophe PLAGNIOL-VILLARD wrote: I agree about it I just mean that if you have the same board with 2 SoC which are pin to pin compatible detect the soc type will be usefull as the soc resource

Re: [PATCH] arm/dt: Add SoC detection macros

2011-09-18 Thread Arnd Bergmann
On Sunday 18 September 2011 02:46:15 Jean-Christophe PLAGNIOL-VILLARD wrote: On 22:56 Sat 17 Sep , Arnd Bergmann wrote: On Saturday 17 September 2011 20:19:07 Jean-Christophe PLAGNIOL-VILLARD wrote: I agree about it I just mean that if you have the same board with 2 SoC which

Re: [PATCH] arm/dt: Add SoC detection macros

2011-09-17 Thread Russell King - ARM Linux
On Fri, Sep 09, 2011 at 01:02:19AM -0700, Allen Martin wrote: +#ifdef CONFIG_ARCH_TEGRA_2x_SOC +# ifdef SOC_NAME +# undef MULTI_SOC +# define MULTI_SOC +# else +# define SOC_NAME tegra2 +# endif +#endif +#ifdef CONFIG_ARCH_TEGRA_3x_SOC +# ifdef SOC_NAME +# undef MULTI_SOC +#

Re: [PATCH] arm/dt: Add SoC detection macros

2011-09-17 Thread Russell King - ARM Linux
On Sat, Sep 17, 2011 at 12:34:57PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: On 11:28 Sat 17 Sep , Russell King - ARM Linux wrote: One last point to raise here is - and it's quite a fundamental one - do we really want this? If we're making decisions based on the SoC type, that

Re: [PATCH] arm/dt: Add SoC detection macros

2011-09-17 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:28 Sat 17 Sep , Russell King - ARM Linux wrote: On Fri, Sep 09, 2011 at 01:02:19AM -0700, Allen Martin wrote: +#ifdef CONFIG_ARCH_TEGRA_2x_SOC +# ifdef SOC_NAME +# undef MULTI_SOC +# define MULTI_SOC +# else +# define SOC_NAME tegra2 +# endif +#endif +#ifdef

Re: [PATCH] arm/dt: Add SoC detection macros

2011-09-17 Thread Arnd Bergmann
On Saturday 17 September 2011 20:19:07 Jean-Christophe PLAGNIOL-VILLARD wrote: I agree about it I just mean that if you have the same board with 2 SoC which are pin to pin compatible detect the soc type will be usefull as the soc resource may not be the same In that scenario, you would put

[PATCH] arm/dt: Add SoC detection macros

2011-09-09 Thread Allen Martin
These macros allow runtime query of SoC family and version via soc_is_*() If the corresponding SoC is not configured the macro will evaluate to 0. If the corresponding SoC is the only architecure configured, the macro will evaluate to 1. If multiple architecures are configured the macro will

Re: [PATCH] arm/dt: Add SoC detection macros

2011-09-09 Thread Olof Johansson
On Fri, Sep 9, 2011 at 1:02 AM, Allen Martin amar...@nvidia.com wrote: These macros allow runtime query of SoC family and version via soc_is_*()  If the corresponding SoC is not configured the macro will evaluate to 0.  If the corresponding SoC is the only architecure configured, the macro