Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd117bd1 authored by Ben Dooks's avatar Ben Dooks
Browse files

[ARM] S3C64XX: Initial support for PM (suspend to RAM)



Add the initial support for the S3C64XX based systems to use
suspend-to-RAM to sleep.

Includes basic debugging for use with the SMDK6410 usign the
LEDs on the baseboard.

Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent 4b637dc2
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
/* linux/arch/arm/mach-s3c6400/include/mach/regs-clock.h
 *
 * Copyright 2008 Openmoko, Inc.
 * Copyright 2008 Simtec Electronics
 *	http://armlinux.simtec.co.uk/
 *	Ben Dooks <ben@simtec.co.uk>
 *
 * S3C64XX - clock register compatibility with s3c24xx
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
*/

#include <plat/regs-clock.h>
+9 −0
Original line number Diff line number Diff line
@@ -71,6 +71,15 @@ config S3C2410_PM_DEBUG
	  Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
	  for more information.

config S3C_PM_DEBUG_LED_SMDK
       bool "SMDK LED suspend/resume debugging"
       depends on PM && (MACH_SMDK6410)
       help
         Say Y here to enable the use of the SMDK LEDs on the baseboard
	 for debugging of the state of the suspend and resume process.

	 Note, this currently only works for S3C64XX based SMDK boards.

config S3C2410_PM_CHECK
	bool "S3C2410 PM Suspend Memory CRC"
	depends on PM && CRC32
+12 −0
Original line number Diff line number Diff line
@@ -127,6 +127,18 @@ extern void s3c_pm_dbg(const char *msg, ...);
#define S3C_PMDBG(fmt...) printk(KERN_DEBUG fmt)
#endif

#ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK
/**
 * s3c_pm_debug_smdkled() - Debug PM suspend/resume via SMDK Board LEDs
 * @set: set bits for the state of the LEDs
 * @clear: clear bits for the state of the LEDs.
 */
extern void s3c_pm_debug_smdkled(u32 set, u32 clear);

#else
static inline void s3c_pm_debug_smdkled(u32 set, u32 clear) { }
#endif /* CONFIG_S3C_PM_DEBUG_LED_SMDK */

/* suspend memory checking */

#ifdef CONFIG_S3C2410_PM_CHECK
+4 −2
Original line number Diff line number Diff line
@@ -21,11 +21,10 @@

#include <asm/cacheflush.h>
#include <mach/hardware.h>
#include <mach/map.h>

#include <plat/regs-serial.h>
#include <mach/regs-clock.h>
#include <mach/regs-gpio.h>
#include <mach/regs-mem.h>
#include <mach/regs-irq.h>
#include <asm/irq.h>

@@ -326,6 +325,9 @@ static int s3c_pm_enter(suspend_state_t state)

	S3C_PMDBG("%s: post sleep, preparing to return\n", __func__);

	/* LEDs should now be 1110 */
	s3c_pm_debug_smdkled(1 << 1, 0);

	s3c_pm_check_restore();

	/* ok, let's return from sleep */
+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,11 @@ obj-y += gpiolib.o
obj-$(CONFIG_CPU_S3C6400_INIT)	+= s3c6400-init.o
obj-$(CONFIG_CPU_S3C6400_CLOCK)	+= s3c6400-clock.o

# PM support

obj-$(CONFIG_PM)		+= pm.o
obj-$(CONFIG_PM)		+= sleep.o

# Device setup

obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o
Loading