From patchwork Fri Feb 22 19:34:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10826863 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D49E922 for ; Fri, 22 Feb 2019 19:36:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6887232C72 for ; Fri, 22 Feb 2019 19:36:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59C7232C84; Fri, 22 Feb 2019 19:36:40 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 09DB632C8C for ; Fri, 22 Feb 2019 19:36:40 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=yp7MyFkqRFfUvi87cUOhOF7HZZHqCH3jkKpf6YLTjAk=; b=RF/7LkyCqR5ewx mcn5vXgImGqx9IH6vJ0FJ4gZGnXA/5JsKfsUz9M+GjJ3cDUU82dCFZ7fRKHw+VWuf9kJxNhV2a+/F YmuGoKnMGaKpNHlP74Gq3ZqpYoeNuAT8BImPH1wyoQkpXAjEs+HXwkpTtWRrlM/xaTAkt2bHGYcqz r4jdUOot8IFiK4lXNJtf2P1vvX6pKTuNtg55T3Hu73hxNiL5bSugrJq51bKicF/vboDTy6EpdjlPK UDdEdKYSuF7fqeo7WQ7u7tmUy5kolm3NOdOu25rj7FUf6I7thEacVHB9NdolcNIjAxIRfLWPtumNY u9Pov+on3grFxD63NR8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gxGcZ-0004Rr-4w; Fri, 22 Feb 2019 19:36:31 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gxGc0-0003o2-4E for linux-arm-kernel@lists.infradead.org; Fri, 22 Feb 2019 19:36:10 +0000 Received: by mail-pl1-x642.google.com with SMTP id p19so1542288plo.2 for ; Fri, 22 Feb 2019 11:35:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=s9q3gbd6+FFh+E4/n8m7zDglopcsbqNaagda1Y5Is1M=; b=E0H7/W/9+Wf7PUgt2VptNB69Q+9Gny+RBJ/5biERUq5qivm+sMpg/x1VxXQr4gN2G6 aBcaoouwvS+bPxAfh3bq8IQXSD9OtgnyTJx6f6WV+1Lv4e4/rxO+g2vSmKYV9Tp5rQxu +Dqynre9s+MzK6BdHBTxNEJ2zfBKeC10T4ZrJshqMxm/KGepvS/CRQeUFoc5Ny9FnGW7 CUSIyFCjH4aJOnOyk9TTUwtHq048PylZHuYuRwyEnnNGfweV9vxQtH+TM599Cw+yzK70 mDy2ReYX2d7aPgRtvqM3Nmz18gmD0kvpiPpUkg19dq+bWxL4BAmjssJ/4PE68d5+k3vD MyuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=s9q3gbd6+FFh+E4/n8m7zDglopcsbqNaagda1Y5Is1M=; b=PD6xNLTnwmu6lL1xX/ycEFLYPYeOv/3BBnKGmfq9QHvATiiUq5NN+NG42vOzGPGtmp sjCiikmrRVQT59ilyf4HC78Lesw2SceEDbPgNpOdtioA1rWNLkfpapF1Wx4mYRxDFT/z Sg5AiSkRmiYL3g73snG91/KMkt1YAS33JCVKcWvI7JbLYMEsAUYNYyQXOSJy7LHv7O12 elomcfQYkLZSsvUmqd6IuwxZ/+bhdh+0OH+ERaT5Kh6joGut2YDyqg+x2bgHCyr7nlWv EF+mNe3z3zAQrm+AzzdeVlK55IO9jz0BgBZYpj8NdqHl1ma7dqKsSzBha1PRgX6ktDxr +vrA== X-Gm-Message-State: AHQUAuawKCqsbRwJoMCmRwVP8QqyIncafojLc/lVJLyVbyCE0fGbsW1k QGWVagi4c0FsWu+fgN0hx4o= X-Google-Smtp-Source: AHgI3IagDA2ESNkuTD51pAeXz6/JGyrW/QEyxf0/GmHYePf/5JcaPtSwMprxlXCIyRIQUBEpN7utzA== X-Received: by 2002:a17:902:1122:: with SMTP id d31mr5810807pla.246.1550864155323; Fri, 22 Feb 2019 11:35:55 -0800 (PST) Received: from localhost.localdomain (ppp91-79-175-49.pppoe.mtu-net.ru. [91.79.175.49]) by smtp.gmail.com with ESMTPSA id e21sm7687190pfh.45.2019.02.22.11.35.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Feb 2019 11:35:54 -0800 (PST) From: Dmitry Osipenko To: Russell King , Thierry Reding , Jonathan Hunter , Robert Yang , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH v6 4/7] ARM: tegra: Set up L2 cache using Trusted Foundations firmware Date: Fri, 22 Feb 2019 22:34:23 +0300 Message-Id: <20190222193426.10747-5-digetx@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190222193426.10747-1-digetx@gmail.com> References: <20190222193426.10747-1-digetx@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190222_113556_644485_B18040E4 X-CRM114-Status: GOOD ( 12.84 ) 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: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 On Tegra30 L2 cache should be initialized using firmware call if CPU is running in insecure mode. Set up the required outer-cache write_sec() callback early during boot using the firmware API, it is always a NO-OP on T114+ and is NO-OP on T20/30 if Trusted Foundations firmware node isn't present in device-tree. Signed-off-by: Dmitry Osipenko --- arch/arm/mach-tegra/tegra.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-tegra/tegra.c b/arch/arm/mach-tegra/tegra.c index f9587be48235..1e89cfefbf68 100644 --- a/arch/arm/mach-tegra/tegra.c +++ b/arch/arm/mach-tegra/tegra.c @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -74,6 +75,7 @@ static void __init tegra_init_early(void) { of_register_trusted_foundations(); tegra_cpu_reset_handler_init(); + call_firmware_op(l2x0_init); } static void __init tegra_dt_init_irq(void)