fixed : rkpm_ddr_regs_dump
authorxxx <xxx@rock-chips.com>
Thu, 26 Jun 2014 07:11:41 +0000 (15:11 +0800)
committerxxx <xxx@rock-chips.com>
Thu, 26 Jun 2014 07:11:41 +0000 (15:11 +0800)
arch/arm/mach-rockchip/rockchip_pm.c

index 30c57a1303b7eaba0c339e7a1c7ee7ced6d54cb8..7d2c14a30b399f1e5bbc3d481610ccd673a634e9 100755 (executable)
@@ -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};