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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4ED5FC433F5 for ; Sat, 22 Jan 2022 13:59:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3FB5F83003; Sat, 22 Jan 2022 14:59:08 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xs4all.nl Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 2801F83065; Sat, 22 Jan 2022 14:59:06 +0100 (CET) Received: from sibelius.xs4all.nl (sibelius.xs4all.nl [83.163.83.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B1AF581974 for ; Sat, 22 Jan 2022 14:59:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xs4all.nl Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=mark.kettenis@xs4all.nl Received: from localhost (bloch.sibelius.xs4all.nl [local]) by bloch.sibelius.xs4all.nl (OpenSMTPD) with ESMTPA id 2a563a16; Sat, 22 Jan 2022 14:59:02 +0100 (CET) Date: Sat, 22 Jan 2022 14:59:02 +0100 (CET) From: Mark Kettenis To: Simon Glass Cc: kettenis@openbsd.org, u-boot@lists.denx.de, jh80.chung@samsung.com, trini@konsulko.com, sven@svenpeter.dev, marcan@marcan.st, bmeng.cn@gmail.com In-Reply-To: (message from Simon Glass on Fri, 21 Jan 2022 18:40:14 -0700) Subject: Re: [PATCH 3/8] arm: apple: Add RTKit support References: <20220114110438.58452-1-kettenis@openbsd.org> <20220114110438.58452-4-kettenis@openbsd.org> Message-ID: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean > From: Simon Glass > Date: Fri, 21 Jan 2022 18:40:14 -0700 > > Hi Mark, > > On Fri, 14 Jan 2022 at 04:05, Mark Kettenis wrote: > > > > Most Apple IOPs run a firmware that is based on what Apple calls > > RTKit. RTKit implements a common mailbox protocol. This code > > provides an implementation of the AP side of this protocol, > > providing a function to initialize RTKit-based firmwares as well > > as a function to do a clean shutdown of this firmware. > > > > Signed-off-by: Mark Kettenis > > --- > > arch/arm/include/asm/arch-apple/rtkit.h | 11 ++ > > arch/arm/mach-apple/Makefile | 1 + > > arch/arm/mach-apple/rtkit.c | 231 ++++++++++++++++++++++++ > > 3 files changed, 243 insertions(+) > > create mode 100644 arch/arm/include/asm/arch-apple/rtkit.h > > create mode 100644 arch/arm/mach-apple/rtkit.c > > This should be a driver. This isn't a driver but just a bit of helper code that implements the RTKit protocol. It will be used by the Apple NVMe driver and a future SMC driver. The same approach is being taken in Linux. Since it is intended to be shared, I didn't put it in the NVMe driver itself.