mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 06:43:09 +00:00
firmware: qcom: scm: add support for SHM bridge memory carveout
Parse the "memory-region" property and - if present - use it to assign the dedicated reserved memory to the underlying DMA callbacks which will then allocate memory for the SCM calls from it. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Elliot Berman <quic_eberman@quicinc.com> Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-12-ce7afaa58d3a@linaro.org Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
parent
f86c61498a
commit
a33b2579c8
@ -23,6 +23,7 @@
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/of_reserved_mem.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/reset-controller.h>
|
||||
#include <linux/sizes.h>
|
||||
@ -1956,6 +1957,11 @@ static int qcom_scm_probe(struct platform_device *pdev)
|
||||
if (of_property_read_bool(pdev->dev.of_node, "qcom,sdi-enabled"))
|
||||
qcom_scm_disable_sdi();
|
||||
|
||||
ret = of_reserved_mem_device_init(__scm->dev);
|
||||
if (ret && ret != -ENODEV)
|
||||
return dev_err_probe(__scm->dev, ret,
|
||||
"Failed to setup the reserved memory region for TZ mem\n");
|
||||
|
||||
ret = qcom_tzmem_enable(__scm->dev);
|
||||
if (ret)
|
||||
return dev_err_probe(__scm->dev, ret,
|
||||
|
Loading…
Reference in New Issue
Block a user