From d205f857f95320a36e1aa2abc0ae21bc6dd33162 Mon Sep 17 00:00:00 2001 From: xxx Date: Thu, 26 Jun 2014 15:11:41 +0800 Subject: [PATCH] fixed : rkpm_ddr_regs_dump --- arch/arm/mach-rockchip/rockchip_pm.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-rockchip/rockchip_pm.c b/arch/arm/mach-rockchip/rockchip_pm.c index 30c57a1303b7..7d2c14a30b39 100755 --- a/arch/arm/mach-rockchip/rockchip_pm.c +++ b/arch/arm/mach-rockchip/rockchip_pm.c @@ -23,23 +23,32 @@ void rkpm_ddr_reg_offset_dump(void __iomem * base_addr,u32 _offset) void rkpm_ddr_regs_dump(void __iomem * base_addr,u32 start_offset,u32 end_offset) { u32 i; - u32 line=0; + //u32 line=0; rkpm_ddr_printascii("start from:"); rkpm_ddr_printhex((u32)(base_addr +start_offset)); rkpm_ddr_printch('\n'); + for(i=start_offset;i<=end_offset;) { + rkpm_ddr_printhex(reg_readl((base_addr + i))); - line++; - if((line%4==0)||i==end_offset) + if(i%16==12) + { rkpm_ddr_printch('\n'); - else - rkpm_ddr_printch('-'); - i+=4; + } + else + { + if(i!=end_offset) + rkpm_ddr_printch('-'); + else + rkpm_ddr_printch('\n'); + } + i=i+4; } + } static struct rkpm_ops pm_ops={NULL}; -- 2.34.1