[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220217101349.2374873-1-conor.dooley@microchip.com>
Date: Thu, 17 Feb 2022 10:13:49 +0000
From: <conor.dooley@...rochip.com>
To: <aou@...s.berkeley.edu>, <paul.walmsley@...ive.com>,
<palmer@...belt.com>, <arnd@...db.de>, <olof@...om.net>,
<linux-riscv@...ts.infradead.org>
CC: <robh+dt@...nel.org>, <cyril.jean@...rochip.com>,
<daire.mcnamara@...rochip.com>, <lewis.hanly@...rochip.com>,
<jassisinghbrar@...il.com>, <j.neuschaefer@....net>,
<sfr@...b.auug.org.au>, <damien.lemoal@....com>,
<atishp@...shpatra.org>, <nicolas.ferre@...rochip.com>,
<alexandre.belloni@...tlin.com>, <ludovic.desroches@...rochip.com>,
<claudiu.beznea@...rochip.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
"Conor Dooley" <conor.dooley@...rochip.com>
Subject: [PATCH v4 0/1] soc: add microchip polarfire soc system controller
From: Conor Dooley <conor.dooley@...rochip.com>
Since I submitted version 1 of this driver, I attempted to upstream
bindings for devices dependant on the system controller [0]. In that
process, Rob said that since they were devices with no resources,
other than a reference to the system controller, the devices should
not be in the device tree & instead they should be created by the
system controller (which it now does).
Since the sub devices using mpfs_sys_controller_get will now have the
system controller as their parent, this function now just checks if the
parent device is compatible. If the parent is compatible, the sub-
device then attempts to register as a consumer of the system controller
@Arnd Hopefully this clears up the issues you had with reference
counting & the lack of checks as to whether the device found by
mpfs_sys_controller_get was in fact a system controller.
Depends on [0] to change the compatible string in the dt-binding.
Thanks,
Conor.
Changes since v3:
- switch to devm_kzalloc in probe
- unify exports to use the non GPL version
Changes since v2:
- system controller is no longer an mfd, system controller now creates
sub devices for itself.
- specify that a mpfs_mss_msg is used in mpfs_blocking_transaction
rather than using a void pointer.
- as the subdevices are now all created by the system controller, the
get() function now checks that the requesting device's parent is
compatible.
- mpfs_sys_controller_get now passes a pointer to the device that is
trying to register as a consumer rather than a device node.
Changes since v1:
- system controller is now an mfd
- parentage is now used to get the device node on the system controller
- mpfs_sys_controller_get() now updates the reference count
- "polarfire-soc" in compat string changed to "mpfs"
[0] https://lore.kernel.org/linux-riscv/20220214135840.168236-1-conor.dooley@microchip.com/
Conor Dooley (1):
soc: add microchip polarfire soc system controller
drivers/soc/Kconfig | 1 +
drivers/soc/Makefile | 1 +
drivers/soc/microchip/Kconfig | 10 +
drivers/soc/microchip/Makefile | 1 +
drivers/soc/microchip/mpfs-sys-controller.c | 194 ++++++++++++++++++++
include/soc/microchip/mpfs.h | 4 +-
6 files changed, 209 insertions(+), 2 deletions(-)
create mode 100644 drivers/soc/microchip/Kconfig
create mode 100644 drivers/soc/microchip/Makefile
create mode 100644 drivers/soc/microchip/mpfs-sys-controller.c
--
2.35.1
Powered by blists - more mailing lists