From: Patrick Delaunay Date: Tue, 16 Mar 2021 08:29:40 +0000 (+0100) Subject: scmi: correctly configure MMU for SCMI buffer X-Git-Tag: v2025.01-rc5-pxa1908~1923^2~8 X-Git-Url: http://git.dujemihanovic.xyz/html/static/%7B%7B%20.Permalink%20%7D%7D?a=commitdiff_plain;h=2a3f161c8b16ed4fe4bd215dddfa21f4ddbd3e37;p=u-boot.git scmi: correctly configure MMU for SCMI buffer Align the MMU area for SCMI shared buffer on section size; use the ALIGN macro in mmu_set_region_dcache_behaviour call. Since commit d877f8fd0f09 ("arm: provide a function for boards init code to modify MMU virtual-physical map") the parameter of mmu_set_region_dcache_behaviour need to be MMU_SECTION_SIZE aligned. Fixes: 240720e9052f ("firmware: scmi: mailbox/smt agent device") Signed-off-by: Patrick Delaunay Reviewed-by: Etienne Carriere --- diff --git a/drivers/firmware/scmi/smt.c b/drivers/firmware/scmi/smt.c index 60b9d499b7..4954355c1a 100644 --- a/drivers/firmware/scmi/smt.c +++ b/drivers/firmware/scmi/smt.c @@ -56,8 +56,10 @@ int scmi_dt_get_smt_buffer(struct udevice *dev, struct scmi_smt *smt) #ifdef CONFIG_ARM if (dcache_status()) - mmu_set_region_dcache_behaviour((uintptr_t)smt->buf, - smt->size, DCACHE_OFF); + mmu_set_region_dcache_behaviour(ALIGN_DOWN((uintptr_t)smt->buf, MMU_SECTION_SIZE), + ALIGN(smt->size, MMU_SECTION_SIZE), + DCACHE_OFF); + #endif return 0;