Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: pxa168 and LINUX_REBOOT_CMD_POWER_OFF
Date: Sun, 22 Aug 2010 11:52:54 +0200	[thread overview]
Message-ID: <201008221152.54485.marek.vasut@gmail.com> (raw)
In-Reply-To: <AANLkTikdGoVwo6igAzf2xtPDvM3adwkfG_X-3AtKN=fU@mail.gmail.com>

Dne Ne 22. srpna 2010 11:21:31 Jaya Kumar napsal(a):
> Hi Arm friends,
> 
> I have a quick question about pxa168 and implementing support for
> power off. I am playing with a pxa168 board (I think it might be based
> off Aspenite) that appears to have no power off support, ie: I see all
> the normal shutdown messages but nothing happens, even the console
> stays active. I see userspace send:
> 
> sys_reboot (... LINUX_REBOOT_CMD_POWER_OFF )
> 
> to which the kernel responds with:
> [   87.248429] System halted.
> 
> which is coming from:
> 
>  316void kernel_halt(void)
>  317{
>  318        kernel_shutdown_prepare(SYSTEM_HALT);
>  319        sysdev_shutdown();
>  320        printk(KERN_EMERG "System halted.\n");
>  321        machine_halt();
>  322}
> 
> I noticed that we have:
>  366        /* Instead of trying to make the power_off code look like
>  367         * halt when pm_power_off is not set do it the easy way.
>  368         */
>  369        if ((cmd == LINUX_REBOOT_CMD_POWER_OFF) && !pm_power_off)
>  370                cmd = LINUX_REBOOT_CMD_HALT;
>  371
> 
> which suggests that I'm missing pm_power_off which is why the command
> got demoted to a halt. I suppose the correct path it should take if we
> really want it to power off is:
> 
>  392        case LINUX_REBOOT_CMD_POWER_OFF:
>  393                kernel_power_off();
>  394                unlock_kernel();
>  395                do_exit(0);
>  396                break;
> 
> and looking in arch/arm/mach-mmp/ , I see that other board drivers
> implement pm_power_off handlers that use an EC to shutdown. But I
> don't think there is an EC on this board. There's a MAX8660 PMIC but
> I'm not sure that should be involved in shutdown. Coming back to
> Aspenite, I tried to figure out how it achieves shutdown and I don't
> see it having a pm_power_off. I don't have an aspenite board to
> compare with but I was wondering if shutdown works on it and if so,
> some pointers to code that is involved would help me figure out how to
> make shutdown work on this board. I'd appreciate any advice.

There's no "poweroff" support on ARM I believe. The kernel just hangs at certain 
point and that's all (and this can be overridden on some platforms).

Cheers
> 
> Thanks,
> jaya
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2010-08-22  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-22  9:21 pxa168 and LINUX_REBOOT_CMD_POWER_OFF Jaya Kumar
2010-08-22  9:52 ` Marek Vasut [this message]
2010-08-22 10:43 ` Eric Miao
2010-08-22 15:01   ` Haojian Zhuang
2010-08-29  5:08     ` Jaya Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201008221152.54485.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox