watchdog: stm32mp: migrate trace to dev macro

Change debug and pr_err to dev macro and define LOG_CATEGORY.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
This commit is contained in:
Patrick Delaunay 2020-11-06 19:01:41 +01:00 committed by Patrick Delaunay
parent 33d797ae03
commit 281ebc5bf7

View File

@ -3,6 +3,8 @@
* Copyright (C) 2019, STMicroelectronics - All Rights Reserved * Copyright (C) 2019, STMicroelectronics - All Rights Reserved
*/ */
#define LOG_CATEGORY UCLASS_WDT
#include <common.h> #include <common.h>
#include <clk.h> #include <clk.h>
#include <dm.h> #include <dm.h>
@ -10,6 +12,7 @@
#include <syscon.h> #include <syscon.h>
#include <wdt.h> #include <wdt.h>
#include <asm/io.h> #include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/iopoll.h> #include <linux/iopoll.h>
@ -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); val & (SR_PVU | SR_RVU), CONFIG_SYS_HZ);
if (ret < 0) { if (ret < 0) {
pr_err("Updating IWDG registers timeout"); dev_err(dev, "Updating IWDG registers timeout");
return -ETIMEDOUT; return -ETIMEDOUT;
} }
@ -90,7 +93,7 @@ static int stm32mp_wdt_probe(struct udevice *dev)
struct clk clk; struct clk clk;
int ret; int ret;
debug("IWDG init\n"); dev_dbg(dev, "IWDG init\n");
priv->base = dev_read_addr(dev); priv->base = dev_read_addr(dev);
if (priv->base == FDT_ADDR_T_NONE) 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); priv->wdt_clk_rate = clk_get_rate(&clk);
debug("IWDG init done\n"); dev_dbg(dev, "IWDG init done\n");
return 0; return 0;
} }