Skip to content

Commit 678c811

Browse files
Eugeniy Paltsevvineetgarc
authored andcommitted
ARC: dma [IOC]: mark DMA devices connected as dma-coherent
Mark DMA devices on AXS103 and HSDK boards connected through IOC port as dma-coherent. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
1 parent 3fcbb82 commit 678c811

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

arch/arc/boot/dts/axc003.dtsi

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,32 @@
9393
};
9494
};
9595

96+
/*
97+
* Mark DMA peripherals connected via IOC port as dma-coherent. We do
98+
* it via overlay because peripherals defined in axs10x_mb.dtsi are
99+
* used for both AXS101 and AXS103 boards and only AXS103 has IOC (so
100+
* only AXS103 board has HW-coherent DMA peripherals)
101+
* We don't need to mark pgu@17000 as dma-coherent because it uses
102+
* external DMA buffer located outside of IOC aperture.
103+
*/
104+
axs10x_mb {
105+
ethernet@0x18000 {
106+
dma-coherent;
107+
};
108+
109+
ehci@0x40000 {
110+
dma-coherent;
111+
};
112+
113+
ohci@0x60000 {
114+
dma-coherent;
115+
};
116+
117+
mmc@0x15000 {
118+
dma-coherent;
119+
};
120+
};
121+
96122
/*
97123
* The DW APB ICTL intc on MB is connected to CPU intc via a
98124
* DT "invisible" DW APB GPIO block, configured to simply pass thru

arch/arc/boot/dts/axc003_idu.dtsi

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,32 @@
100100
};
101101
};
102102

103+
/*
104+
* Mark DMA peripherals connected via IOC port as dma-coherent. We do
105+
* it via overlay because peripherals defined in axs10x_mb.dtsi are
106+
* used for both AXS101 and AXS103 boards and only AXS103 has IOC (so
107+
* only AXS103 board has HW-coherent DMA peripherals)
108+
* We don't need to mark pgu@17000 as dma-coherent because it uses
109+
* external DMA buffer located outside of IOC aperture.
110+
*/
111+
axs10x_mb {
112+
ethernet@0x18000 {
113+
dma-coherent;
114+
};
115+
116+
ehci@0x40000 {
117+
dma-coherent;
118+
};
119+
120+
ohci@0x60000 {
121+
dma-coherent;
122+
};
123+
124+
mmc@0x15000 {
125+
dma-coherent;
126+
};
127+
};
128+
103129
/*
104130
* This INTC is actually connected to DW APB GPIO
105131
* which acts as a wire between MB INTC and CPU INTC.

arch/arc/boot/dts/hsdk.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@
181181
resets = <&cgu_rst HSDK_ETH_RESET>;
182182
reset-names = "stmmaceth";
183183
mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
184+
dma-coherent;
184185

185186
mdio {
186187
#address-cells = <1>;
@@ -199,12 +200,14 @@
199200
compatible = "snps,hsdk-v1.0-ohci", "generic-ohci";
200201
reg = <0x60000 0x100>;
201202
interrupts = <15>;
203+
dma-coherent;
202204
};
203205

204206
ehci@40000 {
205207
compatible = "snps,hsdk-v1.0-ehci", "generic-ehci";
206208
reg = <0x40000 0x100>;
207209
interrupts = <15>;
210+
dma-coherent;
208211
};
209212

210213
mmc@a000 {
@@ -217,6 +220,7 @@
217220
clock-names = "biu", "ciu";
218221
interrupts = <12>;
219222
bus-width = <4>;
223+
dma-coherent;
220224
};
221225
};
222226

0 commit comments

Comments
 (0)