lkml.org 
[lkml]   [2012]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] x86: ce4100: implement pm_poweroff

* Florian Fainelli <ffainelli@freebox.fr> wrote:

> The CE4100 platform is currently missing a proper pm_poweroff implementation
> leading to poweroff making the CPU spin forever and the CE4100 platform does
> not enter a low-power mode where the external Power Management Unit can
> properly power off the system. Power off on this platform is implemented pretty
> much like reboot, by writing to the SoC built-in 8051 microcontroller mapped at
> I/O port 0xcf9, the value 0x4.
>
> Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
> ---
> arch/x86/platform/ce4100/ce4100.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c
> index 4c61b52..74f8774 100644
> --- a/arch/x86/platform/ce4100/ce4100.c
> +++ b/arch/x86/platform/ce4100/ce4100.c
> @@ -27,6 +27,11 @@ static int ce4100_i8042_detect(void)
> return 0;
> }
>
> +static void ce4100_power_off(void)
> +{
> + outb(0x4, 0xcf9);

Would be nice to precede this function with something like:

/*
* Power off on this platform is implemented pretty
* much like reboot, by writing to the SoC built-in
* 8051 microcontroller mapped at I/O port 0xcf9,
* the magic value 0x4:
*/
static void ce4100_power_off(void)
{
outb(0x4, 0xcf9);
...

As arguably such comments are even more useful in the code than
in a changelog.

Thanks,

Ingo


\
 
 \ /
  Last update: 2012-10-26 12:21    [W:0.105 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site