From patchwork Fri Dec 6 15:56:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 3298751 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 A33BFC0D4A for ; Fri, 6 Dec 2013 15:57:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5AD052052A for ; Fri, 6 Dec 2013 15:57:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C21D20414 for ; Fri, 6 Dec 2013 15:57:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753458Ab3LFP5S (ORCPT ); Fri, 6 Dec 2013 10:57:18 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:14960 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752948Ab3LFP5R (ORCPT ); Fri, 6 Dec 2013 10:57:17 -0500 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MXE00LDN6ZGPA00@mailout2.samsung.com>; Sat, 07 Dec 2013 00:57:16 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.122]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 1D.5D.12557.BD3F1A25; Sat, 07 Dec 2013 00:57:15 +0900 (KST) X-AuditID: cbfee690-b7f676d00000310d-2a-52a1f3db97bc Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id F3.1C.17171.BD3F1A25; Sat, 07 Dec 2013 00:57:15 +0900 (KST) Received: from localhost.localdomain ([107.108.83.245]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MXE003WB6Z2JY10@mmp2.samsung.com>; Sat, 07 Dec 2013 00:57:15 +0900 (KST) From: Rahul Sharma To: linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: mturquette@linaro.org, kgene.kim@samsung.com, thomas.ab@samsung.com, tomasz.figa@gmail.com, joshi@samsung.com, pankaj.dubey@samsung.com, yg1004.jang@samsung.com, arun.kk@samsung.com, r.sh.open@gmail.com Subject: [PATCH 1/7] ARM: EXYNOS: initial board support for exynos5260 SoC Date: Fri, 06 Dec 2013 21:26:25 +0530 Message-id: <1386345391-23482-2-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1386345391-23482-1-git-send-email-rahul.sharma@samsung.com> References: <1386345391-23482-1-git-send-email-rahul.sharma@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42JZI2JSpXv788Igg0WbrS0+nrrNajH/yDlW i++7vrBb9C64ymax6fE1VosZ5/cxWTydcJHNYtFWoMTCF/EWHcsYLVbt+sNosaNlNYsDj8fO WXfZPe5c28PmsXlJvUffllWMHp83yQWwRnHZpKTmZJalFunbJXBlzJ3dw1Zw36xi+o9L7A2M V/W6GDk5JARMJGYdamWCsMUkLtxbz9bFyMUhJLCUUeLxqgYWmKLbu2ES0xklfu+bwQ7htDNJ 3D7SwghSxSagKzH74DMgm4NDRCBTYuOWXJAaZoFLjBIXN/8DWyEs4CWxsXsnK4jNIqAqsW9l D5jNK+Ah8XT+ZjaQXgkBBYk5k2xATE4BT4llDwJAKoSAKrY87ANbKyGwj11iyZEz7BBjBCS+ TT7EAtEqK7HpADPEzZISB1fcYJnAKLyAkWEVo2hqQXJBcVJ6kYlecWJucWleul5yfu4mRmBE nP73bMIOxnsHrA8xJgONm8gsJZqcD4yovJJ4Q2MzIwtTE1NjI3NLM9KElcR51R4lBQkJpCeW pGanphakFsUXleakFh9iZOLglGpgtJ3f5qWTzNWdueRB5nalo7OnKM7gNquKF5R3y34hwVqy 4fN32d+KUkZ2XUcXv7lX9e7so6+HOnufy18/biNlfvzh0nCBWU9ioh8ebJtyvmIq/9lAPnvG LdOTItJcnnf62ir9f2MknFCUWL8xgv+E07VfFce//93huTp29e6jOxUkH/r2vf12X4mlOCPR UIu5qDgRAGOV3UaeAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBIsWRmVeSWpSXmKPExsVy+t9jQd3bnxcGGVzapGfx8dRtVov5R86x Wnzf9YXdonfBVTaLTY+vsVrMOL+PyeLphItsFou2AiUWvoi36FjGaLFq1x9Gix0tq1kceDx2 zrrL7nHn2h42j81L6j36tqxi9Pi8SS6ANaqB0SYjNTEltUghNS85PyUzL91WyTs43jne1MzA UNfQ0sJcSSEvMTfVVsnFJ0DXLTMH6DolhbLEnFKgUEBicbGSvh2mCaEhbroWMI0Rur4hQXA9 RgZoIGENY8bc2T1sBffNKqb/uMTewHhVr4uRk0NCwETi9u71bBC2mMSFeyA2F4eQwHRGid/7 ZrBDOO1MErePtDCCVLEJ6ErMPvgMyObgEBHIlNi4JRekhlngEqPExc3/mEBqhAW8JDZ272QF sVkEVCX2rewBs3kFPCSezt/MBtIrIaAgMWeSDYjJKeApsexBAEiFEFDFlod97BMYeRcwMqxi FE0tSC4oTkrPNdQrTswtLs1L10vOz93ECI63Z1I7GFc2WBxiFOBgVOLh5Vi1IEiINbGsuDL3 EKMEB7OSCO+ROwuDhHhTEiurUovy44tKc1KLDzEmA900kVlKNDkfmArySuINjU3MTY1NLU0s TMwsSRNWEuc90GodKCSQnliSmp2aWpBaBLOFiYNTqoFRXahF3/1c8J3qGElfsU5Npso646AN 3yPPSX623GnEddlJNlssxun1kRpXOYZ8QdbYubMWWjL1Jj8/dS4xN9clnLflXsXmtyoOxY/F E7ds5Bav93EXnjhxq/erY6KvOmf+++MUeGF5XMGsOTcO7QxOX5/dMmXSG6a298W71PgcD4Qd uPn4+gMlluKMREMt5qLiRABJ0dTg+wIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 From: Pankaj Dubey This patch add basic arch side support for exynos5260 SoC. Signed-off-by: Pankaj Dubey Signed-off-by: Arun Kumar K --- arch/arm/mach-exynos/Kconfig | 9 +++++++++ arch/arm/mach-exynos/common.c | 19 ++++++++++++++++++- arch/arm/mach-exynos/cpuidle.c | 2 +- arch/arm/mach-exynos/include/mach/map.h | 1 + arch/arm/mach-exynos/include/mach/regs-pmu.h | 4 ++++ arch/arm/mach-exynos/mach-exynos5-dt.c | 1 + arch/arm/plat-samsung/include/plat/cpu.h | 8 ++++++++ arch/arm/plat-samsung/include/plat/map-s5p.h | 1 + 8 files changed, 43 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index f9d67a0..dcae2ec 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -93,6 +93,15 @@ config SOC_EXYNOS5250 help Enable EXYNOS5250 SoC support +config SOC_EXYNOS5260 + bool "SAMSUNG EXYNOS5260" + default y + depends on ARCH_EXYNOS5 + select AUTO_ZRELADDR + select SAMSUNG_DMADEV + help + Enable EXYNOS5260 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 61d2906..5eb77d1 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_exynos5260[] = "EXYNOS5260"; 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 = EXYNOS5260_SOC_ID, + .idmask = EXYNOS5_SOC_MASK, + .map_io = exynos5_map_io, + .init = exynos_init, + .name = name_exynos5260, + }, { .idcode = EXYNOS5420_SOC_ID, .idmask = EXYNOS5_SOC_MASK, .map_io = exynos5_map_io, @@ -263,6 +270,15 @@ static struct map_desc exynos5_iodesc[] __initdata = { }, }; +static struct map_desc exynos5260_iodesc[] __initdata = { + { + .virtual = (unsigned long)S5P_VA_SYSRAM_NS, + .pfn = __phys_to_pfn(EXYNOS5260_PA_SYSRAM_NS), + .length = SZ_4K, + .type = MT_DEVICE, + }, +}; + void exynos4_restart(enum reboot_mode mode, const char *cmd) { __raw_writel(0x1, S5P_SWRESET); @@ -371,7 +387,8 @@ static void __init exynos4_map_io(void) static void __init exynos5_map_io(void) { iotable_init(exynos5_iodesc, ARRAY_SIZE(exynos5_iodesc)); - + if (soc_is_exynos5260()) + iotable_init(exynos5260_iodesc, ARRAY_SIZE(exynos5260_iodesc)); if (soc_is_exynos5250()) iotable_init(exynos5250_iodesc, ARRAY_SIZE(exynos5250_iodesc)); } diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index ddbfe87..405c11a 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c @@ -120,7 +120,7 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev, cpu_suspend(0, idle_finisher); #ifdef CONFIG_SMP - if (!soc_is_exynos5250()) + if (!soc_is_exynos5250() || soc_is_exynos5260()) scu_enable(S5P_VA_SCU); #endif cpu_pm_exit(); diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 7b046b5..bd6fa02 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 EXYNOS5260_PA_SYSRAM_NS 0x02073000 #define EXYNOS_PA_CHIPID 0x10000000 diff --git a/arch/arm/mach-exynos/include/mach/regs-pmu.h b/arch/arm/mach-exynos/include/mach/regs-pmu.h index 2cdb63e..09ae29a 100644 --- a/arch/arm/mach-exynos/include/mach/regs-pmu.h +++ b/arch/arm/mach-exynos/include/mach/regs-pmu.h @@ -234,6 +234,10 @@ #define EXYNOS5_SYS_WDTRESET (1 << 20) +#define EXYNOS5260_A7_WDTRST (1 << 24) +#define EXYNOS5260_A15_WDTRST (1 << 23) +#define EXYNOS5260_SYS_WDTRESET (EXYNOS5260_A7_WDTRST || EXYNOS5260_A15_WDTRST) + #define EXYNOS5_ARM_CORE0_SYS_PWR_REG S5P_PMUREG(0x1000) #define EXYNOS5_DIS_IRQ_ARM_CORE0_LOCAL_SYS_PWR_REG S5P_PMUREG(0x1004) #define EXYNOS5_DIS_IRQ_ARM_CORE0_CENTRAL_SYS_PWR_REG S5P_PMUREG(0x1008) diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 1fe075a..d23cdc3 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -50,6 +50,7 @@ static void __init exynos5_dt_machine_init(void) static char const *exynos5_dt_compat[] __initdata = { "samsung,exynos5250", + "samsung,exynos5260", "samsung,exynos5420", "samsung,exynos5440", NULL diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index 335beb3..60687aa 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 EXYNOS5260_SOC_ID 0xE5260000 #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(exynos5260, EXYNOS5260_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_EXYNOS5260) +# define soc_is_exynos5260() is_samsung_exynos5260() +#else +# define soc_is_exynos5260() 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..804597c 100644 --- a/arch/arm/plat-samsung/include/plat/map-s5p.h +++ b/arch/arm/plat-samsung/include/plat/map-s5p.h @@ -23,6 +23,7 @@ #define S5P_VA_SYSRAM S3C_ADDR(0x02400000) #define S5P_VA_SYSRAM_NS S3C_ADDR(0x02410000) + #define S5P_VA_DMC0 S3C_ADDR(0x02440000) #define S5P_VA_DMC1 S3C_ADDR(0x02480000) #define S5P_VA_SROMC S3C_ADDR(0x024C0000)