Commit 0435ba64 authored by Siva Durga Prasad Paladugu's avatar Siva Durga Prasad Paladugu
Browse files

plat: xilinx: zynqmp: Get chipid from registers for BL32



This patch reads the chipid registers directly instead of making
pm call when running at BL32. User should ensure that these registers
should always be accessed from APU in their system configuration.
Signed-off-by: default avatarSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
parent d37442f7
...@@ -205,12 +205,21 @@ static char *zynqmp_get_silicon_idcode_name(void) ...@@ -205,12 +205,21 @@ static char *zynqmp_get_silicon_idcode_name(void)
{ {
uint32_t id, ver, chipid[2]; uint32_t id, ver, chipid[2];
size_t i, j, len; size_t i, j, len;
enum pm_ret_status ret;
const char *name = "EG/EV"; const char *name = "EG/EV";
ret = pm_get_chipid(chipid); #ifdef IMAGE_BL32
if (ret) /*
* For BL32, get the chip id info directly by reading corresponding
* registers instead of making pm call. This has limitation
* that these registers should be configured to have access
* from APU which is default case.
*/
chipid[0] = mmio_read_32(ZYNQMP_CSU_BASEADDR + ZYNQMP_CSU_IDCODE_OFFSET);
chipid[1] = mmio_read_32(EFUSE_BASEADDR + EFUSE_IPDISABLE_OFFSET);
#else
if (pm_get_chipid(chipid) != PM_RET_SUCCESS)
return "UNKN"; return "UNKN";
#endif
id = chipid[0] & (ZYNQMP_CSU_IDCODE_DEVICE_CODE_MASK | id = chipid[0] & (ZYNQMP_CSU_IDCODE_DEVICE_CODE_MASK |
ZYNQMP_CSU_IDCODE_SVD_MASK); ZYNQMP_CSU_IDCODE_SVD_MASK);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment