Skip to contentSkip to conversation

rng: stm32mp1: use log() instead of printf()

PATCH New Heinrich Schuchardt 3 participants 4 messages Sep 17, 2020 – Sep 21, 2020 Arm STM32

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rng: stm32mp1: use log() instead of printf()

The logging system provides flexible filtering and enhanced output.

---
 drivers/rng/stm32mp1_rng.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/rng/stm32mp1_rng.c +3 -1
index 7ef7ff9756..c1bae180f7 100644
@@ -3,6 +3,8 @@
  * Copyright (c) 2019, Linaro Limited
  */
 
+#define LOG_CATEGORY UCLASS_RNG
+
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
@@ -53,7 +55,7 @@ static int stm32_rng_read(struct udevice *dev, void *data, size_t len)
 			for (i = 0; i < 12; i++)
 				readl(pdata->base + RNG_DR);
 			if (readl(pdata->base + RNG_SR) & RNG_SR_SEIS) {
-				printf("RNG Noise");
+				log_err("RNG Noise");
 				return -EIO;
 			}
 			/* start again */

--
2.28.0

#2 lore raw

PATCH 1/1 rng: stm32mp1: use log() instead of printf()

Quoted 13 lines · Sughosh Ganu

On Thu, 17 Sep 2020 at 20:27, Heinrich Schuchardt <[email protected] <mailto:[email protected]>> wrote:

    The logging system provides flexible filtering and enhanced output.

    Signed-off-by: Heinrich Schuchardt <[email protected]
    <mailto:[email protected]>>
    ---
    ?drivers/rng/stm32mp1_rng.c | 4 +++-
    ?1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 2 lines

<mailto:[email protected]>>

Thanks for reviewing.

I will add the patch to my next EFI pull request.

Best regards

Heinrich

#3 lore raw

PATCH 1/1 rng: stm32mp1: use log() instead of printf()

In reply to Heinrich Schuchardt

Hi Heinrich

Quoted 6 lines

From: U-Boot <[email protected]> On Behalf Of Heinrich Schuchardt
Sent: jeudi 17 septembre 2020 16:58
To: Sughosh Ganu <[email protected]>
Cc: u-boot at lists.denx.de; Heinrich Schuchardt <[email protected]>
Subject: [PATCH 1/1] rng: stm32mp1: use log() instead of printf()

Quoted 7 lines

The logging system provides flexible filtering and enhanced output.

---
 drivers/rng/stm32mp1_rng.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Even it is too late as already merged....

Do you expect that this STM32MP15X is added in "ARM STM STM32MP" of MAINTAINERS file ?

	ARM STM STM32MP
	....
	+F:	drivers/rng/stm32mp1_rng.c	

...

Or the default rules is enough and Sughosh support all the rng drivers, whatever the platform ?

	RNG
	...
	F:	drivers/rng/

Thanks

Patrick