From: Guomin chen <guomin.chen@cixtech.com>
To: Jassi Brar <jassisinghbrar@gmail.com>, Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robh@kernel.org>,
krzk+dt@kernel.org, Conor Dooley <conor+dt@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Peter Chen <peter.chen@cixtech.com>,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, cix-kernel-upstream@cixtech.com,
Marc Zyngier <maz@kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Kajetan Puchalski <kajetan.puchalski@arm.com>,
Enric Balletbo <eballetb@redhat.com>,
Gary Yang <gary.yang@cixtech.com>,
Lihua Liu <Lihua.Liu@cixtech.com>
Subject: Re: [PATCH v9 5/9] mailbox: add CIX mailbox driver
Date: Wed, 16 Jul 2025 02:28:57 +0000 [thread overview]
Message-ID: <aHcOaas459jctIB2@gchen> (raw)
In-Reply-To: <CABb+yY26R_DHQUhpg-xUR_Z7EnjdR_4LPai0M-vfFTAOZy=vvQ@mail.gmail.com>
On Tue, Jul 15, 2025 at 05:11:01PM -0500, Jassi Brar wrote:
> [Some people who received this message don't often get email from jassisinghbrar@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> EXTERNAL EMAIL
>
> On Mon, Jul 14, 2025 at 10:40 AM Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > On Sun, Jul 13, 2025, at 19:00, Jassi Brar wrote:
> > > On Tue, Jul 8, 2025 at 8:54 AM Guomin chen <guomin.chen@cixtech.com> wrote:
> > > ....
> > >> > > +/* [0~7] Fast channel
> > >> > > + * [8] doorbell base channel
> > >> > > + * [9]fifo base channel
> > >> > > + * [10] register base channel
> > >> > > + */
> > >> > > +#define MBOX_FAST_IDX 7
> > >> > > +#define MBOX_DB_IDX 8
> > >> > > +#define MBOX_FIFO_IDX 9
> > >> > > +#define MBOX_REG_IDX 10
> > >> > > +#define CIX_MBOX_CHANS 11
> > >> > > +
> > >> > if it is not really a single controller owning different channels,
> > >> > maybe implement only what you currently use.
> > >> >
> > >> As mentioned in the previous email, a single controller can support
> > >> multiple different channels.
> > >>
> > > OK. I am not too worried about having all variants in one driver esp
> > > when it is manageable and share the code.
> > > Unless I am overlooking something. Arnd?
> >
> > My main worry here is that the types are all quite different: while
> > the doorbell and fast mailboxes are what a lot of other drivers have,
> > the FIFO mode does not seem to be a good fit for the mailbox subsystem
> > but instead looks like a more generic firmware interface with variable
> > length messages.
> >
> > For those, I think a higher-level driver with fixed data structures
> > passed through the hardware interface seems more appropriate.
> >
> Yes. But sometimes when the data structures of a protocol are not
> bigger than FIFO depth, the platform may choose to use the FIFO mode.
> I see it as platform dependent.
>
> > Are there any other mailbox drivers that just use the mailbox to
> > tunnel variable-length messages?
> >
> From a quick look, Armada 37xx and Hi6220 have fifo though they fill
> them up fully for each transfer.
>
Yes, both Armada 37xx and Hi6220 support FIFO functionality, and they
fill the FIFO with each transfer.
Since the cix mailbox hardware supports messages with a maximum length
of 128 bytes, different clients transmit messages of varying lengths,
such as the cix DSP using 8 bytes, the cix sensorhub using 12 bytes, etc.
Therefore, the cix mailbox driver has been modified to support variable-
length messages of up to 128 bytes. This allows for more compact and
flexible support of various clients.
Thanks
Guomin Chen
next prev parent reply other threads:[~2025-07-16 2:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 3:16 [PATCH v9 0/9] arm64: Introduce CIX P1 (SKY1) SoC Peter Chen
2025-06-09 3:16 ` [PATCH v9 1/9] dt-bindings: vendor-prefixes: Add CIX Technology Group Co., Ltd Peter Chen
2025-06-09 3:16 ` [PATCH v9 2/9] dt-bindings: arm: add CIX P1 (SKY1) SoC Peter Chen
2025-06-09 3:16 ` [PATCH v9 3/9] arm64: Kconfig: add ARCH_CIX for cix silicons Peter Chen
2025-06-09 3:16 ` [PATCH v9 4/9] dt-bindings: mailbox: add cix,sky1-mbox Peter Chen
2025-06-09 3:16 ` [PATCH v9 5/9] mailbox: add CIX mailbox driver Peter Chen
2025-07-02 1:08 ` Peter Chen
2025-07-04 16:04 ` Arnd Bergmann
2025-07-04 18:35 ` Jassi Brar
2025-07-08 9:51 ` Guomin chen
2025-07-06 19:30 ` Jassi Brar
2025-07-08 13:53 ` Guomin chen
2025-07-13 17:00 ` Jassi Brar
2025-07-14 12:43 ` Guomin chen
2025-07-14 15:39 ` Arnd Bergmann
2025-07-15 22:11 ` Jassi Brar
2025-07-16 2:28 ` Guomin chen [this message]
2025-07-16 7:19 ` Arnd Bergmann
2025-07-16 17:15 ` Jassi Brar
2025-06-09 3:16 ` [PATCH v9 6/9] arm64: defconfig: Enable CIX SoC Peter Chen
2025-06-09 3:16 ` [PATCH v9 7/9] dt-bindings: clock: cix: Add CIX sky1 scmi clock id Peter Chen
2025-06-09 3:16 ` [PATCH v9 8/9] arm64: dts: cix: Add sky1 base dts initial support Peter Chen
2025-07-05 8:20 ` Krzysztof Kozlowski
2025-07-07 2:50 ` Peter Chen
2025-06-09 3:16 ` [PATCH v9 9/9] MAINTAINERS: Add CIX SoC maintainer entry Peter Chen
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=aHcOaas459jctIB2@gchen \
--to=guomin.chen@cixtech.com \
--cc=Lihua.Liu@cixtech.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=cix-kernel-upstream@cixtech.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=eballetb@redhat.com \
--cc=gary.yang@cixtech.com \
--cc=jassisinghbrar@gmail.com \
--cc=kajetan.puchalski@arm.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=peter.chen@cixtech.com \
--cc=robh@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=will@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).