From bf6681ea53353864bf23a24c82a5c7ac4d7a4e19 Mon Sep 17 00:00:00 2001 From: Manikanta Maddireddy Date: Thu, 11 Jan 2018 11:38:02 +0530 Subject: of: Export of_pci_range_to_resource() Some PCIe host drivers parse of_pci_range from device tree and convert it to resources. Export of_pci_range_to_resource() to allow PCIe host drivers to be compiled as loadable kernel module. Signed-off-by: Manikanta Maddireddy [lorenzo.pieralisi@arm.com: rewrote commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring --- drivers/of/address.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/of/address.c') diff --git a/drivers/of/address.c b/drivers/of/address.c index fa6cabfc3cb9..8d9b93f8701a 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -361,6 +361,7 @@ invalid_range: res->end = (resource_size_t)OF_BAD_ADDR; return err; } +EXPORT_SYMBOL(of_pci_range_to_resource); #endif /* CONFIG_PCI */ /* -- cgit From 4670d610d59233b017a6ea1fa25bbf06dabbff42 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 17 Jan 2018 17:36:39 -0600 Subject: PCI: Move OF-related PCI functions into PCI core Following what has been done for other subsystems, move the remaining PCI related code out of drivers/of/ and into drivers/pci/of.c With this, we can kill a few kconfig symbols. Signed-off-by: Rob Herring [bhelgaas: minor whitespace, comment cleanups] Signed-off-by: Bjorn Helgaas Cc: Frank Rowand --- drivers/of/address.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/of/address.c') diff --git a/drivers/of/address.c b/drivers/of/address.c index fa6cabfc3cb9..8591afbdfe99 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -96,7 +96,7 @@ static unsigned int of_bus_default_get_flags(const __be32 *addr) return IORESOURCE_MEM; } -#ifdef CONFIG_OF_ADDRESS_PCI +#ifdef CONFIG_PCI /* * PCI bus specific translator */ @@ -171,9 +171,7 @@ static int of_bus_pci_translate(__be32 *addr, u64 offset, int na) { return of_bus_default_translate(addr + 1, offset, na - 1); } -#endif /* CONFIG_OF_ADDRESS_PCI */ -#ifdef CONFIG_PCI const __be32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, unsigned int *flags) { @@ -426,7 +424,7 @@ static unsigned int of_bus_isa_get_flags(const __be32 *addr) */ static struct of_bus of_busses[] = { -#ifdef CONFIG_OF_ADDRESS_PCI +#ifdef CONFIG_PCI /* PCI */ { .name = "pci", @@ -437,7 +435,7 @@ static struct of_bus of_busses[] = { .translate = of_bus_pci_translate, .get_flags = of_bus_pci_get_flags, }, -#endif /* CONFIG_OF_ADDRESS_PCI */ +#endif /* CONFIG_PCI */ /* ISA */ { .name = "isa", -- cgit