AnsweredAssumed Answered

imx6D reboot.c issue?

Question asked by jiu jin hong on Dec 20, 2017
Latest reply on Dec 24, 2017 by jiu jin hong

Hi,

 

Currently i am debuging this issueimx6d wdog1 reboot not stable , but still can't fix this issue even if with the help from community.

 

So, I want to choose another way to implement reboot for my board, such as SNVS way (PMIC).  both do_switch_normal in reboot.c and below func didn't make any sense to reboot, power consumption has no change.

 

So, i have missed other things for this? thanks.

 

     void do_power_off(void)                                                                                                             
   14 {                                                                                                                                   
   13     u32 reg;                                                                                                                        
   12     void *addr;                                                                                                                     
   11     phys_addr_t snvs_base_addr;                                                                                                     
   10     phys_addr_t snvs_lpcr;                                                                                                          
    9     size_t snvs_size;                                                                                                               
    8     if (cpu_is_imx6()) {                                                                                                            
    7         pr_warn("cpu is mx6\n");                                                                                                    
    6         snvs_base_addr = MX6_SNVS_BASE_ADDR;                                                                                        
    5         snvs_size = MX6_SNVS_SIZE;                                                                                                  
    4         snvs_lpcr = MX6_SNVS_LPCR;                                                                                                  
    3     } else {                                                                                                                        
    2         snvs_base_addr = MX7_SNVS_BASE_ADDR;                                                                                        
    1         snvs_size = MX7_SNVS_SIZE;                                                                                                  
  79          snvs_lpcr = MX7_SNVS_LPCR;                                                                                                  
    1     }       
   11                                                                                                                                     
   10     addr = ioremap(snvs_base_addr, snvs_size);                                                                                      
    9     if (!addr) {                                                                                                                    
    8         pr_warn("SNVS ioremap failed!\n");                                                                                          
    7         return;                                                                                                                     
    6     }                                                                                                                               
    5     reg = __raw_readl(addr + snvs_lpcr);                                                                                            
    4     reg |= 0x60;                                                                                                                    
    3     pr_warn("PMIC Config...\n");                                                                                                    
    2     __raw_writel(reg, (addr + snvs_lpcr));                                                                                          
    1     iounmap(addr);                                                                                                                  
  92  }    

 

 

[   12.428086] sysrq: SysRq : Emergency Remount R/O
[   12.435704] EXT4-fs (mmcblk3p6): re-mounted. Opts: (null)
[   12.448787] EXT4-fs (mmcblk3p4): re-mounted. Opts: (null)
[   12.467832] Emergency Remount complete
[   13.066736] imx2-wdt 20bc000.wdog: Device shutdown: Expect reboot!
[   13.073044] reboot: Restarting system with command ''
[   13.087046] cpu is mx6
[   13.089432] PMIC Config...
[   14.092149] Reboot failed -- System halted

Outcomes