All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading
@ 2019-12-26  6:52 ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2019-12-26  6:52 UTC (permalink / raw)
  To: rjw, viresh.kumar, shawnguo, s.hauer, kernel, festevam, linux-pm,
	linux-kernel, linux-arm-kernel
  Cc: Linux-imx

Add i.MX8MP to blacklist, so that imx-cpufreq-dt driver can handle
speed grading bits just like other i.MX8M SoCs.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index f1d170d..a2e5f3a 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -109,6 +109,7 @@ static const struct of_device_id blacklist[] __initconst = {
 	{ .compatible = "fsl,imx8mq", },
 	{ .compatible = "fsl,imx8mm", },
 	{ .compatible = "fsl,imx8mn", },
+	{ .compatible = "fsl,imx8mp", },
 
 	{ .compatible = "marvell,armadaxp", },
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 1/2] cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading
@ 2019-12-26  6:52 ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2019-12-26  6:52 UTC (permalink / raw)
  To: rjw, viresh.kumar, shawnguo, s.hauer, kernel, festevam, linux-pm,
	linux-kernel, linux-arm-kernel
  Cc: Linux-imx

Add i.MX8MP to blacklist, so that imx-cpufreq-dt driver can handle
speed grading bits just like other i.MX8M SoCs.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index f1d170d..a2e5f3a 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -109,6 +109,7 @@ static const struct of_device_id blacklist[] __initconst = {
 	{ .compatible = "fsl,imx8mq", },
 	{ .compatible = "fsl,imx8mm", },
 	{ .compatible = "fsl,imx8mn", },
+	{ .compatible = "fsl,imx8mp", },
 
 	{ .compatible = "marvell,armadaxp", },
 
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] cpufreq: imx-cpufreq-dt: Add i.MX8MP support
  2019-12-26  6:52 ` Anson Huang
@ 2019-12-26  6:52   ` Anson Huang
  -1 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2019-12-26  6:52 UTC (permalink / raw)
  To: rjw, viresh.kumar, shawnguo, s.hauer, kernel, festevam, linux-pm,
	linux-kernel, linux-arm-kernel
  Cc: Linux-imx

Add i.MX8MP cpufreq DT support for speed grading and market
segment check.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/cpufreq/imx-cpufreq-dt.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/imx-cpufreq-dt.c b/drivers/cpufreq/imx-cpufreq-dt.c
index 85a6efd..912e93d 100644
--- a/drivers/cpufreq/imx-cpufreq-dt.c
+++ b/drivers/cpufreq/imx-cpufreq-dt.c
@@ -35,7 +35,7 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	if (of_machine_is_compatible("fsl,imx8mn"))
+	if (of_machine_is_compatible("fsl,imx8mn") || of_machine_is_compatible("fsl,imx8mp"))
 		speed_grade = (cell_value & IMX8MN_OCOTP_CFG3_SPEED_GRADE_MASK)
 			      >> OCOTP_CFG3_SPEED_GRADE_SHIFT;
 	else
@@ -54,7 +54,8 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
 		if (of_machine_is_compatible("fsl,imx8mm") ||
 		    of_machine_is_compatible("fsl,imx8mq"))
 			speed_grade = 1;
-		if (of_machine_is_compatible("fsl,imx8mn"))
+		if (of_machine_is_compatible("fsl,imx8mn") ||
+			of_machine_is_compatible("fsl,imx8mp"))
 			speed_grade = 0xb;
 	}
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] cpufreq: imx-cpufreq-dt: Add i.MX8MP support
@ 2019-12-26  6:52   ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2019-12-26  6:52 UTC (permalink / raw)
  To: rjw, viresh.kumar, shawnguo, s.hauer, kernel, festevam, linux-pm,
	linux-kernel, linux-arm-kernel
  Cc: Linux-imx

Add i.MX8MP cpufreq DT support for speed grading and market
segment check.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/cpufreq/imx-cpufreq-dt.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/imx-cpufreq-dt.c b/drivers/cpufreq/imx-cpufreq-dt.c
index 85a6efd..912e93d 100644
--- a/drivers/cpufreq/imx-cpufreq-dt.c
+++ b/drivers/cpufreq/imx-cpufreq-dt.c
@@ -35,7 +35,7 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	if (of_machine_is_compatible("fsl,imx8mn"))
+	if (of_machine_is_compatible("fsl,imx8mn") || of_machine_is_compatible("fsl,imx8mp"))
 		speed_grade = (cell_value & IMX8MN_OCOTP_CFG3_SPEED_GRADE_MASK)
 			      >> OCOTP_CFG3_SPEED_GRADE_SHIFT;
 	else
@@ -54,7 +54,8 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
 		if (of_machine_is_compatible("fsl,imx8mm") ||
 		    of_machine_is_compatible("fsl,imx8mq"))
 			speed_grade = 1;
-		if (of_machine_is_compatible("fsl,imx8mn"))
+		if (of_machine_is_compatible("fsl,imx8mn") ||
+			of_machine_is_compatible("fsl,imx8mp"))
 			speed_grade = 0xb;
 	}
 
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] cpufreq: imx-cpufreq-dt: Add i.MX8MP support
  2019-12-26  6:52   ` Anson Huang
@ 2019-12-26 14:04     ` Abel Vesa
  -1 siblings, 0 replies; 8+ messages in thread
From: Abel Vesa @ 2019-12-26 14:04 UTC (permalink / raw)
  To: Anson Huang
  Cc: rjw, viresh.kumar, shawnguo, s.hauer, kernel, festevam, linux-pm,
	linux-kernel, linux-arm-kernel, dl-linux-imx

On 19-12-26 14:52:47, Anson Huang wrote:
> Add i.MX8MP cpufreq DT support for speed grading and market
> segment check.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  drivers/cpufreq/imx-cpufreq-dt.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/imx-cpufreq-dt.c b/drivers/cpufreq/imx-cpufreq-dt.c
> index 85a6efd..912e93d 100644
> --- a/drivers/cpufreq/imx-cpufreq-dt.c
> +++ b/drivers/cpufreq/imx-cpufreq-dt.c
> @@ -35,7 +35,7 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	if (of_machine_is_compatible("fsl,imx8mn"))
> +	if (of_machine_is_compatible("fsl,imx8mn") || of_machine_is_compatible("fsl,imx8mp"))

Is there a way we could do this more generic so we won't have to add
another of_machine_is_compatible if a new imx8m comes around ?

If not, please drop the second one on a new line to follow the 80 chars rule.

Then you can add:
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>

>  		speed_grade = (cell_value & IMX8MN_OCOTP_CFG3_SPEED_GRADE_MASK)
>  			      >> OCOTP_CFG3_SPEED_GRADE_SHIFT;
>  	else
> @@ -54,7 +54,8 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
>  		if (of_machine_is_compatible("fsl,imx8mm") ||
>  		    of_machine_is_compatible("fsl,imx8mq"))
>  			speed_grade = 1;
> -		if (of_machine_is_compatible("fsl,imx8mn"))
> +		if (of_machine_is_compatible("fsl,imx8mn") ||
> +			of_machine_is_compatible("fsl,imx8mp"))
>  			speed_grade = 0xb;
>  	}
>  
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] cpufreq: imx-cpufreq-dt: Add i.MX8MP support
@ 2019-12-26 14:04     ` Abel Vesa
  0 siblings, 0 replies; 8+ messages in thread
From: Abel Vesa @ 2019-12-26 14:04 UTC (permalink / raw)
  To: Anson Huang
  Cc: linux-pm, viresh.kumar, s.hauer, rjw, linux-kernel, dl-linux-imx,
	kernel, shawnguo, festevam, linux-arm-kernel

On 19-12-26 14:52:47, Anson Huang wrote:
> Add i.MX8MP cpufreq DT support for speed grading and market
> segment check.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  drivers/cpufreq/imx-cpufreq-dt.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/imx-cpufreq-dt.c b/drivers/cpufreq/imx-cpufreq-dt.c
> index 85a6efd..912e93d 100644
> --- a/drivers/cpufreq/imx-cpufreq-dt.c
> +++ b/drivers/cpufreq/imx-cpufreq-dt.c
> @@ -35,7 +35,7 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	if (of_machine_is_compatible("fsl,imx8mn"))
> +	if (of_machine_is_compatible("fsl,imx8mn") || of_machine_is_compatible("fsl,imx8mp"))

Is there a way we could do this more generic so we won't have to add
another of_machine_is_compatible if a new imx8m comes around ?

If not, please drop the second one on a new line to follow the 80 chars rule.

Then you can add:
Reviewed-by: Abel Vesa <abel.vesa@nxp.com>

>  		speed_grade = (cell_value & IMX8MN_OCOTP_CFG3_SPEED_GRADE_MASK)
>  			      >> OCOTP_CFG3_SPEED_GRADE_SHIFT;
>  	else
> @@ -54,7 +54,8 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
>  		if (of_machine_is_compatible("fsl,imx8mm") ||
>  		    of_machine_is_compatible("fsl,imx8mq"))
>  			speed_grade = 1;
> -		if (of_machine_is_compatible("fsl,imx8mn"))
> +		if (of_machine_is_compatible("fsl,imx8mn") ||
> +			of_machine_is_compatible("fsl,imx8mp"))
>  			speed_grade = 0xb;
>  	}
>  
> -- 
> 2.7.4
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading
  2019-12-26  6:52 ` Anson Huang
@ 2020-01-06  6:44   ` Viresh Kumar
  -1 siblings, 0 replies; 8+ messages in thread
From: Viresh Kumar @ 2020-01-06  6:44 UTC (permalink / raw)
  To: Anson Huang
  Cc: rjw, shawnguo, s.hauer, kernel, festevam, linux-pm, linux-kernel,
	linux-arm-kernel, Linux-imx

On 26-12-19, 14:52, Anson Huang wrote:
> Add i.MX8MP to blacklist, so that imx-cpufreq-dt driver can handle
> speed grading bits just like other i.MX8M SoCs.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index f1d170d..a2e5f3a 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -109,6 +109,7 @@ static const struct of_device_id blacklist[] __initconst = {
>  	{ .compatible = "fsl,imx8mq", },
>  	{ .compatible = "fsl,imx8mm", },
>  	{ .compatible = "fsl,imx8mn", },
> +	{ .compatible = "fsl,imx8mp", },
>  
>  	{ .compatible = "marvell,armadaxp", },

Applied both (after minor formatting fixes). Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading
@ 2020-01-06  6:44   ` Viresh Kumar
  0 siblings, 0 replies; 8+ messages in thread
From: Viresh Kumar @ 2020-01-06  6:44 UTC (permalink / raw)
  To: Anson Huang
  Cc: linux-pm, festevam, s.hauer, rjw, linux-kernel, Linux-imx,
	kernel, shawnguo, linux-arm-kernel

On 26-12-19, 14:52, Anson Huang wrote:
> Add i.MX8MP to blacklist, so that imx-cpufreq-dt driver can handle
> speed grading bits just like other i.MX8M SoCs.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
> index f1d170d..a2e5f3a 100644
> --- a/drivers/cpufreq/cpufreq-dt-platdev.c
> +++ b/drivers/cpufreq/cpufreq-dt-platdev.c
> @@ -109,6 +109,7 @@ static const struct of_device_id blacklist[] __initconst = {
>  	{ .compatible = "fsl,imx8mq", },
>  	{ .compatible = "fsl,imx8mm", },
>  	{ .compatible = "fsl,imx8mn", },
> +	{ .compatible = "fsl,imx8mp", },
>  
>  	{ .compatible = "marvell,armadaxp", },

Applied both (after minor formatting fixes). Thanks.

-- 
viresh

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-01-06  6:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-26  6:52 [PATCH 1/2] cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading Anson Huang
2019-12-26  6:52 ` Anson Huang
2019-12-26  6:52 ` [PATCH 2/2] cpufreq: imx-cpufreq-dt: Add i.MX8MP support Anson Huang
2019-12-26  6:52   ` Anson Huang
2019-12-26 14:04   ` Abel Vesa
2019-12-26 14:04     ` Abel Vesa
2020-01-06  6:44 ` [PATCH 1/2] cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading Viresh Kumar
2020-01-06  6:44   ` Viresh Kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.