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: 2696301 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 717583FD4E for ; Mon, 10 Jun 2013 09:12:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752457Ab3FJJMS (ORCPT ); Mon, 10 Jun 2013 05:12:18 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:42117 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752155Ab3FJJMR (ORCPT ); Mon, 10 Jun 2013 05:12:17 -0400 Received: by mail-pa0-f52.google.com with SMTP id kq13so1230873pab.25 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 Cc: arnd@arndb.de, horms@verge.net.au, laurent.pinchart@ideasonboard.com, olof@lixom.net, Magnus Damm , linux-arm-kernel@lists.infradead.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 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.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(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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 *);