From 8b522db474f1573e7f68cdb046d5dc4d789e084b Mon Sep 17 00:00:00 2001 From: Marc Jones Date: Mon, 12 Oct 2020 11:58:46 -0600 Subject: soc/intel/xeon_sp: Move function debug macros Move the macros for printing debug information to debug.h in the common console include directory and device include file. These are available if the platform selects DEFAULT_CONSOLE_LOGLEVEL_8. The macros could be used by any platform. Change-Id: Ie237bdf8cdc42c76f38a0c820fdc92e81095f47c Signed-off-by: Marc Jones Reviewed-on: https://review.coreboot.org/c/coreboot/+/46093 Tested-by: build bot (Jenkins) Reviewed-by: Jay Talbott Reviewed-by: Stefan Reinauer --- src/include/device/device.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/include/device/device.h') diff --git a/src/include/device/device.h b/src/include/device/device.h index eb9ef42eef..8a481b2ca2 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -279,6 +279,20 @@ void show_all_devs_resources(int debug_level, const char *msg); #define LOG_IO_RESOURCE(type, dev, index, base, size) #endif /* DEBUG_RESOURCES*/ +#if CONFIG(DEBUG_FUNC) +#include +#define DEV_FUNC_ENTER(dev) \ + printk(BIOS_SPEW, "%s:%s:%d: ENTER (dev: %s)\n", \ + __FILE__, __func__, __LINE__, dev_path(dev)) + +#define DEV_FUNC_EXIT(dev) \ + printk(BIOS_SPEW, "%s:%s:%d: EXIT (dev: %s)\n", __FILE__, \ + __func__, __LINE__, dev_path(dev)) +#else /* DEBUG_FUNC */ +#define DEV_FUNC_ENTER(dev) +#define DEV_FUNC_EXIT(dev) +#endif /* DEBUG_FUNC */ + /* Rounding for boundaries. * Due to some chip bugs, go ahead and round IO to 16 */ -- cgit v1.2.3