From patchwork Mon Feb 24 03:43:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tarek Dakhran X-Patchwork-Id: 3705821 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 34434BF13A for ; Mon, 24 Feb 2014 03:48:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3687920176 for ; Mon, 24 Feb 2014 03:48:29 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21C312012D for ; Mon, 24 Feb 2014 03:48:28 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WHmWB-000836-Qo; Mon, 24 Feb 2014 03:47:47 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WHmW4-0006Gf-9a; Mon, 24 Feb 2014 03:47:40 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WHmVn-0006De-5Z for linux-arm-kernel@lists.infradead.org; Mon, 24 Feb 2014 03:47:24 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N1H00H38EI5DY60@mailout2.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 24 Feb 2014 03:46:53 +0000 (GMT) X-AuditID: cbfec7f5-b7fc96d000004885-07-530ac0b1ef11 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id EC.06.18565.1B0CA035; Mon, 24 Feb 2014 03:46:57 +0000 (GMT) Received: from localhost.localdomain ([168.219.243.98]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N1H00M2REHSG970@eusync2.samsung.com>; Mon, 24 Feb 2014 03:46:57 +0000 (GMT) From: Tarek Dakhran To: linux-kernel@vger.kernel.org Subject: [PATCH v7 1/3] ARM: EXYNOS: Add support for EXYNOS5410 SoC Date: Mon, 24 Feb 2014 12:43:53 +0900 Message-id: <1393213435-20863-2-git-send-email-t.dakhran@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1393213435-20863-1-git-send-email-t.dakhran@samsung.com> References: <1393213435-20863-1-git-send-email-t.dakhran@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRmVeSWpSXmKPExsVy+t/xK7obD3AFG0ybJGMxad0BJouH62+y WMw/co7Vov/NQlaL/49es1qce7WS0aJ3wVU2i7NNb9gtNj2+xmqxsG0Ji8XlXXPYLGac38dk cfsyr8XS6xeZLJ5OuMhmMWH6WhaLdS+ns1i07j3CbrHlZwejxe+eT8wW65+fYrRYP+M1i8Wx GUsYLabO+MHuIOGxZt4aRo+W5h42j8t9vUwef1e9YPbYOesuu8fK5V/YPDat6mTzeLV6JqvH nWt72Dw2L6n3eHWNxaNvyypGj+3X5jF7fN4kF8AXxWWTkpqTWZZapG+XwJXRtvIrc8FVg4qe 3RfYGhhnaHYxcnJICJhIdOyZzQJhi0lcuLeeDcQWEljKKNHxOAHC7mWSuNEd1cXIwcEmoC2x ZYcXSFhEQEFic+8z1i5GLg5mgU9sEj9WNTGBJIQFnCXOTtnCDGKzCKhKzHr1ihmkl1fAVWLt gXiIVYoS3c8mgK3iFHCT6P3zhR1ilatEw6kNLBMYeRcwMqxiFE0tTS4oTkrPNdIrTswtLs1L 10vOz93ECImnrzsYlx6zOsQowMGoxMMrUc0VLMSaWFZcmXuIUYKDWUmEt6YMKMSbklhZlVqU H19UmpNafIiRiYNTqoExevlDbb70mS0JNadcrzSwfEk91XZPVP/EZGETlVVrHE23s5icOtZs 0juTzdtutT5/+8TVEWs8NW7N5AzaqhB+TzhY9p/kDvbplt25LRw9MRZvX0RPD8hJdspc5738 jlvVY5nJ1TczLmZOkHQ5VbRk89WXHPW6LXPdY72yPhddWyOT4TSxXkCJpTgj0VCLuag4EQAw 7pDohQIAAA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140223_224723_300198_8F9228BA X-CRM114-Status: GOOD ( 16.22 ) X-Spam-Score: -7.4 (-------) Cc: Mark Rutland , Heiko Stuebner , linux-doc@vger.kernel.org, Tomasz Figa , Chander Kashyap , Romain Naour , Tarek Dakhran , Kukjin Kim , Russell King , Thomas Abraham , devicetree@vger.kernel.org, Pawel Moll , Ian Campbell , linux-samsung-soc@vger.kernel.org, Vyacheslav Tyrtov , Ben Dooks , Mike Turquette , linux-arm-kernel@lists.infradead.org, Kyungmin Park , Rob Herring , Rob Landley , Kumar Gala , Tarek Dakhran X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 | 10 ++++++++++ arch/arm/mach-exynos/common.c | 18 ++++++++++++++++++ arch/arm/mach-exynos/include/mach/map.h | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 1 + arch/arm/mach-exynos/platsmp.c | 2 ++ arch/arm/plat-samsung/include/plat/cpu.h | 8 ++++++++ arch/arm/plat-samsung/include/plat/map-s5p.h | 3 +++ 7 files changed, 43 insertions(+) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 4c414af..97a06c3 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -91,6 +91,16 @@ 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 + select S5P_PM if PM_SLEEP + select S5P_SLEEP if PM_SLEEP + help + Enable EXYNOS5410 SoC support + config SOC_EXYNOS5420 bool "SAMSUNG EXYNOS5420" default y diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 025fd82..5d53795 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -52,6 +52,7 @@ static const char name_exynos4210[] = "EXYNOS4210"; static const char name_exynos4212[] = "EXYNOS4212"; static const char name_exynos4412[] = "EXYNOS4412"; static const char name_exynos5250[] = "EXYNOS5250"; +static const char name_exynos5410[] = "EXYNOS5410"; static const char name_exynos5420[] = "EXYNOS5420"; static const char name_exynos5440[] = "EXYNOS5440"; @@ -85,6 +86,12 @@ static struct cpu_table cpu_ids[] __initdata = { .init = exynos_init, .name = name_exynos5250, }, { + .idcode = EXYNOS5410_SOC_ID, + .idmask = EXYNOS5_SOC_MASK, + .map_io = exynos5_map_io, + .init = exynos_init, + .name = name_exynos5410, + }, { .idcode = EXYNOS5420_SOC_ID, .idmask = EXYNOS5_SOC_MASK, .map_io = exynos5_map_io, @@ -215,6 +222,15 @@ static struct map_desc exynos4x12_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 exynos5250_iodesc[] __initdata = { { .virtual = (unsigned long)S5P_VA_SYSRAM_NS, @@ -379,6 +395,8 @@ static void __init exynos5_map_io(void) if (soc_is_exynos5250()) iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); + if (soc_is_exynos5410()) + iotable_init(exynos5410_iodesc, ARRAY_SIZE(exynos5410_iodesc)); } struct bus_type exynos_subsys = { 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_NS 0x0203F000 #define EXYNOS4x12_PA_SYSRAM_NS 0x0204F000 #define EXYNOS5250_PA_SYSRAM_NS 0x0204F000 +#define EXYNOS5410_PA_SYSRAM_NS 0x02073000 #define EXYNOS_PA_CHIPID 0x10000000 diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 37ea261..22245b2 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -51,6 +51,7 @@ static void __init exynos5_dt_machine_init(void) static char const *exynos5_dt_compat[] __initdata = { "samsung,exynos5250", + "samsung,exynos5410", "samsung,exynos5420", "samsung,exynos5440", NULL diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 8ea02f6..b681f89 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -39,6 +39,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 EXYNOS5410_BOOT_REG; return S5P_VA_SYSRAM; } diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 31164b3..262ef86 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h @@ -46,6 +46,7 @@ extern unsigned long samsung_cpu_id; #define EXYNOS4_CPU_MASK 0xFFFE0000 #define EXYNOS5250_SOC_ID 0x43520000 +#define EXYNOS5410_SOC_ID 0xE5410000 #define EXYNOS5420_SOC_ID 0xE5420000 #define EXYNOS5440_SOC_ID 0xE5440000 #define EXYNOS5_SOC_MASK 0xFFFFF000 @@ -68,6 +69,7 @@ IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK) IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK) IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK) IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK) +IS_SAMSUNG_CPU(exynos5410, EXYNOS5410_SOC_ID, EXYNOS5_SOC_MASK) IS_SAMSUNG_CPU(exynos5420, EXYNOS5420_SOC_ID, EXYNOS5_SOC_MASK) IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK) @@ -148,6 +150,12 @@ IS_SAMSUNG_CPU(exynos5440, EXYNOS5440_SOC_ID, EXYNOS5_SOC_MASK) # define soc_is_exynos5250() 0 #endif +#if defined(CONFIG_SOC_EXYNOS5410) +# define soc_is_exynos5410() is_samsung_exynos5410() +#else +# define soc_is_exynos5410() 0 +#endif + #if defined(CONFIG_SOC_EXYNOS5420) # define soc_is_exynos5420() is_samsung_exynos5420() #else diff --git a/arch/arm/plat-samsung/include/plat/map-s5p.h b/arch/arm/plat-samsung/include/plat/map-s5p.h index c186786..6310928 100644 --- a/arch/arm/plat-samsung/include/plat/map-s5p.h +++ b/arch/arm/plat-samsung/include/plat/map-s5p.h @@ -57,6 +57,9 @@ #define S3C_UART_OFFSET (0x400) #endif +#define S5P_VA_SYSRAM_NS_X(x) (S5P_VA_SYSRAM_NS + x) +#define EXYNOS5410_BOOT_REG S5P_VA_SYSRAM_NS_X(0x1c) + #include #endif /* __ASM_PLAT_MAP_S5P_H */