aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-06-05 07:36:22 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-06-05 07:36:22 -0400
commitbd63ce27d9d62bc40a962b991cbbbe4f0dc913d2 (patch)
treebd998b187b7ea4e9f28c0c61912b701bc6ff6420 /include
parent1fb333489fb917c704ad43e51b45c12f52215a9c (diff)
parent6b74f61a471ad0f3a5e919e314d4f60cd3966f5e (diff)
Merge branch 'devel-stable' into for-next
Diffstat (limited to 'include')
-rw-r--r--include/linux/device.h2
-rw-r--r--include/linux/dma-mapping.h7
-rw-r--r--include/linux/of_address.h14
3 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index d1d1c055b48e..460ebad15109 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -685,6 +685,7 @@ struct acpi_dev_node {
685 * @coherent_dma_mask: Like dma_mask, but for alloc_coherent mapping as not all 685 * @coherent_dma_mask: Like dma_mask, but for alloc_coherent mapping as not all
686 * hardware supports 64-bit addresses for consistent allocations 686 * hardware supports 64-bit addresses for consistent allocations
687 * such descriptors. 687 * such descriptors.
688 * @dma_pfn_offset: offset of DMA memory range relatively of RAM
688 * @dma_parms: A low level driver may set these to teach IOMMU code about 689 * @dma_parms: A low level driver may set these to teach IOMMU code about
689 * segment limitations. 690 * segment limitations.
690 * @dma_pools: Dma pools (if dma'ble device). 691 * @dma_pools: Dma pools (if dma'ble device).
@@ -750,6 +751,7 @@ struct device {
750 not all hardware supports 751 not all hardware supports
751 64 bit addresses for consistent 752 64 bit addresses for consistent
752 allocations such descriptors. */ 753 allocations such descriptors. */
754 unsigned long dma_pfn_offset;
753 755
754 struct device_dma_parameters *dma_parms; 756 struct device_dma_parameters *dma_parms;
755 757
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index fd4aee29ad10..c7d9b1b14ce7 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -123,6 +123,13 @@ static inline int dma_coerce_mask_and_coherent(struct device *dev, u64 mask)
123 123
124extern u64 dma_get_required_mask(struct device *dev); 124extern u64 dma_get_required_mask(struct device *dev);
125 125
126#ifndef set_arch_dma_coherent_ops
127static inline int set_arch_dma_coherent_ops(struct device *dev)
128{
129 return 0;
130}
131#endif
132
126static inline unsigned int dma_get_max_seg_size(struct device *dev) 133static inline unsigned int dma_get_max_seg_size(struct device *dev)
127{ 134{
128 return dev->dma_parms ? dev->dma_parms->max_segment_size : 65536; 135 return dev->dma_parms ? dev->dma_parms->max_segment_size : 65536;
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index 5f6ed6b182b8..839a3521b28e 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -63,6 +63,9 @@ extern int of_pci_range_parser_init(struct of_pci_range_parser *parser,
63extern struct of_pci_range *of_pci_range_parser_one( 63extern struct of_pci_range *of_pci_range_parser_one(
64 struct of_pci_range_parser *parser, 64 struct of_pci_range_parser *parser,
65 struct of_pci_range *range); 65 struct of_pci_range *range);
66extern int of_dma_get_range(struct device_node *np, u64 *dma_addr,
67 u64 *paddr, u64 *size);
68extern bool of_dma_is_coherent(struct device_node *np);
66#else /* CONFIG_OF_ADDRESS */ 69#else /* CONFIG_OF_ADDRESS */
67static inline struct device_node *of_find_matching_node_by_address( 70static inline struct device_node *of_find_matching_node_by_address(
68 struct device_node *from, 71 struct device_node *from,
@@ -90,6 +93,17 @@ static inline struct of_pci_range *of_pci_range_parser_one(
90{ 93{
91 return NULL; 94 return NULL;
92} 95}
96
97static inline int of_dma_get_range(struct device_node *np, u64 *dma_addr,
98 u64 *paddr, u64 *size)
99{
100 return -ENODEV;
101}
102
103static inline bool of_dma_is_coherent(struct device_node *np)
104{
105 return false;
106}
93#endif /* CONFIG_OF_ADDRESS */ 107#endif /* CONFIG_OF_ADDRESS */
94 108
95#ifdef CONFIG_OF 109#ifdef CONFIG_OF