From patchwork Thu Aug 30 18:04:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 10582503 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 DFC155A4 for ; Thu, 30 Aug 2018 18:05:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CECF328581 for ; Thu, 30 Aug 2018 18:05:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C08E02C384; Thu, 30 Aug 2018 18:05:48 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE 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 2FB8A28581 for ; Thu, 30 Aug 2018 18:05:48 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=3k2hWerm0SY0jrL//OK7/Gz694GIvWJJ3ZNrN1nnsRU=; b=YIi LMH/nIbzEh02itkdRmSN0V22VPfTucf5AqkrvIjVimJxc5eN/IJfy/yLDsI9b0l+YVIPi5vZzPfOB oQqvbEOyLgCayxt9f3mfpDlyxAIChXGfnbA6kyMmH9F/gbnIiFJCAH+YKmjURfecu+lRF8UNaPHk/ Jd5ZnjxEwn6tD1MSG6vCOtQYvYU7dlSelT3z1zsknL9LR8MkpPsIkqnUvmEin2CpCIui50dEq0g9F H+Ke4t6aSdu8gJaKLjoUgY+d8LpNCkYZLg8MW1QHDp4/WGXM2eyRyAbOKyZBSFa+ExpvLLhniGelN JXhr02wHunG4lzIgf6Th5s1f8e8uU5Q==; 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 1fvRK6-00006g-AJ; Thu, 30 Aug 2018 18:05:38 +0000 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvRK2-0008Ts-0t for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2018 18:05:35 +0000 Received: by mail-lj1-x244.google.com with SMTP id s12-v6so8033511ljj.0 for ; Thu, 30 Aug 2018 11:05:23 -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; bh=sDZqQay6ciF2WLUaQBAG4CwLyQbKEA7+WWTKFXjMJcI=; b=WYqtzO7NKB48F6DFhfSj93EpUuygYoSAZu+1CbbTrObu6wpFwAPVcfTsmmMpHGnV0e 7NPxXaoo/gHxF9/WentS0glgPfmX+hYlz93cezkIeEpISkL1TBmBc5eN8CL6adaxq92G 1zr320KX9eVufn1lx/Gngthqjfdu7wVlasHBaQSYjLHauS7TzTrblYnAnuHj1W5/GlxS a43M/2a3Gyf7q34ujX1AbNZREjEb7pQi0iU+t+/CbnzJ1VVKhyvLwYnZeL7oxTlBJ7Pl BcQ0XH4tMnIiqmdCXF6ecqBBUt3PXJ3Ocv/3wrO8xCIbh+9dDEFCsdLRI38qMvGzPNmt vkVA== 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; bh=sDZqQay6ciF2WLUaQBAG4CwLyQbKEA7+WWTKFXjMJcI=; b=n4zY6HXKY0PAsxbwSl2fjlTWWM71nv07jnBNjuulQmlM9JW8mW5RvCzoFlSFc8Rj2G YIczGasErOZZLOjbIV8KvrWNPBWvSzBR7TQR83QXto/LKPla7DXP7l6FfpsH61/7mKoJ I6nKVm0t8hhf4G4rZnDf2XU32TAP4pHdhF9GzylP87pQJ5Ab06fd1OMVTAr4HjJ65aA+ f49HKR7pN7eZWYwqef7XROqZP2gUOWvt054mrK4+02V96p/m0lVMZbZhKSkycakyDrEw EXgfLOPRpJYyo9q2G2qTZ52RI/KvRd4GjMU9+ZjTXk4V1YWKvzlovlT2Fo1ypzqC6yii sSPw== X-Gm-Message-State: APzg51AMYHQ95W+uU8qL9BtICzeV0vFT2D8cO1U0g+9lBOwm3kApvXTW vAhUghaZvL1K6z95k1xM9Yjvb0Ff X-Google-Smtp-Source: ANB0VdYNHV7Qi/XKX3aS7cTd0vCw5cddaED03yvem5AC/rXc3DtwqJvGT09kfvLr5ooqIsSc0chPqw== X-Received: by 2002:a2e:2096:: with SMTP id g22-v6mr7959244lji.37.1535652321573; Thu, 30 Aug 2018 11:05:21 -0700 (PDT) Received: from localhost.localdomain (109-252-90-13.nat.spd-mgts.ru. [109.252.90.13]) by smtp.gmail.com with ESMTPSA id 13-v6sm1420789lfy.87.2018.08.30.11.05.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 11:05:20 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Russell King Subject: [PATCH v3 0/8] Support Trusted Foundations firmware on Tegra30 Date: Thu, 30 Aug 2018 21:04:13 +0300 Message-Id: <20180830180421.6415-1-digetx@gmail.com> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180830_110534_088084_F7CF519F X-CRM114-Status: GOOD ( 11.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 MIME-Version: 1.0 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 Hello, All consumer-grade Tegra30 devices, like Nexus 7 tablet; Ouya console and others, use Trusted Foundations firmware that doesn't allow CPU to access secure registers directly from the Linux kernel, these accesses shall be done via the firmware calls. This patch-series adds a full-featured support of the Trusted Foundations firmware that opens the door for supporting of various Tegra30-based devices in the upstream Linux kernel. Changelog: v3: - Implemented suspend-resume support. - Reworked arm/firmware/trusted_foundations.c a tad. Now cache is getting properly initialized, cache enabling / disabling is supported. v2: - The "Don't apply CPU erratas in insecure mode" patch got some cleanup, in particular resolved the messiness in __tegra_cpu_reset_handler_data. - Added a comment to tf_cache_write_sec(), justifying the warning message. Dmitry Osipenko (8): ARM: trusted_foundations: Implement L2 cache initialization callback ARM: trusted_foundations: Make prepare_idle call to take mode argument ARM: trusted_foundations: Provide information about whether firmware is registered ARM: tegra: Setup L2 cache using Trusted Foundations firmware ARM: tegra: Don't apply CPU erratas in insecure mode ARM: tegra: Always boot CPU in ARM-mode ARM: tegra: Support L2 cache maintenance done via firmware ARM: tegra: Add firmware calls required for suspend-resume arch/arm/firmware/trusted_foundations.c | 80 +++++++++++++++++++++- arch/arm/include/asm/firmware.h | 2 +- arch/arm/include/asm/trusted_foundations.h | 13 ++++ arch/arm/mach-tegra/cpuidle-tegra114.c | 3 +- arch/arm/mach-tegra/pm.c | 43 ++++++++++++ arch/arm/mach-tegra/reset-handler.S | 66 ++++++++++++++---- arch/arm/mach-tegra/reset.c | 3 + arch/arm/mach-tegra/reset.h | 9 ++- arch/arm/mach-tegra/sleep-tegra20.S | 4 ++ arch/arm/mach-tegra/sleep.S | 4 ++ arch/arm/mach-tegra/tegra.c | 10 +++ 11 files changed, 216 insertions(+), 21 deletions(-)