soc: qcom: smem: Move RPM message ram out of smem DT node
PATCH 1/1 soc: qcom: smem: Move RPM message ram out of smem DT node
SMEM is a software construct built on top of a DDR carveout and sometimes a device memory called RPM message ram. Having the RPM message ram in the smem DT node's reg property leads to the smem node being located in different places depending on if the message ram is being used or not. Let's add a qcom specific property, qcom,rpm-msg-ram, and point to the device memory from the SMEM node via a phandle. This allows us to always have the SMEM node at the root of the DT regardless of whether it's using the message ram or not.
--- arch/arm/boot/dts/qcom-msm8974.dtsi | 17 ++++++--- drivers/soc/qcom/smem.c | 73 +++++++++++++++---------------------- 2 files changed, 41 insertions(+), 49 deletions(-)
arch/arm/boot/dts/qcom-msm8974.dtsi +11 -6
@@ -20,6 +20,15 @@ }; }; + smem { + compatible = "qcom,smem"; + + memory-region = <&smem_region>; + qcom,rpm-msg-ram = <&rpm_msg_ram>; + + hwlocks = <&tcsr_mutex 3>; + }; + smd { compatible = "qcom,smd";
@@ -300,13 +309,9 @@ #hwlock-cells = <1>; }; - smem at fa00000 { - compatible = "qcom,smem"; - - memory-region = <&smem_region>; + rpm_msg_ram: memory at fc428000 { + compatible = "qcom,rpm-msg-ram"; reg = <0xfc428000 0x4000>; - - hwlocks = <&tcsr_mutex 3>; }; blsp1_uart2: serial at f991e000 {
drivers/soc/qcom/smem.c +30 -43
103 lines not on this page · raw message
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Quoted 10 lines · Stephen Boyd
SMEM is a software construct built on top of a DDR carveout and sometimes a device memory called RPM message ram. Having the RPM message ram in the smem DT node's reg property leads to the smem node being located in different places depending on if the message ram is being used or not. Let's add a qcom specific property, qcom,rpm-msg-ram, and point to the device memory from the SMEM node via a phandle. This allows us to always have the SMEM node at the root of the DT regardless of whether it's using the message ram or not.
Based on the codeaurora limit of 99 aux-mem regions I figured this had to be more generic. But I think this makes sense and we can easily extend it with other specific regions (if we ever find any of those other 98 supported aux-mems).
Can you update the dt binding document as well?
Regards,
Bjorn
Quoted 12 lines · Bjorn Andersson
Quoted 10 lines · Stephen Boyd
SMEM is a software construct built on top of a DDR carveout and sometimes a device memory called RPM message ram. Having the RPM message ram in the smem DT node's reg property leads to the smem node being located in different places depending on if the message ram is being used or not. Let's add a qcom specific property, qcom,rpm-msg-ram, and point to the device memory from the SMEM node via a phandle. This allows us to always have the SMEM node at the root of the DT regardless of whether it's using the message ram or not.
Quoted 4 lines
Based on the codeaurora limit of 99 aux-mem regions I figured this had to be more generic. But I think this makes sense and we can easily extend it with other specific regions (if we ever find any of those other 98 supported aux-mems).
Great.
Quoted 5 lines
Can you update the dt binding document as well?
Sure. Is there a binding document? I couldn't find one.
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project