diff options
author | Murali Karicheri <m-karicheri2@ti.com> | 2015-03-03 12:52:09 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-03-03 15:42:56 -0500 |
commit | 1f5c69aa51f9c7c8d2a5c2e4dc339f6c7d5c15cd (patch) | |
tree | 152d30ba274eddb828c0f5ea8d886ab82f96819a /include/linux/of_device.h | |
parent | ed748621031c2a205749997421e59fb4dfb1e909 (diff) |
of: Move of_dma_configure() to device.c to help re-use
Move of_dma_configure() to device.c so it can be re-used for PCI devices to
obtain DMA configuration from DT. Also add a second argument so that for
PCI, the DT node of root bus host bridge can be used to obtain the DMA
configuration for the slave PCI device.
Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> (AMD Seattle)
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Rob Herring <robh+dt@kernel.org>
CC: Joerg Roedel <joro@8bytes.org>
CC: Grant Likely <grant.likely@linaro.org>
CC: Russell King <linux@arm.linux.org.uk>
CC: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux/of_device.h')
-rw-r--r-- | include/linux/of_device.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index ef370210ffb2..22801b10cef5 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
@@ -53,6 +53,7 @@ static inline struct device_node *of_cpu_device_node_get(int cpu) | |||
53 | return of_node_get(cpu_dev->of_node); | 53 | return of_node_get(cpu_dev->of_node); |
54 | } | 54 | } |
55 | 55 | ||
56 | void of_dma_configure(struct device *dev, struct device_node *np); | ||
56 | #else /* CONFIG_OF */ | 57 | #else /* CONFIG_OF */ |
57 | 58 | ||
58 | static inline int of_driver_match_device(struct device *dev, | 59 | static inline int of_driver_match_device(struct device *dev, |
@@ -90,6 +91,8 @@ static inline struct device_node *of_cpu_device_node_get(int cpu) | |||
90 | { | 91 | { |
91 | return NULL; | 92 | return NULL; |
92 | } | 93 | } |
94 | static inline void of_dma_configure(struct device *dev, struct device_node *np) | ||
95 | {} | ||
93 | #endif /* CONFIG_OF */ | 96 | #endif /* CONFIG_OF */ |
94 | 97 | ||
95 | #endif /* _LINUX_OF_DEVICE_H */ | 98 | #endif /* _LINUX_OF_DEVICE_H */ |