Subject: Re: [PATCH 3/7] powerpc/85xx: add sleep and deep sleep support

From: Felix Radensky <[email-masked]>
Date: Sat, 05 Nov 2011 00:43:07 +0200

Hi Zhao,

From: Li Yang <leoli at freescale.com>

Some Freescale chips like MPC8536 and P1022 has deep sleep PM mode
in addtion to the sleep PM mode.

In sleep PM mode, the clocks of e500 core and unused IP blocks is
turned off. IP blocks which are allowed to wake up the processor
are still running

While in deep sleep PM mode, additionally, the power supply is
removed from e500 core and most IP blocks. Only the blocks needed
to wake up the chip out of deep sleep are ON.

This patch supports 32-bit and 36-bit address space.

The deep sleep mode is equal to the Suspend-to-RAM state of Linux
Power Management.

Command to enter deep sleep mode.
echo mem > /sys/power/state

Resending in plain text.

Thanks a lot for bringing this code to mainline. I was recently
involved in enabling

deep sleep on a custom P1022 board, and would like to make some
remarks based

on this experience.

1. I think 85xx deep sleep code would be more complete if you also
port FSL

BSP code that saves eLBC configuration before entering deep
sleep and

restores it afterwards. Otherwise all eLBC customization done by
u-boot is lost.

2. You should implement fsl_deep_sleep() routine for 85xx. The
default implementation

in include/linux/fsl_devices.h always returns 0. The routine is
used by FSL USB host

driver, drivers/usb/host/ehci-fsl.c to restore USB hardware
state after deep sleep.

With default implementation USB is dead on 85xx after deep sleep
if USB PHY is

powered down.

Felix.