From patchwork Thu Jan 25 18:02:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 10184605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6ADE260383 for ; Thu, 25 Jan 2018 18:21:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C1672874F for ; Thu, 25 Jan 2018 18:21:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0019628A09; Thu, 25 Jan 2018 18:21:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9743C2874F for ; Thu, 25 Jan 2018 18:21:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=v6moPygNtBasA5gjl15zZG/zE4UREvUnwxnOR6A0CRU=; b=IFuy2o7hgAhiq9Jrb2Sr7A5h+E 4fFXTx9fMeDbRy+aOCQRcWNObNlK0h8zUN6ntM8iuT5RqGXftqLO0BziZPerOylstGvRGqe99uZQi Z9B7962O21QlSXVZzuNDmKdrtlFU9RcsJUk4bTK+ltfJFnR8sTbm2l0a5AfOD+8MOPV3IGXoKvUK/ H3/oTFggP8/YIutZAoKldNDCq7D23XxCQ1n5alM6T1SkpckKlu5u2izF7w436n+IdiJfZ96Hk/9Px Sy1uCxAyeCSS5lXf0svhmbygijPNbxVq7Lw/yiFLMocho1MMTZqCAKB2bDF5hVKjxSrCmt1cL7l3n QicItMqw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eem90-0005RN-4V; Thu, 25 Jan 2018 18:21:02 +0000 Received: from relmlor2.renesas.com ([210.160.252.172] helo=relmlie1.idc.renesas.com) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eelu8-0003fH-Cb for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2018 18:05:41 +0000 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 26 Jan 2018 03:05:29 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 9748543CA7; Fri, 26 Jan 2018 03:05:29 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.46,412,1511794800"; d="scan'208";a="270637063" Received: from unknown (HELO fabrizio-dev.ree.adwin.renesas.com) ([10.226.37.88]) by relmlii2.idc.renesas.com with ESMTP; 26 Jan 2018 03:05:24 +0900 From: Fabrizio Castro To: Philipp Zabel , Rob Herring , Mark Rutland , Wim Van Sebroeck , Russell King , Catalin Marinas , Will Deacon , Michael Turquette , Stephen Boyd , Simon Horman , Magnus Damm , Geert Uytterhoeven Subject: [RFC 23/37] ARM: shmobile: rcar-gen2: Export shmobile_set_wdt_clock_status function Date: Thu, 25 Jan 2018 18:02:57 +0000 Message-Id: <1516903391-30467-24-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516903391-30467-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1516903391-30467-1-git-send-email-fabrizio.castro@bp.renesas.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrizio Castro , devicetree@vger.kernel.org, Chris Paterson , linux-watchdog@vger.kernel.org, Biju Das , linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ramesh Shanmugasundaram , linux-clk@vger.kernel.org, Guenter Roeck MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch exposes a function to set the value of variable "shmobile_wdt_clock_status" so that the watchdog driver may communicate critical information to the SMP bring up assembly routine. Signed-off-by: Fabrizio Castro Signed-off-by: Ramesh Shanmugasundaram --- arch/arm/mach-shmobile/common.h | 1 + arch/arm/mach-shmobile/pm-rcar-gen2.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h index a8fa4f7..e4ffca8 100644 --- a/arch/arm/mach-shmobile/common.h +++ b/arch/arm/mach-shmobile/common.h @@ -5,6 +5,7 @@ extern void shmobile_init_cntvoff(void); extern void shmobile_init_delay(void); extern void shmobile_boot_vector(void); +extern unsigned long shmobile_wdt_clock_status; extern unsigned long shmobile_boot_fn; extern unsigned long shmobile_boot_size; extern void shmobile_smp_boot(void); diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c index e5f215c..cfdc3cd 100644 --- a/arch/arm/mach-shmobile/pm-rcar-gen2.c +++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c @@ -50,6 +50,16 @@ static inline u32 phys_to_sbar(phys_addr_t addr) #define SYSCIER 0x0c #define SYSCIMR 0x10 +static void __iomem *shmobile_boot_vector_start; +static unsigned long clock_status; + +void shmobile_set_wdt_clock_status(unsigned long value) +{ + memcpy_toio(shmobile_boot_vector_start + clock_status, + &value, sizeof(value)); +} +EXPORT_SYMBOL(shmobile_set_wdt_clock_status); + #if defined(CONFIG_SMP) static void __init rcar_gen2_sysc_init(u32 syscier) @@ -120,8 +130,12 @@ void __init rcar_gen2_pm_init(void) if (!p) return; + shmobile_boot_vector_start = p; + clock_status = (&shmobile_wdt_clock_status - + (unsigned long *)shmobile_boot_vector) * + sizeof(shmobile_wdt_clock_status); + memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size); - iounmap(p); /* setup reset vectors */ p = ioremap_nocache(RST, 0x63);