From 2bd51f2891150b524f73e58c55da5fe68a7d1457 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 | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c index fa0fc46edb0c..9715ba070263 100644 --- a/drivers/pci/controller/pci-mvebu.c +++ b/drivers/pci/controller/pci-mvebu.c @@ -624,9 +624,13 @@ 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 pci_bridge_emul_conf_write(&port->bridge, where, size, val); + } if (!mvebu_pcie_link_up(port)) return PCIBIOS_DEVICE_NOT_FOUND; @@ -653,9 +657,14 @@ 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 pci_bridge_emul_conf_read(&port->bridge, where, - size, val); + if (bus->number == 0) { + ret = pci_bridge_emul_conf_read(&port->bridge, 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; @@ -986,6 +995,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