rockchip: rv1126: call hang() if timeout when set the pmu

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Ib92d97e4a2faf3d6002cc6236b576b4c820ad6d9
This commit is contained in:
Jason Zhu 2020-05-21 11:55:47 +08:00 committed by Jianhong Chen
parent 6cc5f5cc85
commit f0130a0392
1 changed files with 12 additions and 6 deletions

View File

@ -78,8 +78,10 @@ int arch_cpu_init(void)
do {
udelay(1);
delay--;
if (delay == 0)
break;
if (delay == 0) {
printf("Fail to set domain.");
hang();
}
} while (readl(PMU_BASE_ADDR + PMU_PWR_DWN_ST));
/* release all idle request */
@ -91,8 +93,10 @@ int arch_cpu_init(void)
do {
udelay(1);
delay--;
if (delay == 0)
break;
if (delay == 0) {
printf("Fail to get ack on domain.\n");
hang();
}
} while (readl(PMU_BASE_ADDR + PMU_BUS_IDLE_ACK));
delay = 1000;
@ -100,8 +104,10 @@ int arch_cpu_init(void)
do {
udelay(1);
delay--;
if (delay == 0)
break;
if (delay == 0) {
printf("Fail to set idle on domain.\n");
hang();
}
} while (readl(PMU_BASE_ADDR + PMU_BUS_IDLE_ST));
writel(0x303, USB_HOST_PRIORITY_REG);