summaryrefslogtreecommitdiff
path: root/include/linux/of_address.h
diff options
context:
space:
mode:
authorMarc Gonzalez <marc_gonzalez@sigmadesigns.com>2017-09-26 13:22:54 +0300
committerBjorn Helgaas <bhelgaas@google.com>2017-10-05 23:52:34 +0300
commita060c2104ef83e62346b7e893947a940471c0d7c (patch)
treec029535eda482d732c3295188545691db805909c /include/linux/of_address.h
parent9e66317d3c92ddaab330c125dfe9d06eee268aff (diff)
downloadlinux-a060c2104ef83e62346b7e893947a940471c0d7c.tar.xz
of/pci: Add of_pci_dma_range_parser_init() for dma-ranges parsing support
Several host bridge drivers duplicate of_pci_range_parser_init() in order to parse their dma-ranges property. Provide of_pci_dma_range_parser_init() for that use case. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'include/linux/of_address.h')
-rw-r--r--include/linux/of_address.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index 37864734ca50..8beed2de98e9 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -49,6 +49,8 @@ extern const __be32 *of_get_address(struct device_node *dev, int index,
extern int of_pci_range_parser_init(struct of_pci_range_parser *parser,
struct device_node *node);
+extern int of_pci_dma_range_parser_init(struct of_pci_range_parser *parser,
+ struct device_node *node);
extern struct of_pci_range *of_pci_range_parser_one(
struct of_pci_range_parser *parser,
struct of_pci_range *range);
@@ -85,7 +87,13 @@ static inline const __be32 *of_get_address(struct device_node *dev, int index,
static inline int of_pci_range_parser_init(struct of_pci_range_parser *parser,
struct device_node *node)
{
- return -1;
+ return -ENOSYS;
+}
+
+static inline int of_pci_dma_range_parser_init(struct of_pci_range_parser *parser,
+ struct device_node *node)
+{
+ return -ENOSYS;
}
static inline struct of_pci_range *of_pci_range_parser_one(