From: Patrick Delaunay Date: Fri, 6 Nov 2020 18:01:41 +0000 (+0100) Subject: watchdog: stm32mp: migrate trace to dev macro X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=281ebc5bf7fbc321f5e8d8e1c4fa390c329e2d68;p=u-boot.git watchdog: stm32mp: migrate trace to dev macro Change debug and pr_err to dev macro and define LOG_CATEGORY. Signed-off-by: Patrick Delaunay Reviewed-by: Patrice Chotard --- diff --git a/drivers/watchdog/stm32mp_wdt.c b/drivers/watchdog/stm32mp_wdt.c index 53586fdbfc..4be616c1b6 100644 --- a/drivers/watchdog/stm32mp_wdt.c +++ b/drivers/watchdog/stm32mp_wdt.c @@ -3,6 +3,8 @@ * Copyright (C) 2019, STMicroelectronics - All Rights Reserved */ +#define LOG_CATEGORY UCLASS_WDT + #include #include #include @@ -10,6 +12,7 @@ #include #include #include +#include #include #include @@ -77,7 +80,7 @@ static int stm32mp_wdt_start(struct udevice *dev, u64 timeout_ms, ulong flags) val & (SR_PVU | SR_RVU), CONFIG_SYS_HZ); if (ret < 0) { - pr_err("Updating IWDG registers timeout"); + dev_err(dev, "Updating IWDG registers timeout"); return -ETIMEDOUT; } @@ -90,7 +93,7 @@ static int stm32mp_wdt_probe(struct udevice *dev) struct clk clk; int ret; - debug("IWDG init\n"); + dev_dbg(dev, "IWDG init\n"); priv->base = dev_read_addr(dev); if (priv->base == FDT_ADDR_T_NONE) @@ -112,7 +115,7 @@ static int stm32mp_wdt_probe(struct udevice *dev) priv->wdt_clk_rate = clk_get_rate(&clk); - debug("IWDG init done\n"); + dev_dbg(dev, "IWDG init done\n"); return 0; }