diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-11-06 06:32:27 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-11-08 07:49:15 +0000 |
commit | c86fc8e63d81251a5da80ed55e4fbc9900a900d9 (patch) | |
tree | 66cefc92a8cb97ac02693b4df42ec30fb77337a8 /src/southbridge/intel/bd82x6x/me.c | |
parent | 82c0e7e3d50cca20ed98d650d511071329e9f3a0 (diff) | |
download | coreboot-c86fc8e63d81251a5da80ed55e4fbc9900a900d9.tar.xz |
sb,soc/intel: Reduce preprocessor use with ME debugging
Change-Id: Iedd54730f140b6a7a40834f00d558ed99a345077
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36639
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/southbridge/intel/bd82x6x/me.c')
-rw-r--r-- | src/southbridge/intel/bd82x6x/me.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/southbridge/intel/bd82x6x/me.c b/src/southbridge/intel/bd82x6x/me.c index ea60085624..5e355a110f 100644 --- a/src/southbridge/intel/bd82x6x/me.c +++ b/src/southbridge/intel/bd82x6x/me.c @@ -60,11 +60,13 @@ static const char *me_bios_path_values[] = { /* MMIO base address for MEI interface */ static u32 *mei_base_address; -#if CONFIG(DEBUG_INTEL_ME) static void mei_dump(void *ptr, int dword, int offset, const char *type) { struct mei_csr *csr; + if (!CONFIG(DEBUG_INTEL_ME)) + return; + printk(BIOS_SPEW, "%-9s[%02x] : ", type, offset); switch (offset) { @@ -90,9 +92,6 @@ static void mei_dump(void *ptr, int dword, int offset, const char *type) break; } } -#else -# define mei_dump(ptr,dword,offset,type) do {} while (0) -#endif /* * ME/MEI access helpers using memcpy to avoid aliasing. @@ -373,9 +372,8 @@ static int mkhi_end_of_post(void) } #endif -#if (CONFIG_DEFAULT_CONSOLE_LOGLEVEL >= BIOS_DEBUG) && !defined(__SMM__) /* Get ME firmware version */ -static int mkhi_get_fw_version(void) +static int __unused mkhi_get_fw_version(void) { struct me_fw_version version; struct mkhi_header mkhi = { @@ -412,7 +410,7 @@ static inline void print_cap(const char *name, int state) } /* Get ME Firmware Capabilities */ -static int mkhi_get_fwcaps(void) +static int __unused mkhi_get_fwcaps(void) { u32 rule_id = 0; struct me_fwcaps cap; @@ -454,7 +452,6 @@ static int mkhi_get_fwcaps(void) return 0; } -#endif #if CONFIG(CHROMEOS) && 0 /* DISABLED */ /* Tell ME to issue a global reset */ @@ -714,12 +711,12 @@ static void intel_me_init(struct device *dev) if (intel_mei_setup(dev) < 0) break; -#if (CONFIG_DEFAULT_CONSOLE_LOGLEVEL >= BIOS_DEBUG) - /* Print ME firmware version */ - mkhi_get_fw_version(); - /* Print ME firmware capabilities */ - mkhi_get_fwcaps(); -#endif + if (CONFIG_DEFAULT_CONSOLE_LOGLEVEL >= BIOS_DEBUG) { + /* Print ME firmware version */ + mkhi_get_fw_version(); + /* Print ME firmware capabilities */ + mkhi_get_fwcaps(); + } /* * Leave the ME unlocked in this path. |