diff mbox series

[06/14] arm64: dts: qcom: msm8916: Drop qcom,tcsr-mutex syscon

Message ID 20200915071221.72895-7-stephan@gerhold.net
State Accepted
Commit 5342f1df8f50df3cec6e015beefc4eca79eb858d
Headers show
Series Cleanup & sort msm8916.dtsi, various minor fixes | expand

Commit Message

Stephan Gerhold Sept. 15, 2020, 7:12 a.m. UTC
The hwlock device node does not (directly) use memory resources
of the SoC, so we should move it outside the "soc" node.

However, as of commit 7a1e6fb1c606 ("hwspinlock: qcom: Allow mmio usage
in addition to syscon") we can now assign the memory region directly
to the hwlock device node. This works because the register space
used by it is actually separate and not used by any other components.

Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

Comments

Bjorn Andersson Sept. 15, 2020, 3:38 p.m. UTC | #1
On Tue 15 Sep 07:12 UTC 2020, Stephan Gerhold wrote:

> The hwlock device node does not (directly) use memory resources
> of the SoC, so we should move it outside the "soc" node.
> 
> However, as of commit 7a1e6fb1c606 ("hwspinlock: qcom: Allow mmio usage
> in addition to syscon") we can now assign the memory region directly
> to the hwlock device node. This works because the register space
> used by it is actually separate and not used by any other components.
> 

A side-note on that...

In addition to the listed commit, it was also determined that the old
two-node split is prohibited and the DT binding was updated to deprecate
it.

So in the event of us having to also access registers from e.g. the
remoteproc driver (which 8916 doesn't doesn't do), we would have to use:

	compatible = "qcom,tcsr-mutex", "syscon";

Regards,
Bjorn

> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
>  arch/arm64/boot/dts/qcom/msm8916.dtsi | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> index 003451ccf3ee..10e177988555 100644
> --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> @@ -458,9 +458,10 @@ gcc: clock-controller@1800000 {
>  			reg = <0x1800000 0x80000>;
>  		};
>  
> -		tcsr_mutex_regs: syscon@1905000 {
> -			compatible = "syscon";
> +		tcsr_mutex: hwlock@1905000 {
> +			compatible = "qcom,tcsr-mutex";
>  			reg = <0x1905000 0x20000>;
> +			#hwlock-cells = <1>;
>  		};
>  
>  		tcsr: syscon@1937000 {
> @@ -468,12 +469,6 @@ tcsr: syscon@1937000 {
>  			reg = <0x1937000 0x30000>;
>  		};
>  
> -		tcsr_mutex: hwlock {
> -			compatible = "qcom,tcsr-mutex";
> -			syscon = <&tcsr_mutex_regs 0 0x1000>;
> -			#hwlock-cells = <1>;
> -		};
> -
>  		rpm_msg_ram: memory@60000 {
>  			compatible = "qcom,rpm-msg-ram";
>  			reg = <0x60000 0x8000>;
> -- 
> 2.28.0
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 003451ccf3ee..10e177988555 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -458,9 +458,10 @@  gcc: clock-controller@1800000 {
 			reg = <0x1800000 0x80000>;
 		};
 
-		tcsr_mutex_regs: syscon@1905000 {
-			compatible = "syscon";
+		tcsr_mutex: hwlock@1905000 {
+			compatible = "qcom,tcsr-mutex";
 			reg = <0x1905000 0x20000>;
+			#hwlock-cells = <1>;
 		};
 
 		tcsr: syscon@1937000 {
@@ -468,12 +469,6 @@  tcsr: syscon@1937000 {
 			reg = <0x1937000 0x30000>;
 		};
 
-		tcsr_mutex: hwlock {
-			compatible = "qcom,tcsr-mutex";
-			syscon = <&tcsr_mutex_regs 0 0x1000>;
-			#hwlock-cells = <1>;
-		};
-
 		rpm_msg_ram: memory@60000 {
 			compatible = "qcom,rpm-msg-ram";
 			reg = <0x60000 0x8000>;