Re: [PATCH v3 5/7] remoteproc: qcom: wcss: populate hardcoded param using driver data

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

 



Quoting Govind Singh (2018-12-15 02:35:55)
> diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
> index f93e1e4a1cc0..129f82404656 100644
> --- a/drivers/remoteproc/qcom_q6v5_wcss.c
> +++ b/drivers/remoteproc/qcom_q6v5_wcss.c
> @@ -16,7 +17,6 @@
>  #include "qcom_common.h"
>  #include "qcom_q6v5.h"
>  
> -#define WCSS_CRASH_REASON              421
>  
>  /* Q6SS Register Offsets */
>  #define Q6SS_RESET_REG         0x014
> @@ -70,6 +70,14 @@
>  #define TCSR_WCSS_CLK_MASK     0x1F
>  #define TCSR_WCSS_CLK_ENABLE   0x14
>  
> +struct wcss_data {
> +       void (*pas_handover)(struct qcom_q6v5 *q6v5);
> +       const char *firmware_name;
> +       int crash_reason_smem;
> +       int version;

version can be negative?

> +       int pas_id;

And the pas_id can be negative too?

> +};
> +
>  struct q6v5_wcss {
>         struct device *dev;
>  
> @@ -553,7 +573,8 @@ static int q6v5_wcss_probe(struct platform_device *pdev)
>         if (ret)
>                 goto free_rproc;
>  
> -       ret = qcom_q6v5_init(&wcss->q6v5, pdev, rproc, WCSS_CRASH_REASON, NULL);
> +       ret = qcom_q6v5_init(&wcss->q6v5, pdev, rproc, desc->crash_reason_smem,
> +                            desc->pas_handover);
>         if (ret)
>                 goto free_rproc;
>  
> @@ -581,8 +602,15 @@ 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 = 421,

Why destroy the #define and inline it here? Keep the define around and
use it here instead?

> +       .pas_handover = NULL,

This surely isn't needed to be assigned to NULL.





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux