From c3fcf5d1a43cc27393f77d07b1323232095173de Mon Sep 17 00:00:00 2001 From: Kyungmin Park Date: Tue, 17 Nov 2009 08:41:17 +0100 Subject: ARM: S5PC1XX: add cpu idle and system reset support Add CPU idle support by a call to SoC build-in power management core. Add system reset support by a simple write to system controll register. Signed-off-by: Kyungmin Park Signed-off-by: Marek Szyprowski Signed-off-by: Ben Dooks --- arch/arm/mach-s5pc100/cpu.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'arch/arm/mach-s5pc100/cpu.c') diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c index 0e718890da3..a23ca5795bc 100644 --- a/arch/arm/mach-s5pc100/cpu.c +++ b/arch/arm/mach-s5pc100/cpu.c @@ -22,6 +22,8 @@ #include #include +#include + #include #include #include @@ -32,6 +34,7 @@ #include #include +#include #include #include @@ -45,6 +48,23 @@ static struct map_desc s5pc100_iodesc[] __initdata = { }; +static void s5pc100_idle(void) +{ + unsigned long tmp; + + tmp = __raw_readl(S5PC100_PWR_CFG); + tmp &= ~S5PC100_PWRCFG_CFG_DEEP_IDLE; + tmp &= ~S5PC100_PWRCFG_CFG_WFI_MASK; + tmp |= S5PC100_PWRCFG_CFG_WFI_DEEP_IDLE; + __raw_writel(tmp, S5PC100_PWR_CFG); + + tmp = __raw_readl(S5PC100_OTHERS); + tmp |= S5PC100_PMU_INT_DISABLE; + __raw_writel(tmp, S5PC100_OTHERS); + + cpu_do_idle(); +} + /* s5pc100_map_io * * register the standard cpu IO areas @@ -93,5 +113,7 @@ int __init s5pc100_init(void) { printk(KERN_DEBUG "S5PC100: Initialising architecture\n"); + s5pc1xx_idle = s5pc100_idle; + return sysdev_register(&s5pc100_sysdev); } -- cgit v1.2.3 From 5eda288fa96cac0b0f25c90249f5347c6c62da0e Mon Sep 17 00:00:00 2001 From: Kyungmin Park Date: Tue, 17 Nov 2009 08:41:21 +0100 Subject: ARM: S5PC1xx: add platform helpers for i2c adapter devices Samsung S5PC100 has I2C bus controller compatible with the one known from previous SoCs series. Add required platform setup and support code that it can be used with s3c2410-i2c driver. Signed-off-by: Kyungmin Park Signed-off-by: Marek Szyprowski Signed-off-by: Ben Dooks --- arch/arm/mach-s5pc100/cpu.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm/mach-s5pc100/cpu.c') diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c index a23ca5795bc..1319e3d0ec3 100644 --- a/arch/arm/mach-s5pc100/cpu.c +++ b/arch/arm/mach-s5pc100/cpu.c @@ -75,6 +75,10 @@ void __init s5pc100_map_io(void) iotable_init(s5pc100_iodesc, ARRAY_SIZE(s5pc100_iodesc)); /* initialise device information early */ + + /* the i2c devices are directly compatible with s3c2440 */ + s3c_i2c0_setname("s3c2440-i2c"); + s3c_i2c1_setname("s3c2440-i2c"); } void __init s5pc100_init_clocks(int xtal) -- cgit v1.2.3 From 86cd4f5f83acbfa481c513c74666ad360b49d73b Mon Sep 17 00:00:00 2001 From: Kyungmin Park Date: Tue, 17 Nov 2009 08:41:23 +0100 Subject: ARM: S5PC1xx: add platform helpers for SDHCI host controllers Samsung S5PC100 has 3 SDHCI controllers compatible with the one known from previous SoCs series. Add required platform setup and support code that the devices can be used with sdhci-s3c driver. Signed-off-by: Kyungmin Park Signed-off-by: Marek Szyprowski Signed-off-by: Ben Dooks --- arch/arm/mach-s5pc100/cpu.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/mach-s5pc100/cpu.c') diff --git a/arch/arm/mach-s5pc100/cpu.c b/arch/arm/mach-s5pc100/cpu.c index 1319e3d0ec3..d79e7574a85 100644 --- a/arch/arm/mach-s5pc100/cpu.c +++ b/arch/arm/mach-s5pc100/cpu.c @@ -75,6 +75,9 @@ void __init s5pc100_map_io(void) iotable_init(s5pc100_iodesc, ARRAY_SIZE(s5pc100_iodesc)); /* initialise device information early */ + s5pc100_default_sdhci0(); + s5pc100_default_sdhci1(); + s5pc100_default_sdhci2(); /* the i2c devices are directly compatible with s3c2440 */ s3c_i2c0_setname("s3c2440-i2c"); -- cgit v1.2.3