Skip to content

Commit c68a2cf

Browse files
committed
Merge tag 'pci-v4.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
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
2 parents 99d7d64 + fc110eb commit c68a2cf

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

drivers/pci/dwc/pcie-designware-host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
613613
/* setup bus numbers */
614614
val = dw_pcie_readl_dbi(pci, PCI_PRIMARY_BUS);
615615
val &= 0xff000000;
616-
val |= 0x00010100;
616+
val |= 0x00ff0100;
617617
dw_pcie_writel_dbi(pci, PCI_PRIMARY_BUS, val);
618618

619619
/* setup command register */

include/linux/of_pci.h

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ struct device_node;
1313
struct device_node *of_pci_find_child_device(struct device_node *parent,
1414
unsigned int devfn);
1515
int of_pci_get_devfn(struct device_node *np);
16-
int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin);
1716
int of_pci_parse_bus_range(struct device_node *node, struct resource *res);
1817
int of_get_pci_domain_nr(struct device_node *node);
1918
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)
3332
return -EINVAL;
3433
}
3534

36-
static inline int
37-
of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin)
38-
{
39-
return 0;
40-
}
41-
4235
static inline int
4336
of_pci_parse_bus_range(struct device_node *node, struct resource *res)
4437
{
@@ -67,6 +60,16 @@ of_pci_get_max_link_speed(struct device_node *node)
6760
static inline void of_pci_check_probe_only(void) { }
6861
#endif
6962

63+
#if IS_ENABLED(CONFIG_OF_IRQ)
64+
int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin);
65+
#else
66+
static inline int
67+
of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin)
68+
{
69+
return 0;
70+
}
71+
#endif
72+
7073
#if defined(CONFIG_OF_ADDRESS)
7174
int of_pci_get_host_bridge_resources(struct device_node *dev,
7275
unsigned char busno, unsigned char bus_max,

0 commit comments

Comments
 (0)