Skip to content

Commit fe135c6

Browse files
Lee Jonesmcoquelin-stm32
authored andcommitted
ARM: dts: STiH407: Move over to using the 'reserved-memory' API for obtaining DMA memory
Doing so saves quite a bit of code in the driver. For more information on the 'reserved-memory' bindings see: Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt Suggested-by: Suman Anna <[email protected]> Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Maxime Coquelin <[email protected]>
1 parent 3ff0a01 commit fe135c6

File tree

1 file changed

+39
-8
lines changed

1 file changed

+39
-8
lines changed

arch/arm/boot/dts/stih407-family.dtsi

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,36 @@
1515
#address-cells = <1>;
1616
#size-cells = <1>;
1717

18+
reserved-memory {
19+
#address-cells = <1>;
20+
#size-cells = <1>;
21+
ranges;
22+
23+
gp0_reserved: rproc@40000000 {
24+
compatible = "shared-dma-pool";
25+
reg = <0x40000000 0x01000000>;
26+
no-map;
27+
};
28+
29+
gp1_reserved: rproc@41000000 {
30+
compatible = "shared-dma-pool";
31+
reg = <0x41000000 0x01000000>;
32+
no-map;
33+
};
34+
35+
audio_reserved: rproc@42000000 {
36+
compatible = "shared-dma-pool";
37+
reg = <0x42000000 0x01000000>;
38+
no-map;
39+
};
40+
41+
dmu_reserved: rproc@43000000 {
42+
compatible = "shared-dma-pool";
43+
reg = <0x43000000 0x01000000>;
44+
no-map;
45+
};
46+
};
47+
1848
cpus {
1949
#address-cells = <1>;
2050
#size-cells = <0>;
@@ -748,39 +778,40 @@
748778
status = "okay";
749779
};
750780

751-
st231_gp0: remote-processor@40000000 {
781+
st231_gp0: remote-processor {
752782
compatible = "st,st231-rproc";
753-
reg = <0x40000000 0x01000000>;
783+
memory-region = <&gp0_reserved>;
754784
resets = <&softreset STIH407_ST231_GP0_SOFTRESET>;
755785
reset-names = "sw_reset";
756786
clocks = <&clk_s_c0_flexgen CLK_ST231_GP_0>;
757787
clock-frequency = <600000000>;
758788
st,syscfg = <&syscfg_core 0x22c>;
759789
};
760790

761-
st231_gp1: remote-processor@41000000 {
791+
792+
st231_gp1: remote-processor {
762793
compatible = "st,st231-rproc";
763-
reg = <0x41000000 0x01000000>;
794+
memory-region = <&gp1_reserved>;
764795
resets = <&softreset STIH407_ST231_GP1_SOFTRESET>;
765796
reset-names = "sw_reset";
766797
clocks = <&clk_s_c0_flexgen CLK_ST231_GP_1>;
767798
clock-frequency = <600000000>;
768799
st,syscfg = <&syscfg_core 0x220>;
769800
};
770801

771-
st231_audio: remote-processor@42000000 {
802+
st231_audio: remote-processor {
772803
compatible = "st,st231-rproc";
773-
reg = <0x42000000 0x01000000>;
804+
memory-region = <&audio_reserved>;
774805
resets = <&softreset STIH407_ST231_AUD_SOFTRESET>;
775806
reset-names = "sw_reset";
776807
clocks = <&clk_s_c0_flexgen CLK_ST231_AUD_0>;
777808
clock-frequency = <600000000>;
778809
st,syscfg = <&syscfg_core 0x228>;
779810
};
780811

781-
st231_dmu: remote-processor@43000000 {
812+
st231_dmu: remote-processor {
782813
compatible = "st,st231-rproc";
783-
reg = <0x43000000 0x01000000>;
814+
memory-region = <&dmu_reserved>;
784815
resets = <&softreset STIH407_ST231_DMU_SOFTRESET>;
785816
reset-names = "sw_reset";
786817
clocks = <&clk_s_c0_flexgen CLK_ST231_DMU>;

0 commit comments

Comments
 (0)