From f15dd8504d76343a1069706558abf954d9e4521d Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 17 Oct 2014 18:17:57 +0200 Subject: arm: vf610: add SoC detection Vybrid product family consists of several rather similar SoC which can be determined by softare during boot time. This allows to use the variable ${soc} for Linux device tree files. --- arch/arm/cpu/armv7/vf610/generic.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c index 414cf17a23..f586d064fd 100644 --- a/arch/arm/cpu/armv7/vf610/generic.c +++ b/arch/arm/cpu/armv7/vf610/generic.c @@ -295,6 +295,20 @@ int print_cpuinfo(void) } #endif +#ifdef CONFIG_ARCH_MISC_INIT +int arch_misc_init(void) +{ + struct mscm *mscm = (struct mscm *)MSCM_BASE_ADDR; + char soc[6]; + + snprintf(soc, ARRAY_SIZE(info), "vf%c%c0", mscm->cpxcount ? '6' : '5', + mscm->cpxcfg1 ? '1' : '0'); + setenv("soc", soc); + + return 0; +} +#endif + int cpu_eth_init(bd_t *bis) { int rc = -ENODEV; -- cgit v1.2.3