All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] stm32mp: update uart number in trace of serial device not found
@ 2021-04-06  7:27 Patrick Delaunay
  2021-04-06  7:27 ` [PATCH 2/2] stm32mp: replace printf by log macro in setup_boot_mode Patrick Delaunay
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Patrick Delaunay @ 2021-04-06  7:27 UTC (permalink / raw)
  To: u-boot

Align the uart number in the trace of setup_boot_mode() with the name of
the uart/usart device (start at 1) and not with the instance value
(start at 0), i.e. the serial device sequence number and the index in
serial_addr[].

Fixes: f49eb16c17e2c ("stm32mp: stm32prog: replace alias by serial
device sequence number")

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 arch/arm/mach-stm32mp/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 897ec13ad8..2f05c5e91b 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -503,7 +503,7 @@ static void setup_boot_mode(void)
 				gd->flags &= ~(GD_FLG_SILENT |
 					       GD_FLG_DISABLE_CONSOLE);
 			printf("uart%d = %s not found in device tree!\n",
-			       instance, cmd);
+			       instance + 1, cmd);
 			break;
 		}
 		sprintf(cmd, "%d", dev_seq(dev));
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] stm32mp: replace printf by log macro in setup_boot_mode
  2021-04-06  7:27 [PATCH 1/2] stm32mp: update uart number in trace of serial device not found Patrick Delaunay
@ 2021-04-06  7:27 ` Patrick Delaunay
  2021-04-08 13:57   ` Patrice CHOTARD
  2021-04-09 10:03   ` Patrice CHOTARD
  2021-04-08 13:56 ` [PATCH 1/2] stm32mp: update uart number in trace of serial device not found Patrice CHOTARD
  2021-04-09 10:03 ` Patrice CHOTARD
  2 siblings, 2 replies; 6+ messages in thread
From: Patrick Delaunay @ 2021-04-06  7:27 UTC (permalink / raw)
  To: u-boot

Replace the remaining printf in setup_boot_mode() by log macro
to handle filtering for log features.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
---

 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 1/2] stm32mp: update uart number in trace of serial device not found
  2021-04-06  7:27 [PATCH 1/2] stm32mp: update uart number in trace of serial device not found Patrick Delaunay
  2021-04-06  7:27 ` [PATCH 2/2] stm32mp: replace printf by log macro in setup_boot_mode Patrick Delaunay
@ 2021-04-08 13:56 ` Patrice CHOTARD
  2021-04-09 10:03 ` Patrice CHOTARD
  2 siblings, 0 replies; 6+ messages in thread
From: Patrice CHOTARD @ 2021-04-08 13:56 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 4/6/21 9:27 AM, Patrick Delaunay wrote:
> Align the uart number in the trace of setup_boot_mode() with the name of
> the uart/usart device (start at 1) and not with the instance value
> (start at 0), i.e. the serial device sequence number and the index in
> serial_addr[].
> 
> Fixes: f49eb16c17e2c ("stm32mp: stm32prog: replace alias by serial
> device sequence number")
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  arch/arm/mach-stm32mp/cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
> index 897ec13ad8..2f05c5e91b 100644
> --- a/arch/arm/mach-stm32mp/cpu.c
> +++ b/arch/arm/mach-stm32mp/cpu.c
> @@ -503,7 +503,7 @@ static void setup_boot_mode(void)
>  				gd->flags &= ~(GD_FLG_SILENT |
>  					       GD_FLG_DISABLE_CONSOLE);
>  			printf("uart%d = %s not found in device tree!\n",
> -			       instance, cmd);
> +			       instance + 1, cmd);
>  			break;
>  		}
>  		sprintf(cmd, "%d", dev_seq(dev));
> 

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] stm32mp: replace printf by log macro in setup_boot_mode
  2021-04-06  7:27 ` [PATCH 2/2] stm32mp: replace printf by log macro in setup_boot_mode Patrick Delaunay
@ 2021-04-08 13:57   ` Patrice CHOTARD
  2021-04-09 10:03   ` Patrice CHOTARD
  1 sibling, 0 replies; 6+ messages in thread
From: Patrice CHOTARD @ 2021-04-08 13:57 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 4/6/21 9:27 AM, Patrick Delaunay wrote:
> Replace the remaining printf in setup_boot_mode() by log macro
> to handle filtering for log features.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  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);
> 

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] stm32mp: update uart number in trace of serial device not found
  2021-04-06  7:27 [PATCH 1/2] stm32mp: update uart number in trace of serial device not found Patrick Delaunay
  2021-04-06  7:27 ` [PATCH 2/2] stm32mp: replace printf by log macro in setup_boot_mode Patrick Delaunay
  2021-04-08 13:56 ` [PATCH 1/2] stm32mp: update uart number in trace of serial device not found Patrice CHOTARD
@ 2021-04-09 10:03 ` Patrice CHOTARD
  2 siblings, 0 replies; 6+ messages in thread
From: Patrice CHOTARD @ 2021-04-09 10:03 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 4/6/21 9:27 AM, Patrick Delaunay wrote:
> Align the uart number in the trace of setup_boot_mode() with the name of
> the uart/usart device (start at 1) and not with the instance value
> (start at 0), i.e. the serial device sequence number and the index in
> serial_addr[].
> 
> Fixes: f49eb16c17e2c ("stm32mp: stm32prog: replace alias by serial
> device sequence number")
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  arch/arm/mach-stm32mp/cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
> index 897ec13ad8..2f05c5e91b 100644
> --- a/arch/arm/mach-stm32mp/cpu.c
> +++ b/arch/arm/mach-stm32mp/cpu.c
> @@ -503,7 +503,7 @@ static void setup_boot_mode(void)
>  				gd->flags &= ~(GD_FLG_SILENT |
>  					       GD_FLG_DISABLE_CONSOLE);
>  			printf("uart%d = %s not found in device tree!\n",
> -			       instance, cmd);
> +			       instance + 1, cmd);
>  			break;
>  		}
>  		sprintf(cmd, "%d", dev_seq(dev));
> 
Applied to u-boot-stm/master

Thanks
Patrice

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] stm32mp: replace printf by log macro in setup_boot_mode
  2021-04-06  7:27 ` [PATCH 2/2] stm32mp: replace printf by log macro in setup_boot_mode Patrick Delaunay
  2021-04-08 13:57   ` Patrice CHOTARD
@ 2021-04-09 10:03   ` Patrice CHOTARD
  1 sibling, 0 replies; 6+ messages in thread
From: Patrice CHOTARD @ 2021-04-09 10:03 UTC (permalink / raw)
  To: u-boot

Hi Patrick

On 4/6/21 9:27 AM, Patrick Delaunay wrote:
> Replace the remaining printf in setup_boot_mode() by log macro
> to handle filtering for log features.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  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);
> 
Applied to u-boot-stm/master

Thanks
Patrice

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-09 10:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06  7:27 [PATCH 1/2] stm32mp: update uart number in trace of serial device not found Patrick Delaunay
2021-04-06  7:27 ` [PATCH 2/2] stm32mp: replace printf by log macro in setup_boot_mode Patrick Delaunay
2021-04-08 13:57   ` Patrice CHOTARD
2021-04-09 10:03   ` Patrice CHOTARD
2021-04-08 13:56 ` [PATCH 1/2] stm32mp: update uart number in trace of serial device not found Patrice CHOTARD
2021-04-09 10:03 ` Patrice CHOTARD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.