diff options
| author | Paul Burton <paul.burton@imgtec.com> | 2016-10-05 18:18:16 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@google.com> | 2018-02-05 08:58:32 -0800 |
| commit | df5314d4c24b9ec8c36a794e58db67745fdbe410 (patch) | |
| tree | 3e54b900f5088756f080871dac323014b7426d60 /lib/jedec_ddr_data.c | |
| parent | 5e7488820cf9e76f9395701fa8cff0b2c1767eee (diff) | |
UPSTREAM: MIPS: Support per-device DMA coherence
On some MIPS systems, a subset of devices may have DMA coherent with CPU
caches. For example in systems including a MIPS I/O Coherence Unit
(IOCU), some devices may be connected to that IOCU whilst others are
not.
Prior to this patch, we have a plat_device_is_coherent() function but no
implementation which does anything besides return a global true or
false, optionally chosen at runtime. For devices such as those described
above this is insufficient.
Fix this by tracking DMA coherence on a per-device basis with a
dma_coherent field in struct dev_archdata. Setting this from
arch_setup_dma_ops() takes care of devices which set the dma-coherent
property via device tree, and any PCI devices beneath a bridge described
in DT, automatically.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14349/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
(cherry picked from commit 20d330645cfb8cfecfb82b369e4d3084e429e68a)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'lib/jedec_ddr_data.c')
0 files changed, 0 insertions, 0 deletions
