Message ID | 20241105-rk3399-dram-init-v1-5-1e29acdf0966@cherry.de |
---|---|
State | New |
Headers | show |
Series | rockchip: panic() when DRAM init fails | expand |
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index d953dda13cd3daa689fa362dc511c372db454064..591e1469afb25ba606d8f7e44f63e50905b4ab31 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -817,8 +817,7 @@ static int pctl_start(struct dram_info *dram, if (count > 1000) { printf("%s: Failed to init pctl channel 0\n", __func__); - while (1) - ; + return -1; } udelay(1); count++; @@ -853,8 +852,7 @@ static int pctl_start(struct dram_info *dram, if (count > 1000) { printf("%s: Failed to init pctl channel 1\n", __func__); - while (1) - ; + return -2; } udelay(1); count++;