Re: [v7 1/4] remoteproc: qcom: wcss: populate hardcoded param using driver data

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

 



Quoting Gokul Sriram Palanisamy (2020-07-03 01:58:39)
> From: Govind Singh <govinds@xxxxxxxxxxxxxx>
> 
> Q6 based WiFi fw loading is supported across
> different targets, ex: IPQ8074/QCS404. In order to
> support different fw names/pas id etc, populate
> hardcoded param using driver data.
> 
> Signed-off-by: Govind Singh <govinds@xxxxxxxxxxxxxx>
> [rebased on top of 5.8-rc3]

This tag is not really useful and doesn't follow the style of having
your email prefix the text. I'd expect to see

[gokulsri@xxxxxxxxxxxxxx: made some sort of change]

> Signed-off-by: Gokul Sriram Palanisamy <gokulsri@xxxxxxxxxxxxxx>
> ---
>  drivers/remoteproc/qcom_q6v5_wcss.c | 31 ++++++++++++++++++++++++++-----
>  1 file changed, 26 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
> index 88c76b9..abc5f9d 100644
> --- a/drivers/remoteproc/qcom_q6v5_wcss.c
> +++ b/drivers/remoteproc/qcom_q6v5_wcss.c
> @@ -70,6 +71,11 @@
>  #define TCSR_WCSS_CLK_MASK     0x1F
>  #define TCSR_WCSS_CLK_ENABLE   0x14
>  
> +struct wcss_data {
> +       const char *firmware_name;
> +       int crash_reason_smem;

Is it signed for some reason?

> +};
> +
>  struct q6v5_wcss {
>         struct device *dev;
>  
> @@ -92,6 +98,8 @@ struct q6v5_wcss {
>         void *mem_region;
>         size_t mem_size;
>  
> +       int crash_reason_smem;
> +

Same question, why not unsigned?

>         struct qcom_rproc_glink glink_subdev;
>         struct qcom_rproc_ssr ssr_subdev;
>  };
> @@ -430,7 +438,7 @@ static int q6v5_wcss_load(struct rproc *rproc, const struct firmware *fw)
>                                      wcss->mem_size, &wcss->mem_reloc);
>  }
>  
> -static const struct rproc_ops q6v5_wcss_ops = {
> +static const struct rproc_ops q6v5_wcss_ipq8074_ops = {
>         .start = q6v5_wcss_start,
>         .stop = q6v5_wcss_stop,
>         .da_to_va = q6v5_wcss_da_to_va,
> @@ -530,12 +538,17 @@ static int q6v5_alloc_memory_region(struct q6v5_wcss *wcss)
>  
>  static int q6v5_wcss_probe(struct platform_device *pdev)
>  {
> +       const struct wcss_data *desc;
>         struct q6v5_wcss *wcss;
>         struct rproc *rproc;
>         int ret;
>  
> -       rproc = rproc_alloc(&pdev->dev, pdev->name, &q6v5_wcss_ops,
> -                           "IPQ8074/q6_fw.mdt", sizeof(*wcss));
> +       desc = of_device_get_match_data(&pdev->dev);

Use device_get_match_data() and drop the of_device.h include.

> +       if (!desc)
> +               return -EINVAL;
> +
> +       rproc = rproc_alloc(&pdev->dev, pdev->name, &q6v5_wcss_ipq8074_ops,
> +                           desc->firmware_name, sizeof(*wcss));
>         if (!rproc) {
>                 dev_err(&pdev->dev, "failed to allocate rproc\n");
>                 return -ENOMEM;
> @@ -587,8 +602,14 @@ static int q6v5_wcss_remove(struct platform_device *pdev)
>         return 0;
>  }
>  
> +static const struct wcss_data wcss_ipq8074_res_init = {
> +       .firmware_name = "IPQ8074/q6_fw.mdt",
> +       .crash_reason_smem = WCSS_CRASH_REASON,
> +};
> +
>  static const struct of_device_id q6v5_wcss_of_match[] = {
> -       { .compatible = "qcom,ipq8074-wcss-pil" },
> +       { .compatible = "qcom,ipq8074-wcss-pil", .data = &wcss_ipq8074_res_init },
> +

Please remove this extra newline.

>         { },
>  };
>  MODULE_DEVICE_TABLE(of, q6v5_wcss_of_match);




[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