From patchwork Mon Jun 10 09:19:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2696761 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 68F833FD4E for ; Mon, 10 Jun 2013 10:26:26 +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 1UlyB4-00029R-D2; Mon, 10 Jun 2013 09:14:18 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uly9a-0004uw-RJ; Mon, 10 Jun 2013 09:12:42 +0000 Received: from mail-pd0-f182.google.com ([209.85.192.182]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uly9W-0004sU-H1 for linux-arm-kernel@lists.infradead.org; Mon, 10 Jun 2013 09:12:40 +0000 Received: by mail-pd0-f182.google.com with SMTP id r10so1073556pdi.13 for ; Mon, 10 Jun 2013 02:12:17 -0700 (PDT) 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=L62qfS9ogZmEJwBfAqL6PGJDCIGrMQ0FLuYwmlHYSYQ=; b=QpYmxfXYlE0wk/Qddrur6sJBzxZMrFz0gHgLDezk2/C44n/PTATRZvdi97nyP17Fv9 M9Gd7PyC/J8mUROtoIIZEypkdogfZlAXwOo8Z/lo8XizOKrTAR0jyxNZ/dNCmE3aq2hD /rP6ArZZQ41jqGUuYsK6YQcUgIBn3mSto2N/+ocPymUoVkxeyT9aw3Ju+sUOqTk+5xyW pksPMqk8u16wRBDGHafLVhXAhcXgWEFWIDW1oVbhmovnyD7b8fnrfk1VV7+rs0IcMDJ1 mxINTAtDkU1r8l7Pc/z5z2c5Ed13GUprGoakwTy54syIOXsOZcAvRgBBV9DmgNh8Y4hm rfQQ== X-Received: by 10.66.2.103 with SMTP id 7mr12957707pat.211.1370855537211; Mon, 10 Jun 2013 02:12:17 -0700 (PDT) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id dr6sm14821969pac.11.2013.06.10.02.12.14 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 02:12:16 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Mon, 10 Jun 2013 18:19:46 +0900 Message-Id: <20130610091946.18944.39252.sendpatchset@w520> In-Reply-To: <20130610091925.18944.68117.sendpatchset@w520> References: <20130610091925.18944.68117.sendpatchset@w520> Subject: [PATCH 02/06] ARM: shmobile: Add SCU boot function using argument X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130610_051238_786546_4AA958E4 X-CRM114-Status: UNSURE ( 7.98 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.182 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (magnus.damm[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: arnd@arndb.de, Magnus Damm , horms@verge.net.au, laurent.pinchart@ideasonboard.com, olof@lixom.net, 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 From: Magnus Damm Add a shmoible_boot_scu function that assumes that the base address of the SCU is passed in r0. This code is free from inline virtual to physical address conversion. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/headsmp-scu.S | 13 +++++++++++++ arch/arm/mach-shmobile/include/mach/common.h | 1 + 2 files changed, 14 insertions(+) --- 0001/arch/arm/mach-shmobile/headsmp-scu.S +++ work/arch/arm/mach-shmobile/headsmp-scu.S 2013-06-10 17:44:41.000000000 +0900 @@ -51,6 +51,19 @@ ENTRY(shmobile_secondary_vector_scu) 2: .long shmobile_scu_base - PAGE_OFFSET + PLAT_PHYS_OFFSET ENDPROC(shmobile_secondary_vector_scu) +ENTRY(shmobile_boot_scu) + @ r0 = SCU base address + mrc p15, 0, r1, c0, c0, 5 @ read MIPDR + and r1, r1, #3 @ mask out cpu ID + lsl r1, r1, #3 @ we will shift by cpu_id * 8 bits + ldr r2, [r0, #8] @ SCU Power Status Register + mov r3, #3 + bic r2, r2, r3, lsl r1 @ Clear bits of our CPU (Run Mode) + str r2, [r0, #8] @ write back + + b shmobile_invalidate_start +ENDPROC(shmobile_boot_scu) + .text .globl shmobile_scu_base shmobile_scu_base: --- 0004/arch/arm/mach-shmobile/include/mach/common.h +++ work/arch/arm/mach-shmobile/include/mach/common.h 2013-06-10 16:32:25.000000000 +0900 @@ -11,6 +11,7 @@ extern void shmobile_boot_vector(void); extern unsigned long shmobile_boot_fn; extern unsigned long shmobile_boot_arg; extern void shmobile_secondary_vector_scu(void); +extern void shmobile_boot_scu(void); struct clk; extern int shmobile_clk_init(void); extern void shmobile_handle_irq_intc(struct pt_regs *);