AnsweredAssumed Answered

Kernel oops while power off, custom mx28 board.

Question asked by Andrzej Smyk on Jun 3, 2016
Latest reply on Jun 11, 2016 by lategoodbye

Dear Community,

 

I'm trying to shut down i.MX28 custom board using kernel 3.18.22.

Code added to arch/arm/mach-mxs/pm.c as follows:

 

#define REGS_POWER_BASE 0x80044000

#define POWER_RESET_UNLOCK_KEY (0x3e77 << 16)

#define MX28_HW_POWER_RESET 0x100

#define MX28_HW_POWER_RESET_SET 0x104

(...)

static void customMX28_pm_power_off(void)

{

     writel(POWER_RESET_UNLOCK_KEY,  REGS_POWER_BASE + MX28_HW_POWER_RESET_SET );

     writel(POWER_RESET_UNLOCK_KEY | POWER_RESET_PWD_OFF, REGS_POWER_BASE + MX28_HW_POWER_RESET_SET );

}

 

(...)

void __init mxs_pm_init(void)

{

        pm_power_off = customMX28_pm_power_off;

        suspend_set_ops(&mxs_suspend_ops);

}

 

When I tried to poweroff device, kernel Oops message appears:

 

Unable to handle kernel paging request at virtual address 80044104

 

What am I doing wrong?
Regards

Andrzej

Outcomes