]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: st: common: migrate trace to dev and log macro
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 6 Nov 2020 18:02:00 +0000 (19:02 +0100)
committerPatrick Delaunay <patrick.delaunay@foss.st.com>
Wed, 13 Jan 2021 08:52:58 +0000 (09:52 +0100)
Change pr_* to dev_ or log_ macro and define LOG_CATEGORY.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
board/st/common/stm32mp_dfu.c
board/st/common/stm32mp_mtdparts.c
board/st/common/stpmic1.c
board/st/common/stusb160x.c

index 9c3d115dce7384e3e8144daed93303ee6271d467..5633a6cb95c6eee894701b6d5bc7c79374120760 100644 (file)
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <dfu.h>
 #include <env.h>
+#include <log.h>
 #include <memalign.h>
 #include <misc.h>
 #include <mtd.h>
@@ -199,7 +200,7 @@ static int dfu_pmic_read(u64 offset, u8 *buffer, long *size)
                ret = 0;
        }
 #else
-       pr_err("PMIC update not supported");
+       log_err("PMIC update not supported");
        ret = -EOPNOTSUPP;
 #endif
 
index 9f5897f8c860640e72b24a9a28ddaa849e6e9522..71a0b449adfe1f4204a5345afc1fe09dc8794b42 100644 (file)
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <env.h>
 #include <env_internal.h>
+#include <log.h>
 #include <mtd.h>
 #include <mtd_node.h>
 #include <tee.h>
@@ -117,7 +118,7 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
        for (uclass_first_device(UCLASS_MTD, &dev);
             dev;
             uclass_next_device(&dev)) {
-               pr_debug("mtd device = %s\n", dev->name);
+               log_debug("mtd device = %s\n", dev->name);
        }
 
        if (nor || nand) {
@@ -163,5 +164,5 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
        mtd_initialized = true;
        *mtdids = ids;
        *mtdparts = parts;
-       debug("%s:mtdids=%s & mtdparts=%s\n", __func__, ids, parts);
+       log_debug("mtdids=%s & mtdparts=%s\n", ids, parts);
 }
index a313b817c57290f1d3e3e0c2ace443025ce1ea97..5fb1be2fd3d36c805707b7e2803cb079429273d8 100644 (file)
@@ -3,8 +3,11 @@
  * Copyright (C) 2020, STMicroelectronics - All Rights Reserved
  */
 
+#define LOG_CATEGORY LOGC_BOARD
+
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/ddr.h>
 #include <linux/bitops.h>
@@ -202,7 +205,7 @@ void stpmic1_init(u32 voltage_mv)
 
        /* Check if debug is enabled to program PMIC according to the bit */
        if (readl(TAMP_BOOT_CONTEXT) & TAMP_BOOT_DEBUG_ON) {
-               printf("Keep debug unit ON\n");
+               log_info("Keep debug unit ON\n");
 
                pmic_clrsetbits(dev, STPMIC1_BUCKS_MRST_CR,
                                STPMIC1_MRST_BUCK_DEBUG,
index e0a2b76353afb0660dcc75a41e2a30b4f1e5f423..f0385e5e3830bca4234cdd9d6b8b198b12381542 100644 (file)
@@ -6,6 +6,8 @@
  * Copyright (C) 2020, STMicroelectronics - All Rights Reserved
  */
 
+#define LOG_CATEGORY UCLASS_I2C_GENERIC
+
 #include <common.h>
 #include <dm.h>
 #include <i2c.h>