mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-10 11:17:18 +01:00
Merge "ipq: Add entries to expose SoC version details"
This commit is contained in:
commit
cb09b1a3b7
1 changed files with 19 additions and 0 deletions
|
|
@ -225,6 +225,19 @@ int get_current_flash_type(uint32_t *flash_type)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int get_soc_version(uint32_t *soc_ver_major, uint32_t *soc_ver_minor)
|
||||
{
|
||||
int ret;
|
||||
uint32_t soc_version;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
void get_kernel_fs_part_details(void)
|
||||
{
|
||||
int ret, i;
|
||||
|
|
@ -310,6 +323,7 @@ int board_late_init(void)
|
|||
{
|
||||
unsigned int machid;
|
||||
uint32_t flash_type;
|
||||
uint32_t soc_ver_major, soc_ver_minor;
|
||||
int ret;
|
||||
|
||||
qca_smem_flash_info_t *sfi = &qca_smem_flash_info;
|
||||
|
|
@ -331,6 +345,11 @@ int board_late_init(void)
|
|||
if (!ret)
|
||||
setenv_ulong("flash_type", (unsigned long)flash_type);
|
||||
|
||||
ret = get_soc_version(&soc_ver_major, &soc_ver_minor);
|
||||
if (!ret) {
|
||||
setenv_ulong("soc_version_major", (unsigned long)soc_ver_major);
|
||||
setenv_ulong("soc_version_minor", (unsigned long)soc_ver_minor);
|
||||
}
|
||||
#ifdef CONFIG_FLASH_PROTECT
|
||||
board_flash_protect();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue