]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rng: stm32mp1: use log() instead of printf()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Thu, 17 Sep 2020 14:49:02 +0000 (16:49 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 18 Sep 2020 20:23:58 +0000 (22:23 +0200)
The logging system provides flexible filtering and enhanced output.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
drivers/rng/stm32mp1_rng.c

index 7ef7ff9756d4fd5e748c79f11ed90f44068e266e..c1bae180f772fe7c9cda4286bf063192cfbda1ec 100644 (file)
@@ -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 */