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

Commit ea31fd43 authored by Jongpill Lee's avatar Jongpill Lee Committed by Kukjin Kim
Browse files

ARM: S5PV210: Add Power Management Support



This patch adds suspend-to-ram support for S5PV210.
Note. This patch is confirmed on SMDKV210 and SMDKC110 board.

Signed-off-by: default avatarJongpill Lee <boyko.lee@samsung.com>
Signed-off-by: default avatarSangbeom Kim <sbkim73@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent dc425471
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@ config CPU_S5PV210
	bool
	bool
	select S3C_PL330_DMA
	select S3C_PL330_DMA
	select S5P_EXT_INT
	select S5P_EXT_INT
	select S5PV210_PM if PM
	help
	help
	  Enable S5PV210 CPU support
	  Enable S5PV210 CPU support


@@ -152,4 +153,9 @@ config MACH_TORBRECK


endmenu
endmenu


config S5PV210_PM
	bool
	help
	  Power Management code common to S5PV210

endif
endif
+1 −0
Original line number Original line Diff line number Diff line
@@ -14,6 +14,7 @@ obj- :=


obj-$(CONFIG_CPU_S5PV210)	+= cpu.o init.o clock.o dma.o gpiolib.o
obj-$(CONFIG_CPU_S5PV210)	+= cpu.o init.o clock.o dma.o gpiolib.o
obj-$(CONFIG_CPU_S5PV210)	+= setup-i2c0.o
obj-$(CONFIG_CPU_S5PV210)	+= setup-i2c0.o
obj-$(CONFIG_S5PV210_PM)	+= pm.o sleep.o


# machine support
# machine support


+43 −0
Original line number Original line Diff line number Diff line
/* linux/arch/arm/mach-s5pv210/include/mach/pm-core.h
 *
 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
 *		http://www.samsung.com
 *
 * Based on arch/arm/mach-s3c2410/include/mach/pm-core.h,
 * Copyright 2008 Simtec Electronics
 *      Ben Dooks <ben@simtec.co.uk>
 *      http://armlinux.simtec.co.uk/
 *
 * S5PV210 - PM core support for arch/arm/plat-s5p/pm.c
 *
 * 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.
*/

static inline void s3c_pm_debug_init_uart(void)
{
	/* nothing here yet */
}

static inline void s3c_pm_arch_prepare_irqs(void)
{
	__raw_writel(s3c_irqwake_intmask, S5P_WAKEUP_MASK);
	__raw_writel(s3c_irqwake_eintmask, S5P_EINT_WAKEUP_MASK);
}

static inline void s3c_pm_arch_stop_clocks(void)
{
	/* nothing here yet */
}

static inline void s3c_pm_arch_show_resume_irqs(void)
{
	/* nothing here yet */
}

static inline void s3c_pm_arch_update_uart(void __iomem *regs,
					   struct pm_uart_save *save)
{
	/* nothing here yet */
}
+5 −2
Original line number Original line Diff line number Diff line
@@ -159,8 +159,11 @@
#define S5P_SLEEP_CFG_USBOSC_EN		(1 << 1)
#define S5P_SLEEP_CFG_USBOSC_EN		(1 << 1)


/* OTHERS Resgister */
/* OTHERS Resgister */
#define S5P_OTHERS_RET_IO		(1 << 31)
#define S5P_OTHERS_RET_CF		(1 << 30)
#define S5P_OTHERS_RET_MMC		(1 << 29)
#define S5P_OTHERS_RET_UART		(1 << 28)
#define S5P_OTHERS_USB_SIG_MASK		(1 << 16)
#define S5P_OTHERS_USB_SIG_MASK		(1 << 16)
#define S5P_OTHERS_MIPI_DPHY_EN		(1 << 28)


/* MIPI */
/* MIPI */
#define S5P_MIPI_DPHY_EN		(3)
#define S5P_MIPI_DPHY_EN		(3)
+3 −0
Original line number Original line Diff line number Diff line
@@ -28,6 +28,7 @@
#include <plat/cpu.h>
#include <plat/cpu.h>
#include <plat/ata.h>
#include <plat/ata.h>
#include <plat/iic.h>
#include <plat/iic.h>
#include <plat/pm.h>


/* Following are default values for UCON, ULCON and UFCON UART registers */
/* Following are default values for UCON, ULCON and UFCON UART registers */
#define SMDKC110_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
#define SMDKC110_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
@@ -110,6 +111,8 @@ static void __init smdkc110_map_io(void)


static void __init smdkc110_machine_init(void)
static void __init smdkc110_machine_init(void)
{
{
	s3c_pm_init();

	s3c_i2c0_set_platdata(NULL);
	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_i2c2_set_platdata(NULL);
	s3c_i2c2_set_platdata(NULL);
Loading