Re: [PATCH v8 1/3] ARM: EXYNOS: Add support for EXYNOS5410 SoC
Hi Kevin, On 26.04.2014 00:52, Kevin Hilman wrote: Tarek Dakhran writes: EXYNOS5410 is SoC in Samsung's Exynos5 SoC series. Add initial support for this SoC. Signed-off-by: Tarek Dakhran Signed-off-by: Vyacheslav Tyrtov Reviewed-by: Tomasz Figa [...] diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index 5eead53..83ae5fb 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c @@ -95,8 +95,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) for (;;) { /* make cpu1 to be turned off at next WFI command */ - if (cpu == 1) - __raw_writel(0, S5P_ARM_CORE1_CONFIGURATION); + if (cpu > 0) + __raw_writel(0, S5P_ARM_CORE_CONFIGURATION(cpu)); This looks like a fix that's probably not specific to the 5410 and maybe deserves it's own patch? [...] @@ -107,14 +111,14 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) */ write_pen_release(phys_cpu); - if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) { + if (!(__raw_readl(S5P_ARM_CORE_STATUS(cpu)) & S5P_CORE_LOCAL_PWR_EN)) { __raw_writel(S5P_CORE_LOCAL_PWR_EN, -S5P_ARM_CORE1_CONFIGURATION); +S5P_ARM_CORE_CONFIGURATION(cpu)); timeout = 10; /* wait max 10 ms until cpu1 is on */ - while ((__raw_readl(S5P_ARM_CORE1_STATUS) + while ((__raw_readl(S5P_ARM_CORE_STATUS(cpu)) & S5P_CORE_LOCAL_PWR_EN) != S5P_CORE_LOCAL_PWR_EN) { if (timeout-- == 0) break; ...and this hunk too? Yes, they do, but we are currently refactoring this code anyway. Best regards, Tomasz -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v8 1/3] ARM: EXYNOS: Add support for EXYNOS5410 SoC
Tarek Dakhran writes: > EXYNOS5410 is SoC in Samsung's Exynos5 SoC series. > Add initial support for this SoC. > > Signed-off-by: Tarek Dakhran > Signed-off-by: Vyacheslav Tyrtov > Reviewed-by: Tomasz Figa [...] > diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c > index 5eead53..83ae5fb 100644 > --- a/arch/arm/mach-exynos/hotplug.c > +++ b/arch/arm/mach-exynos/hotplug.c > @@ -95,8 +95,8 @@ static inline void platform_do_lowpower(unsigned int cpu, > int *spurious) > for (;;) { > > /* make cpu1 to be turned off at next WFI command */ > - if (cpu == 1) > - __raw_writel(0, S5P_ARM_CORE1_CONFIGURATION); > + if (cpu > 0) > + __raw_writel(0, S5P_ARM_CORE_CONFIGURATION(cpu)); This looks like a fix that's probably not specific to the 5410 and maybe deserves it's own patch? [...] > @@ -107,14 +111,14 @@ static int exynos_boot_secondary(unsigned int cpu, > struct task_struct *idle) >*/ > write_pen_release(phys_cpu); > > - if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) { > + if (!(__raw_readl(S5P_ARM_CORE_STATUS(cpu)) & S5P_CORE_LOCAL_PWR_EN)) { > __raw_writel(S5P_CORE_LOCAL_PWR_EN, > - S5P_ARM_CORE1_CONFIGURATION); > + S5P_ARM_CORE_CONFIGURATION(cpu)); > > timeout = 10; > > /* wait max 10 ms until cpu1 is on */ > - while ((__raw_readl(S5P_ARM_CORE1_STATUS) > + while ((__raw_readl(S5P_ARM_CORE_STATUS(cpu)) > & S5P_CORE_LOCAL_PWR_EN) != S5P_CORE_LOCAL_PWR_EN) { > if (timeout-- == 0) > break; ...and this hunk too? Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v8 1/3] ARM: EXYNOS: Add support for EXYNOS5410 SoC
Hi Tarek, On 14.04.2014 13:59, Tarek Dakhran wrote: On 04/14/2014 03:03 PM, Arnd Bergmann wrote: On Monday 14 April 2014 11:17:38 Tarek Dakhran wrote: --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -159,6 +159,15 @@ static struct map_desc exynos5250_iodesc[] __initdata = { }, }; +static struct map_desc exynos5410_iodesc[] __initdata = { + { + .virtual= (unsigned long)S5P_VA_SYSRAM_NS, + .pfn= __phys_to_pfn(EXYNOS5410_PA_SYSRAM_NS), + .length = SZ_4K, + .type = MT_DEVICE, + }, +}; + static struct map_desc exynos5_iodesc[] __initdata = { NAK Why does this keep coming up? Arnd We need this memory region because boot address for exynos5410 located here, same as for 5250. Is there really no way to map this region dynamically in the entity (driver, source file, whatever) that actually uses it? The goal is to get rid of all the static mappings entirely, so adding new one makes us further from it. Best regards, Tomasz -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v8 1/3] ARM: EXYNOS: Add support for EXYNOS5410 SoC
On 04/14/2014 03:03 PM, Arnd Bergmann wrote: On Monday 14 April 2014 11:17:38 Tarek Dakhran wrote: --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -159,6 +159,15 @@ static struct map_desc exynos5250_iodesc[] __initdata = { }, }; +static struct map_desc exynos5410_iodesc[] __initdata = { + { + .virtual= (unsigned long)S5P_VA_SYSRAM_NS, + .pfn= __phys_to_pfn(EXYNOS5410_PA_SYSRAM_NS), + .length = SZ_4K, + .type = MT_DEVICE, + }, +}; + static struct map_desc exynos5_iodesc[] __initdata = { NAK Why does this keep coming up? Arnd We need this memory region because boot address for exynos5410 located here, same as for 5250. -- Best regards, Tarek Dakhran -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v8 1/3] ARM: EXYNOS: Add support for EXYNOS5410 SoC
On Monday 14 April 2014 11:17:38 Tarek Dakhran wrote: > --- a/arch/arm/mach-exynos/exynos.c > +++ b/arch/arm/mach-exynos/exynos.c > @@ -159,6 +159,15 @@ static struct map_desc exynos5250_iodesc[] __initdata = { > }, > }; > > +static struct map_desc exynos5410_iodesc[] __initdata = { > + { > + .virtual= (unsigned long)S5P_VA_SYSRAM_NS, > + .pfn= __phys_to_pfn(EXYNOS5410_PA_SYSRAM_NS), > + .length = SZ_4K, > + .type = MT_DEVICE, > + }, > +}; > + > static struct map_desc exynos5_iodesc[] __initdata = { NAK Why does this keep coming up? Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH v8 1/3] ARM: EXYNOS: Add support for EXYNOS5410 SoC
EXYNOS5410 is SoC in Samsung's Exynos5 SoC series. Add initial support for this SoC. Signed-off-by: Tarek Dakhran Signed-off-by: Vyacheslav Tyrtov Reviewed-by: Tomasz Figa --- arch/arm/mach-exynos/Kconfig |8 arch/arm/mach-exynos/exynos.c| 12 arch/arm/mach-exynos/hotplug.c |4 ++-- arch/arm/mach-exynos/include/mach/map.h |1 + arch/arm/mach-exynos/platsmp.c | 10 +++--- arch/arm/mach-exynos/regs-pmu.h |4 ++-- arch/arm/plat-samsung/include/plat/cpu.h | 11 ++- 7 files changed, 42 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index fc8bf18..92f2593 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -84,6 +84,14 @@ config SOC_EXYNOS5250 help Enable EXYNOS5250 SoC support +config SOC_EXYNOS5410 + bool "SAMSUNG EXYNOS5410" + default y + depends on ARCH_EXYNOS5 + select PM_GENERIC_DOMAINS if PM_RUNTIME + help + Enable EXYNOS5410 SoC support + config SOC_EXYNOS5420 bool "SAMSUNG EXYNOS5420" default y diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index b32a907..fdb3fb5 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -159,6 +159,15 @@ static struct map_desc exynos5250_iodesc[] __initdata = { }, }; +static struct map_desc exynos5410_iodesc[] __initdata = { + { + .virtual= (unsigned long)S5P_VA_SYSRAM_NS, + .pfn= __phys_to_pfn(EXYNOS5410_PA_SYSRAM_NS), + .length = SZ_4K, + .type = MT_DEVICE, + }, +}; + static struct map_desc exynos5_iodesc[] __initdata = { { .virtual= (unsigned long)S3C_VA_SYS, @@ -294,6 +303,8 @@ static void __init exynos_map_io(void) iotable_init(exynos4x12_iodesc, ARRAY_SIZE(exynos4x12_iodesc)); if (soc_is_exynos5250()) iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); + if (soc_is_exynos5410()) + iotable_init(exynos5410_iodesc, ARRAY_SIZE(exynos5410_iodesc)); } void __init exynos_init_io(void) @@ -376,6 +387,7 @@ static char const *exynos_dt_compat[] __initconst = { "samsung,exynos4412", "samsung,exynos5", "samsung,exynos5250", + "samsung,exynos5410", "samsung,exynos5420", "samsung,exynos5440", NULL diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index 5eead53..83ae5fb 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c @@ -95,8 +95,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) for (;;) { /* make cpu1 to be turned off at next WFI command */ - if (cpu == 1) - __raw_writel(0, S5P_ARM_CORE1_CONFIGURATION); + if (cpu > 0) + __raw_writel(0, S5P_ARM_CORE_CONFIGURATION(cpu)); /* * here's the WFI diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 7b046b5..894f431 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -29,6 +29,7 @@ #define EXYNOS4210_PA_SYSRAM_NS0x0203F000 #define EXYNOS4x12_PA_SYSRAM_NS0x0204F000 #define EXYNOS5250_PA_SYSRAM_NS0x0204F000 +#define EXYNOS5410_PA_SYSRAM_NS0x02073000 #define EXYNOS_PA_CHIPID 0x1000 diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 03e5e9f..dce2841 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -37,6 +37,8 @@ static inline void __iomem *cpu_boot_reg_base(void) { if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) return S5P_INFORM5; + if (soc_is_exynos5410()) + return S5P_VA_SYSRAM_NS; return S5P_VA_SYSRAM; } @@ -47,6 +49,8 @@ static inline void __iomem *cpu_boot_reg(int cpu) boot_reg = cpu_boot_reg_base(); if (soc_is_exynos4412()) boot_reg += 4*cpu; + else if (soc_is_exynos5410()) + boot_reg += (0x1c); else if (soc_is_exynos5420()) boot_reg += 4; return boot_reg; @@ -107,14 +111,14 @@ static int exynos_boot_secondary(unsigned int cpu, struct task_struct *idle) */ write_pen_release(phys_cpu); - if (!(__raw_readl(S5P_ARM_CORE1_STATUS) & S5P_CORE_LOCAL_PWR_EN)) { + if (!(__raw_readl(S5P_ARM_CORE_STATUS(cpu)) & S5P_CORE_LOCAL_PWR_EN)) { __raw_writel(S5P_CORE_LOCAL_PWR_EN, -S5P_ARM_CORE1_CONFIGURATION); +S5P_ARM_CORE_CONFIGURA