mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
clk: rockchip: rk3128: add cru regs dump for panic
Add cru regs dump when system panic. It's just for debug. Change-Id: I7f9bc78deef60b1fa48bada5b1a6203185ddce48 Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
This commit is contained in:
@@ -588,6 +588,16 @@ void rkclk_cpuclk_div_setting(int div)
|
||||
rk312x_reg_base + RK2928_CLKSEL_CON(0));
|
||||
}
|
||||
|
||||
static void rk3128_dump_cru(void)
|
||||
{
|
||||
if (rk312x_reg_base) {
|
||||
pr_warn("CRU:\n");
|
||||
print_hex_dump(KERN_WARNING, "", DUMP_PREFIX_OFFSET,
|
||||
32, 4, rk312x_reg_base,
|
||||
0x1f8, false);
|
||||
}
|
||||
}
|
||||
|
||||
static struct rockchip_clk_provider *__init rk3128_common_clk_init(struct device_node *np)
|
||||
{
|
||||
struct rockchip_clk_provider *ctx;
|
||||
@@ -623,6 +633,9 @@ static struct rockchip_clk_provider *__init rk3128_common_clk_init(struct device
|
||||
|
||||
rockchip_register_restart_notifier(ctx, RK2928_GLB_SRST_FST, NULL);
|
||||
|
||||
if (!rk_dump_cru)
|
||||
rk_dump_cru = rk3128_dump_cru;
|
||||
|
||||
return ctx;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user