From patchwork Fri Sep 26 07:23:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonghwa Lee X-Patchwork-Id: 4979051 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 07378BEEA6 for ; Fri, 26 Sep 2014 07:26:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 374C120117 for ; Fri, 26 Sep 2014 07:26:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 61FB320148 for ; Fri, 26 Sep 2014 07:26:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XXPsr-0004qT-Ap; Fri, 26 Sep 2014 07:24:05 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XXPse-0004MK-9J for linux-arm-kernel@lists.infradead.org; Fri, 26 Sep 2014 07:23:53 +0000 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NCH00JPEZ74M770@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 26 Sep 2014 16:23:29 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.116]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id DA.A8.11124.07415245; Fri, 26 Sep 2014 16:23:28 +0900 (KST) X-AuditID: cbfee68e-f79b46d000002b74-6b-54251470b64e Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 24.F2.09430.07415245; Fri, 26 Sep 2014 16:23:28 +0900 (KST) Received: from localhost.localdomain ([10.252.82.199]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NCH00JC6Z70YO30@mmp2.samsung.com>; Fri, 26 Sep 2014 16:23:28 +0900 (KST) From: Jonghwa Lee To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ARM: EXYNOS3250: Add initial support EXYNOS3250 suspend/resume. Date: Fri, 26 Sep 2014 16:23:22 +0900 Message-id: <1411716202-31644-3-git-send-email-jonghwa3.lee@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1411716202-31644-1-git-send-email-jonghwa3.lee@samsung.com> References: <1411716202-31644-1-git-send-email-jonghwa3.lee@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPLMWRmVeSWpSXmKPExsWyRsSkRLdARDXEYPddC4vrX56zWnSefcJs 0bvgKpvFpsfXWC0u75rDZjHj/D4mi5vPtjM5sHtsXlLv0bdlFaPH501yAcxRXDYpqTmZZalF +nYJXBlLpyxnLFgnVrFz337GBsbrQl2MnBwSAiYSZ94fZ4OwxSQu3FsPZHNxCAksZZRo3fiJ BaaoZ+5NJojEdEaJTY+mMUM4bUwS33Z1MoNUsQnoSPzfd5MdxBYRyJaYv7cbzGYWKJG4sGgr 2CRhgTCJa1uvgcVZBFQldrRdAerl4OAV8JCY3h8DYkoIKEjMmWQDUsEp4Cnx9scssGohoIrr K56xgqyVEGhnl9j0cA4LxBgBiW+TD7FA9MpKbDrADHGzpMTBFTdYJjAKL2BkWMUomlqQXFCc lF5kpFecmFtcmpeul5yfu4kRGM6n/z3r28F484D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FO7OP/nhhviKttLnryJmvGhaCbrruO31u8R+S6z3ez9x6hoGeZ+PSst /0VBnMtOVyRkNd/OS7f4yFHnIGIVp8RSnJFoqMVcVJwIAJmKQFisAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140926_002352_465580_E97FF8E2 X-CRM114-Status: GOOD ( 11.33 ) X-Spam-Score: -5.8 (-----) Cc: vikas.sajjan@samsung.com, cw00.choi@samsung.com, Jonghwa Lee , kgene.kim@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, 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 It adds data and callback needed for exynos3250's suspend/resume. Signed-off-by: Jonghwa Lee --- arch/arm/mach-exynos/regs-pmu.h | 4 ++++ arch/arm/mach-exynos/suspend.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h index 322f132..b5125dc1 100644 --- a/arch/arm/mach-exynos/regs-pmu.h +++ b/arch/arm/mach-exynos/regs-pmu.h @@ -131,6 +131,10 @@ #define S5P_CORE_LOCAL_PWR_EN 0x3 #define S5P_CORE_WAKEUP_FROM_LOCAL_CFG (0x3 << 8) +/* Only for EXYNOS3250 */ +#define S5P_PAD_RET_MMCC_OPTION 0x30C8 +#define S5P_PAD_RET_SPI_OPTION 0x31C8 + /* Only for EXYNOS4210 */ #define S5P_CMU_CLKSTOP_LCD1_LOWPWR 0x1154 #define S5P_CMU_RESET_LCD1_LOWPWR 0x1174 diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index b41d146..de7d6d5 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -87,6 +87,12 @@ struct exynos_pm_data *pm_data; static u32 exynos_irqwake_intmask = 0xffffffff; +static const struct exynos_wkup_irq exynos3250_wkup_irq[] = { + { 105, BIT(1) }, /* RTC alarm */ + { 106, BIT(2) }, /* RTC tick */ + { /* sentinel */ }, +}; + static const struct exynos_wkup_irq exynos4_wkup_irq[] = { { 76, BIT(1) }, /* RTC alarm */ { 77, BIT(2) }, /* RTC tick */ @@ -99,6 +105,19 @@ static const struct exynos_wkup_irq exynos5250_wkup_irq[] = { { /* sentinel */ }, }; +unsigned int exynos3250_release_ret_regs[] = { + S5P_PAD_RET_MAUDIO_OPTION, + S5P_PAD_RET_GPIO_OPTION, + S5P_PAD_RET_UART_OPTION, + S5P_PAD_RET_MMCA_OPTION, + S5P_PAD_RET_MMCB_OPTION, + S5P_PAD_RET_MMCC_OPTION, + S5P_PAD_RET_EBIA_OPTION, + S5P_PAD_RET_EBIB_OPTION, + S5P_PAD_RET_SPI_OPTION, + REG_TABLE_END, +}; + unsigned int exynos_release_ret_regs[] = { S5P_PAD_RET_MAUDIO_OPTION, S5P_PAD_RET_GPIO_OPTION, @@ -288,6 +307,15 @@ static const struct platform_suspend_ops exynos_suspend_ops = { .valid = suspend_valid_only_mem, }; +static const struct exynos_pm_data exynos3250_pm_data = { + .wkup_irq = exynos3250_wkup_irq, + .release_ret_regs = exynos3250_release_ret_regs, + .pm_suspend = exynos_pm_suspend, + .pm_resume = exynos_pm_resume, + .pm_prepare = exynos_pm_prepare, + .cpu_suspend = exynos_cpu_suspend, +}; + static const struct exynos_pm_data exynos4_pm_data = { .wkup_irq = exynos4_wkup_irq, .wake_disable_mask = ((0xFF << 8) | (0x1F << 1)), @@ -314,6 +342,9 @@ static const struct exynos_pm_data exynos5250_pm_data = { static struct of_device_id exynos_pmu_of_device_ids[] = { { + .compatible = "samsung,exynos3250-pmu", + .data = &exynos3250_pm_data, + }, { .compatible = "samsung,exynos4210-pmu", .data = &exynos4_pm_data, }, {