提交 db271747 编写于 作者: H Honghui Zhang 提交者: Bjorn Helgaas

PCI: mediatek: Use bus->sysdata to get host private data

75983c6d1f38 ("PCI: mediatek: Add controller support for MT2712 and
MT7622") has put the mtk_pcie * into bus->sysdata.  Take advantage of that
to get the private data and simplify the code.
Signed-off-by: NHonghui Zhang <honghui.zhang@mediatek.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NRyder Lee <ryder.lee@mediatek.com>
上级 c2e0ba9c
...@@ -511,8 +511,7 @@ static int mtk_pcie_setup_irq(struct mtk_pcie_port *port, ...@@ -511,8 +511,7 @@ static int mtk_pcie_setup_irq(struct mtk_pcie_port *port,
static void __iomem *mtk_pcie_map_bus(struct pci_bus *bus, static void __iomem *mtk_pcie_map_bus(struct pci_bus *bus,
unsigned int devfn, int where) unsigned int devfn, int where)
{ {
struct pci_host_bridge *host = pci_find_host_bridge(bus); struct mtk_pcie *pcie = bus->sysdata;
struct mtk_pcie *pcie = pci_host_bridge_priv(host);
writel(PCIE_CONF_ADDR(where, PCI_FUNC(devfn), PCI_SLOT(devfn), writel(PCIE_CONF_ADDR(where, PCI_FUNC(devfn), PCI_SLOT(devfn),
bus->number), pcie->base + PCIE_CFG_ADDR); bus->number), pcie->base + PCIE_CFG_ADDR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册