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};
int cpu_suspend(unsigned long arg, int (*fn)(unsigned long));
-
static int rkpm_enter(suspend_state_t state)
{
-
- printk("%s\n",__FUNCTION__);
-
-
+ //static u32 test_count=0;
+ // printk(KERN_DEBUG"pm: ");
+ printk("%s:\n",__FUNCTION__);
+ //printk("pm test times=%d\n",++test_count);
+
RKPM_DDR_FUN(prepare);
- printk(KERN_DEBUG "pm: ");
-
rkpm_ctrbits_prepare();
- // if(rkpm_chk_jdg_ctrbits(RKPM_CTR_RET_DIRT))
- // return 0;
+ // if(rkpm_chk_jdg_ctrbits(RKPM_CTR_RET_DIRT))
+ // return 0;
rkpm_ddr_printch('0');
rkpm_ddr_printch('5');
- pm_log = false;
-
if(rkpm_chk_jdg_ctrbits(RKPM_CTRBITS_SOC_DLPMD))
{
if(cpu_suspend(0,rk_lpmode_enter)==0)
wfi();
}
- pm_log = true;
-
rkpm_ddr_printch('5');
RKPM_BITCTR_DDR_FUN(GPIOS,re_gpios);
local_fiq_enable();
rkpm_ddr_printch('1');
-
-
RKPM_BITCTR_DDR_FUN(PWR_DMNS,re_pwr_dmns);
rkpm_ddr_printch('0');
-
-
- pm_log = false;
-
- printk(KERN_CONT "\n");
-
rkpm_ddr_printch('\n');
-
- RKPM_DDR_FUN(finish);
+ RKPM_DDR_FUN(finish);
return 0;
}
+#if 0
static int rkpm_enter_tst(void)
{
return rkpm_enter(0);
}
+#endif
static int rkpm_suspend_prepare(void)
{