diff options
author | Manish Pandey <manish.pandey2@arm.com> | 2021-11-18 15:25:14 +0100 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2021-11-18 15:25:14 +0100 |
commit | 7300434afc4d88e920aeac460b17fa2277a61e6b (patch) | |
tree | 9e07b5c93c3f3d57ea1cab6239c4e3fbf729b294 | |
parent | b3e2b6e715fe72dbbe6c8c817a04c13ac21e1d25 (diff) | |
parent | 7f322f228e76caa5480f827af0aa6751f00fc1c4 (diff) | |
download | arm-trusted-firmware-7300434afc4d88e920aeac460b17fa2277a61e6b.tar.gz |
Merge "fix(drivers/gic600ae_fmu): fix timeout calculation" into integration
-rw-r--r-- | drivers/arm/gic/v3/gic600ae_fmu_helpers.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/arm/gic/v3/gic600ae_fmu_helpers.c b/drivers/arm/gic/v3/gic600ae_fmu_helpers.c index 84f72925c..4aa0efb32 100644 --- a/drivers/arm/gic/v3/gic600ae_fmu_helpers.c +++ b/drivers/arm/gic/v3/gic600ae_fmu_helpers.c @@ -46,17 +46,20 @@ /* Helper function to wait until FMU is ready to accept the next command */ static void wait_until_fmu_is_idle(uintptr_t base) { - uint64_t timeout_ref = timeout_init_us(GICFMU_IDLE_TIMEOUT_US); + uint32_t timeout_count = GICFMU_IDLE_TIMEOUT_US; uint64_t status; /* wait until status is 'busy' */ do { status = (gic_fmu_read_status(base) & BIT(0)); - if (timeout_elapsed(timeout_ref)) { + if (timeout_count-- == 0U) { ERROR("GIC600 AE FMU is not responding\n"); panic(); } + + udelay(1U); + } while (status == U(0)); } |