mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
ARM: uniphier: use pr_*() more where appropriate
Commit dd74b945af
("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>
This commit is contained in:
parent
9e19031ca3
commit
624c0954c7
1 changed files with 10 additions and 8 deletions
|
@ -5,9 +5,13 @@
|
||||||
* SPDX-License-Identifier: GPL-2.0+
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <common.h>
|
#include <linux/bitops.h>
|
||||||
|
#include <linux/delay.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/printk.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#include "ddrphy-init.h"
|
#include "ddrphy-init.h"
|
||||||
#include "ddrphy-regs.h"
|
#include "ddrphy-regs.h"
|
||||||
|
@ -108,7 +112,7 @@ int ddrphy_training(void __iomem *phy_base)
|
||||||
u32 init_flag = PHY_PIR_INIT;
|
u32 init_flag = PHY_PIR_INIT;
|
||||||
u32 done_flag = PHY_PGSR0_IDONE;
|
u32 done_flag = PHY_PGSR0_IDONE;
|
||||||
int timeout = 50000; /* 50 msec is long enough */
|
int timeout = 50000; /* 50 msec is long enough */
|
||||||
#ifdef DISPLAY_ELAPSED_TIME
|
#ifdef DEBUG
|
||||||
ulong start = get_timer(0);
|
ulong start = get_timer(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -121,8 +125,7 @@ int ddrphy_training(void __iomem *phy_base)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (--timeout < 0) {
|
if (--timeout < 0) {
|
||||||
printf("%s: error: timeout during DDR training\n",
|
pr_err("timeout during DDR training\n");
|
||||||
__func__);
|
|
||||||
return -ETIMEDOUT;
|
return -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
udelay(1);
|
udelay(1);
|
||||||
|
@ -131,14 +134,13 @@ int ddrphy_training(void __iomem *phy_base)
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(init_sequence); i++) {
|
for (i = 0; i < ARRAY_SIZE(init_sequence); i++) {
|
||||||
if (pgsr0 & init_sequence[i].err_flag) {
|
if (pgsr0 & init_sequence[i].err_flag) {
|
||||||
printf("%s: error: %s failed\n", __func__,
|
pr_err("%s failed\n", init_sequence[i].description);
|
||||||
init_sequence[i].description);
|
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DISPLAY_ELAPSED_TIME
|
#ifdef DEBUG
|
||||||
printf("%s: info: elapsed time %ld msec\n", get_timer(start));
|
pr_debug("DDR training: elapsed time %ld msec\n", get_timer(start));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue