From cf0bf89227594cf3fdcae8242f023685cdd11cb7 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 17 Sep 2020 16:49:02 +0200 Subject: [PATCH] rng: stm32mp1: use log() instead of printf() The logging system provides flexible filtering and enhanced output. Signed-off-by: Heinrich Schuchardt Reviewed-by: Sughosh Ganu --- drivers/rng/stm32mp1_rng.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/rng/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c index 7ef7ff9756..c1bae180f7 100644 --- a/drivers/rng/stm32mp1_rng.c +++ b/drivers/rng/stm32mp1_rng.c @@ -3,6 +3,8 @@ * Copyright (c) 2019, Linaro Limited */ +#define LOG_CATEGORY UCLASS_RNG + #include #include #include @@ -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.39.5