summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/scmi/smt.c
Commit message (Collapse)AuthorAgeFilesLines
* dm: core: Add address translation in fdt_get_resourcePatrick Delaunay2021-04-291-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Today of_address_to_resource() is called only in ofnode_read_resource() for livetree support and fdt_get_resource() is called when livetree is not supported. The fdt_get_resource() doesn't do the address translation so when it is required, but the address translation is done by ofnode_read_resource() caller, for example in drivers/firmware/scmi/smt.c::scmi_dt_get_smt_buffer() { ... ret = ofnode_read_resource(args.node, 0, &resource); if (ret) return ret; faddr = cpu_to_fdt32(resource.start); paddr = ofnode_translate_address(args.node, &faddr); ... The both behavior should be aligned and the address translation must be called in fdt_get_resource() and removed for each caller. Fixes: a44810123f9e ("dm: core: Add dev_read_resource() to read device resources") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
* scmi: translate the resource only when livetree is not activatedPatrick Delaunay2021-04-121-2/+7
| | | | | | | | | | | | | | | Call the translation function on the ofnode_read_resource result only when the livetree is not activated. Today of_address_to_resource() calls ofnode_read_resource() for livetree support and fdt_get_resource() when livetree is not supported. The fdt_get_resource() doesn't do the address translation so when it is required when livetree is activated but this address translation is already done by ofnode_read_resource(). Fixes: 240720e9052f ("firmware: scmi: mailbox/smt agent device") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
* scmi: correctly configure MMU for SCMI bufferPatrick Delaunay2021-04-121-2/+4
| | | | | | | | | | | | | | 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 <patrick.delaunay@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
* scmi: define LOG_CATEGORYPatrick Delaunay2021-03-111-0/+2
| | | | | | | | Define LOG_CATEGORY to allow filtering with log command. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
* firmware: scmi: Include device_compat.hSean Anderson2020-10-151-0/+1
| | | | | | | This header is necessary for the dev_xxx macros. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* firmware: scmi: mailbox/smt agent deviceEtienne Carriere2020-09-301-0/+139
This change implements a mailbox transport using SMT format for SCMI exchanges. This implementation follows the Linux kernel and SCP-firmware [1] as references implementation for SCMI message processing using SMT format for communication channel meta-data. Use of mailboxes in SCMI FDT bindings are defined in the Linux kernel DT bindings since v4.17. Links: [1] https://github.com/ARM-software/SCP-firmware Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Cc: Simon Glass <sjg@chromium.org> Cc: Peng Fan <peng.fan@nxp.com> Cc: Sudeep Holla <sudeep.holla@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>