From patchwork Mon Jun 15 09:47:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 6607451 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E811A9F1C1 for ; Mon, 15 Jun 2015 09:48:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 224182039D for ; Mon, 15 Jun 2015 09:48:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1556B203EB for ; Mon, 15 Jun 2015 09:48:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753970AbbFOJsS (ORCPT ); Mon, 15 Jun 2015 05:48:18 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:33381 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754089AbbFOJsR (ORCPT ); Mon, 15 Jun 2015 05:48:17 -0400 Received: by pdjn11 with SMTP id n11so69428884pdj.0; Mon, 15 Jun 2015 02:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=V4H4hzprL1qwG1YNYj9rr752DDxpR6ML6ediL2uBw6Q=; b=k17lyE2QAvtR/jtoTwVAIruxHbMBu20zLOHgiThXAogsO1RXFpXZwiYz0XqGlNokvr D5IB5kW0L03LQKEfS8wxtj3nzp6BnD7VTAZm4XLbfXvU+LVXguQdnHBtbXHAtQg6JTDy x75UU+dDrYKFWHmLOX4leZyjP1SmZi2oY76jMaUHl+Ga02yR3Y8lqaN9J/gi7qirQiq9 qWrRKEs0C2RNqqtcVRgno3NEXd67+rzUrLqzbN3uCtkp7lnG8f0ajpwTComzL+O7AjcP L64F9bTUvidhThT7hNl5Nrh3mDN/A2ZoGs49MHYJ45MSn0HOnoMk4D6DTSpAyBu5Sl83 FGAw== X-Received: by 10.66.228.73 with SMTP id sg9mr5139912pac.88.1434361696609; Mon, 15 Jun 2015 02:48:16 -0700 (PDT) Received: from localhost.localdomain ([125.130.175.98]) by mx.google.com with ESMTPSA id q4sm11640225pdo.42.2015.06.15.02.48.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Jun 2015 02:48:15 -0700 (PDT) From: Krzysztof Kozlowski To: Kukjin Kim , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH] ARM: EXYNOS: Remove duplicated define of SLEEP_MAGIC Date: Mon, 15 Jun 2015 18:47:25 +0900 Message-Id: <1434361645-10233-1-git-send-email-k.kozlowski.k@gmail.com> X-Mailer: git-send-email 2.1.4 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.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 The magic cookie for entering sleep state was defined and used in two different places: firmware.c and suspend.c. Move it to one common place to reduce duplication. Signed-off-by: Krzysztof Kozlowski --- arch/arm/mach-exynos/common.h | 6 ++++++ arch/arm/mach-exynos/firmware.c | 2 -- arch/arm/mach-exynos/suspend.c | 4 +--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h index e3a9256ed55f..153492513c40 100644 --- a/arch/arm/mach-exynos/common.h +++ b/arch/arm/mach-exynos/common.h @@ -128,6 +128,12 @@ void exynos_firmware_init(void); /* CPU BOOT mode flag for Exynos3250 SoC bootloader */ #define C2_STATE (1 << 3) +/* + * Magic values for bootloader indicating chosen low power mode. + * See also Documentation/arm/Samsung/Bootloader-interface.txt + */ +#define EXYNOS_SLEEP_MAGIC 0x00000bad +#define EXYNOS_AFTR_MAGIC 0xfcba0d10 void exynos_set_boot_flag(unsigned int cpu, unsigned int mode); void exynos_clear_boot_flag(unsigned int cpu, unsigned int mode); diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c index 245f6dec1ded..111cfbf66fdb 100644 --- a/arch/arm/mach-exynos/firmware.c +++ b/arch/arm/mach-exynos/firmware.c @@ -25,8 +25,6 @@ #include "common.h" #include "smc.h" -#define EXYNOS_SLEEP_MAGIC 0x00000bad -#define EXYNOS_AFTR_MAGIC 0xfcba0d10 #define EXYNOS_BOOT_ADDR 0x8 #define EXYNOS_BOOT_FLAG 0xc diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index f572219c7a40..c506f8e9c3e5 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -38,8 +38,6 @@ #include "regs-pmu.h" #include "exynos-pmu.h" -#define S5P_CHECK_SLEEP 0x00000BAD - #define REG_TABLE_END (-1U) #define EXYNOS5420_CPU_STATE 0x28 @@ -331,7 +329,7 @@ static void exynos_pm_enter_sleep_mode(void) { /* Set value of power down register for sleep mode */ exynos_sys_powerdown_conf(SYS_SLEEP); - pmu_raw_writel(S5P_CHECK_SLEEP, S5P_INFORM1); + pmu_raw_writel(EXYNOS_SLEEP_MAGIC, S5P_INFORM1); } static void exynos_pm_prepare(void)