From patchwork Tue Feb 22 15:08:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 12755396 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B03F6C433F5 for ; Tue, 22 Feb 2022 15:20:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=Ldove29+0KZw/EOEa5qfHYByAZEoUWJ8aEIVyB0+3Gk=; b=Q7fTRaQZlqx7Om RdSJK6HimnOARCNdfis0n+lY8irpXznbQumEdAuLlSUKPjcChLxhZocEYFt6cqkLH3PuExNCJw6TI 9J7Lls3wDK5nS8FL3HQqBV4LdjGJOkdktSo3gHTZWARV1ODaQ8a4iJ1ORLbG2t3/lXu1qhQxQZpLG FL5KjvCyePbQ7+KuJrhCDGsOt9kHiNehUBdfQLHU+ozF+1qcmWWC+wzR00eQcX1OplKWANCwTdhSU b02lxeH7q3CmoVA53+a0fm/Y4CwBbWY/wehmfWTc1biD0i3FG9Lr0Ozb1FaCBebO6yoz73unuEwKy soo/hg0fvoGeIOPrIddQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMWwF-00A9bC-5s; Tue, 22 Feb 2022 15:18:51 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMWoQ-00A5qE-Nn for linux-arm-kernel@lists.infradead.org; Tue, 22 Feb 2022 15:10:49 +0000 Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id CE615FF814; Tue, 22 Feb 2022 15:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1645542642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pOM4wfrMDqeY9Bjg00fwOoESa/b377YpBh4HMF9LC7U=; b=PBZW3zUOBneAa37PdtDkkBmmlqzZ+F0sMBsOq35Il849SxHeOBi/jjgF6/2sRa/gLqrpUy 3GuF1geQaadYfXv0CvaRHUl2za8rZHUYX8zYIReuSk5biUaNIsUaRsuOtKteOdrdcDWMSz UvuwJeRTsjtTpWtCbkUSVQRyi6p/lVVllIIbUj0EgZPkSczDbavW59zso+0pu5VfXLBbVo lC7+MWXeXRl6Y0XCuDguvId07/4tgHCq/bOw1Oq+xD2n6OU8BHqJaMRKmogPKEvA9M88J7 jfnXccbc3u7/IObuKhhn6h7h/yv+ImW7GjjGPP2fAxL1omJkd5PqD8LmPfcOUQ== From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Russell King , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , =?utf-8?b?Q2zDqW1lbnQgTMOp?= =?utf-8?b?Z2Vy?= Subject: [PATCH 0/4] ARM: at91: add support for secure suspend on sama5d2 Date: Tue, 22 Feb 2022 16:08:42 +0100 Message-Id: <20220222150846.255307-1-clement.leger@bootlin.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220222_071046_960973_07FA3CB1 X-CRM114-Status: GOOD ( 11.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that OP-TEE support for sama5d2 is more complete, add support to execute SMC calls and to set suspend mode. This series adds new files to be able to execute SMC calls targeting OP-TEE secure monitor and secure suspend support uses it. Clément Léger (4): ARM: at91: add code to handle secure calls ARM: at91: pm: move "atmel.pm_modes" parsing into a common file ARM: at91: pm: add support for sama5d2 secure suspend ARM: at91: pm: fix defines to select *_pm_init functions arch/arm/mach-at91/Kconfig | 14 ++++++- arch/arm/mach-at91/Makefile | 5 ++- arch/arm/mach-at91/generic.h | 2 +- arch/arm/mach-at91/pm.c | 31 +------------- arch/arm/mach-at91/pm.h | 7 ++++ arch/arm/mach-at91/pm_common.c | 39 ++++++++++++++++++ arch/arm/mach-at91/pm_secure.c | 64 +++++++++++++++++++++++++++++ arch/arm/mach-at91/sam_secure.c | 46 +++++++++++++++++++++ arch/arm/mach-at91/sam_secure.h | 18 ++++++++ arch/arm/mach-at91/sama5.c | 2 + include/linux/platform_data/atmel.h | 2 +- 11 files changed, 195 insertions(+), 35 deletions(-) create mode 100644 arch/arm/mach-at91/pm_common.c create mode 100644 arch/arm/mach-at91/pm_secure.c create mode 100644 arch/arm/mach-at91/sam_secure.c create mode 100644 arch/arm/mach-at91/sam_secure.h