summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2014-10-17 18:17:57 +0200
committerStefan Agner <stefan.agner@toradex.com>2014-10-23 11:11:04 +0200
commitf15dd8504d76343a1069706558abf954d9e4521d (patch)
treeb0249578b9ceadeb8093250a182533141f5e4159
parent403da198cd8c6e6874c614d0affc404c0c05751f (diff)
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.
-rw-r--r--arch/arm/cpu/armv7/vf610/generic.c14
1 files changed, 14 insertions, 0 deletions
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;