From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Delaunay Date: Tue, 6 Apr 2021 09:27:39 +0200 Subject: [PATCH 2/2] stm32mp: replace printf by log macro in setup_boot_mode In-Reply-To: <20210406092731.1.Iad88039569017850ed77dfae267b261f8efc8ad7@changeid> References: <20210406092731.1.Iad88039569017850ed77dfae267b261f8efc8ad7@changeid> Message-ID: <20210406092731.2.I5436203a1417ef602cffce8d3e56f84c5f92c539@changeid> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Replace the remaining printf in setup_boot_mode() by log macro to handle filtering for log features. Signed-off-by: Patrick Delaunay --- arch/arm/mach-stm32mp/cpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c index 2f05c5e91b..621a6b7c89 100644 --- a/arch/arm/mach-stm32mp/cpu.c +++ b/arch/arm/mach-stm32mp/cpu.c @@ -502,8 +502,8 @@ static void setup_boot_mode(void) if (IS_ENABLED(CONFIG_CMD_STM32PROG_SERIAL)) gd->flags &= ~(GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE); - printf("uart%d = %s not found in device tree!\n", - instance + 1, cmd); + log_err("uart%d = %s not found in device tree!\n", + instance + 1, cmd); break; } sprintf(cmd, "%d", dev_seq(dev)); @@ -514,7 +514,7 @@ static void setup_boot_mode(void) if (IS_ENABLED(CONFIG_CMD_STM32PROG_SERIAL) && gd->cur_serial_dev != dev) { gd->flags &= ~(GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE); - printf("serial boot with console enabled!\n"); + log_info("serial boot with console enabled!\n"); } break; case BOOT_SERIAL_USB: @@ -546,7 +546,7 @@ static void setup_boot_mode(void) switch (forced_mode) { case BOOT_FASTBOOT: - printf("Enter fastboot!\n"); + log_info("Enter fastboot!\n"); env_set("preboot", "env set preboot; fastboot 0"); break; case BOOT_STM32PROG: @@ -556,7 +556,7 @@ static void setup_boot_mode(void) case BOOT_UMS_MMC0: case BOOT_UMS_MMC1: case BOOT_UMS_MMC2: - printf("Enter UMS!\n"); + log_info("Enter UMS!\n"); instance = forced_mode - BOOT_UMS_MMC0; sprintf(cmd, "env set preboot; ums 0 mmc %d", instance); env_set("preboot", cmd); -- 2.17.1