From ac0aa231c23390150dddfdf923400af2a4a4e86b Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 8 Jan 2019 10:59:19 +0100 Subject: [PATCH] PCI: mvebu: add debug Signed-off-by: Thomas Petazzoni --- drivers/pci/controller/pci-mvebu.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c index dacad51f19e7..94aa7e42c5e2 100644 --- a/drivers/pci/controller/pci-mvebu.c +++ b/drivers/pci/controller/pci-mvebu.c @@ -796,8 +796,12 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn, return PCIBIOS_DEVICE_NOT_FOUND; /* Access the emulated PCI-to-PCI bridge */ - if (bus->number == 0) + if (bus->number == 0) { + dev_info(&pcie->pdev->dev, + "%s: devfn=0x%x, where=0x%x, size=%d, val=0x%x\n", + __func__, devfn, where, size, val); return mvebu_sw_pci_bridge_write(port, where, size, val); + } if (!mvebu_pcie_link_up(port)) return PCIBIOS_DEVICE_NOT_FOUND; @@ -824,8 +828,13 @@ static int mvebu_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, } /* Access the emulated PCI-to-PCI bridge */ - if (bus->number == 0) - return mvebu_sw_pci_bridge_read(port, where, size, val); + if (bus->number == 0) { + ret = mvebu_sw_pci_bridge_read(port, where, size, val); + dev_info(&pcie->pdev->dev, + "%s: devfn=0x%x, where=0x%x, size=%d, val=0x%x\n", + __func__, devfn, where, size, *val); + return ret; + } if (!mvebu_pcie_link_up(port)) { *val = 0xffffffff; @@ -1156,6 +1165,8 @@ static int mvebu_pcie_parse_request_resources(struct mvebu_pcie *pcie) /* Get the PCIe IO aperture */ mvebu_mbus_get_pcie_io_aperture(&pcie->io); + dev_info(dev, "MEM: %pR, IO: %pR\n", &pcie->mem, &pcie->io); + if (resource_size(&pcie->io) != 0) { pcie->realio.flags = pcie->io.flags; pcie->realio.start = PCIBIOS_MIN_IO; -- 2.20.1