[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241017163649.3007062-1-tudor.ambarus@linaro.org>
Date: Thu, 17 Oct 2024 16:36:47 +0000
From: Tudor Ambarus <tudor.ambarus@...aro.org>
To: jassisinghbrar@...il.com,
krzk@...nel.org
Cc: alim.akhtar@...sung.com,
mst@...hat.com,
javierm@...hat.com,
tzimmermann@...e.de,
bartosz.golaszewski@...aro.org,
luzmaximilian@...il.com,
sudeep.holla@....com,
conor.dooley@...rochip.com,
bjorn@...osinc.com,
ulf.hansson@...aro.org,
linux-samsung-soc@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
marcan@...can.st,
neal@...pa.dev,
alyssa@...enzweig.io,
broonie@...nel.org,
andre.draszik@...aro.org,
willmcvicker@...gle.com,
peter.griffin@...aro.org,
kernel-team@...roid.com,
vincent.guittot@...aro.org,
daniel.lezcano@...aro.org,
Tudor Ambarus <tudor.ambarus@...aro.org>
Subject: [PATCH v2 0/2] mailbox: add async request mechanism w/ a user
Hi,
This adds a simple mailbox async mechanism, similar to the one found in
the crypto subsystem. It empowers mailbox controllers with hardware
queue support.
It then adds a user for this mechanism, the ACPM driver.
ACPM (Alive Clock and Power Manager) is a firmware that operates on the
APM (Active Power Management) module that handles overall power management
activities. ACPM and masters communicate with each other using mailbox
messages and shared memory (mmio-sram). The shared memory contains
channel configuration data. It exposes at a specific offset into the
memory the channel ID, message and queue lengths, pointers to the TX and
RX queues (which are also part of the shared memory), and whether the RX
queues work by polling or interrupts. It resembles in a way to the
arm-scmi driver as that too uses mailbox messages and shared memory to
communicate with the firmware.
The set is marked as v2 because the mailbox core patch was already sent
for review a few weeks ago:
Link: https://lore.kernel.org/linux-arm-kernel/20241004165301.1979527-1-tudor.ambarus@linaro.org/
If everyone is happy with the current form of the set, we'll probably
need an immutable tag/branch to be shared between the mailbox and firmware
trees.
Thanks,
ta
Changes in v2:
- add the exynos acpm driver - new patch.
- extend the mailbox request with rx and tx len - let the client decide
how much to write and get back from the controller. The controller can
verify the lengths by comparing them with its channel length.
- extend the mailbox request with flags, in particular with
MBOX_REQ_MAY_SLEEP. All requests that don't set this flag are
considered in atomic context.
- remove a dereference that was done before checking for null.
- update the commit message, rebased on top of v6.12-rc3.
Tudor Ambarus (2):
mailbox: add async request mechanism to empower controllers w/ hw
queues
firmware: add exynos acpm driver
drivers/firmware/Kconfig | 1 +
drivers/firmware/Makefile | 1 +
drivers/firmware/samsung/Kconfig | 11 +
drivers/firmware/samsung/Makefile | 3 +
drivers/firmware/samsung/exynos-acpm.c | 703 ++++++++++++++++++++
drivers/mailbox/mailbox.c | 127 +++-
include/linux/mailbox/exynos-acpm-message.h | 21 +
include/linux/mailbox_client.h | 4 +
include/linux/mailbox_controller.h | 7 +
include/linux/mailbox_request.h | 33 +
10 files changed, 888 insertions(+), 23 deletions(-)
create mode 100644 drivers/firmware/samsung/Kconfig
create mode 100644 drivers/firmware/samsung/Makefile
create mode 100644 drivers/firmware/samsung/exynos-acpm.c
create mode 100644 include/linux/mailbox/exynos-acpm-message.h
create mode 100644 include/linux/mailbox_request.h
--
2.47.0.rc1.288.g06298d1525-goog
Powered by blists - more mailing lists