From: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
To: Alex Elder <elder@riscstar.com>
Cc: sboyd@kernel.org, bmasney+clk@redhat.com,
jbrunet+clk@baylibre.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, p.zabel@pengutronix.de,
andersson@kernel.org, konradybcio@kernel.org,
abelvesa@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org,
daniel@riscstar.com, mohd.anwar@oss.qualcomm.com,
fabrice.gasnier@foss.st.com, alexandre.torgue@foss.st.com,
marex@nabladev.com, changhuang.liang@starfivetech.com,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/4] reset: toshiba: introduce a TC9564 reset driver
Date: Fri, 4 Dec 2026 14:47:12 +0100 [thread overview]
Message-ID: <axLEYEuFgSBOiSkB@lore-desk> (raw)
In-Reply-To: <70717fcc-59a5-4029-92d7-42617160c757@riscstar.com>
[-- Attachment #1: Type: text/plain, Size: 4043 bytes --]
On Dec 04, Alex Elder wrote:
> On 12/4/26 3:42 AM, Lorenzo Bianconi wrote:
> > > Define a new auxiliary device driver that manages resets implemented
> > > by the Toshiba TC9564 SoC. The TC9564 clock driver will create the
> > > reset device, which will bind to this driver.
> > >
> > > The reset controller uses two registers to control a set of 13 resets
> > > that can be asserted or deasserted. Only a subset of the resets can
> > > currently be managed.
> > >
> > > The MMIO region containing the two control registers is mapped by
> > > the clock controller driver, and passed via the auxiliary device's
> > > platform data.
> > >
> > > Some common definitions are added to <linux/soc/qcom/tc9563.h> to
> > > specify the interface between the clock and reset drivers.
> > >
> > > Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
> > > Reviewed-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
> > > Co-developed-by: Daniel Thompson <daniel@riscstar.com>
> > > Signed-off-by: Daniel Thompson <daniel@riscstar.com>
> > > Signed-off-by: Alex Elder <elder@riscstar.com>
> > > ---
> > > v5: - Code related to the I2C and PCIE resets (including code that
> > > warned if they were used) has been removed.
> > > - The Kconfig now selects AUXILIARY_BUS
> > > - Philipp's Reviewed-by tag has been added.
> > >
> > > MAINTAINERS | 1 +
> > > drivers/reset/Kconfig | 8 ++
> > > drivers/reset/Makefile | 1 +
> > > drivers/reset/reset-tc9564.c | 165 ++++++++++++++++++++++++++++++++
> > > include/linux/soc/qcom/tc9563.h | 9 ++
> > > 5 files changed, 184 insertions(+)
> > > create mode 100644 drivers/reset/reset-tc9564.c
> > >
>
>
> . . .
>
> > > diff --git a/include/linux/soc/qcom/tc9563.h b/include/linux/soc/qcom/tc9563.h
> > > index 086f37a40d801..f778ce9ae2e7c 100644
> > > --- a/include/linux/soc/qcom/tc9563.h
> > > +++ b/include/linux/soc/qcom/tc9563.h
> > > @@ -16,4 +16,13 @@
> > > #define TC9563_GPIO_CONFIG TC9563_GPIO_EN0_OFFSET
> > > #define TC9563_RESET_GPIO TC9563_GPIO_OUT0_OFFSET
> > > +/* Name of the clock driver and the reset auxiliary device it creates */
> > > +#define TC9564_CLK_MODNAME "clk_tc9564"
> > > +#define TC9564_RESET_DEV_NAME "tc9564-reset"
> > > +
> > > +/* Platform data passed to the TC9564 reset auxiliary driver */
> > > +struct tc9564_aux_data {
> > > + void __iomem *regs;
> >
> > nit: I guess we do not really need it.
>
> I'm not sure what you mean here. The mapped registers pointer
> is required by the auxiliary reset driver, so we need to pass
> it via platform data.
>
>
> If what you're saying is that we could just pass the pointer
> alone, rather than a structure that *contains* the pointer,
> that is technically true. (And I think that's what you're
> saying.)
>
> The reason I did it this way is that assigning an __iomem
> tagged pointer to a simple void pointer (like the platform
> data) produces a "sparse" warning:
>
> warning: incorrect type in assignment (different address spaces)
>
> That happens in the clock driver (when setting the platform
> data) and in the auxiliary reset driver (when getting it
> from the platform data). I didn't like that, so I enclosed
> it in a structure to avoid the problem.
>
> I *would* prefer to just pass the mapped pointer. But even if
> I try to cast away the warning with (void *) we get a different
> warning from "sparse":
>
> warning: cast removes address space '__iomem' of expression
ack, right. I missed it. Thx :)
Regards,
Lorenzo
>
> I think the __iomem tag has value and putting it inside a
> structure preserves it (and avoids these warnings). So
> that's how I did it.
>
> Unless there are other objections I'd like to keep it this way.
>
> Thanks.
>
> -Ales
>
>
> > Regards,
> > Lorenzo
> >
> > > +};
> > > +
> > > #endif /* __QCOM_TC9563_H */
> > > --
> > > 2.53.0
> > >
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-12-04 13:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 20:09 [PATCH v5 0/4] clk: tc9564: introduce clock and reset drivers Alex Elder
2026-12-03 20:09 ` [PATCH v5 1/4] dt-bindings: toshiba: introduce toshiba,tc9564-clock.yaml Alex Elder
2026-12-03 20:18 ` sashiko-bot
2026-12-04 2:42 ` Alex Elder
2026-12-03 20:09 ` [PATCH v5 2/4] reset: toshiba: introduce a TC9564 reset driver Alex Elder
2026-12-03 20:24 ` sashiko-bot
2026-12-04 2:42 ` Alex Elder
2026-12-04 9:42 ` Lorenzo Bianconi
2026-12-04 13:37 ` Alex Elder
2026-12-04 13:47 ` Lorenzo Bianconi [this message]
2026-12-03 20:09 ` [PATCH v5 3/4] clk: toshiba: introduce a TC9564 clock driver Alex Elder
2026-12-03 20:22 ` sashiko-bot
2026-12-04 2:42 ` Alex Elder
2026-12-04 9:40 ` Lorenzo Bianconi
2026-12-04 13:37 ` Alex Elder
2026-12-03 20:09 ` [PATCH v5 4/4] arm64: dts: qcom: qcs6490-rb3gen2: add TC9564 clock node Alex Elder
2026-12-03 20:28 ` sashiko-bot
2026-12-04 2:43 ` Alex Elder
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=axLEYEuFgSBOiSkB@lore-desk \
--to=lorenzo.bianconi@oss.qualcomm.com \
--cc=abelvesa@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=andersson@kernel.org \
--cc=arnd@arndb.de \
--cc=bmasney+clk@redhat.com \
--cc=changhuang.liang@starfivetech.com \
--cc=conor+dt@kernel.org \
--cc=daniel@riscstar.com \
--cc=devicetree@vger.kernel.org \
--cc=elder@riscstar.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=gregkh@linuxfoundation.org \
--cc=jbrunet+clk@baylibre.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@nabladev.com \
--cc=mohd.anwar@oss.qualcomm.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
/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