From: "Clément Léger" <clement.leger@bootlin.com>
To: Lee Jones <lee.jones@linaro.org>,
Rob Herring <robh+dt@kernel.org>, Mark Brown <broonie@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Arnd Bergmann <arnd@arndb.de>
Cc: "Clément Léger" <clement.leger@bootlin.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
"Peng Fan" <peng.fan@nxp.com>,
"Sudeep Holla" <sudeep.holla@arm.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>
Subject: [PATCH 0/3] add SMC based regmap driver for secure syscon access
Date: Fri, 23 Jul 2021 15:52:36 +0200 [thread overview]
Message-ID: <20210723135239.388325-1-clement.leger@bootlin.com> (raw)
When running under a secure monitor, some peripherals are setup as accessible
by secure world only. When those peripherals are system controllers, they might
need to be accessed by the normal world for some peripheral configuration.
In order to keep the existing code working for such devices (which usually uses
the regmap from a syscon), this series adds support for a regmap that uses SMCs
(Secure Monitor Call) to request access to registers. The secure monitor will
then catch these accesses and decide whether or not the normal world is allowed
to access the requested register.
As said, most drivers that needs access to registers that are shared in a system
controller often uses syscon. Currently, syscon uses a regmap_mmio which allows
to read and write registers using MMIO accesses. Support is added in this series
to also support "syscon-smc" compatible which will use a SMC regmap instead of a
MMIO one.
Clément Léger (3):
regmap: add regmap using ARM SMCCC
syscon: add support for "syscon-smc" compatible
dt-bindings: mfd: add "syscon-smc" YAML description
.../devicetree/bindings/mfd/syscon-smc.yaml | 57 ++++++
drivers/base/regmap/Kconfig | 7 +-
drivers/base/regmap/Makefile | 1 +
drivers/base/regmap/regmap-smccc.c | 131 ++++++++++++++
drivers/mfd/syscon.c | 170 +++++++++++++++---
include/linux/regmap.h | 38 ++++
6 files changed, 378 insertions(+), 26 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mfd/syscon-smc.yaml
create mode 100644 drivers/base/regmap/regmap-smccc.c
--
2.32.0
next reply other threads:[~2021-07-23 13:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-23 13:52 Clément Léger [this message]
2021-07-23 13:52 ` [PATCH 1/3] regmap: add regmap using ARM SMCCC Clément Léger
2021-07-23 14:43 ` Mark Brown
2021-07-23 15:53 ` Clément Léger
2021-07-23 16:37 ` Mark Brown
2021-07-23 13:52 ` [PATCH 2/3] syscon: add support for "syscon-smc" compatible Clément Léger
2021-07-23 15:27 ` Lee Jones
2021-07-23 15:56 ` Clément Léger
2021-07-23 16:07 ` Arnd Bergmann
2021-07-23 16:41 ` Mark Brown
2021-07-24 12:36 ` Peng Fan (OSS)
2021-07-24 7:00 ` kernel test robot
2021-07-23 13:52 ` [PATCH 3/3] dt-bindings: mfd: add "syscon-smc" YAML description Clément Léger
2021-07-29 21:19 ` Rob Herring
2021-07-30 7:21 ` Clément Léger
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=20210723135239.388325-1-clement.leger@bootlin.com \
--to=clement.leger@bootlin.com \
--cc=alexandre.belloni@bootlin.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=rafael@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sudeep.holla@arm.com \
/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).