From patchwork Thu Jul 20 00:29:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 9853415 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 6A26A600F5 for ; Thu, 20 Jul 2017 00:31:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70C5D286FB for ; Thu, 20 Jul 2017 00:31:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 645CF28709; Thu, 20 Jul 2017 00:31:39 +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=-1.1 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID autolearn=no 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 F2F2F286FB for ; Thu, 20 Jul 2017 00:31:38 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:MIME-Version:Subject:From:References :In-Reply-To:Message-Id:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9Q+qgx0fnV41XfFRtCfA9NgztqGdPnKco/0elK3P6MI=; b=mehSrLnd/xRhX8 ijHSOM8zNxGMZlckrIIhV5xbpOZm+VmFug06mvbAv1rkoC1A5L2oq5+psBLgKZFO2LnPq6cBgOOi+ FBWeNw8+s7wRJkLNc+Diq4gkrw03hvB0N/nyHVGN7owit+tvVqcwpqGE0u+rzyP79Z9G+FZlW/dHt 4v1FQMuZHHM16vAfJ5a2WlGSStjaymcCIY5rmHnxBKv//ogIpw9U9QCJigCf/d9iB+xjxXBUTEKr0 b2wETa2RRWCCrbNTBwI9/EL/ZCgZCZW9e17r0pro6R0/rDP4NVJQy5X6WZo+1KsaFj37eYm6P+Xns VQTDx7YFTwk3KFSpL3ng==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dXzNK-0004rC-Up; Thu, 20 Jul 2017 00:31:30 +0000 Received: from rere.qmqm.pl ([91.227.64.183]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXzM9-0002Rd-3O for linux-arm-kernel@lists.infradead.org; Thu, 20 Jul 2017 00:30:22 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id BA83732D; Thu, 20 Jul 2017 02:29:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1500510565; bh=To5u83rv42gFR1lSSI/xC5HDIlpqL0zBzwbr+fb2Oro=; h=Date:In-Reply-To:References:From:Subject:To:From; b=gUlVcRh4JMMOE66q2gSRdfGkk3zXEfUlxs1GpaccaWBR5/OZvkt2BsDSslkdy9pNO v/OQVvXD5pN+oOpaUXtjYXbnoxABdz18ZVbKPlubD2WAqPAKLPMoOvA3+Fwr0nzHEf h0GAYtbymarZOGcH/ypXyGyuNuI+ioNMXN5L/n677k9J6Hsj0wKBxjgmbcbzSzME2U g3kcGlYHcPodyrIOaSGfSrNh+UDsXZIjSRCEEN8iqi3/zMECOKh5Hcn37XNcV5TpZj B6HtTTm/mzY+W4KAjji9m9PKPdSwVBfhYmtChaxq0uk5FGxYUUqmn6w5DEVf7kzf/R VrWPAz0eQOg+w== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99.2 at rere Date: Thu, 20 Jul 2017 02:29:25 +0200 Message-Id: <6a164b2270a3e996c083e94bf5b1e27028c1135e.1500510157.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH 7/9] ARM: tegra: enable cache via TF MIME-Version: 1.0 To: linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170719_173018_053641_DF6D830D X-CRM114-Status: UNSURE ( 7.00 ) X-CRM114-Notice: Please train this message. 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: , 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 Cache enable needs to go via firmware call with TF running. Signed-off-by: Michał Mirosław --- arch/arm/mach-tegra/reset-handler.S | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S index 805f306fa6f7..aae7f5961563 100644 --- a/arch/arm/mach-tegra/reset-handler.S +++ b/arch/arm/mach-tegra/reset-handler.S @@ -78,8 +78,20 @@ ENTRY(tegra_resume) orr r1, r1, #1 str r1, [r0] #endif +#ifdef CONFIG_TRUSTED_FOUNDATIONS + adr r3, __tegra_smc_stack + stmia r3, {r4-r12, sp, lr} -#ifdef CONFIG_CACHE_L2X0 + mov r0, #3 // local wake + mov r3, #0 + mov r4, #0 + dsb + .arch_extension sec + smc #0 + + adr r3, __tegra_smc_stack + ldmia r3, {r4-r12, sp, pc} +#elif defined(CONFIG_CACHE_L2X0) /* L2 cache resume & re-enable */ bl l2c310_early_resume #endif @@ -92,6 +104,16 @@ end_ca9_scu_l2_resume: ENDPROC(tegra_resume) #endif +#ifdef CONFIG_TRUSTED_FOUNDATIONS + .align L1_CACHE_SHIFT + .type __tegra_smc_stack, %object +__tegra_smc_stack: + .rept 11 + .long 0 + .endr + .size __tegra_smc_stack, . - __tegra_smc_stack +#endif /* CONFIG_TRUSTED_FOUNDATIONS */ + .align L1_CACHE_SHIFT ENTRY(__tegra_cpu_reset_handler_start)