@@ -251,11 +251,20 @@ static inline bool dev_is_dma_coherent(struct device *dev)
{
return dev->dma_coherent;
}
+static inline void dev_set_dma_coherent(struct device *dev,
+ bool coherent)
+{
+ dev->dma_coherent = coherent;
+}
#else
static inline bool dev_is_dma_coherent(struct device *dev)
{
return true;
}
+static inline void dev_set_dma_coherent(struct device *dev,
+ bool coherent)
+{
+}
#endif /* CONFIG_ARCH_HAS_DMA_COHERENCE_H */
void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,