From 08f242df8b7c7e65aab858991a1fcda3b66e968f Mon Sep 17 00:00:00 2001 From: Sarat Chand Savitala Date: Tue, 20 Oct 2015 14:07:50 +0530 Subject: [PATCH] sw_apps:zynqmp_fsbl: Skip power-up requests for QEMU QEMU doesn't model PMU in signle arch. Since, in FSBL, it couldn't be determined if QEMU is of single or multi arch, for now skipping power-up request for both cases. Signed-off-by: Sarat Chand Savitala Acked-by: Krishna Chaitanya Patakamuri --- lib/sw_apps/zynqmp_fsbl/src/xfsbl_misc.c | 36 +++++++++++++----------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_misc.c b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_misc.c index ec55ac9e..15084148 100644 --- a/lib/sw_apps/zynqmp_fsbl/src/xfsbl_misc.c +++ b/lib/sw_apps/zynqmp_fsbl/src/xfsbl_misc.c @@ -517,23 +517,27 @@ u32 XFsbl_PowerUpIsland(u32 PwrIslandMask) u32 RegVal; u32 Status = XFSBL_SUCCESS; - /* There is a single island for both R5_0 and R5_1 */ - if ((PwrIslandMask & PMU_GLOBAL_PWR_STATE_R5_1_MASK) == - PMU_GLOBAL_PWR_STATE_R5_1_MASK) { - PwrIslandMask &= ~(PMU_GLOBAL_PWR_STATE_R5_1_MASK); - PwrIslandMask |= PMU_GLOBAL_PWR_STATE_R5_0_MASK; + /* Skip power-up request for QEMU */ + if (XFSBL_PLATFORM != XFSBL_PLATFORM_QEMU) + { + /* There is a single island for both R5_0 and R5_1 */ + if ((PwrIslandMask & PMU_GLOBAL_PWR_STATE_R5_1_MASK) == + PMU_GLOBAL_PWR_STATE_R5_1_MASK) { + PwrIslandMask &= ~(PMU_GLOBAL_PWR_STATE_R5_1_MASK); + PwrIslandMask |= PMU_GLOBAL_PWR_STATE_R5_0_MASK; + } + + /* Power up request enable */ + XFsbl_Out32(PMU_GLOBAL_REQ_PWRUP_INT_EN, PwrIslandMask); + + /* Trigger power up request */ + XFsbl_Out32(PMU_GLOBAL_REQ_PWRUP_TRIG, PwrIslandMask); + + /* Poll for Power up complete */ + do { + RegVal = XFsbl_In32(PMU_GLOBAL_REQ_PWRUP_STATUS) & PwrIslandMask; + } while (RegVal != 0x0U); } - /* Power up request enable */ - XFsbl_Out32(PMU_GLOBAL_REQ_PWRUP_INT_EN, PwrIslandMask); - - /* Trigger power up request */ - XFsbl_Out32(PMU_GLOBAL_REQ_PWRUP_TRIG, PwrIslandMask); - - /* Poll for Power up complete */ - do { - RegVal = XFsbl_In32(PMU_GLOBAL_REQ_PWRUP_STATUS) & PwrIslandMask; - } while (RegVal != 0x0U); - return Status; }