diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-03-22 15:24:24 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-03-25 10:59:13 +0100 |
commit | 9caee28f71300eb64ee256b9fef2247ca06be5cf (patch) | |
tree | 6c84a0b9fbd11c5cde8fbf035eb8118eb2a1820d /dts/Bindings/ptp/ptp-qoriq.txt | |
parent | 6c809314ab8837a83bc2575b5698ce763a6d280f (diff) | |
download | barebox-9caee28f71300eb64ee256b9fef2247ca06be5cf.tar.gz barebox-9caee28f71300eb64ee256b9fef2247ca06be5cf.tar.xz |
dma: correctly honour dma-noncoherent device tree property
Most barebox platforms are either completely cache-coherent with respect to
DMA or completely non-coherent. To avoid having to walk the device tree for
non-existent dma-coherent and dma-noncohrent properties, barebox thus
only does this when CONFIG_OF_DMA_COHERENCY is selected.
CONFIG_OF_DMA_COHERENCY is to be selected by platforms that have mixed
coherency for DMA masters. Forgetting to select this option can be
annoying to debug, which is why devinfo will inform the user of default
DMA coherency assignments:
DMA Coherent: false (default)
In order to allow devinfo to differentiate implicit default and explicit
device tree DMA coherency configuration, the struct device::dma_coherent
member is not of boolean type, but Instead an enumeration that besides
coherent and non-coherent also encodes a DEV_DMA_COHERENCE_DEFAULT state.
In practice though, a boolean was saved in this dma_coherent member,
leading to any dma-noncoherent property being ignored and the default
coherency setting being taken for the node.
By fixing the type confusion, we restore working Ethernet on the
StarFive JH7100, which is the only SoC we currently support that
requires /soc/dma-noncohrent to be set for proper operation of its DMA
masters.
Fixes: fbdea8fd54fe ("of: populate new device_d::dma_coherent attribute")
Reported-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240322142424.981863-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'dts/Bindings/ptp/ptp-qoriq.txt')
0 files changed, 0 insertions, 0 deletions