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 9C133C433EF for ; Sat, 22 Jan 2022 13:54:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3336483003; Sat, 22 Jan 2022 14:54:49 +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 08A3583065; Sat, 22 Jan 2022 14:54:48 +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 988778209A for ; Sat, 22 Jan 2022 14:54:45 +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 ce4d5621; Sat, 22 Jan 2022 14:54:44 +0100 (CET) Date: Sat, 22 Jan 2022 14:54:44 +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:12 -0700) Subject: Re: [PATCH 2/8] mailbox: apple: Add driver for Apple IOP mailbox References: <20220114110438.58452-1-kettenis@openbsd.org> <20220114110438.58452-3-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:12 -0700 > > On Fri, 14 Jan 2022 at 04:05, Mark Kettenis wrote: > > > > This mailbox driver provides a communication channel with the > > Apple IOP controllers found on Apple SoCs. These IOP controllers > > are used to implement various functions such as the System > > Manegement Controller (SMC) and NVMe storage. It allows sending > > and receiving a 96-bit message over a single channel. > > > > The header file with the struct used for mailbox messages is taken > > straight from Linux. > > > > Signed-off-by: Mark Kettenis > > Signed-off-by: Sven Peter > > --- > > arch/arm/Kconfig | 1 + > > drivers/mailbox/Kconfig | 11 +++++ > > drivers/mailbox/Makefile | 1 + > > drivers/mailbox/apple-mbox.c | 92 +++++++++++++++++++++++++++++++++++ > > include/linux/apple-mailbox.h | 19 ++++++++ > > 5 files changed, 124 insertions(+) > > create mode 100644 drivers/mailbox/apple-mbox.c > > create mode 100644 include/linux/apple-mailbox.h > > Reviewed-by: Simon Glass > Tested on: Macbook Air M1 > Tested-by: Simon Glass > > with nit below > > [..] > > > diff --git a/include/linux/apple-mailbox.h b/include/linux/apple-mailbox.h > > new file mode 100644 > > index 0000000000..720fbb7029 > > --- /dev/null > > +++ b/include/linux/apple-mailbox.h > > @@ -0,0 +1,19 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only OR MIT */ > > +/* > > + * Apple mailbox message format > > + * > > + * Copyright (C) 2021 The Asahi Linux Contributors > > + */ > > + > > +#ifndef _LINUX_APPLE_MAILBOX_H_ > > +#define _LINUX_APPLE_MAILBOX_H_ > > Drop the _LINUX Hmm, this is a straight copy of the Linux header file. Isn't it better to keep it unmodified? Most (all?) the other files in this directory return the _LINUX bit... > > + > > +#include > > + > > +/* encodes a single 96bit message sent over the single channel */ > > +struct apple_mbox_msg { > > + u64 msg0; > > + u32 msg1; > > +}; > > + > > +#endif > > -- > > 2.34.1 > > > > Regards, > Simon >