[PATCH 1/5] i.MX27: add suspend to RAM support

Russell King - ARM Linux linux at arm.linux.org.uk
Fri May 21 15:19:04 EDT 2010


On Fri, May 21, 2010 at 01:12:39PM +0200, Eric Bénard wrote:
> +#include <linux/kernel.h>
> +#include <linux/suspend.h>
> +#include <asm/io.h>

linux/io.h

> +#include <mach/system.h>
> +#include <mach/mx27.h>
> +
> +static int mx27_suspend_enter(suspend_state_t state)
> +{
> +	u32 cscr;
> +	switch (state) {
> +	case PM_SUSPEND_MEM:
> +		/* Clear MPEN and SPEN to disable MPLL/SPLL */
> +		cscr = __raw_readl(MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR));
> +		cscr &= 0xFFFFFFFC;
> +		__raw_writel(cscr, MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR));
> +		/* Executes WFI */
> +		arch_idle();
> +		break;
> +
> +	default:
> +		return -1;

-Exxx ?



More information about the linux-arm-kernel mailing list