Currently it is not possible to completely silent the debug console
in i.e. PX30, what might be required in some embedded devices.
Disabling DEBUG_UART results in errors, due to missing symbols.
In particular, rockchip sdram driver performs calls to debug_uart
functions (i.e. printascii), defined directly in serial driver.
This patch series fixes the dependencies in Kconfig and provides
dummy implementation of debug_uart functions that are linked in case
serial driver is not used.

changes in v2:
 - Update commit titles
 - Create separate SPL and TPL symbols for RAM_ROCKCHIP_DEBUG

changes in v3:
 - Dropped [PATCH v2 3/5] ram: rockchip: Add separate RAM_ROCKCHIP_DEBUG config 
for TPL/SPL
   As suggested by Kever, dependency on DEBUG_UART is sufficient and this patch
   was not needed.

changes in v4:
 - Add new patch fixing compilation warnings in lib/efi/efi_stub.c, if
   CONFIG_DEBUG_UART is not enabled. The #ifdef directive is used to
   conditionally define debug uart functions, as suggested by Quentin.
 - Fixed invalid redefinition of DEBUG_UART_FUNCS macro, and changed
   the dummy print functions implementation in debug_uart.h

Changes in v5:
 - Replaced [PATCH v4 1/5] ("efi: stub: Define debug uart functions only if 
CONFIG_DEBUG_UART is enabled")
   with changing definition of _debug_uart_putc to inline, as suggested by Tom.
   This is consistent with implementations for other platforms and
   allows to suppress warning withut introducing #ifdefs.
   Same change is added for arch/arm/mach-uniphier/debug-uart/debug-uart.c,
   for consistency.
 - Added dummies for missing functions in debug_uart.h (_printchm, printhex1,
   printhex, debug_uart_init), as suggeted by Quentin.
 - Updated order of patches.
 - Link to v4: 
https://lore.kernel.org/r/20250515-silent_console-v4-0-dec6c8391...@thaumatec.com

--
2.43.0

---
Lukasz Czechowski (6):
      arm: uniphier: Change _debug_uart_putc function to inline
      efi: stub: Change _debug_uart_putc function to inline
      ram: rockchip: Fix dependency of RAM_ROCKCHIP_DEBUG
      debug_uart: Replace debug functions with dummies if CONFIG_DEBUG_UART is 
not set
      rockchip: px30: Weaken dependency TPL/SPL serial
      rockchip: px30: Fix hard dependency to DEBUG_UART_BOARD_INIT

 arch/arm/mach-rockchip/Kconfig                 |  5 ++---
 arch/arm/mach-uniphier/debug-uart/debug-uart.c |  2 +-
 drivers/ram/rockchip/Kconfig                   |  1 +
 include/debug_uart.h                           | 20 ++++++++++++++++++++
 lib/efi/efi_stub.c                             |  2 +-
 5 files changed, 25 insertions(+), 5 deletions(-)
---
base-commit: 1b5e435102aa29a665119430196cb366ce36a01b
change-id: 20250515-silent_console-af979569e24a

Best regards,
-- 
Lukasz Czechowski <lukasz.czechow...@thaumatec.com>

Reply via email to