From patchwork Sun Mar 17 22:52:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10856653 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 A448F1390 for ; Sun, 17 Mar 2019 22:56:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9008C29211 for ; Sun, 17 Mar 2019 22:56:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82A7029250; Sun, 17 Mar 2019 22:56: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=-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 6C85A29211 for ; Sun, 17 Mar 2019 22:56: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: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=j03uu/r8o4qsWT2LZI1uqljkx7JfjwgH7YBvOdahonE=; b=QCsm1Kco2PyKHa Qc2F9WSSHMGHrn3QMY50lb/QnYkVsM+E3fXECOoNim4jp9jRMGiMV2T408CNdJ8J2TnCQ3sQVlq5y 38iA8RV4gWKnqEmnNlFWrZgH2Kgs7Us/RPHlGSNPlTWyPAP1XE9nQzJnaaDoA+83kPFLR3pJ/TIr0 QXa0IE/gMpoH/8ke/pQHtScQ2+WDoT1xgyr1Vwv69kb2L5lW3SI80QIlOZ5bXbBsCSLyukcA218GC 6Xn6kJ6Ze4zH7uSy0WHcx34Vw4CNWoqcMeWA3wMNmsXhHHTBxsnOlxUEtcCiyDbTrzkO2nvKze72q 5XP4JEC823zNm3rrPeuA==; 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 1h5ehk-0007rz-5e; Sun, 17 Mar 2019 22:56:32 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5eh9-0007C7-Dx for linux-arm-kernel@lists.infradead.org; Sun, 17 Mar 2019 22:55:57 +0000 Received: by mail-pf1-x442.google.com with SMTP id r15so7172622pfn.9 for ; Sun, 17 Mar 2019 15:55:55 -0700 (PDT) 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=yq5wxwSzSOiQKae/Fl8cjis8j+TFJgO/dAYMPjapJ44=; b=sDq82OY4NHq+gWmXsU0zF/TyBXvRvQE89Ccg1fWIqHxltD2U5zgX3D/IsdwogTJfLc atB3UZ5TJCF9933+Ha1vhBfqCOVnZoXFRUx0TvQcHKs/kyX00Tdlppp4+8S24CCf2RG1 S+7KdclKfsd11lWm8z1slHNYGNuREULU5JTB4foy2DLZ0oDDqZ9Oib/uzuyw4avux8JE r6hJhVF2Ewicj2ta5O2W7kWIgspV7mdOSOD7aKBPHGpaT4WHLyLVynRisteAcHh4SaBp Rx7yr82DceGTD4eVlQTLe4n6DP/nTE5Ve5FvB1bBQgtlGekRtRpFNa1hYp8bsnkwhz0o nXzQ== 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=yq5wxwSzSOiQKae/Fl8cjis8j+TFJgO/dAYMPjapJ44=; b=CdsaNIY+nj1sDwQfW6oNpmzdo8sIPuDFEWruNn2tqnBP7aam873bW7JntL+Hufb9kX x0VqzLUYtyN+pXdmO+3QKaqCWDYKxtZ5CQgV/gq5tSzBDr4XPBq6VjC7enh2IJ61aPLB tWkRQ+d6cKvY5h8DeR/cxCCLZ9y3nVLFdOw6Np/lfX4m/IsNPMCAO75XjZag0RCGNGLf E6xoOG1/QijBpYhUVLnJ6d0KkF8CVYu1K6YlYIaV74pid8JE+hfKAmi4/Ickvm2OIolH cWrD0vUsvOBlgBmqdpmyslXwGA8ebD9MZ+oznWLqpZvzK1gDJZ647vr2GEp2VBkcVB6/ FOnA== X-Gm-Message-State: APjAAAXlmKUJsACuttIoJHgkhjkj9R7qEeofeiVGn/cfG/D7eUgYuxI9 yD6JCXD5sOQ0DsPNFE2/6uw= X-Google-Smtp-Source: APXvYqxFiScNA8yf0lov+46e0AgC7VJxPldRn92Ro7qqB4qo5NE1wtdvXtzl7YI3ipSWiz2LwD0rUg== X-Received: by 2002:a65:47cb:: with SMTP id f11mr14875231pgs.18.1552863355027; Sun, 17 Mar 2019 15:55:55 -0700 (PDT) Received: from localhost.localdomain (ppp94-29-37-86.pppoe.spdop.ru. [94.29.37.86]) by smtp.gmail.com with ESMTPSA id v2sm13738838pfg.118.2019.03.17.15.55.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Mar 2019 15:55:54 -0700 (PDT) From: Dmitry Osipenko To: Russell King , Thierry Reding , Jonathan Hunter , Robert Yang , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH v10 4/7] ARM: tegra: Set up L2 cache using Trusted Foundations firmware Date: Mon, 18 Mar 2019 01:52:07 +0300 Message-Id: <20190317225211.23091-5-digetx@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190317225211.23091-1-digetx@gmail.com> References: <20190317225211.23091-1-digetx@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190317_155555_665245_2557A320 X-CRM114-Status: GOOD ( 12.48 ) 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. Tested-by: Robert Yang Tested-by: Michał Mirosław 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)