dm: define LOG_CATEGORY for all uclass
Define LOG_CATEGORY for all uclass to allow filtering with
log command.
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/adc/adc-uclass.c b/drivers/adc/adc-uclass.c
index 8781f32..67137ff 100644
--- a/drivers/adc/adc-uclass.c
+++ b/drivers/adc/adc-uclass.c
@@ -4,6 +4,8 @@
* Przemyslaw Marczak <p.marczak@samsung.com>
*/
+#define LOG_CATEGORY UCLASS_ADC
+
#include <common.h>
#include <errno.h>
#include <div64.h>
diff --git a/drivers/ata/ahci-uclass.c b/drivers/ata/ahci-uclass.c
index c4c7a03..d398b50 100644
--- a/drivers/ata/ahci-uclass.c
+++ b/drivers/ata/ahci-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_AHCI
+
#include <common.h>
#include <ahci.h>
#include <dm.h>
diff --git a/drivers/axi/axi-emul-uclass.c b/drivers/axi/axi-emul-uclass.c
index b28351f..793336d 100644
--- a/drivers/axi/axi-emul-uclass.c
+++ b/drivers/axi/axi-emul-uclass.c
@@ -4,6 +4,8 @@
* Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
*/
+#define LOG_CATEGORY UCLASS_AXI_EMUL
+
#include <common.h>
#include <axi.h>
#include <dm.h>
diff --git a/drivers/axi/axi-uclass.c b/drivers/axi/axi-uclass.c
index af8acd9..afb4844 100644
--- a/drivers/axi/axi-uclass.c
+++ b/drivers/axi/axi-uclass.c
@@ -4,6 +4,8 @@
* Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
*/
+#define LOG_CATEGORY UCLASS_AXI
+
#include <common.h>
#include <dm.h>
#include <axi.h>
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index d0d91db..dfc0d46 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_BLK
+
#include <common.h>
#include <blk.h>
#include <dm.h>
diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index 862a85b..c99076c 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -4,6 +4,8 @@
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
+#define LOG_CATEGORY UCLASS_IDE
+
#include <common.h>
#include <ata.h>
#include <blk.h>
diff --git a/drivers/bootcount/bootcount-uclass.c b/drivers/bootcount/bootcount-uclass.c
index 34ac08d..c747c9a 100644
--- a/drivers/bootcount/bootcount-uclass.c
+++ b/drivers/bootcount/bootcount-uclass.c
@@ -3,6 +3,8 @@
* (C) Copyright 2018 Theobroma Systems Design und Consulting GmbH
*/
+#define LOG_CATEGORY UCLASS_BOOTCOUNT
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/button/button-uclass.c b/drivers/button/button-uclass.c
index e06d3eb..e33ed7d 100644
--- a/drivers/button/button-uclass.c
+++ b/drivers/button/button-uclass.c
@@ -5,6 +5,8 @@
* Based on led-uclass.c
*/
+#define LOG_CATEGORY UCLASS_BUTTON
+
#include <common.h>
#include <button.h>
#include <dm.h>
diff --git a/drivers/cache/cache-uclass.c b/drivers/cache/cache-uclass.c
index 3b20a10..0c13dbd 100644
--- a/drivers/cache/cache-uclass.c
+++ b/drivers/cache/cache-uclass.c
@@ -3,6 +3,8 @@
* Copyright (C) 2019 Intel Corporation <www.intel.com>
*/
+#define LOG_CATEGORY UCLASS_CACHE
+
#include <common.h>
#include <cache.h>
#include <dm.h>
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 1425421..f049e36 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -6,6 +6,8 @@
* Copyright (c) 2018, Theobroma Systems Design und Consulting GmbH
*/
+#define LOG_CATEGORY UCLASS_CLK
+
#include <common.h>
#include <clk.h>
#include <clk-uclass.h>
diff --git a/drivers/core/root.c b/drivers/core/root.c
index fe0562c..537e9da 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -6,6 +6,8 @@
* Pavel Herrmann <morpheus.ibis@gmail.com>
*/
+#define LOG_CATEGORY UCLASS_ROOT
+
#include <common.h>
#include <errno.h>
#include <fdtdec.h>
diff --git a/drivers/core/simple-bus.c b/drivers/core/simple-bus.c
index 18f52d2..abc55c2 100644
--- a/drivers/core/simple-bus.c
+++ b/drivers/core/simple-bus.c
@@ -3,6 +3,8 @@
* Copyright (c) 2014 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_SIMPLE_BUS
+
#include <common.h>
#include <asm/global_data.h>
#include <dm.h>
diff --git a/drivers/cpu/cpu-uclass.c b/drivers/cpu/cpu-uclass.c
index 1c338ba..a5cda6a 100644
--- a/drivers/cpu/cpu-uclass.c
+++ b/drivers/cpu/cpu-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_CPU
+
#include <common.h>
#include <cpu.h>
#include <dm.h>
diff --git a/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c b/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
index f5ae35e..6a4d235 100644
--- a/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
+++ b/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
@@ -4,6 +4,8 @@
* Author: Ruchika Gupta <ruchika.gupta@freescale.com>
*/
+#define LOG_CATEGORY UCLASS_MOD_EXP
+
#include <common.h>
#include <dm.h>
#include <asm/global_data.h>
diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
index a93b0b7..652ddbb 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -9,6 +9,8 @@
* Author: Mugunthan V N <mugunthanvnm@ti.com>
*/
+#define LOG_CATEGORY UCLASS_DMA
+
#include <common.h>
#include <cpu_func.h>
#include <dm.h>
diff --git a/drivers/firmware/firmware-uclass.c b/drivers/firmware/firmware-uclass.c
index 7fcd7fb..bfaf283 100644
--- a/drivers/firmware/firmware-uclass.c
+++ b/drivers/firmware/firmware-uclass.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
+#define LOG_CATEGORY UCLASS_FIRMWARE
+
#include <common.h>
#include <dm.h>
diff --git a/drivers/hwspinlock/hwspinlock-uclass.c b/drivers/hwspinlock/hwspinlock-uclass.c
index 8997243..cbe7236 100644
--- a/drivers/hwspinlock/hwspinlock-uclass.c
+++ b/drivers/hwspinlock/hwspinlock-uclass.c
@@ -3,6 +3,8 @@
* Copyright (C) 2018, STMicroelectronics - All Rights Reserved
*/
+#define LOG_CATEGORY UCLASS_HWSPINLOCK
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/i2c/i2c-emul-uclass.c b/drivers/i2c/i2c-emul-uclass.c
index 7917b63..aeec6aa 100644
--- a/drivers/i2c/i2c-emul-uclass.c
+++ b/drivers/i2c/i2c-emul-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2014 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_I2C_EMUL
+
#include <common.h>
#include <dm.h>
#include <i2c.h>
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c
index be56785..04c8850 100644
--- a/drivers/i2c/i2c-uclass.c
+++ b/drivers/i2c/i2c-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2014 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_I2C
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/i2c/muxes/i2c-mux-uclass.c b/drivers/i2c/muxes/i2c-mux-uclass.c
index dbca409..a5d1bb0 100644
--- a/drivers/i2c/muxes/i2c-mux-uclass.c
+++ b/drivers/i2c/muxes/i2c-mux-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_I2C_MUX
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/input/keyboard-uclass.c b/drivers/input/keyboard-uclass.c
index 2c66803..aefc8e8 100644
--- a/drivers/input/keyboard-uclass.c
+++ b/drivers/input/keyboard-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2015 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_KEYBOARD
+
#include <common.h>
#include <dm.h>
#include <keyboard.h>
diff --git a/drivers/led/led-uclass.c b/drivers/led/led-uclass.c
index e15a296..7e298db 100644
--- a/drivers/led/led-uclass.c
+++ b/drivers/led/led-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_LED
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c
index c972d84..01c9e75 100644
--- a/drivers/mailbox/mailbox-uclass.c
+++ b/drivers/mailbox/mailbox-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2016, NVIDIA CORPORATION.
*/
+#define LOG_CATEGORY UCLASS_MAILBOX
+
#include <common.h>
#include <dm.h>
#include <log.h>
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index e77b3af..0139bd6 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -3,6 +3,9 @@
* Copyright (C) 2018-2019 Intel Corporation <www.intel.com>
*
*/
+
+#define LOG_CATEGORY UCLASS_FS_FIRMWARE_LOADER
+
#include <common.h>
#include <dm.h>
#include <env.h>
diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c
index 5926c91..3b24984 100644
--- a/drivers/misc/i2c_eeprom.c
+++ b/drivers/misc/i2c_eeprom.c
@@ -3,6 +3,8 @@
* Copyright (c) 2014 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_I2C_EEPROM
+
#include <common.h>
#include <eeprom.h>
#include <linux/delay.h>
diff --git a/drivers/misc/misc-uclass.c b/drivers/misc/misc-uclass.c
index 55381ed..72720b0 100644
--- a/drivers/misc/misc-uclass.c
+++ b/drivers/misc/misc-uclass.c
@@ -3,6 +3,8 @@
* Copyright (C) 2010 Thomas Chou <thomas@wytron.com.tw>
*/
+#define LOG_CATEGORY UCLASS_MISC
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/misc/p2sb-uclass.c b/drivers/misc/p2sb-uclass.c
index ac28525..94d273d 100644
--- a/drivers/misc/p2sb-uclass.c
+++ b/drivers/misc/p2sb-uclass.c
@@ -6,6 +6,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_P2SB
+
#include <common.h>
#include <dm.h>
#include <log.h>
diff --git a/drivers/misc/pwrseq-uclass.c b/drivers/misc/pwrseq-uclass.c
index c8f6c46..a0f24e1 100644
--- a/drivers/misc/pwrseq-uclass.c
+++ b/drivers/misc/pwrseq-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2015 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_PWRSEQ
+
#include <common.h>
#include <dm.h>
#include <pwrseq.h>
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index 579d7a1..0e13238 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -5,6 +5,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_MMC
+
#include <common.h>
#include <log.h>
#include <mmc.h>
diff --git a/drivers/mtd/mtd-uclass.c b/drivers/mtd/mtd-uclass.c
index 4ab84de..0743fe7 100644
--- a/drivers/mtd/mtd-uclass.c
+++ b/drivers/mtd/mtd-uclass.c
@@ -3,6 +3,8 @@
* Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw>
*/
+#define LOG_CATEGORY UCLASS_MTD
+
#include <common.h>
#include <dm.h>
#include <dm/device-internal.h>
diff --git a/drivers/mtd/spi/sf-uclass.c b/drivers/mtd/spi/sf-uclass.c
index cfce00e..63d1629 100644
--- a/drivers/mtd/spi/sf-uclass.c
+++ b/drivers/mtd/spi/sf-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2014 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_SPI_FLASH
+
#include <common.h>
#include <dm.h>
#include <log.h>
diff --git a/drivers/mux/mux-uclass.c b/drivers/mux/mux-uclass.c
index 6d28dbe..91842c5 100644
--- a/drivers/mux/mux-uclass.c
+++ b/drivers/mux/mux-uclass.c
@@ -11,6 +11,8 @@
* Jean-Jacques Hiblot <jjhiblot@ti.com>
*/
+#define LOG_CATEGORY UCLASS_MUX
+
#include <common.h>
#include <dm.h>
#include <mux-internal.h>
diff --git a/drivers/nvme/nvme-uclass.c b/drivers/nvme/nvme-uclass.c
index 610166d..239a92a 100644
--- a/drivers/nvme/nvme-uclass.c
+++ b/drivers/nvme/nvme-uclass.c
@@ -4,6 +4,8 @@
* Copyright (C) 2017 Bin Meng <bmeng.cn@gmail.com>
*/
+#define LOG_CATEGORY UCLASS_NVME
+
#include <common.h>
#include <dm.h>
diff --git a/drivers/pch/pch-uclass.c b/drivers/pch/pch-uclass.c
index ad4906a..7bc2372 100644
--- a/drivers/pch/pch-uclass.c
+++ b/drivers/pch/pch-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_PCH
+
#include <common.h>
#include <dm.h>
#include <pch.h>
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 22a033e..0bd604d 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_PCI
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/pci_endpoint/pci_ep-uclass.c b/drivers/pci_endpoint/pci_ep-uclass.c
index 5555cf5..6ee4cfb 100644
--- a/drivers/pci_endpoint/pci_ep-uclass.c
+++ b/drivers/pci_endpoint/pci_ep-uclass.c
@@ -9,6 +9,8 @@
* Written by Ramon Fried <ramon.fried@gmail.com>
*/
+#define LOG_CATEGORY UCLASS_PCI_EP
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c
index 43ffbce..59683a0 100644
--- a/drivers/phy/phy-uclass.c
+++ b/drivers/phy/phy-uclass.c
@@ -4,6 +4,8 @@
* Written by Jean-Jacques Hiblot <jjhiblot@ti.com>
*/
+#define LOG_CATEGORY UCLASS_PHY
+
#include <common.h>
#include <dm.h>
#include <dm/device_compat.h>
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index 6e68e52..ea7275c 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -3,6 +3,8 @@
* Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
*/
+#define LOG_CATEGORY UCLASS_PINCTRL
+
#include <common.h>
#include <malloc.h>
#include <asm/global_data.h>
diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c
index af829db..00d1489 100644
--- a/drivers/power/domain/power-domain-uclass.c
+++ b/drivers/power/domain/power-domain-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2016, NVIDIA CORPORATION.
*/
+#define LOG_CATEGORY UCLASS_POWER_DOMAIN
+
#include <common.h>
#include <dm.h>
#include <log.h>
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c
index 79166b8..5dcf6d8 100644
--- a/drivers/power/pmic/pmic-uclass.c
+++ b/drivers/power/pmic/pmic-uclass.c
@@ -4,6 +4,8 @@
* Przemyslaw Marczak <p.marczak@samsung.com>
*/
+#define LOG_CATEGORY UCLASS_PMIC
+
#include <common.h>
#include <fdtdec.h>
#include <errno.h>
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index fac9606..aca00e5 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -4,6 +4,8 @@
* Przemyslaw Marczak <p.marczak@samsung.com>
*/
+#define LOG_CATEGORY UCLASS_REGULATOR
+
#include <common.h>
#include <errno.h>
#include <dm.h>
diff --git a/drivers/pwm/pwm-uclass.c b/drivers/pwm/pwm-uclass.c
index 027181c..648d075 100644
--- a/drivers/pwm/pwm-uclass.c
+++ b/drivers/pwm/pwm-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_PWM
+
#include <common.h>
#include <dm.h>
#include <pwm.h>
diff --git a/drivers/ram/ram-uclass.c b/drivers/ram/ram-uclass.c
index f4d387f..4e21240 100644
--- a/drivers/ram/ram-uclass.c
+++ b/drivers/ram/ram-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_RAM
+
#include <common.h>
#include <ram.h>
#include <dm.h>
diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c
index 5919c8b..64c47c1 100644
--- a/drivers/remoteproc/rproc-uclass.c
+++ b/drivers/remoteproc/rproc-uclass.c
@@ -3,6 +3,9 @@
* (C) Copyright 2015
* Texas Instruments Incorporated - http://www.ti.com/
*/
+
+#define LOG_CATEGORY UCLASS_REMOTEPROC
+
#define pr_fmt(fmt) "%s: " fmt, __func__
#include <common.h>
#include <errno.h>
diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c
index ac89eaf..8caa616 100644
--- a/drivers/reset/reset-uclass.c
+++ b/drivers/reset/reset-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2016, NVIDIA CORPORATION.
*/
+#define LOG_CATEGORY UCLASS_RESET
+
#include <common.h>
#include <dm.h>
#include <fdtdec.h>
diff --git a/drivers/rng/rng-uclass.c b/drivers/rng/rng-uclass.c
index b6af3b8..53108e1 100644
--- a/drivers/rng/rng-uclass.c
+++ b/drivers/rng/rng-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2019, Linaro Limited
*/
+#define LOG_CATEGORY UCLASS_RNG
+
#include <common.h>
#include <dm.h>
#include <rng.h>
diff --git a/drivers/rtc/rtc-uclass.c b/drivers/rtc/rtc-uclass.c
index b406bab..be6a2dd 100644
--- a/drivers/rtc/rtc-uclass.c
+++ b/drivers/rtc/rtc-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_RTC
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/scsi/scsi-uclass.c b/drivers/scsi/scsi-uclass.c
index 90a0add..a7c1eaf 100644
--- a/drivers/scsi/scsi-uclass.c
+++ b/drivers/scsi/scsi-uclass.c
@@ -8,6 +8,8 @@
* Based on ahci-uclass.c
*/
+#define LOG_CATEGORY UCLASS_SCSI
+
#include <common.h>
#include <dm.h>
#include <scsi.h>
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 8a87eed..2b4feac 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2014 The Chromium OS Authors.
*/
+#define LOG_CATEGORY UCLASS_SERIAL
+
#include <common.h>
#include <dm.h>
#include <env_internal.h>
diff --git a/drivers/smem/smem-uclass.c b/drivers/smem/smem-uclass.c
index ce7bf40..8469076 100644
--- a/drivers/smem/smem-uclass.c
+++ b/drivers/smem/smem-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2018 Ramon Fried <ramon.fried@gmail.com>
*/
+#define LOG_CATEGORY UCLASS_SMEM
+
#include <common.h>
#include <dm.h>
#include <smem.h>
diff --git a/drivers/soc/soc-uclass.c b/drivers/soc/soc-uclass.c
index c32d647..dfad32d 100644
--- a/drivers/soc/soc-uclass.c
+++ b/drivers/soc/soc-uclass.c
@@ -4,6 +4,8 @@
* Dave Gerlach <d-gerlach@ti.com>
*/
+#define LOG_CATEGORY UCLASS_SOC
+
#include <common.h>
#include <soc.h>
#include <dm.h>
diff --git a/drivers/sound/codec-uclass.c b/drivers/sound/codec-uclass.c
index 1ec77ac..2cb233b 100644
--- a/drivers/sound/codec-uclass.c
+++ b/drivers/sound/codec-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_AUDIO_CODEC
+
#include <common.h>
#include <dm.h>
#include <audio_codec.h>
diff --git a/drivers/sound/i2s-uclass.c b/drivers/sound/i2s-uclass.c
index 2639c86..fc4f686 100644
--- a/drivers/sound/i2s-uclass.c
+++ b/drivers/sound/i2s-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_I2S
+
#include <common.h>
#include <dm.h>
#include <i2s.h>
diff --git a/drivers/sound/sound-uclass.c b/drivers/sound/sound-uclass.c
index 0c71e01..2ffc4fc 100644
--- a/drivers/sound/sound-uclass.c
+++ b/drivers/sound/sound-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_SOUND
+
#include <common.h>
#include <dm.h>
#include <i2s.h>
diff --git a/drivers/spi/spi-emul-uclass.c b/drivers/spi/spi-emul-uclass.c
index 52f3f9a..64bc19c 100644
--- a/drivers/spi/spi-emul-uclass.c
+++ b/drivers/spi/spi-emul-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2014 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_SPI_EMUL
+
#include <common.h>
#include <dm.h>
#include <spi.h>
diff --git a/drivers/spmi/spmi-uclass.c b/drivers/spmi/spmi-uclass.c
index ff09873..9d9f46a 100644
--- a/drivers/spmi/spmi-uclass.c
+++ b/drivers/spmi/spmi-uclass.c
@@ -5,6 +5,8 @@
* (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
*/
+#define LOG_CATEGORY UCLASS_SPMI
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/sysinfo/sysinfo-uclass.c b/drivers/sysinfo/sysinfo-uclass.c
index 4a660df..c5cc3cb 100644
--- a/drivers/sysinfo/sysinfo-uclass.c
+++ b/drivers/sysinfo/sysinfo-uclass.c
@@ -4,6 +4,8 @@
* Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
*/
+#define LOG_CATEGORY UCLASS_SYSINFO
+
#include <common.h>
#include <dm.h>
#include <sysinfo.h>
diff --git a/drivers/tee/tee-uclass.c b/drivers/tee/tee-uclass.c
index 2cc6b6c..cb1b28e 100644
--- a/drivers/tee/tee-uclass.c
+++ b/drivers/tee/tee-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2018 Linaro Limited
*/
+#define LOG_CATEGORY UCLASS_TEE
+
#include <common.h>
#include <dm.h>
#include <log.h>
diff --git a/drivers/thermal/thermal-uclass.c b/drivers/thermal/thermal-uclass.c
index a4ea1e2..700df8a 100644
--- a/drivers/thermal/thermal-uclass.c
+++ b/drivers/thermal/thermal-uclass.c
@@ -3,6 +3,8 @@
* (C) Copyright 2014 Freescale Semiconductor, Inc
*/
+#define LOG_CATEGORY UCLASS_THERMAL
+
#include <common.h>
#include <dm.h>
#include <thermal.h>
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index 73b4a5c..c8e8419 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -3,6 +3,8 @@
* Copyright (C) 2015 Thomas Chou <thomas@wytron.com.tw>
*/
+#define LOG_CATEGORY UCLASS_TIMER
+
#include <common.h>
#include <clk.h>
#include <cpu.h>
diff --git a/drivers/ufs/ufs-uclass.c b/drivers/ufs/ufs-uclass.c
index 034d14f..ceea30c 100644
--- a/drivers/ufs/ufs-uclass.c
+++ b/drivers/ufs/ufs-uclass.c
@@ -5,6 +5,8 @@
* Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com
*/
+#define LOG_CATEGORY UCLASS_UFS
+
#include <common.h>
#include "ufs.h"
#include <dm.h>
diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c
index f5d98b9..05f6d3d 100644
--- a/drivers/usb/emul/usb-emul-uclass.c
+++ b/drivers/usb/emul/usb-emul-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_USB_EMUL
+
#include <common.h>
#include <dm.h>
#include <log.h>
diff --git a/drivers/usb/gadget/udc/udc-uclass.c b/drivers/usb/gadget/udc/udc-uclass.c
index dbc354e..de88618 100644
--- a/drivers/usb/gadget/udc/udc-uclass.c
+++ b/drivers/usb/gadget/udc/udc-uclass.c
@@ -4,6 +4,8 @@
* Written by Jean-Jacques Hiblot <jjhiblot@ti.com>
*/
+#define LOG_CATEGORY UCLASS_USB_GADGET_GENERIC
+
#include <common.h>
#include <dm.h>
#include <dm/device-internal.h>
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index e3b616c..fd39c33 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -6,6 +6,8 @@
* usb_match_device() modified from Linux kernel v4.0.
*/
+#define LOG_CATEGORY UCLASS_USB
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/video/backlight-uclass.c b/drivers/video/backlight-uclass.c
index 0aadf8a..c14996d 100644
--- a/drivers/video/backlight-uclass.c
+++ b/drivers/video/backlight-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_PANEL_BACKLIGHT
+
#include <common.h>
#include <dm.h>
#include <backlight.h>
diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c
index 08d38b2..f389bc6 100644
--- a/drivers/video/bridge/video-bridge-uclass.c
+++ b/drivers/video/bridge/video-bridge-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_VIDEO_BRIDGE
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/video/display-uclass.c b/drivers/video/display-uclass.c
index 068108e..2da3d1d 100644
--- a/drivers/video/display-uclass.c
+++ b/drivers/video/display-uclass.c
@@ -3,6 +3,8 @@
* Copyright 2014 Google Inc.
*/
+#define LOG_CATEGORY UCLASS_DISPLAY
+
#include <common.h>
#include <dm.h>
#include <display.h>
diff --git a/drivers/video/dsi-host-uclass.c b/drivers/video/dsi-host-uclass.c
index 1db1f88..6e5256e 100644
--- a/drivers/video/dsi-host-uclass.c
+++ b/drivers/video/dsi-host-uclass.c
@@ -5,6 +5,8 @@
*
*/
+#define LOG_CATEGORY UCLASS_DSI_HOST
+
#include <common.h>
#include <dm.h>
#include <dsi_host.h>
diff --git a/drivers/video/panel-uclass.c b/drivers/video/panel-uclass.c
index 246d1b2..bb2eaae 100644
--- a/drivers/video/panel-uclass.c
+++ b/drivers/video/panel-uclass.c
@@ -4,6 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
+#define LOG_CATEGORY UCLASS_PANEL
+
#include <common.h>
#include <dm.h>
#include <panel.h>
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index 81b65f5..8f7d987 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -7,6 +7,8 @@
* Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
*/
+#define LOG_CATEGORY UCLASS_VIDEO_CONSOLE
+
#include <common.h>
#include <command.h>
#include <console.h>
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 96ec6f8..9f8cf6e 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -3,6 +3,8 @@
* Copyright (c) 2015 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_VIDEO
+
#include <common.h>
#include <console.h>
#include <cpu_func.h>
diff --git a/drivers/video/video_osd-uclass.c b/drivers/video/video_osd-uclass.c
index 82136a2..0d3aae4 100644
--- a/drivers/video/video_osd-uclass.c
+++ b/drivers/video/video_osd-uclass.c
@@ -4,6 +4,8 @@
* Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
*/
+#define LOG_CATEGORY UCLASS_VIDEO_OSD
+
#include <common.h>
#include <dm.h>
#include <video_osd.h>
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index 0379536..9e2d0e0 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -15,6 +15,8 @@
* the VirtIO specification v1.0.
*/
+#define LOG_CATEGORY UCLASS_VIRTIO
+
#include <common.h>
#include <dm.h>
#include <log.h>
diff --git a/drivers/w1-eeprom/w1-eeprom-uclass.c b/drivers/w1-eeprom/w1-eeprom-uclass.c
index 7a02af3..70ba537 100644
--- a/drivers/w1-eeprom/w1-eeprom-uclass.c
+++ b/drivers/w1-eeprom/w1-eeprom-uclass.c
@@ -10,6 +10,8 @@
*
*/
+#define LOG_CATEGORY UCLASS_W1_EEPROM
+
#include <common.h>
#include <dm.h>
#include <log.h>
diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c
index b989273..52b519c 100644
--- a/drivers/w1/w1-uclass.c
+++ b/drivers/w1/w1-uclass.c
@@ -12,6 +12,8 @@
*
*/
+#define LOG_CATEGORY UCLASS_W1
+
#include <common.h>
#include <dm.h>
#include <log.h>
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index 2687135..a0c2429 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -3,6 +3,8 @@
* Copyright 2017 Google, Inc
*/
+#define LOG_CATEGORY UCLASS_WDT
+
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/xen/pvblock.c b/drivers/xen/pvblock.c
index 1c5d039..c25c3ea 100644
--- a/drivers/xen/pvblock.c
+++ b/drivers/xen/pvblock.c
@@ -3,6 +3,9 @@
* (C) 2007-2008 Samuel Thibault.
* (C) Copyright 2020 EPAM Systems Inc.
*/
+
+#define LOG_CATEGORY UCLASS_PVBLOCK
+
#include <blk.h>
#include <common.h>
#include <dm.h>