aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-uniphier/dram
diff options
context:
space:
mode:
authorMasahiro Yamada2017-10-23 00:19:36 +0900
committerMasahiro Yamada2017-10-23 01:09:22 +0900
commit624c0954c7be03d92a20170ffc551ca7e9853e16 (patch)
treefe69fbe584279b54c984061608cd7e6415a17418 /arch/arm/mach-uniphier/dram
parent9e19031ca3d019f99239ce48508f91b105d68d5e (diff)
ARM: uniphier: use pr_*() more where appropriate
Commit dd74b945af2e ("ARM: uniphier: use pr_() instead of printf() where appropriate"), but I missed to update this file for some reason. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/arm/mach-uniphier/dram')
-rw-r--r--arch/arm/mach-uniphier/dram/ddrphy-training.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/arm/mach-uniphier/dram/ddrphy-training.c b/arch/arm/mach-uniphier/dram/ddrphy-training.c
index fa29a430625..6efdd43b377 100644
--- a/arch/arm/mach-uniphier/dram/ddrphy-training.c
+++ b/arch/arm/mach-uniphier/dram/ddrphy-training.c
@@ -5,9 +5,13 @@
* SPDX-License-Identifier: GPL-2.0+
*/
-#include <common.h>
+#include <linux/bitops.h>
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/io.h>
+#include <linux/kernel.h>
+#include <linux/printk.h>
+#include <time.h>
#include "ddrphy-init.h"
#include "ddrphy-regs.h"
@@ -108,7 +112,7 @@ int ddrphy_training(void __iomem *phy_base)
u32 init_flag = PHY_PIR_INIT;
u32 done_flag = PHY_PGSR0_IDONE;
int timeout = 50000; /* 50 msec is long enough */
-#ifdef DISPLAY_ELAPSED_TIME
+#ifdef DEBUG
ulong start = get_timer(0);
#endif
@@ -121,8 +125,7 @@ int ddrphy_training(void __iomem *phy_base)
do {
if (--timeout < 0) {
- printf("%s: error: timeout during DDR training\n",
- __func__);
+ pr_err("timeout during DDR training\n");
return -ETIMEDOUT;
}
udelay(1);
@@ -131,14 +134,13 @@ int ddrphy_training(void __iomem *phy_base)
for (i = 0; i < ARRAY_SIZE(init_sequence); i++) {
if (pgsr0 & init_sequence[i].err_flag) {
- printf("%s: error: %s failed\n", __func__,
- init_sequence[i].description);
+ pr_err("%s failed\n", init_sequence[i].description);
return -EIO;
}
}
-#ifdef DISPLAY_ELAPSED_TIME
- printf("%s: info: elapsed time %ld msec\n", get_timer(start));
+#ifdef DEBUG
+ pr_debug("DDR training: elapsed time %ld msec\n", get_timer(start));
#endif
return 0;