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

Commit c68a2cf0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull PCI fixes from Bjorn Helgaas:

 - fix sparc build issue when OF_IRQ not enabled (Guenter Roeck)

 - fix enumeration of devices below switches on DesignWare-based
   controllers (Koen Vandeputte)

* tag 'pci-v4.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: dwc: Fix enumeration end when reaching root subordinate
  PCI: Move of_irq_parse_and_map_pci() declaration under OF_IRQ
parents 99d7d64b fc110ebd
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -613,7 +613,7 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
	/* setup bus numbers */
	/* setup bus numbers */
	val = dw_pcie_readl_dbi(pci, PCI_PRIMARY_BUS);
	val = dw_pcie_readl_dbi(pci, PCI_PRIMARY_BUS);
	val &= 0xff000000;
	val &= 0xff000000;
	val |= 0x00010100;
	val |= 0x00ff0100;
	dw_pcie_writel_dbi(pci, PCI_PRIMARY_BUS, val);
	dw_pcie_writel_dbi(pci, PCI_PRIMARY_BUS, val);


	/* setup command register */
	/* setup command register */
+10 −7
Original line number Original line Diff line number Diff line
@@ -13,7 +13,6 @@ struct device_node;
struct device_node *of_pci_find_child_device(struct device_node *parent,
struct device_node *of_pci_find_child_device(struct device_node *parent,
					     unsigned int devfn);
					     unsigned int devfn);
int of_pci_get_devfn(struct device_node *np);
int of_pci_get_devfn(struct device_node *np);
int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin);
int of_pci_parse_bus_range(struct device_node *node, struct resource *res);
int of_pci_parse_bus_range(struct device_node *node, struct resource *res);
int of_get_pci_domain_nr(struct device_node *node);
int of_get_pci_domain_nr(struct device_node *node);
int of_pci_get_max_link_speed(struct device_node *node);
int of_pci_get_max_link_speed(struct device_node *node);
@@ -33,12 +32,6 @@ static inline int of_pci_get_devfn(struct device_node *np)
	return -EINVAL;
	return -EINVAL;
}
}


static inline int
of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin)
{
	return 0;
}

static inline int
static inline int
of_pci_parse_bus_range(struct device_node *node, struct resource *res)
of_pci_parse_bus_range(struct device_node *node, struct resource *res)
{
{
@@ -67,6 +60,16 @@ of_pci_get_max_link_speed(struct device_node *node)
static inline void of_pci_check_probe_only(void) { }
static inline void of_pci_check_probe_only(void) { }
#endif
#endif


#if IS_ENABLED(CONFIG_OF_IRQ)
int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin);
#else
static inline int
of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin)
{
	return 0;
}
#endif

#if defined(CONFIG_OF_ADDRESS)
#if defined(CONFIG_OF_ADDRESS)
int of_pci_get_host_bridge_resources(struct device_node *dev,
int of_pci_get_host_bridge_resources(struct device_node *dev,
			unsigned char busno, unsigned char bus_max,
			unsigned char busno, unsigned char bus_max,