diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2017-11-14 12:11:34 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-11-14 12:11:34 -0600 |
commit | 2b61a44e115e346dcf248b4b35ae2aafed99bb78 (patch) | |
tree | 19f25ab595a2395b2b81b73a22c145dc0b0cd120 /drivers/pci/host/pci-ftpci100.c | |
parent | 9ff950304d2b39e00e090e71e7d1316d4e9fdd9d (diff) | |
parent | d76bdce394bf48140cbb33b07509c32df1cef8e7 (diff) | |
download | lwn-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/pci-ftpci100.c')
-rw-r--r-- | drivers/pci/host/pci-ftpci100.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/pci/host/pci-ftpci100.c b/drivers/pci/host/pci-ftpci100.c index a19919c17d04..fae6bd190770 100644 --- a/drivers/pci/host/pci-ftpci100.c +++ b/drivers/pci/host/pci-ftpci100.c @@ -370,24 +370,6 @@ static int faraday_pci_setup_cascaded_irq(struct faraday_pci *p) return 0; } -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 faraday_pci_parse_map_dma_ranges(struct faraday_pci *p, struct device_node *np) { @@ -402,7 +384,7 @@ static int faraday_pci_parse_map_dma_ranges(struct faraday_pci *p, int i = 0; u32 val; - if (pci_dma_range_parser_init(&parser, np)) { + if (of_pci_dma_range_parser_init(&parser, np)) { dev_err(dev, "missing dma-ranges property\n"); return -EINVAL; } |