coreboot/src/soc
Subrata Banik bf83dd9927 soc/qualcomm/common/qclib: Introduce runtime debug log level control
Introduce a new static function, `qclib_debug_log_level`, that
checks a runtime-configurable option, "qclib_debug_level", to
control whether QCLib enables serial logging.

This allows for dynamic control of QCLib's verbose output via a
coreboot option instead of relying solely on the static
`CONFIG(CONSOLE_SERIAL)` Kconfig option. This is necessary because
while the serial console might be enabled for general coreboot
logging, the user may want to suppress the often extensive and
low-level output from QCLib to keep the console clean during normal
operations.

The check for enabling QCLib's serial output is updated from
`if (CONFIG(CONSOLE_SERIAL))` to
`if (CONFIG(CONSOLE_SERIAL) && qclib_debug_log_level())`

The option value is read using
`get_uint_option("qclib_debug_level", 1)`, meaning the default
behavior is to enable QCLib logging if `CONSOLE_SERIAL` is set,
maintaining backward compatibility unless the option is explicitly
set to 0 at runtime.

BUG=b:445211186
TEST=Build and boot a Qualcomm platform with CONFIG_CONSOLE_SERIAL
enabled. Confirmed QCLib logs are present by default.
Set option "qclib_debug_level" to 0 via CBFS option and confirmed
QCLib logs are suppressed while coreboot serial output remains
active.

Change-Id: I2c7326fae889508f09e1eb5e3863456cf54f5c29
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89185
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-09-18 01:56:22 +00:00
..
amd soc/amd/common/fsp/dmi: Skip parsing when memory type UNKNOWN 2025-08-30 13:55:51 +00:00
cavium
example/min86
ibm/power9 soc/power9/rom_media.c: find CBFS in PNOR 2025-08-28 20:14:01 +00:00
intel soc/intel/pantherlake: Add support for a new Panther Lake B0 SKU 2025-09-13 22:00:24 +00:00
mediatek soc/mediatek/common: Add support for regulator VCN18 2025-09-16 15:04:31 +00:00
nvidia
qualcomm soc/qualcomm/common/qclib: Introduce runtime debug log level control 2025-09-18 01:56:22 +00:00
rockchip
samsung
sifive
ti
ucb/riscv
xilinx