mirror of
https://xff.cz/git/u-boot/
synced 2025-09-30 06:51:28 +02:00
rng: stm32mp1: use log() instead of printf()
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>
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
* Copyright (c) 2019, Linaro Limited
|
* Copyright (c) 2019, Linaro Limited
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define LOG_CATEGORY UCLASS_RNG
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <clk.h>
|
#include <clk.h>
|
||||||
#include <dm.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++)
|
for (i = 0; i < 12; i++)
|
||||||
readl(pdata->base + RNG_DR);
|
readl(pdata->base + RNG_DR);
|
||||||
if (readl(pdata->base + RNG_SR) & RNG_SR_SEIS) {
|
if (readl(pdata->base + RNG_SR) & RNG_SR_SEIS) {
|
||||||
printf("RNG Noise");
|
log_err("RNG Noise");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
/* start again */
|
/* start again */
|
||||||
|
Reference in New Issue
Block a user