From patchwork Wed Jan 15 12:26:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3491671 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B11AD9F32F for ; Wed, 15 Jan 2014 12:26:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A485F20176 for ; Wed, 15 Jan 2014 12:26:34 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 649302016C for ; Wed, 15 Jan 2014 12:26:33 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3PXP-0006RG-T1; Wed, 15 Jan 2014 12:25:40 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3PXE-0005Zy-R2; Wed, 15 Jan 2014 12:25:28 +0000 Received: from mail-pb0-x232.google.com ([2607:f8b0:400e:c01::232]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3PX7-0005Wo-V5 for linux-arm-kernel@lists.infradead.org; Wed, 15 Jan 2014 12:25:23 +0000 Received: by mail-pb0-f50.google.com with SMTP id rq2so1061131pbb.23 for ; Wed, 15 Jan 2014 04:25:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=vePLlIUBKTmKprnbRZJImKeptidjAdmdrROD9/yE4oM=; b=h2GM1q5qIbZQf8xtUm2Ftbok3BoBrMa2uYIIIdKwaZL3sBuOaeYH27gMvWFTgUhLb2 0FBK1QV3A55sPBJO0Eww4afLozHs/I1raoAwxmJJj6DrMHJRocv+RyG8maXndXalIuY1 1oY2+32UsPLkDW+8/KXt8cfVev5Igf0TjsFEX1fll6uYusO8PM13dauNW72luwI2GvfT DKW6AX0qLCNvMR3VQOKk1aBAkWSY2Bz5pGGaZURMUzFXW8KF8+D4poylcxqwDIU2UM9B nEExQAkZyrMAhYa/yUDs35iVRmGmsnboJm+0tmYfRKtA2CIME39YkaRyNOwb4Hsz//D+ QKDg== X-Received: by 10.68.204.161 with SMTP id kz1mr2378341pbc.156.1389788700521; Wed, 15 Jan 2014 04:25:00 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id lh13sm10058662pab.4.2014.01.15.04.24.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jan 2014 04:24:59 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 15 Jan 2014 21:26:04 +0900 Message-Id: <20140115122604.9437.98423.sendpatchset@w520> In-Reply-To: <20140115122539.9437.63968.sendpatchset@w520> References: <20140115122539.9437.63968.sendpatchset@w520> Subject: [PATCH 02/04] ARM: shmobile: r8a7790 CA7-SCU enablement X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140115_072522_142657_8733ED45 X-CRM114-Status: GOOD ( 10.59 ) X-Spam-Score: -2.0 (--) Cc: horms@verge.net.au, Magnus Damm , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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=-4.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, 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 From: Gaku Inami Power on CA7 SCU in case of booting from a CA15 core. Signed-off-by: Gaku Inami [damm@opensource.se: Converted to use broken out SYSC code] Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/smp-r8a7790.c | 11 +++++++++++ 1 file changed, 11 insertions(+) --- 0001/arch/arm/mach-shmobile/smp-r8a7790.c +++ work/arch/arm/mach-shmobile/smp-r8a7790.c 2014-01-15 14:34:03.000000000 +0900 @@ -19,6 +19,8 @@ #include #include #include +#include +#include #define RST 0xe6160000 #define CA15BAR 0x0020 @@ -27,6 +29,11 @@ #define CA7RESCNT 0x0044 #define MERAM 0xe8080000 +static struct rcar_sysc_ch r8a7790_ca7_scu = { + .chan_offs = 0x100, /* PWRSR3 .. PWRER3 */ + .isr_bit = 21, /* CA7-SCU */ +}; + static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus) { void __iomem *p; @@ -54,6 +61,10 @@ static void __init r8a7790_smp_prepare_c writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) | 0x5a5a0000, p + CA7RESCNT); iounmap(p); + + /* turn on power to SCU */ + r8a7790_pm_init(); + rcar_sysc_power_up(&r8a7790_ca7_scu); } struct smp_operations r8a7790_smp_ops __initdata = {