Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp1811675imc; Fri, 22 Feb 2019 11:38:13 -0800 (PST) X-Google-Smtp-Source: AHgI3IYm75Flq2VdXYcAowigYIqebw49lcapDjCuUzQEa9dqpq/0joPxl80ZtEwWDz3GLJ8DNZku X-Received: by 2002:a17:902:2e03:: with SMTP id q3mr5974696plb.330.1550864293647; Fri, 22 Feb 2019 11:38:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550864293; cv=none; d=google.com; s=arc-20160816; b=oDDOUa0fgLh1QEM4iyBi+6v3ff8BIRdpJskLxVNHgyRG7uBJpN8BblsFBshrCYawUE 24qc0vqVEzTat4vBgy56N3dbmRSwLgrixIsfu6I/fWmqla/n2LWtySi990ugsyl3TeET zhYieKRpm92mE4YXTmcT0XOokcuGyNcL3yjZXzoZjC6K195DMdVnlfO1lVFKDz5avyOw lioqNQLMlbjNcAHQQfT28nIu58vrcg4fcp1Td/voHWNYWAfVpO14V3lcwbdUA6DNHgGo XAIdJOz6+uXaJfXVwJMykvAdPxyNiHabhnnzp8Wwiult+8eVopzyg6JtlNW91+nzptQL w4Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=s9q3gbd6+FFh+E4/n8m7zDglopcsbqNaagda1Y5Is1M=; b=dDOHqarTOD8qBSObC265zV7AmdWo4mzDGZLNlUJQ0cWwAmp2maS/dRydoHs4Fu1tZs yYWSwL1//KT2H3H6nrUv/AagWydbjURV4yWgbLEiawoB2x88pDt/zSIv+EIbT8RbecP+ np2nptZ9xZeH3/5FzhvqMVH2kQ6DO9YuRpb7qusU28LpjkBR3fihMpSZMHx8wisWUyy+ tMB+cosGChgHTw83SL63dJUCbc6G5BT3MYVgxmosBhUhEJuDziQ9WesMADhfPcFqXm5l aemHYeCsridlxRLTvR0yx0aqbMOyHCkX12aQmfMOVsV3WJ/dtZedM7K5Ns9DydAh3r2L 6IeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="E0H7/W/9"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 76si2164424pft.132.2019.02.22.11.37.58; Fri, 22 Feb 2019 11:38:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="E0H7/W/9"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726920AbfBVTf4 (ORCPT + 99 others); Fri, 22 Feb 2019 14:35:56 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43462 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726480AbfBVTfz (ORCPT ); Fri, 22 Feb 2019 14:35:55 -0500 Received: by mail-pl1-f194.google.com with SMTP id m10so1515124plt.10; 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=UkwR6ZB1wagpO2jIo3M5LtAKAxzyw3TH9bnNpluyrJ9L9aGuCoKzRnniam96DVWXAG vGqdXulSo9W+2hkNZR49QUbC3Dv9wAo8W0e8cPzFVXy/TFZ79UUPhxDe/ORhEoQflmnf FJlGuZrsusJhw1khBcS7EyuCZ2c+flBM7N3YfsEOsls32iE4tqsovhch4CnwreLcD4I5 zWX39Rzpg5SGHRfnKtSwaqgnbUEdmBqGAwVsHHRjtpDAz1WHV1oGc4hqmbCjcsC5Rvpa z7Z2t+h+6DWjANLpRDILY2uQo78fXlOcFpPUmCcPh+jprh1v3Vo0D3ZIdlatLPjsQd9x gn3A== X-Gm-Message-State: AHQUAua7LJDos+gGHvKmeX5Rl+1A0K5jTrjnvizmq5A6icahx7F6DO5P Gq2m99Vr8WLrr+m5H0DxZ70= 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?q?Micha=C5=82=20Miros=C5=82aw?= Cc: linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) -- 2.20.1