Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b290397 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Bjorn Helgaas
Browse files

Merge branch 'pci/dt-resources' into next

* pci/dt-resources:
  PCI: Make of_irq_parse_pci() static
  powerpc/pci: Use of_irq_parse_and_map_pci() helper
  PCI: Move OF-related PCI functions into PCI core
parents 3972b0e2 7e297843
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ menuconfig ARCH_MVEBU
	select ZONE_DMA if ARM_LPAE
	select GPIOLIB
	select PCI_QUIRKS if PCI
	select OF_ADDRESS_PCI

if ARCH_MVEBU

+2 −8
Original line number Diff line number Diff line
@@ -339,8 +339,7 @@ struct pci_controller* pci_find_hose_for_OF_device(struct device_node* node)
 */
static int pci_read_irq_line(struct pci_dev *pci_dev)
{
	struct of_phandle_args oirq;
	unsigned int virq;
	unsigned int virq = 0;

	pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev));

@@ -348,7 +347,7 @@ static int pci_read_irq_line(struct pci_dev *pci_dev)
	memset(&oirq, 0xff, sizeof(oirq));
#endif
	/* Try to get a mapping from the device-tree */
	if (of_irq_parse_pci(pci_dev, &oirq)) {
	if (!of_irq_parse_and_map_pci(pci_dev, 0, 0)) {
		u8 line, pin;

		/* If that fails, lets fallback to what is in the config
@@ -372,11 +371,6 @@ static int pci_read_irq_line(struct pci_dev *pci_dev)
		virq = irq_create_mapping(NULL, line);
		if (virq)
			irq_set_irq_type(virq, IRQ_TYPE_LEVEL_LOW);
	} else {
		pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %pOF\n",
			 oirq.args_count, oirq.args[0], oirq.args[1], oirq.np);

		virq = irq_create_of_mapping(&oirq);
	}

	if (!virq) {
+0 −16
Original line number Diff line number Diff line
@@ -62,10 +62,6 @@ config OF_DYNAMIC
config OF_ADDRESS
	def_bool y
	depends on !SPARC && HAS_IOMEM
	select OF_ADDRESS_PCI if PCI

config OF_ADDRESS_PCI
	bool

config OF_IRQ
	def_bool y
@@ -82,18 +78,6 @@ config OF_MDIO
	help
	  OpenFirmware MDIO bus (Ethernet PHY) accessors

config OF_PCI
	def_tristate PCI
	depends on PCI
	help
	  OpenFirmware PCI bus accessors

config OF_PCI_IRQ
	def_tristate PCI
	depends on OF_PCI && OF_IRQ
	help
	  OpenFirmware PCI IRQ routing helpers

config OF_RESERVED_MEM
	depends on OF_EARLY_FLATTREE
	bool
+0 −2
Original line number Diff line number Diff line
@@ -10,8 +10,6 @@ obj-$(CONFIG_OF_IRQ) += irq.o
obj-$(CONFIG_OF_NET)	+= of_net.o
obj-$(CONFIG_OF_UNITTEST) += unittest.o
obj-$(CONFIG_OF_MDIO)	+= of_mdio.o
obj-$(CONFIG_OF_PCI)	+= of_pci.o
obj-$(CONFIG_OF_PCI_IRQ)  += of_pci_irq.o
obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
obj-$(CONFIG_OF_RESOLVE)  += resolver.o
obj-$(CONFIG_OF_OVERLAY) += overlay.o
+3 −5
Original line number Diff line number Diff line
@@ -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",
Loading