From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gary Bisson Date: Wed, 11 Apr 2018 17:46:24 +0200 Subject: [U-Boot] [PATCH V3 1/3] imx6: Define 'soc' env var for imx6 SoC In-Reply-To: <20180411103850.13539-2-guillaume.gardet@free.fr> References: <20180409063941.7754-1-guillaume.gardet@free.fr> <20180411103850.13539-1-guillaume.gardet@free.fr> <20180411103850.13539-2-guillaume.gardet@free.fr> Message-ID: <20180411154624.GA22735@t450s.lan> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Guillaume, On Wed, Apr 11, 2018 at 12:38:48PM +0200, Guillaume GARDET wrote: > Signed-off-by: Guillaume GARDET > Cc: Troy Kisky > Cc: Stefano Babic > Cc: Fabio Estevam > Cc: Gary Bisson > > --- > arch/arm/mach-imx/mx6/soc.c | 34 ++++++++++++++++++++++++++++++++++ > 1 file changed, 34 insertions(+) > > diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c > index 9b3d8f69b2..c4cb752c76 100644 > --- a/arch/arm/mach-imx/mx6/soc.c > +++ b/arch/arm/mach-imx/mx6/soc.c > @@ -446,6 +446,40 @@ int arch_cpu_init(void) > return 0; > } > > + #ifdef CONFIG_ARCH_MISC_INIT > + int arch_misc_init(void) > + { > + #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG > + if (is_cpu_type(MXC_CPU_MX6QP)) > + env_set("soc", "imx6qp"); > + else if (is_cpu_type(MXC_CPU_MX6Q)) > + env_set("soc", "imx6q"); > + else if (is_cpu_type(MXC_CPU_MX6DP)) > + env_set("soc", "imx6dp"); If we want that soc variable to be used for dtb names, then the above won't work. A i.MX6DP platform has its dtb named imx6qp-board.dtb. > + else if (is_cpu_type(MXC_CPU_MX6D)) > + env_set("soc", "imx6d"); Same here, a Dual CPU actually uses a imx6q-board.dtb. > + else if (is_mx6dl( )) > + env_set("soc", "imx6dl"); > + else if (is_mx6sx( )) > + env_set("soc", "imx6sx"); > + else if (is_mx6sl( )) > + env_set("soc", "imx6sl"); > + else if (is_mx6solo( )) > + env_set("soc", "imx6solo"); Same here, a Solo CPU uses a imx6dl-board.dtb. > + else if (is_mx6ul( )) > + env_set("soc", "imx6ul"); > + else if (is_mx6ull( )) > + env_set("soc", "imx6ull"); > + else if (is_mx6sll( )) > + env_set("soc", "imx6sll"); > + else > + env_set("soc", "imx6"); In that case we most likely miss a CPU definition, maybe "unknown" would be more explicit? Regards, Gary