summaryrefslogtreecommitdiff
path: root/arch/sandbox/lib/pci_io.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-09-01 16:26:26 -0600
committerTom Rini <trini@konsulko.com>2024-09-18 13:01:00 -0600
commit505b21b60720f00ef67d880fa7f176cbd207c1c3 (patch)
treed48033ff8af11551cfcf84dcf2ee08bbb73c28ce /arch/sandbox/lib/pci_io.c
parente82baf0801f399266781303675b0f66cca2bc51f (diff)
sandbox: Add some debugging to pci_io
Add a little debugging to this driver. Convert the existing debugging to use logging. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/sandbox/lib/pci_io.c')
-rw-r--r--arch/sandbox/lib/pci_io.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/sandbox/lib/pci_io.c b/arch/sandbox/lib/pci_io.c
index 6040eacb594..5eff7c7d65d 100644
--- a/arch/sandbox/lib/pci_io.c
+++ b/arch/sandbox/lib/pci_io.c
@@ -8,6 +8,8 @@
* IO space access commands.
*/
+#define LOG_CATEGORY UCLASS_PCI
+
#include <command.h>
#include <dm.h>
#include <log.h>
@@ -31,10 +33,11 @@ int pci_map_physmem(phys_addr_t paddr, unsigned long *lenp,
if (ret)
continue;
*devp = dev;
+ log_debug("addr=%lx, dev=%s\n", (ulong)paddr, dev->name);
return 0;
}
- debug("%s: failed: addr=%pap\n", __func__, &paddr);
+ log_debug("%s: failed: addr=%pap\n", __func__, &paddr);
return -ENOSYS;
}
@@ -66,7 +69,7 @@ static int pci_io_read(unsigned int addr, ulong *valuep, pci_size_t size)
}
}
- debug("%s: failed: addr=%x\n", __func__, addr);
+ log_debug("%s: failed: addr=%x\n", __func__, addr);
return -ENOSYS;
}
@@ -87,7 +90,7 @@ static int pci_io_write(unsigned int addr, ulong value, pci_size_t size)
}
}
- debug("%s: failed: addr=%x, value=%lx\n", __func__, addr, value);
+ log_debug("%s: failed: addr=%x, value=%lx\n", __func__, addr, value);
return -ENOSYS;
}