ARM: EXYNOS4: Add support new EXYNOS4212 SoC
cover ARM: EXYNOS4: Add support new EXYNOS4212 SoC
This patch adds support new EXYNOS4212 SoC and SMDK4212 Board.
[PATCH 1/5] ARM: EXYNOS4: Add support new EXYNOS4212 SoC [PATCH 2/5] ARM: EXYNOS4: Add support clock for EXYNOS4212 [PATCH 3/5] ARM: EXYNOS4: Add support PM for EXYNOS4212 [PATCH 4/5] ARM: EXYNOS4: Add support SMDK4212 Board [PATCH 5/5] tty: Add support serial for EXYNOS4212 SoC
arch/arm/mach-exynos4/Kconfig | 30 ++ arch/arm/mach-exynos4/Makefile | 8 +- arch/arm/mach-exynos4/clock-exynos4210.c | 139 ++++++++++ arch/arm/mach-exynos4/clock-exynos4212.c | 118 ++++++++ arch/arm/mach-exynos4/clock.c | 218 ++++++++++----- arch/arm/mach-exynos4/cpu.c | 12 +- arch/arm/mach-exynos4/include/mach/exynos4-clock.h | 43 +++ arch/arm/mach-exynos4/include/mach/regs-clock.h | 54 +++-- arch/arm/mach-exynos4/mach-smdk4212.c | 292 ++++++++++++++++++++ arch/arm/mach-exynos4/pm.c | 79 +----- arch/arm/plat-s5p/cpu.c | 9 + arch/arm/plat-s5p/include/plat/exynos4.h | 5 +- arch/arm/plat-s5p/include/plat/pll.h | 55 ++++- arch/arm/plat-samsung/include/plat/cpu.h | 8 + drivers/tty/serial/Kconfig | 4 +- 15 files changed, 903 insertions(+), 171 deletions(-)
PATCH 1/5 ARM: EXYNOS4: Add support new EXYNOS4212 SoC
This patch adds Samsung EXYNOS4212 SoC support. The EXYNOS4212 integrates a ARM Cortex A9 multi-core.
--- arch/arm/mach-exynos4/Kconfig | 5 +++++ arch/arm/mach-exynos4/Makefile | 6 ++++-- arch/arm/mach-exynos4/cpu.c | 6 +++++- arch/arm/plat-s5p/cpu.c | 9 +++++++++ arch/arm/plat-s5p/include/plat/exynos4.h | 3 +-- arch/arm/plat-samsung/include/plat/cpu.h | 8 ++++++++ 6 files changed, 32 insertions(+), 5 deletions(-)
arch/arm/mach-exynos4/Kconfig +5 -0
@@ -15,6 +15,11 @@ config CPU_EXYNOS4210 help Enable EXYNOS4210 CPU support +config SOC_EXYNOS4212 + bool + help + Enable EXYNOS4212 SoC support + config EXYNOS4_MCT bool default y
arch/arm/mach-exynos4/Makefile +4 -2
@@ -12,8 +12,10 @@ obj- := # Core support for EXYNOS4 system -obj-$(CONFIG_CPU_EXYNOS4210) += cpu.o init.o clock.o irq-combiner.o -obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o irq-eint.o dma.o pmu.o +obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o +obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o irq-eint.o dma.o pmu.o +obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o +obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o obj-$(CONFIG_PM) += pm.o sleep.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o
arch/arm/mach-exynos4/cpu.c +5 -1
@@ -241,7 +241,11 @@ static int __init exynos4_l2x0_cache_init(void) {/* TAG, Data Latency Control: 2cycle */ __raw_writel (0x110 ,S5P_VA_L2CC +L2X0_TAG_LATENCY_CTRL ); -__raw_writel (0x110 ,S5P_VA_L2CC +L2X0_DATA_LATENCY_CTRL ); + +if (soc_is_exynos4210 ()) +__raw_writel (0x110 ,S5P_VA_L2CC +L2X0_DATA_LATENCY_CTRL ); +else if (soc_is_exynos4212 ()) +__raw_writel (0x120 ,S5P_VA_L2CC +L2X0_DATA_LATENCY_CTRL );/* L2X0 Prefetch Control */ __raw_writel (0x30000007 ,S5P_VA_L2CC +L2X0_PREFETCH_CTRL );
arch/arm/plat-s5p/cpu.c +9 -0
@@ -33,6 +33,7 @@ static const char name_s5p6450[] = "S5P6450";static const char name_s5pc100[] ="S5PC100" ;static const char name_s5pv210[] ="S5PV210/S5PC110" ;static const char name_exynos4210[] ="EXYNOS4210" ; +static const char name_exynos4212[] ="EXYNOS4212" ;static struct cpu_table cpu_ids[]__initdata = { {
@@ -75,6 +76,14 @@ static struct cpu_table cpu_ids[] __initdata = { .init_uarts = exynos4_init_uarts, .init = exynos4_init, .name = name_exynos4210, + }, { + .idcode = EXYNOS4212_CPU_ID, + .idmask = EXYNOS4_CPU_MASK, + .map_io = exynos4_map_io, + .init_clocks = exynos4_init_clocks, + .init_uarts = exynos4_init_uarts, + .init = exynos4_init, + .name = name_exynos4212, }, };
arch/arm/plat-s5p/include/plat/exynos4.h +1 -2
@@ -16,8 +16,7 @@ extern void exynos4_common_init_uarts(struct s3c2410_uartcfg *cfg, int no);extern void exynos4_register_clocks (void );extern void exynos4_setup_clocks (void ); -#ifdef CONFIG_CPU_EXYNOS4210 - +#ifdef CONFIG_ARCH_EXYNOS4 extern int exynos4_init (void );extern void exynos4_init_irq (void );extern void exynos4_map_io (void );
arch/arm/plat-samsung/include/plat/cpu.h +8 -0
@@ -39,6 +39,7 @@ extern unsigned long samsung_cpu_id;#define S5PV210_CPU_MASK 0xFFFFF000#define EXYNOS4210_CPU_ID 0x43210000 +#define EXYNOS4212_CPU_ID 0x43220000#define EXYNOS4_CPU_MASK 0xFFFE0000#define IS_SAMSUNG_CPU (name, id, mask) \
@@ -54,6 +55,7 @@ IS_SAMSUNG_CPU(s5p6450, S5P6450_CPU_ID, S5P64XX_CPU_MASK) IS_SAMSUNG_CPU(s5pc100, S5PC100_CPU_ID, S5PC100_CPU_MASK) IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK) IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK) +IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK) #if defined(CONFIG_CPU_S3C2410) || defined(CONFIG_CPU_S3C2412) || \ defined(CONFIG_CPU_S3C2416) || defined(CONFIG_CPU_S3C2440) || \
@@ -100,6 +102,12 @@ IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)# define soc_is_exynos4210 () 0#endif +#if defined(CONFIG_SOC_EXYNOS4212 ) +# define soc_is_exynos4212 () is_samsung_exynos4212() +#else +# define soc_is_exynos4212 () 0 +#endif +#define EXYNOS4210_REV_0 (0x0)#define EXYNOS4210_REV_1_0 (0x10)#define EXYNOS4210_REV_1_1 (0x11)
Signature · 1 line
1.7.1
PATCH 2/5 ARM: EXYNOS4: Add support clock for EXYNOS4212
In reply to Kukjin KimThis patch splits EXYNOS4 clock code to EXYNOS4 common, EXYNOS4210 and EXYNOS4212 for supporting new EXYNOS4212 SoC with one kernel image. Of course, this patch adds some clock codes for EXYNOS4212 SoC.
--- arch/arm/mach-exynos4/clock-exynos4210.c | 101 ++++++++++++++++ arch/arm/mach-exynos4/clock-exynos4212.c | 84 +++++++++++++ arch/arm/mach-exynos4/clock.c | 127 +++++++++----------- arch/arm/mach-exynos4/cpu.c | 6 + arch/arm/mach-exynos4/include/mach/exynos4-clock.h | 43 +++++++ arch/arm/mach-exynos4/include/mach/regs-clock.h | 50 +++++--- arch/arm/plat-s5p/include/plat/exynos4.h | 2 + arch/arm/plat-s5p/include/plat/pll.h | 55 ++++++++- 8 files changed, 377 insertions(+), 91 deletions(-) create mode 100644 arch/arm/mach-exynos4/clock-exynos4210.c create mode 100644 arch/arm/mach-exynos4/clock-exynos4212.c create mode 100644 arch/arm/mach-exynos4/include/mach/exynos4-clock.h
arch/arm/mach-exynos4/clock-exynos4210.c new file +101 -0
@@ -0,0 +1,101 @@ +/* +* linux/arch/arm/mach-exynos4/clock-exynos4210.c +* +* Copyright (c) 2011 Samsung Electronics Co., Ltd. +* http://www.samsung.com +* +* EXYNOS4210 - Clock support +* +* 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 <linux/kernel.h> +#include <linux/err.h> +#include <linux/clk.h> +#include <linux/io.h> + +#include <plat/cpu-freq.h> +#include <plat/clock.h> +#include <plat/cpu.h> +#include <plat/pll.h> +#include <plat/s5p-clock.h> +#include <plat/clock-clksrc.h> +#include <plat/exynos4.h> + +#include <mach/hardware.h> +#include <mach/map.h> +#include <mach/regs-clock.h> +#include <mach/exynos4-clock.h> + +static struct clksrc_clk *sysclks[] = { +/* nothing here yet */ +}; + +static int exynos4_clksrc_mask_lcd1_ctrl (struct clk *clk,int enable) +{ +return s5p_gatectrl (S5P_CLKSRC_MASK_LCD1 , clk, enable); +} + +static struct clksrc_clk clksrcs[] = { + { + .clk = { + .name ="sclk_sata" , + .id =-1 , + .enable = exynos4_clksrc_mask_fsys_ctrl, + .ctrlbit = (1 <<24 ), + }, + .sources = &clkset_mout_corebus, + .reg_src = { .reg =S5P_CLKSRC_FSYS , .shift =24 , .size =1 }, + .reg_div = { .reg =S5P_CLKDIV_FSYS0 , .shift =20 , .size =4 }, + }, { + .clk = { + .name ="sclk_fimd" , + .devname ="exynos4-fb.1" , + .enable = exynos4_clksrc_mask_lcd1_ctrl, + .ctrlbit = (1 <<0 ), + }, + .sources = &clkset_group, + .reg_src = { .reg =S5P_CLKSRC_LCD1 , .shift =0 , .size =4 }, + .reg_div = { .reg =S5P_CLKDIV_LCD1 , .shift =0 , .size =4 }, + }, +}; + +static struct clk init_clocks_off[] = { + { + .name ="sataphy" , + .id =-1 , + .parent = &clk_aclk_133.clk, + .enable = exynos4_clk_ip_fsys_ctrl, + .ctrlbit = (1 <<3 ), + }, { + .name ="sata" , + .id =-1 , + .parent = &clk_aclk_133.clk, + .enable = exynos4_clk_ip_fsys_ctrl, + .ctrlbit = (1 <<10 ), + }, { + .name ="fimd" , + .devname ="exynos4-fb.1" , + .enable = exynos4_clk_ip_lcd1_ctrl, + .ctrlbit = (1 <<0 ), + }, +}; + +void __init exynos4210_register_clocks (void ) +{ +int ptr; + + clk_mout_mpll.reg_src.reg =S5P_CLKSRC_CPU ; + clk_mout_mpll.reg_src.shift =8 ; + clk_mout_mpll.reg_src.size =1 ; + +for (ptr =0 ; ptr <ARRAY_SIZE (sysclks); ptr++) +s3c_register_clksrc (sysclks[ptr],1 ); + +s3c_register_clksrc (clksrcs,ARRAY_SIZE (clksrcs)); + +s3c_register_clocks (init_clocks_off,ARRAY_SIZE (init_clocks_off)); +s3c_disable_clocks (init_clocks_off,ARRAY_SIZE (init_clocks_off)); +}
arch/arm/mach-exynos4/clock-exynos4212.c new file +84 -0
84 lines not on this page · raw message
arch/arm/mach-exynos4/clock.c +56 -71
267 lines not on this page · raw message
arch/arm/mach-exynos4/cpu.c +6 -0
@@ -188,6 +188,12 @@ void __init exynos4_init_clocks(int xtal)s3c24xx_register_baseclocks (xtal);s5p_register_clocks (xtal); + +if (soc_is_exynos4210 ()) +exynos4210_register_clocks (); +else if (soc_is_exynos4212 ()) +exynos4212_register_clocks (); +exynos4_register_clocks ();exynos4_setup_clocks (); }
arch/arm/mach-exynos4/include/mach/exynos4-clock.h new file +43 -0
43 lines not on this page · raw message
arch/arm/mach-exynos4/include/mach/regs-clock.h +32 -18
103 lines not on this page · raw message
arch/arm/plat-s5p/include/plat/exynos4.h +2 -0
@@ -14,6 +14,8 @@extern void exynos4_common_init_uarts (struct s3c2410_uartcfg *cfg,int no);extern void exynos4_register_clocks (void ); +extern void exynos4210_register_clocks (void ); +extern void exynos4212_register_clocks (void );extern void exynos4_setup_clocks (void );#ifdef CONFIG_ARCH_EXYNOS4
arch/arm/plat-s5p/include/plat/pll.h +53 -2
67 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 3/5 ARM: EXYNOS4: Add support PM for EXYNOS4212
In reply to Kukjin KimFrom: Jonghwan Choi <[email protected]>
This patch moves regarding clock stuff of PM into clock file to support PM on EXYNOS4210 and EXYNOS4212 with one single kernel image. Because some clock registers are different on each SoCs.
--- arch/arm/mach-exynos4/clock-exynos4210.c | 38 ++++++++++ arch/arm/mach-exynos4/clock-exynos4212.c | 34 +++++++++ arch/arm/mach-exynos4/clock.c | 89 +++++++++++++++++++++++ arch/arm/mach-exynos4/include/mach/regs-clock.h | 4 + arch/arm/mach-exynos4/pm.c | 79 ++------------------ 5 files changed, 172 insertions(+), 72 deletions(-)
arch/arm/mach-exynos4/clock-exynos4210.c +38 -0
@@ -15,6 +15,7 @@#include <linux/err.h> #include <linux/clk.h> #include <linux/io.h> +#include <linux/syscore_ops.h> #include <plat/cpu-freq.h> #include <plat/clock.h>
@@ -23,12 +24,24 @@#include <plat/s5p-clock.h> #include <plat/clock-clksrc.h> #include <plat/exynos4.h> +#include <plat/pm.h> #include <mach/hardware.h> #include <mach/map.h> #include <mach/regs-clock.h> #include <mach/exynos4-clock.h> +static struct sleep_save exynos4210_clock_save[] = { +SAVE_ITEM (S5P_CLKSRC_IMAGE ), +SAVE_ITEM (S5P_CLKSRC_LCD1 ), +SAVE_ITEM (S5P_CLKDIV_IMAGE ), +SAVE_ITEM (S5P_CLKDIV_LCD1 ), +SAVE_ITEM (S5P_CLKSRC_MASK_LCD1 ), +SAVE_ITEM (S5P_CLKGATE_IP_IMAGE_4210 ), +SAVE_ITEM (S5P_CLKGATE_IP_LCD1 ), +SAVE_ITEM (S5P_CLKGATE_IP_PERIR_4210 ), +}; +static struct clksrc_clk *sysclks[] = {/* nothing here yet */ };
@@ -83,6 +96,29 @@ static struct clk init_clocks_off[] = { }, }; +#ifdef CONFIG_PM +static int exynos4210_clock_suspend (void ) +{ +s3c_pm_do_save (exynos4210_clock_save,ARRAY_SIZE (exynos4210_clock_save)); + +return 0 ; +} + +static void exynos4210_clock_resume (void ) +{ +s3c_pm_do_restore_core (exynos4210_clock_save,ARRAY_SIZE (exynos4210_clock_save)); +} + +#else +#define exynos4210_clock_suspend NULL +#define exynos4210_clock_resume NULL +#endif + +struct syscore_ops exynos4210_clock_syscore_ops = { + .suspend = exynos4210_clock_suspend, + .resume = exynos4210_clock_resume, +}; +void __init exynos4210_register_clocks (void ) {int ptr;
@@ -98,4 +134,6 @@ void __init exynos4210_register_clocks(void)s3c_register_clocks (init_clocks_off,ARRAY_SIZE (init_clocks_off));s3c_disable_clocks (init_clocks_off,ARRAY_SIZE (init_clocks_off)); + +register_syscore_ops (&exynos4210_clock_syscore_ops); }
arch/arm/mach-exynos4/clock-exynos4212.c +34 -0
@@ -15,6 +15,7 @@#include <linux/err.h> #include <linux/clk.h> #include <linux/io.h> +#include <linux/syscore_ops.h> #include <plat/cpu-freq.h> #include <plat/clock.h>
@@ -23,12 +24,20 @@#include <plat/s5p-clock.h> #include <plat/clock-clksrc.h> #include <plat/exynos4.h> +#include <plat/pm.h> #include <mach/hardware.h> #include <mach/map.h> #include <mach/regs-clock.h> #include <mach/exynos4-clock.h> +static struct sleep_save exynos4212_clock_save[] = { +SAVE_ITEM (S5P_CLKSRC_IMAGE ), +SAVE_ITEM (S5P_CLKDIV_IMAGE ), +SAVE_ITEM (S5P_CLKGATE_IP_IMAGE_4212 ), +SAVE_ITEM (S5P_CLKGATE_IP_PERIR_4212 ), +}; +static struct clk *clk_src_mpll_user_list[] = { [0 ] = &clk_fin_mpll, [1 ] = &clk_mout_mpll.clk,
@@ -59,6 +68,29 @@ static struct clk init_clocks_off[] = {/* nothing here yet */ }; +#ifdef CONFIG_PM +static int exynos4212_clock_suspend (void ) +{ +s3c_pm_do_save (exynos4212_clock_save,ARRAY_SIZE (exynos4212_clock_save)); + +return 0 ; +} + +static void exynos4212_clock_resume (void ) +{ +s3c_pm_do_restore_core (exynos4212_clock_save,ARRAY_SIZE (exynos4212_clock_save)); +} + +#else +#define exynos4212_clock_suspend NULL +#define exynos4212_clock_resume NULL +#endif + +struct syscore_ops exynos4212_clock_syscore_ops = { + .suspend = exynos4212_clock_suspend, + .resume = exynos4212_clock_resume, +}; +void __init exynos4212_register_clocks (void ) {int ptr;
@@ -81,4 +113,6 @@ void __init exynos4212_register_clocks(void)s3c_register_clocks (init_clocks_off,ARRAY_SIZE (init_clocks_off));s3c_disable_clocks (init_clocks_off,ARRAY_SIZE (init_clocks_off)); + +register_syscore_ops (&exynos4212_clock_syscore_ops); }
arch/arm/mach-exynos4/clock.c +89 -0
118 lines not on this page · raw message
arch/arm/mach-exynos4/include/mach/regs-clock.h +4 -0
@@ -86,6 +86,8 @@#define S5P_CLKGATE_IP_IMAGE (soc_is_exynos4210() ? \ S5P_CLKREG(0x0C930) : \ S5P_CLKREG(0x04930)) +#define S5P_CLKGATE_IP_IMAGE_4210 S5P_CLKREG(0x0C930) +#define S5P_CLKGATE_IP_IMAGE_4212 S5P_CLKREG(0x04930)#define S5P_CLKGATE_IP_LCD0 S5P_CLKREG(0x0C934)#define S5P_CLKGATE_IP_FSYS S5P_CLKREG(0x0C940)#define S5P_CLKGATE_IP_GPS S5P_CLKREG(0x0C94C)
@@ -93,6 +95,8 @@#define S5P_CLKGATE_IP_PERIR (soc_is_exynos4210() ? \ S5P_CLKREG(0x0C960) : \ S5P_CLKREG(0x08960)) +#define S5P_CLKGATE_IP_PERIR_4210 S5P_CLKREG(0x0C960) +#define S5P_CLKGATE_IP_PERIR_4212 S5P_CLKREG(0x08960)#define S5P_CLKGATE_BLOCK S5P_CLKREG(0x0C970)#define S5P_CLKSRC_MASK_DMC S5P_CLKREG(0x10300)
arch/arm/mach-exynos4/pm.c +7 -72
103 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 3/5 ARM: EXYNOS4: Add support PM for EXYNOS4212
Quoted 43 lines · Kukjin Kim
From: Jonghwan Choi <[email protected]>
This patch moves regarding clock stuff of PM into clock file to support PM on EXYNOS4210 and EXYNOS4212 with one single kernel image. Because some clock registers are different on each SoCs.
Signed-off-by Jonghwan Choi <[email protected]>Signed-off-by Kukjin Kim <[email protected]>---
?arch/arm/mach-exynos4/clock-exynos4210.c ? ? ? ?| ? 38 ++++++++++ ?arch/arm/mach-exynos4/clock-exynos4212.c ? ? ? ?| ? 34 +++++++++ ?arch/arm/mach-exynos4/clock.c ? ? ? ? ? ? ? ? ? | ? 89 +++++++++++++++++++++++ ?arch/arm/mach-exynos4/include/mach/regs-clock.h | ? ?4 + ?arch/arm/mach-exynos4/pm.c ? ? ? ? ? ? ? ? ? ? ?| ? 79 ++------------------?5 files changed, 172 insertions(+), 72 deletions(-)
arch/arm/mach-exynos4/clock-exynos4210.c +11
-0+static struct sleep_save exynos4210_clock_save[] = { + ? ? ? SAVE_ITEM(S5P_CLKSRC_IMAGE), + ? ? ? SAVE_ITEM(S5P_CLKSRC_LCD1), + ? ? ? SAVE_ITEM(S5P_CLKDIV_IMAGE), + ? ? ? SAVE_ITEM(S5P_CLKDIV_LCD1), + ? ? ? SAVE_ITEM(S5P_CLKSRC_MASK_LCD1), + ? ? ? SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4210), + ? ? ? SAVE_ITEM(S5P_CLKGATE_IP_LCD1), + ? ? ? SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4210), +}; +arch/arm/mach-exynos4/clock-exynos4212.c +7
-0+static struct sleep_save exynos4212_clock_save[] = { + ? ? ? SAVE_ITEM(S5P_CLKSRC_IMAGE), + ? ? ? SAVE_ITEM(S5P_CLKDIV_IMAGE), + ? ? ? SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4212), + ? ? ? SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4212), +}; +
arch/arm/mach-exynos4/clock.c line 32
Quoted 1 line
arch/arm/mach-exynos4/clock.c +1
-0+static struct sleep_save exynos4_clock_save[] = {
Hello,
Is there any reason to have the following two SAVE_ITEM(S5P_CLKSRC_IMAGE),
SAVE_ITEM(S5P_CLKDIV_IMAGE
defined at both clock-exynos4210.c and clock-exynos4212.c, not defined at clock.c once?
Also, consider using CONFIG_PM_SLEEP rather than CONFIG_PM for suspend/resume ops.
Cheers!
MyungJoo
Signature · 2 lines
MyungJoo Ham, Ph.D. Mobile Software Platform Lab, DMC Business, Samsung Electronics
PATCH 3/5 ARM: EXYNOS4: Add support PM for EXYNOS4212
Quoted 2 lines · MyungJoo Ham
On Wed, Aug 24, 2011 at 10:25 PM, Kukjin Kim <[email protected]>
Quoted 7 lines · wrote:
Quoted 7 lines
From: Jonghwan Choi <[email protected]>
This patch moves regarding clock stuff of PM into clock file to support PM on EXYNOS4210 and EXYNOS4212 with one single kernel image. Because some clock registers are different on each SoCs.
Quoted 9 lines
Quoted 6 lines
Signed-off-by Jonghwan Choi <[email protected]>Signed-off-by Kukjin Kim <[email protected]>---
?arch/arm/mach-exynos4/clock-exynos4210.c ? ? ? ?| ? 38 ++++++++++ ?arch/arm/mach-exynos4/clock-exynos4212.c ? ? ? ?| ? 34 +++++++++ ?arch/arm/mach-exynos4/clock.c ? ? ? ? ? ? ? ? ? | ? 89+++++++++++++++++++++++
Quoted 2 lines
?arch/arm/mach-exynos4/include/mach/regs-clock.h | ? ?4 + ?arch/arm/mach-exynos4/pm.c ? ? ? ? ? ? ? ? ? ? ?| ? 79
++------------------
Quoted 24 lines
arch/arm/mach-
Quoted 3 lines
?5 files changed, 172 insertions(+), 72 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-exynos4/clock-exynos4210.c +0
-0
exynos4/clock-exynos4210.cQuoted 20 lines
index fe74b91..a4b00b7 100644
arch/arm/mach-exynos4/clock-exynos4210.c +11
-0+static struct sleep_save exynos4210_clock_save[] = { + ? ? ? SAVE_ITEM(S5P_CLKSRC_IMAGE), + ? ? ? SAVE_ITEM(S5P_CLKSRC_LCD1), + ? ? ? SAVE_ITEM(S5P_CLKDIV_IMAGE), + ? ? ? SAVE_ITEM(S5P_CLKDIV_LCD1), + ? ? ? SAVE_ITEM(S5P_CLKSRC_MASK_LCD1), + ? ? ? SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4210), + ? ? ? SAVE_ITEM(S5P_CLKGATE_IP_LCD1), + ? ? ? SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4210), +}; +arch/arm/mach-exynos4/clock-exynos4212.c +4
-0+static struct sleep_save exynos4212_clock_save[] = { + ? ? ? SAVE_ITEM(S5P_CLKSRC_IMAGE), + ? ? ? SAVE_ITEM(S5P_CLKDIV_IMAGE), + ? ? ? SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4212),
Quoted 9 lines
arch/arm/mach-exynos4/clock.c line 32
Quoted 6 lines
+ ? ? ?
SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4212),arch/arm/mach-exynos4/clock-exynos4212.c +2
-0+}; +arch/arm/mach-exynos4/clock.c +1
-0+static struct sleep_save exynos4_clock_save[] = {Hello,
Hi,
Quoted 6 lines
Is there any reason to have the following two
SAVE_ITEM(S5P_CLKSRC_IMAGE),
SAVE_ITEM(S5P_CLKDIV_IMAGE
defined at bothclock-exynos4210.candclock-exynos4212.c, not defined atclock.conce?
Yes, I know. I just wanted to keep in mind there is a different value(CLKGATE_IP_IMAGE) in regarding IMAGE clocks on each SoCs, and I think need it now. Anyway thanks for your pointing out.
Quoted 3 lines
Also, consider using
CONFIG_PM_SLEEPrather thanCONFIG_PMfor suspend/resume ops.
(Cc'ed Rafael)
Well, even though CONFIG_PM_SLEEP is used in regarding syscore_ops, in this case, using CONFIG_PM looks better.
If ARCH_SUSPEND_POSSIBLE will be selected, then CONFIG_SUSPEND is selected and CONFIG_PM_SLEEP is selected in kernel/power/Kconfig and of course, ARCH_SUSPEND_POSSIBLE is selected in arch/arm/Kconfig. However above everything depends on CONFIG_PM. So I think to use CONFIG_PM is more reasonable. In addition, it is more popular in other mainline codes now.
Hi Rafael,
How do you think about this?
Its original code is below.
---
#ifdef CONFIG_PM
static int exynos4210_clock_suspend(void)
{
s3c_pm_do_save(exynos4210_clock_save,ARRAY_SIZE(exynos4210_clock_save));
return 0; }
static void exynos4210_clock_resume(void)
{
s3c_pm_do_restore_core(exynos4210_clock_save,ARRAY_SIZE(exynos4210_clock_save));
}
#else
#define exynos4210_clock_suspend NULL
#define exynos4210_clock_resume NULL
#endif
struct syscore_ops exynos4210_clock_syscore_ops = {
.suspend = exynos4210_clock_suspend,
.resume = exynos4210_clock_resume,
};
---
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 3/5 ARM: EXYNOS4: Add support PM for EXYNOS4212
Quoted 74 lines · Kukjin Kim
Quoted 2 lines · MyungJoo Ham
On Wed, Aug 24, 2011 at 10:25 PM, Kukjin Kim <[email protected]>
Quoted 7 lines · wrote:
Quoted 7 lines
From: Jonghwan Choi <[email protected]>
This patch moves regarding clock stuff of PM into clock file to support PM on EXYNOS4210 and EXYNOS4212 with one single kernel image. Because some clock registers are different on each SoCs.
Quoted 9 lines
Quoted 6 lines
Signed-off-by Jonghwan Choi <[email protected]>Signed-off-by Kukjin Kim <[email protected]>--- arch/arm/mach-exynos4/clock-exynos4210.c | 38 ++++++++++ arch/arm/mach-exynos4/clock-exynos4212.c | 34 +++++++++ arch/arm/mach-exynos4/clock.c | 89+++++++++++++++++++++++
Quoted 2 lines
arch/arm/mach-exynos4/include/mach/regs-clock.h | 4 + arch/arm/mach-exynos4/pm.c | 79++------------------
Quoted 24 lines
arch/arm/mach-
Quoted 3 lines
5 files changed, 172 insertions(+), 72 deletions(-)arch/arm/mach- renamed from arch/arm/mach-exynos4/clock-exynos4210.c +0
-0
exynos4/clock-exynos4210.cQuoted 20 lines
index fe74b91..a4b00b7 100644
arch/arm/mach-exynos4/clock-exynos4210.c +11
-0+static struct sleep_save exynos4210_clock_save[] = { +SAVE_ITEM (S5P_CLKSRC_IMAGE ), +SAVE_ITEM (S5P_CLKSRC_LCD1 ), +SAVE_ITEM (S5P_CLKDIV_IMAGE ), +SAVE_ITEM (S5P_CLKDIV_LCD1 ), +SAVE_ITEM (S5P_CLKSRC_MASK_LCD1 ), +SAVE_ITEM (S5P_CLKGATE_IP_IMAGE_4210 ), +SAVE_ITEM (S5P_CLKGATE_IP_LCD1 ), +SAVE_ITEM (S5P_CLKGATE_IP_PERIR_4210 ), +}; +arch/arm/mach-exynos4/clock-exynos4212.c +4
-0+static struct sleep_save exynos4212_clock_save[] = { +SAVE_ITEM (S5P_CLKSRC_IMAGE ), +SAVE_ITEM (S5P_CLKDIV_IMAGE ), +SAVE_ITEM (S5P_CLKGATE_IP_IMAGE_4212 ),Quoted 9 lines
arch/arm/mach-exynos4/clock.c line 32
Quoted 6 lines
arch/arm/mach-exynos4/clock-exynos4212.c +3
-0+ SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4212), +}; +arch/arm/mach-exynos4/clock.c +1
-0+static struct sleep_save exynos4_clock_save[] = {Hello,
Hi,
Quoted 6 lines
Is there any reason to have the following two
SAVE_ITEM(S5P_CLKSRC_IMAGE),
SAVE_ITEM(S5P_CLKDIV_IMAGE
defined at bothclock-exynos4210.candclock-exynos4212.c, not defined atclock.conce?Yes, I know. I just wanted to keep in mind there is a different
value(CLKGATE_IP_IMAGE)in regarding IMAGE clocks on each SoCs, and I think need it now. Anyway thanks for your pointing out.Quoted 3 lines
Also, consider using
CONFIG_PM_SLEEPrather thanCONFIG_PMfor suspend/resume ops.(Cc'ed Rafael)
Well, even though
CONFIG_PM_SLEEPis used in regardingsyscore_ops, in this case, usingCONFIG_PMlooks better.
Quoted 8 lines
If
ARCH_SUSPEND_POSSIBLEwill be selected, thenCONFIG_SUSPENDis selected andCONFIG_PM_SLEEPis selected inkernel/power/Kconfigand of course,ARCH_SUSPEND_POSSIBLEis selected inarch/arm/Kconfig. However above everything depends onCONFIG_PM. So I think to useCONFIG_PMis more reasonable. In addition, it is more popular in other mainline codes now.Hi Rafael,
How do you think about this?
If you make syscore_ops depend on CONFIG_PM, they will be built but not used when CONFIG_PM_RUNTIME is set and CONFIG_PM_SLEEP is unset. If you think that's acceptable, I guess you can do it (although you may get a few "defined but not used" warnings in that case, which don't look nice).
Thanks,
Rafael
PATCH 3/5 ARM: EXYNOS4: Add support PM for EXYNOS4212
Quoted 19 lines · Rafael J. Wysocki
Quoted 17 lines · Kukjin Kim
Quoted 2 lines · MyungJoo Ham
On Wed, Aug 24, 2011 at 10:25 PM, Kukjin Kim <[email protected]>
Quoted 13 lines · wrote:
Quoted 13 lines
From: Jonghwan Choi <[email protected]>
This patch moves regarding clock stuff of PM into clock file to support PM on EXYNOS4210 and EXYNOS4212 with one single kernel image. Because some clock registers are different on each SoCs.
Signed-off-by Jonghwan Choi <[email protected]>Signed-off-by Kukjin Kim <[email protected]>--- arch/arm/mach-exynos4/clock-exynos4210.c | 38 ++++++++++ arch/arm/mach-exynos4/clock-exynos4212.c | 34 +++++++++ arch/arm/mach-exynos4/clock.c | 89
Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
+++++++++++++++++++++++
Quoted 2 lines
arch/arm/mach-exynos4/include/mach/regs-clock.h | 4 + arch/arm/mach-exynos4/pm.c | 79++------------------
Quoted 3 lines
Review
Quoted 3 lines
5 files changed, 172 insertions(+), 72 deletions(-)(quoted diff) +0
-0
b/arch/arm/mach-
Quoted 38 lines
Quoted 38 lines
Quoted 21 lines
exynos4/clock-exynos4210.cQuoted 20 lines
index fe74b91..a4b00b7 100644
arch/arm/mach-exynos4/clock-exynos4210.c +11
-0+static struct sleep_save exynos4210_clock_save[] = { +SAVE_ITEM (S5P_CLKSRC_IMAGE ), +SAVE_ITEM (S5P_CLKSRC_LCD1 ), +SAVE_ITEM (S5P_CLKDIV_IMAGE ), +SAVE_ITEM (S5P_CLKDIV_LCD1 ), +SAVE_ITEM (S5P_CLKSRC_MASK_LCD1 ), +SAVE_ITEM (S5P_CLKGATE_IP_IMAGE_4210 ), +SAVE_ITEM (S5P_CLKGATE_IP_LCD1 ), +SAVE_ITEM (S5P_CLKGATE_IP_PERIR_4210 ), +}; +arch/arm/mach-exynos4/clock-exynos4212.c +4
-0+static struct sleep_save exynos4212_clock_save[] = { +SAVE_ITEM (S5P_CLKSRC_IMAGE ), +SAVE_ITEM (S5P_CLKDIV_IMAGE ), +SAVE_ITEM (S5P_CLKGATE_IP_IMAGE_4212 ),Quoted 9 lines
arch/arm/mach-exynos4/clock.c line 32
Quoted 6 lines
arch/arm/mach-exynos4/clock-exynos4212.c +3
-0+ SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4212), +}; +arch/arm/mach-exynos4/clock.c +1
-0+static struct sleep_save exynos4_clock_save[] = {Hello,
Hi,
Quoted 6 lines
Is there any reason to have the following two
SAVE_ITEM(S5P_CLKSRC_IMAGE),
SAVE_ITEM(S5P_CLKDIV_IMAGE
defined at bothclock-exynos4210.candclock-exynos4212.c, not defined atclock.conce?
Quoted 11 lines
Quoted 2 lines
Yes, I know. I just wanted to keep in mind there is a different
value(CLKGATE_IP_IMAGE)in regarding IMAGE clocks on each SoCs, and Ithink
Quoted 8 lines
need it now. Anyway thanks for your pointing out.
Quoted 3 lines
Also, consider using
CONFIG_PM_SLEEPrather thanCONFIG_PMfor suspend/resume ops.(Cc'ed Rafael)
Well, even though
CONFIG_PM_SLEEPis used in regardingsyscore_ops, in
this
Quoted 9 lines
Quoted 3 lines
case, using
CONFIG_PMlooks better.If
ARCH_SUSPEND_POSSIBLEwill be selected, thenCONFIG_SUSPENDisselected
Quoted 5 lines
and
CONFIG_PM_SLEEPis selected inkernel/power/Kconfigand of course,ARCH_SUSPEND_POSSIBLEis selected inarch/arm/Kconfig. However above everything depends onCONFIG_PM. So I think to useCONFIG_PMis more reasonable. In addition, it is more popular in other mainline codes now.
Quoted 9 lines
Quoted 2 lines
Hi Rafael,
How do you think about this?If you make
syscore_opsdepend onCONFIG_PM, they will be built but not used whenCONFIG_PM_RUNTIMEis set andCONFIG_PM_SLEEPis unset. If you
think that's acceptable, I guess you can do it (although you may get a few "defined but not used" warnings in that case, which don't look nice).
Hmm...ok, I understand you mean CONFIG_PM_SLEEP is better in this case to reduce useless warnings. Will use CONFIG_PM_SLEEP.
Rafael and MyungJoo, Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 4/5 ARM: EXYNOS4: Add support SMDK4212 Board
In reply to Kukjin KimThis patch adds mach-smdk4212.c to support SMDK4212 board. Now it can support HSMMCs, I2Cs, RTC, WDT and Keypad. Other features will be supported next time.
--- arch/arm/mach-exynos4/Kconfig | 25 +++ arch/arm/mach-exynos4/Makefile | 2 + arch/arm/mach-exynos4/mach-smdk4212.c | 292 +++++++++++++++++++++++++++++++++ 3 files changed, 319 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-exynos4/mach-smdk4212.c
arch/arm/mach-exynos4/Kconfig +25 -0
@@ -116,6 +116,8 @@ config EXYNOS4_SETUP_USB_PHY menu "EXYNOS4 Machines" +comment "EXYNOS4210 Boards" + config MACH_SMDKC210 bool "SMDKC210" select MACH_SMDKV310
@@ -208,6 +210,29 @@ config MACH_NURI help Machine support for Samsung Mobile NURI Board. +comment "EXYNOS4212 Boards" + +config MACH_SMDK4212 + bool "SMDK4212" + select SOC_EXYNOS4212 + select S3C_DEV_HSMMC2 + select S3C_DEV_HSMMC3 + select S3C_DEV_I2C1 + select S3C_DEV_I2C3 + select S3C_DEV_I2C7 + select S3C_DEV_RTC + select S3C_DEV_WDT + select SAMSUNG_DEV_BACKLIGHT + select SAMSUNG_DEV_KEYPAD + select SAMSUNG_DEV_PWM + select EXYNOS4_SETUP_I2C1 + select EXYNOS4_SETUP_I2C3 + select EXYNOS4_SETUP_I2C7 + select EXYNOS4_SETUP_KEYPAD + select EXYNOS4_SETUP_SDHCI + help + Machine support for Samsung SMDK4212 + endmenu comment "Configuration for HSMMC bus width"
arch/arm/mach-exynos4/Makefile +2 -0
@@ -33,6 +33,8 @@ obj-$(CONFIG_MACH_ARMLEX4210) += mach-armlex4210.o obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o obj-$(CONFIG_MACH_NURI) += mach-nuri.o +obj-$(CONFIG_MACH_SMDK4212) += mach-smdk4212.o + # device support obj-y += dev-audio.o
arch/arm/mach-exynos4/mach-smdk4212.c new file +292 -0
292 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 5/5 tty: Add support serial for EXYNOS4212 SoC
In reply to Kukjin KimAccording to add support EXYNOS4212 SoC, we need to enable SERIAL_S5PV210 on EXYNOS4212.
--- drivers/tty/serial/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/Kconfig +2 -2
@@ -522,8 +522,8 @@ config SERIAL_S3C6400 config SERIAL_S5PV210 tristate "Samsung S5PV210 Serial port support" - depends on SERIAL_SAMSUNG && (CPU_S5PV210 || CPU_EXYNOS4210) - select SERIAL_SAMSUNG_UARTS_4 if (CPU_S5PV210 || CPU_EXYNOS4210) + depends on SERIAL_SAMSUNG && (CPU_S5PV210 || CPU_EXYNOS4210 || SOC_EXYNOS4212) + select SERIAL_SAMSUNG_UARTS_4 if (CPU_S5PV210 || CPU_EXYNOS4210 || SOC_EXYNOS4212) default y help Serial port support for Samsung's S5P Family of SoC's
Signature · 1 line
1.7.1