clk: define LOG_CATEGORY for generic and ccf clocks
Define LOG_CATEGORY to allow filtering with log command
for generic clock and CCF clocks.
This patch also change existing printf, debug and pr_ macro
to log_ or dev_ macro.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index fd746f2..b49946f 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -21,12 +21,16 @@
* clock.
*/
+#define LOG_CATEGORY UCLASS_CLK
+
#include <common.h>
#include <clk.h>
#include <clk-uclass.h>
+#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <dm/device.h>
+#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/uclass.h>
#include <linux/bitops.h>
@@ -124,7 +128,7 @@
index = clk_fetch_parent_index(clk, parent);
if (index < 0) {
- printf("Could not fetch index\n");
+ log_err("Could not fetch index\n");
return index;
}
@@ -170,7 +174,7 @@
if (clk_mux_flags & CLK_MUX_HIWORD_MASK) {
width = fls(mask) - ffs(mask) + 1;
if (width + shift > 16) {
- pr_err("mux value exceeds LOWORD field\n");
+ dev_err(dev, "mux value exceeds LOWORD field\n");
return ERR_PTR(-EINVAL);
}
}