diff options
author | Peng Fan <peng.fan@nxp.com> | 2025-09-27 00:06:18 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-10-09 14:16:11 -0600 |
commit | b2ae10970d40a26e955d6f763cda77948d8b4f7e (patch) | |
tree | c14678fbfbd105dc82bfae574a5e571ac5440598 | |
parent | eb7469eb1a32a02d024da254d34912c3fe741c7f (diff) |
firmware: scmi: use PAGE_SIZE alignment for ARM64
For ARMv7, the alignment could be SECTION size. But for ARM64, use
PAGE_SIZE.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
-rw-r--r-- | drivers/firmware/scmi/smt.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/firmware/scmi/smt.c b/drivers/firmware/scmi/smt.c index 5eb78387344..237871559f0 100644 --- a/drivers/firmware/scmi/smt.c +++ b/drivers/firmware/scmi/smt.c @@ -62,11 +62,17 @@ int scmi_dt_get_smt_buffer(struct udevice *dev, struct scmi_smt *smt) scmi_smt_enable_intr(smt, true); #ifdef CONFIG_ARM - if (dcache_status()) - mmu_set_region_dcache_behaviour(ALIGN_DOWN((uintptr_t)smt->buf, MMU_SECTION_SIZE), - ALIGN(smt->size, MMU_SECTION_SIZE), - DCACHE_OFF); + if (dcache_status()) { + u32 align_size; + if (IS_ENABLED(CONFIG_ARM64)) + align_size = PAGE_SIZE; + else + align_size = MMU_SECTION_SIZE; + + mmu_set_region_dcache_behaviour(ALIGN_DOWN((uintptr_t)smt->buf, align_size), + ALIGN(smt->size, align_size), DCACHE_OFF); + } #endif return 0; |