mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2025-12-10 07:44:53 +01:00
ipq807x: Adding SOC version to default env.
Adding soc_version_major and soc_version_minor to the default environment. Change-Id: I38ee6dd228382111beaa2bdacfade1e3d2c989de Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
This commit is contained in:
parent
9ad98fee86
commit
8438ea4b9b
2 changed files with 23 additions and 0 deletions
|
|
@ -1317,3 +1317,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue