[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190114144202.27315-1-benjamin.gaignard@st.com>
Date: Mon, 14 Jan 2019 15:41:55 +0100
From: Benjamin Gaignard <benjamin.gaignard@...com>
To: <broonie@...nel.org>, <robh@...nel.org>, <arnd@...db.de>
CC: <linux-kernel@...r.kernel.org>, <loic.pallardy@...com>,
<benjamin.gaignard@...aro.org>,
Benjamin Gaignard <benjamin.gaignard@...com>
Subject: [RFC 0/7] Introduce bus domains controller framework
The goal of this framework is to offer an interface for the
hardware blocks controlling bus accesses rights.
Bus domains controllers are typically used to control if a
hardware block can perform read or write operations on bus.
Smarter domains controllers could be able to define accesses
rights per hardware blocks to control where they can read
or write.
Domains controller configurations are provided in device node,
parsed by the framework and send to the driver to apply them.
Each controller may need different number and type of inputs
to configure a domain so device-tree properties size have to
be define by using "#domainctrl-cells".
Domains configurations properties have to be named "domainsctrl-X"
on device node.
"domainsctrl-names" keyword can also be used to give a name to
a specific configuration.
An example of bus domains controller is STM32 ETZPC hardware block
which got 3 domains:
- secure: hardware blocks are only accessible by software running on trust
zone.
- non-secure: hardware blocks are accessible by non-secure software (i.e.
linux kernel).
- coprocessor: hardware blocks are only accessible by the corpocessor.
Up to 94 hardware blocks of the soc could be managed by ETZPC and
assigned to one of the three domains.
It is an RFC, comments are welcome to help to create this framework, thanks.
Benjamin
Benjamin Gaignard (7):
devicetree: bindings: Document domains controller bindings
domainsctrl: Introduce domains controller framework
base: Add calls to domains controller
devicetree: bindings: domainsctrl: Add STM32 ETZPC bindings
bus: domainsctrl: Add driver for STM32 ETZPC controller
ARM: dts: stm32: Add domainsctrl node for stm32mp157 SoC
ARM: dts: stm32: enable domains controller node on stm32mp157c-ed1
.../bindings/bus/domains/domainsctrl.txt | 35 +++
.../bindings/bus/domains/st,stm32-etzpc.txt | 14 ++
arch/arm/boot/dts/stm32mp157c-ev1.dts | 2 +
arch/arm/boot/dts/stm32mp157c.dtsi | 7 +
drivers/base/dd.c | 9 +
drivers/bus/Kconfig | 2 +
drivers/bus/Makefile | 2 +
drivers/bus/domains/Kconfig | 14 ++
drivers/bus/domains/Makefile | 2 +
drivers/bus/domains/domainsctrl.c | 234 +++++++++++++++++++++
drivers/bus/domains/stm32-etzpc.c | 140 ++++++++++++
include/dt-bindings/bus/domains/stm32-etzpc.h | 25 +++
include/linux/domainsctrl.h | 70 ++++++
13 files changed, 556 insertions(+)
create mode 100644 Documentation/devicetree/bindings/bus/domains/domainsctrl.txt
create mode 100644 Documentation/devicetree/bindings/bus/domains/st,stm32-etzpc.txt
create mode 100644 drivers/bus/domains/Kconfig
create mode 100644 drivers/bus/domains/Makefile
create mode 100644 drivers/bus/domains/domainsctrl.c
create mode 100644 drivers/bus/domains/stm32-etzpc.c
create mode 100644 include/dt-bindings/bus/domains/stm32-etzpc.h
create mode 100644 include/linux/domainsctrl.h
--
2.15.0
Powered by blists - more mailing lists