summaryrefslogtreecommitdiff
path: root/drivers/ram/stm32mp1/stm32mp1_tests.c
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2020-11-06 19:01:36 +0100
committerPatrick Delaunay <patrick.delaunay@foss.st.com>2021-01-13 09:52:58 +0100
commit66b3b9db692d2f7ce393c5d003ef4a14d3d0f576 (patch)
tree4753ebcf085a6133cacf791612238c2f750b4dcb /drivers/ram/stm32mp1/stm32mp1_tests.c
parent997f7dab9d6ea71436c5954b2fc2a64db2841fb9 (diff)
ram: stm32mp1: migrate trace to dev or log macro
Define LOG_CATEGORY, use dev_ macro when it is possible and migrate other trace to log_ macro. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'drivers/ram/stm32mp1/stm32mp1_tests.c')
-rw-r--r--drivers/ram/stm32mp1/stm32mp1_tests.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/ram/stm32mp1/stm32mp1_tests.c b/drivers/ram/stm32mp1/stm32mp1_tests.c
index 952006aa149..1fcc7cfd692 100644
--- a/drivers/ram/stm32mp1/stm32mp1_tests.c
+++ b/drivers/ram/stm32mp1/stm32mp1_tests.c
@@ -2,6 +2,9 @@
/*
* Copyright (C) 2019, STMicroelectronics - All Rights Reserved
*/
+
+#define LOG_CATEGORY UCLASS_RAM
+
#include <common.h>
#include <console.h>
#include <init.h>
@@ -197,8 +200,8 @@ static u32 databus(u32 *address)
/* Read it back (immediately is okay for this test). */
read_value = readl(address);
- debug("%x: %x <=> %x\n",
- (u32)address, read_value, pattern);
+ log_debug("%x: %x <=> %x\n",
+ (u32)address, read_value, pattern);
if (read_value != pattern)
return pattern;
@@ -252,8 +255,8 @@ static u32 *addressbus(u32 *address, u32 nb_bytes)
for (offset = 1; (offset & mask) != 0; offset <<= 1) {
read_value = readl(&address[offset]);
- debug("%x: %x <=> %x\n",
- (u32)&address[offset], read_value, pattern);
+ log_debug("%x: %x <=> %x\n",
+ (u32)&address[offset], read_value, pattern);
if (read_value != pattern)
return &address[offset];
}
@@ -363,8 +366,8 @@ static enum test_result databuswalk0(struct stm32mp1_ddrctl *ctl,
data = readl(addr + 4 * i);
if (~(1 << i) != data) {
error |= 1 << i;
- debug("%x: error %x expected %x => error:%x\n",
- addr + 4 * i, data, ~(1 << i), error);
+ log_debug("%x: error %x expected %x => error:%x\n",
+ addr + 4 * i, data, ~(1 << i), error);
}
}
if (test_loop_end(&loop, nb_loop, 1000))
@@ -403,8 +406,8 @@ static enum test_result databuswalk1(struct stm32mp1_ddrctl *ctl,
data = readl(addr + 4 * i);
if ((1 << i) != data) {
error |= 1 << i;
- debug("%x: error %x expected %x => error:%x\n",
- addr + 4 * i, data, (1 << i), error);
+ log_debug("%x: error %x expected %x => error:%x\n",
+ addr + 4 * i, data, (1 << i), error);
}
}
if (test_loop_end(&loop, nb_loop, 1000))