dma-mapping: Introduce DMA_ATTR_IOMMU_USE_UPSTREAM_HINT

Add documentation for this new attribute. It will be used on the
skunk target for allowing smmu clients to set the bus attributes
required to use system cache.

Change-Id: Id0b0dc261e46082ac48accdeb949947dce375d28
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
diff --git a/Documentation/DMA-attributes.txt b/Documentation/DMA-attributes.txt
index 836d232..9fa070c 100644
--- a/Documentation/DMA-attributes.txt
+++ b/Documentation/DMA-attributes.txt
@@ -169,3 +169,10 @@
 By default, the DMA mappings are non-executable. Some use cases might require
 an executable mapping. This attribute can be used to indicate to the DMA
 subsystem to create an executable mappings for the buffer.
+
+DMA_ATTR_IOMMU_USE_UPSTREAM_HINT
+--------------------------------
+
+DMA_ATTR_IOMMU_USE_UPSTREAM_HINT: Normally an smmu will override any bus
+attributes (i.e cacheablilty) provided by the client device. Some hardware
+may be designed to use the original attributes instead.
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 0f478e7..542cc16 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -81,6 +81,12 @@
  * DMA_ATTR_EXEC_MAPPING: The mapping has executable permissions.
  */
 #define DMA_ATTR_EXEC_MAPPING		(1UL << 12)
+/*
+ * DMA_ATTR_IOMMU_USE_UPSTREAM_HINT: Normally an smmu will override any bus
+ * attributes (i.e cacheablilty) provided by the client device. Some hardware
+ * may be designed to use the original attributes instead.
+ */
+#define DMA_ATTR_IOMMU_USE_UPSTREAM_HINT	(1UL << 13)
 
 /*
  * A dma_addr_t can hold any valid DMA or bus address for the platform.