Merge "ipq807x: Adding SOC version to default env."

This commit is contained in:
Linux Build Service Account 2018-11-09 23:04:30 -08:00 committed by Gerrit - the friendly Code Review server
commit cfccc0b8a7
2 changed files with 23 additions and 0 deletions

View file

@ -1440,3 +1440,19 @@ void run_tzt(void *address)
{
execute_tzt(address);
}
void set_platform_specific_default_env(void)
{
uint32_t soc_ver_major, soc_ver_minor, soc_version;
int ret;
ret = ipq_smem_get_socinfo_version((uint32_t *)&soc_version);
if (!ret) {
soc_ver_major = SOCINFO_VERSION_MAJOR(soc_version);
soc_ver_minor = SOCINFO_VERSION_MINOR(soc_version);
setenv_ulong("soc_version_major", (unsigned long)soc_ver_major);
setenv_ulong("soc_version_minor", (unsigned long)soc_ver_minor);
}
return;
}

View file

@ -95,6 +95,11 @@ char *getenv_default(const char *name)
return ret_val;
}
__weak void set_platform_specific_default_env(void)
{
return;
}
void set_default_env(const char *s)
{
int flags = 0;
@ -122,6 +127,8 @@ void set_default_env(const char *s)
0, NULL) == 0)
error("Environment import failed: errno = %d\n", errno);
set_platform_specific_default_env();
gd->flags |= GD_FLG_ENV_READY;
}