All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: Mark Kettenis <kettenis@openbsd.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	 Jaehoon Chung <jh80.chung@samsung.com>,
	Tom Rini <trini@konsulko.com>,
	sven@svenpeter.dev, marcan@marcan.st,
	Bin Meng <bmeng.cn@gmail.com>
Subject: Re: [PATCH 2/8] mailbox: apple: Add driver for Apple IOP mailbox
Date: Sat, 22 Jan 2022 10:17:07 -0700	[thread overview]
Message-ID: <CAPnjgZ2vq+OFe1wFuBktEx89cXpsZP+NhxS2Ebg8aEkTdk9V3A@mail.gmail.com> (raw)
In-Reply-To: <d3cbcd515e30a820@bloch.sibelius.xs4all.nl>

Hi Mark,

On Sat, 22 Jan 2022 at 06:54, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>
> > From: Simon Glass <sjg@chromium.org>
> > Date: Fri, 21 Jan 2022 18:40:12 -0700
> >
> > On Fri, 14 Jan 2022 at 04:05, Mark Kettenis <kettenis@openbsd.org> 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 <kettenis@openbsd.org>
> > > Signed-off-by: Sven Peter <sven@svenpeter.dev>
> > > ---
> > >  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 <sjg@chromium.org>
> > Tested on: Macbook Air M1
> > Tested-by: Simon Glass <sjg@chromium.org>
> >
> > 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...

Oh I missed that this was supposed to be in this dir. Yes seems OK.


>
> > > +
> > > +#include <linux/types.h>
> > > +
> > > +/* encodes a single 96bit message sent over the single channel */
> > > +struct apple_mbox_msg {
> > > +       u64 msg0;
> > > +       u32 msg1;
> > > +};
> > > +
> > > +#endif
> > > --
> > > 2.34.1
> > >

Regards,
Simon

  reply	other threads:[~2022-01-22 17:17 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 11:04 [PATCH 0/8] Apple M1 NVMe storage support Mark Kettenis
2022-01-14 11:04 ` [PATCH 1/8] nvme: Split out PCI support Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 12:47     ` Mark Kettenis
2022-01-22 13:18       ` Simon Glass
2022-01-22 14:57         ` Mark Kettenis
2022-01-14 11:04 ` [PATCH 2/8] mailbox: apple: Add driver for Apple IOP mailbox Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 13:54     ` Mark Kettenis
2022-01-22 17:17       ` Simon Glass [this message]
2022-01-14 11:04 ` [PATCH 3/8] arm: apple: Add RTKit support Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 13:59     ` Mark Kettenis
2022-01-22 17:17       ` Simon Glass
2022-01-22 19:31         ` Mark Kettenis
2022-01-14 11:04 ` [PATCH 4/8] nvme: Introduce driver ops Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 13:33     ` Mark Kettenis
2022-01-22 17:17       ` Simon Glass
2022-01-14 11:04 ` [PATCH 5/8] nvme: Add shutdown function Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-14 11:04 ` [PATCH 6/8] power: domain: apple: Add reset support Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 14:11     ` Mark Kettenis
2022-01-22 17:17       ` Simon Glass
2022-01-22 19:35         ` Mark Kettenis
2022-01-14 11:04 ` [PATCH 7/8] nvme: apple: Add driver for Apple NVMe storage controller Mark Kettenis
2022-01-22  1:40   ` Simon Glass
2022-01-22 14:45     ` Mark Kettenis
2022-01-22 17:17       ` Simon Glass
2022-01-22 17:41         ` Mark Kettenis
2022-01-22 18:28           ` Simon Glass
2022-01-14 11:04 ` [PATCH 8/8] configs: apple: Add NVMe boot target Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPnjgZ2vq+OFe1wFuBktEx89cXpsZP+NhxS2Ebg8aEkTdk9V3A@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=bmeng.cn@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=kettenis@openbsd.org \
    --cc=marcan@marcan.st \
    --cc=mark.kettenis@xs4all.nl \
    --cc=sven@svenpeter.dev \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.