diff options
author | Tom Rini <trini@konsulko.com> | 2021-04-13 09:50:45 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-13 09:50:45 -0400 |
commit | a94ab561e2f49a80d8579930e840b810ab1a1330 (patch) | |
tree | 77913e7bd9309afa6b2ddc6f3e3e49827da2025c /drivers/firmware/scmi/smt.c | |
parent | 3b676a1662ac6b54d1e97ea40a0c41ee0925ffe3 (diff) | |
parent | 8c4e3b79bd0bb76eea16869e9666e19047c0d005 (diff) |
Merge branch '2021-04-13-assorted-improvements'
- A large assortment of bug fixes, code cleanups and a few feature
enhancements.
Diffstat (limited to 'drivers/firmware/scmi/smt.c')
-rw-r--r-- | drivers/firmware/scmi/smt.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/firmware/scmi/smt.c b/drivers/firmware/scmi/smt.c index 60b9d499b79..f1915c00741 100644 --- a/drivers/firmware/scmi/smt.c +++ b/drivers/firmware/scmi/smt.c @@ -41,8 +41,13 @@ int scmi_dt_get_smt_buffer(struct udevice *dev, struct scmi_smt *smt) if (ret) return ret; - faddr = cpu_to_fdt32(resource.start); - paddr = ofnode_translate_address(args.node, &faddr); + /* TEMP workaround for ofnode_read_resource translation issue */ + if (of_live_active()) { + paddr = resource.start; + } else { + faddr = cpu_to_fdt32(resource.start); + paddr = ofnode_translate_address(args.node, &faddr); + } smt->size = resource_size(&resource); if (smt->size < sizeof(struct scmi_smt_header)) { @@ -56,8 +61,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; |