From patchwork Thu Aug 7 11:59:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vikas Sajjan X-Patchwork-Id: 4690841 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 33B6EC0338 for ; Thu, 7 Aug 2014 12:02:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CB7020148 for ; Thu, 7 Aug 2014 12:02:52 +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 16A1120121 for ; Thu, 7 Aug 2014 12:02:51 +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 1XFMN3-00069l-0k; Thu, 07 Aug 2014 12:00:37 +0000 Received: from mail-pd0-x230.google.com ([2607:f8b0:400e:c02::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XFMMy-00064P-NW for linux-arm-kernel@lists.infradead.org; Thu, 07 Aug 2014 12:00:33 +0000 Received: by mail-pd0-f176.google.com with SMTP id y10so5077017pdj.7 for ; Thu, 07 Aug 2014 05:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=+eY5zhZtQOGVgZoWQ0gkyVZ3s0WYDzYW1Kj5rNorYV8=; b=dpM28BvIo+ew4iGPes1vOI50v/LvZFPdTfTzqYSpSpNNUw/Ydh8Jf6B7voJ8SIJpzC h/LXQ7ZX95cZBB2FNeCVkWDJYaouPJmr0id7MCiHnX5EAsPObk3lv/In/B9fx8Wck69h rFTSej6S8Hvy/wvl/zjX3lAuXDqSOLfA6DTKH8UrahlvAUcyOEajNU+faO3I6SGqiLfn ADhY74zgftxIRdaLkm3kZL8yTFqF8b4YQBS19vvjkRmN9rIfB1DX0nT07jMxeI1JkelS PjfkvFzeIehe50SRyCEZ4RxRgfK77Ik4VZwmyhB7BswSM5z69HxeYzUinMjTpUfvdvAR vcvg== X-Received: by 10.67.5.36 with SMTP id cj4mr17436375pad.9.1407412811648; Thu, 07 Aug 2014 05:00:11 -0700 (PDT) Received: from localhost.localdomain ([14.140.216.146]) by mx.google.com with ESMTPSA id cj17sm6176706pdb.75.2014.08.07.05.00.07 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 Aug 2014 05:00:10 -0700 (PDT) From: Vikas Sajjan To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v3 1/2] ARM: EXYNOS: Move Disabling of JPEG USE_RETENTION for exynos5250 to pmu.c Date: Thu, 7 Aug 2014 17:44:47 +0545 Message-Id: <1407412789-1919-2-git-send-email-vikas.sajjan@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1407412789-1919-1-git-send-email-vikas.sajjan@samsung.com> References: <1407412789-1919-1-git-send-email-vikas.sajjan@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140807_050032_786009_B38659D2 X-CRM114-Status: GOOD ( 13.85 ) X-Spam-Score: -0.7 (/) Cc: sajjan.linux@gmail.com, kgene.kim@samsung.com, tomasz.figa@gmail.com, dianders@chromium.org, olof@lixom.net, joshi@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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Move the Disabling of JPEG USE_RETENTION for exynos5250 to pmu.c to make way for refactoring of pm.c and to create common functions across exynos4 and exynos5250. Signed-off-by: Vikas Sajjan --- arch/arm/mach-exynos/pm.c | 7 +------ arch/arm/mach-exynos/pmu.c | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index c4c6d98..fdd68c2 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -265,13 +265,8 @@ static void exynos_pm_prepare(void) s3c_pm_do_save(exynos_core_save, ARRAY_SIZE(exynos_core_save)); - if (soc_is_exynos5250()) { + if (soc_is_exynos5250()) s3c_pm_do_save(exynos5_sys_save, ARRAY_SIZE(exynos5_sys_save)); - /* Disable USE_RETENTION of JPEG_MEM_OPTION */ - tmp = pmu_raw_readl(EXYNOS5_JPEG_MEM_OPTION); - tmp &= ~EXYNOS5_OPTION_USE_RETENTION; - pmu_raw_writel(tmp, EXYNOS5_JPEG_MEM_OPTION); - } /* Set value of power down register for sleep mode */ diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c index ff9d23f..6021adb 100644 --- a/arch/arm/mach-exynos/pmu.c +++ b/arch/arm/mach-exynos/pmu.c @@ -389,6 +389,7 @@ void exynos_sys_powerdown_conf(enum sys_powerdown mode) static int __init exynos_pmu_init(void) { unsigned int value; + unsigned int tmp; exynos_pmu_config = exynos4210_pmu_config; @@ -411,6 +412,11 @@ static int __init exynos_pmu_init(void) value &= ~EXYNOS5_SYS_WDTRESET; pmu_raw_writel(value, EXYNOS5_MASK_WDTRESET_REQUEST); + /* Disable USE_RETENTION of JPEG_MEM_OPTION */ + tmp = pmu_raw_readl(EXYNOS5_JPEG_MEM_OPTION); + tmp &= ~EXYNOS5_OPTION_USE_RETENTION; + pmu_raw_writel(tmp, EXYNOS5_JPEG_MEM_OPTION); + exynos_pmu_config = exynos5250_pmu_config; pr_info("EXYNOS5250 PMU Initialize\n"); } else {