From: xxx Date: Thu, 26 Jun 2014 07:11:41 +0000 (+0800) Subject: fixed : rkpm_ddr_regs_dump X-Git-Tag: firefly_0821_release~5039 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d205f857f95320a36e1aa2abc0ae21bc6dd33162;p=firefly-linux-kernel-4.4.55.git fixed : rkpm_ddr_regs_dump --- 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};