From: <conor.dooley@microchip.com>
To: <aou@eecs.berkeley.edu>, <paul.walmsley@sifive.com>,
<palmer@dabbelt.com>, <arnd@arndb.de>, <olof@lixom.net>,
<linux-riscv@lists.infradead.org>
Cc: <robh+dt@kernel.org>, <cyril.jean@microchip.com>,
<daire.mcnamara@microchip.com>, <lewis.hanly@microchip.com>,
<jassisinghbrar@gmail.com>, <j.neuschaefer@gmx.net>,
<sfr@canb.auug.org.au>, <damien.lemoal@wdc.com>,
<atishp@atishpatra.org>, <nicolas.ferre@microchip.com>,
<alexandre.belloni@bootlin.com>,
<ludovic.desroches@microchip.com>, <claudiu.beznea@microchip.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>,
"Conor Dooley" <conor.dooley@microchip.com>
Subject: [PATCH v3 0/1] soc: add microchip polarfire soc system controller
Date: Tue, 15 Feb 2022 15:31:53 +0000 [thread overview]
Message-ID: <20220215153153.4136503-1-conor.dooley@microchip.com> (raw)
From: Conor Dooley <conor.dooley@microchip.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 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
next reply other threads:[~2022-02-15 15:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 15:31 conor.dooley [this message]
2022-02-15 15:31 ` [PATCH v3 1/1] soc: add microchip polarfire soc system controller conor.dooley
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=20220215153153.4136503-1-conor.dooley@microchip.com \
--to=conor.dooley@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=atishp@atishpatra.org \
--cc=claudiu.beznea@microchip.com \
--cc=cyril.jean@microchip.com \
--cc=daire.mcnamara@microchip.com \
--cc=damien.lemoal@wdc.com \
--cc=j.neuschaefer@gmx.net \
--cc=jassisinghbrar@gmail.com \
--cc=lewis.hanly@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=ludovic.desroches@microchip.com \
--cc=nicolas.ferre@microchip.com \
--cc=olof@lixom.net \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh+dt@kernel.org \
--cc=sfr@canb.auug.org.au \
/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