Merge "ipq: Add entries to expose SoC version details"

This commit is contained in:
Linux Build Service Account 2018-09-01 15:03:01 -07:00 committed by Gerrit - the friendly Code Review server
commit cb09b1a3b7

View file

@ -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