summaryrefslogtreecommitdiff
path: root/drivers/pci/host/pcie-iproc.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2017-11-14 12:11:34 -0600
committerBjorn Helgaas <bhelgaas@google.com>2017-11-14 12:11:34 -0600
commit2b61a44e115e346dcf248b4b35ae2aafed99bb78 (patch)
tree19f25ab595a2395b2b81b73a22c145dc0b0cd120 /drivers/pci/host/pcie-iproc.c
parent9ff950304d2b39e00e090e71e7d1316d4e9fdd9d (diff)
parentd76bdce394bf48140cbb33b07509c32df1cef8e7 (diff)
downloadlwn-2b61a44e115e346dcf248b4b35ae2aafed99bb78.tar.gz
lwn-2b61a44e115e346dcf248b4b35ae2aafed99bb78.zip
Merge branch 'pci/host-tango' into next
* pci/host-tango: PCI: tango: Add MSI controller support PCI: Use of_pci_dma_range_parser_init() to reduce duplication of/pci: Add of_pci_dma_range_parser_init() for dma-ranges parsing support
Diffstat (limited to 'drivers/pci/host/pcie-iproc.c')
-rw-r--r--drivers/pci/host/pcie-iproc.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index 3a8b9d20ee57..935909bbe5c4 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -1097,24 +1097,6 @@ err_ib:
return ret;
}
-static int pci_dma_range_parser_init(struct of_pci_range_parser *parser,
- struct device_node *node)
-{
- const int na = 3, ns = 2;
- int rlen;
-
- parser->node = node;
- parser->pna = of_n_addr_cells(node);
- parser->np = parser->pna + na + ns;
-
- parser->range = of_get_property(node, "dma-ranges", &rlen);
- if (!parser->range)
- return -ENOENT;
-
- parser->end = parser->range + rlen / sizeof(__be32);
- return 0;
-}
-
static int iproc_pcie_map_dma_ranges(struct iproc_pcie *pcie)
{
struct of_pci_range range;
@@ -1122,7 +1104,7 @@ static int iproc_pcie_map_dma_ranges(struct iproc_pcie *pcie)
int ret;
/* Get the dma-ranges from DT */
- ret = pci_dma_range_parser_init(&parser, pcie->dev->of_node);
+ ret = of_pci_dma_range_parser_init(&parser, pcie->dev->of_node);
if (ret)
return ret;