Re: [PATCH v10 12/15] firmware: qcom: scm: add support for SHM bridge memory carveout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 27, 2024 at 02:55:02PM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>

Reviewed-by: Elliot Berman <quic_eberman@xxxxxxxxxxx>

> ---
>  drivers/firmware/qcom/qcom_scm.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
> index 94c34cde8179..c82957727650 100644
> --- a/drivers/firmware/qcom/qcom_scm.c
> +++ b/drivers/firmware/qcom/qcom_scm.c
> @@ -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>
> @@ -1942,6 +1943,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,
> 
> -- 
> 2.43.0
> 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux