All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] PXO fixes for ipq8064 dtsi
@ 2022-04-30  5:51 Ansuel Smith
  2022-04-30  5:51 ` [PATCH v2 1/2] ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock Ansuel Smith
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ansuel Smith @ 2022-04-30  5:51 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel
  Cc: Ansuel Smith

This small series is a fix for a long lasting error present in ipq8064
dtsi. At times the kpss-gcc driver was defined in the dts with
<&gcc PXO_SRC> a pxo clock. While PXO_SRC exist in the includes, the gcc
driver never expose it and if a driver try to actually use it the result
is a kernel panic even before any log is init.

To prepare for correct conversion of the different krait drivers to
parent data and to reflect what is defined in the Documentation with
actual driver and dts implementation, fix this error by using the now
defined pxo_board fixed clock.

v2:
- Swap patch 1 with patch 2 (fixes first changes second)
- Add fixes tag

Ansuel Smith (2):
  ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock
  ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064

 arch/arm/boot/dts/qcom-ipq8064.dtsi | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

-- 
2.34.1


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

* [PATCH v2 1/2] ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock
  2022-04-30  5:51 [PATCH v2 0/2] PXO fixes for ipq8064 dtsi Ansuel Smith
@ 2022-04-30  5:51 ` Ansuel Smith
  2022-04-30 13:25   ` Dmitry Baryshkov
  2022-04-30  5:51 ` [PATCH v2 2/2] ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064 Ansuel Smith
  2022-07-03  3:55 ` [PATCH v2 0/2] PXO fixes for ipq8064 dtsi Bjorn Andersson
  2 siblings, 1 reply; 6+ messages in thread
From: Ansuel Smith @ 2022-04-30  5:51 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel
  Cc: Ansuel Smith

Replace gcc PXO phandle to pxo_board fixed clock declared in the dts.
gcc driver doesn't provide PXO_SRC as it's a fixed-clock. This cause a
kernel panic if any driver actually try to use it.

Fixes: 40cf5c884a96 ("ARM: dts: qcom: add L2CC and RPM for IPQ8064")
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index 996f4458d9fc..e6ca8d1d1c5f 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -304,7 +304,7 @@ cxo_board {
 			clock-frequency = <25000000>;
 		};
 
-		pxo_board {
+		pxo_board: pxo_board {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			clock-frequency = <25000000>;
@@ -782,7 +782,7 @@ tcsr: syscon@1a400000 {
 		l2cc: clock-controller@2011000 {
 			compatible = "qcom,kpss-gcc", "syscon";
 			reg = <0x2011000 0x1000>;
-			clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
+			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
 			clock-names = "pll8_vote", "pxo";
 			clock-output-names = "acpu_l2_aux";
 		};
-- 
2.34.1


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

* [PATCH v2 2/2] ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064
  2022-04-30  5:51 [PATCH v2 0/2] PXO fixes for ipq8064 dtsi Ansuel Smith
  2022-04-30  5:51 ` [PATCH v2 1/2] ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock Ansuel Smith
@ 2022-04-30  5:51 ` Ansuel Smith
  2022-04-30 13:26   ` Dmitry Baryshkov
  2022-07-03  3:55 ` [PATCH v2 0/2] PXO fixes for ipq8064 dtsi Bjorn Andersson
  2 siblings, 1 reply; 6+ messages in thread
From: Ansuel Smith @ 2022-04-30  5:51 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel
  Cc: Ansuel Smith, Stephen Boyd

Add syscon compatible required for tsens driver to correctly probe driver
and access the reg. Also add cxo and pxo tag and declare them as gcc clock
now requires them for the ipq8064 gcc driver that has now been modernized.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
---
 arch/arm/boot/dts/qcom-ipq8064.dtsi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
index e6ca8d1d1c5f..ad30f7c8a5a7 100644
--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
@@ -298,7 +298,7 @@ smem: smem@41000000 {
 	};
 
 	clocks {
-		cxo_board {
+		cxo_board: cxo_board {
 			compatible = "fixed-clock";
 			#clock-cells = <0>;
 			clock-frequency = <25000000>;
@@ -736,7 +736,9 @@ tsens_calib_backup: calib_backup@410 {
 		};
 
 		gcc: clock-controller@900000 {
-			compatible = "qcom,gcc-ipq8064";
+			compatible = "qcom,gcc-ipq8064", "syscon";
+			clocks = <&pxo_board>, <&cxo_board>;
+			clock-names = "pxo", "cxo";
 			reg = <0x00900000 0x4000>;
 			#clock-cells = <1>;
 			#reset-cells = <1>;
-- 
2.34.1


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

* Re: [PATCH v2 1/2] ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock
  2022-04-30  5:51 ` [PATCH v2 1/2] ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock Ansuel Smith
@ 2022-04-30 13:25   ` Dmitry Baryshkov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2022-04-30 13:25 UTC (permalink / raw)
  To: Ansuel Smith
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel

On Sat, 30 Apr 2022 at 15:59, Ansuel Smith <ansuelsmth@gmail.com> wrote:
>
> Replace gcc PXO phandle to pxo_board fixed clock declared in the dts.
> gcc driver doesn't provide PXO_SRC as it's a fixed-clock. This cause a
> kernel panic if any driver actually try to use it.
>
> Fixes: 40cf5c884a96 ("ARM: dts: qcom: add L2CC and RPM for IPQ8064")
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---
>  arch/arm/boot/dts/qcom-ipq8064.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
> index 996f4458d9fc..e6ca8d1d1c5f 100644
> --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
> +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
> @@ -304,7 +304,7 @@ cxo_board {
>                         clock-frequency = <25000000>;
>                 };
>
> -               pxo_board {
> +               pxo_board: pxo_board {
>                         compatible = "fixed-clock";
>                         #clock-cells = <0>;
>                         clock-frequency = <25000000>;
> @@ -782,7 +782,7 @@ tcsr: syscon@1a400000 {
>                 l2cc: clock-controller@2011000 {
>                         compatible = "qcom,kpss-gcc", "syscon";
>                         reg = <0x2011000 0x1000>;
> -                       clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>;
> +                       clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
>                         clock-names = "pll8_vote", "pxo";
>                         clock-output-names = "acpu_l2_aux";
>                 };
> --
> 2.34.1
>


-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 2/2] ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064
  2022-04-30  5:51 ` [PATCH v2 2/2] ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064 Ansuel Smith
@ 2022-04-30 13:26   ` Dmitry Baryshkov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Baryshkov @ 2022-04-30 13:26 UTC (permalink / raw)
  To: Ansuel Smith
  Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel, Stephen Boyd

On Sat, 30 Apr 2022 at 15:59, Ansuel Smith <ansuelsmth@gmail.com> wrote:
>
> Add syscon compatible required for tsens driver to correctly probe driver
> and access the reg. Also add cxo and pxo tag and declare them as gcc clock
> now requires them for the ipq8064 gcc driver that has now been modernized.
>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> Reviewed-by: Stephen Boyd <sboyd@kernel.org>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---
>  arch/arm/boot/dts/qcom-ipq8064.dtsi | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi
> index e6ca8d1d1c5f..ad30f7c8a5a7 100644
> --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
> +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
> @@ -298,7 +298,7 @@ smem: smem@41000000 {
>         };
>
>         clocks {
> -               cxo_board {
> +               cxo_board: cxo_board {
>                         compatible = "fixed-clock";
>                         #clock-cells = <0>;
>                         clock-frequency = <25000000>;
> @@ -736,7 +736,9 @@ tsens_calib_backup: calib_backup@410 {
>                 };
>
>                 gcc: clock-controller@900000 {
> -                       compatible = "qcom,gcc-ipq8064";
> +                       compatible = "qcom,gcc-ipq8064", "syscon";
> +                       clocks = <&pxo_board>, <&cxo_board>;
> +                       clock-names = "pxo", "cxo";
>                         reg = <0x00900000 0x4000>;
>                         #clock-cells = <1>;
>                         #reset-cells = <1>;
> --
> 2.34.1
>


-- 
With best wishes
Dmitry

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

* Re: [PATCH v2 0/2] PXO fixes for ipq8064 dtsi
  2022-04-30  5:51 [PATCH v2 0/2] PXO fixes for ipq8064 dtsi Ansuel Smith
  2022-04-30  5:51 ` [PATCH v2 1/2] ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock Ansuel Smith
  2022-04-30  5:51 ` [PATCH v2 2/2] ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064 Ansuel Smith
@ 2022-07-03  3:55 ` Bjorn Andersson
  2 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2022-07-03  3:55 UTC (permalink / raw)
  To: Rob Herring, Andy Gross, linux-kernel, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, Ansuel Smith

On Sat, 30 Apr 2022 07:51:16 +0200, Ansuel Smith wrote:
> This small series is a fix for a long lasting error present in ipq8064
> dtsi. At times the kpss-gcc driver was defined in the dts with
> <&gcc PXO_SRC> a pxo clock. While PXO_SRC exist in the includes, the gcc
> driver never expose it and if a driver try to actually use it the result
> is a kernel panic even before any log is init.
> 
> To prepare for correct conversion of the different krait drivers to
> parent data and to reflect what is defined in the Documentation with
> actual driver and dts implementation, fix this error by using the now
> defined pxo_board fixed clock.
> 
> [...]

Applied, thanks!

[1/2] ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock
      commit: eb9e93937756a05787977875830c0dc482cb57e0
[2/2] ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064
      (no commit info)

Best regards,
-- 
Bjorn Andersson <bjorn.andersson@linaro.org>

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

end of thread, other threads:[~2022-07-03  3:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-30  5:51 [PATCH v2 0/2] PXO fixes for ipq8064 dtsi Ansuel Smith
2022-04-30  5:51 ` [PATCH v2 1/2] ARM: dts: qcom: replace gcc PXO with pxo_board fixed clock Ansuel Smith
2022-04-30 13:25   ` Dmitry Baryshkov
2022-04-30  5:51 ` [PATCH v2 2/2] ARM: dts: qcom: add syscon and cxo/pxo clock to gcc node for ipq8064 Ansuel Smith
2022-04-30 13:26   ` Dmitry Baryshkov
2022-07-03  3:55 ` [PATCH v2 0/2] PXO fixes for ipq8064 dtsi Bjorn Andersson

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.