Commit 12b8277
of: also handle dma-noncoherent in of_dma_is_coherent()
of_dma_is_coherent() currently expects the architecture to be
non-coherent and some devices being coherent getting marked
as such with the dma-coherent devicetree property.
For PowerPC CONFIG_OF_DMA_DEFAULT_COHERENT was added which currently
makes of_dma_is_coherent() always return true but doesn't handle
the case of the architecture being coherent but some devices not.
So modify the function to also check for dma-noncoherent and
set a suitable default return value. If CONFIG_OF_DMA_DEFAULT_COHERENT
is set the value starts with true and finding dma-noncoherent will
set it to false and without CONFIG_OF_DMA_DEFAULT_COHERENT, the
behaviour is reversed.
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Reviewed-by: Guo Ren <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>1 parent 73448ae commit 12b8277
1 file changed
+10
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
1048 | | - | |
| 1048 | + | |
| 1049 | + | |
1049 | 1050 | | |
1050 | 1051 | | |
1051 | 1052 | | |
1052 | 1053 | | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
| 1054 | + | |
1056 | 1055 | | |
1057 | 1056 | | |
1058 | 1057 | | |
1059 | 1058 | | |
1060 | 1059 | | |
1061 | | - | |
1062 | | - | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1063 | 1066 | | |
1064 | 1067 | | |
1065 | 1068 | | |
1066 | 1069 | | |
1067 | | - | |
| 1070 | + | |
1068 | 1071 | | |
1069 | 1072 | | |
1070 | 1073 | | |
| |||
0 commit comments