All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alex Elder" <elder@riscstar.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v5 2/4] reset: toshiba: introduce a TC9564 reset driver
Date: Thu, 03 Dec 2026 20:24:00 +0000	[thread overview]
Message-ID: <sashiko-outbox-248627@kernel.org> (raw)
In-Reply-To: <20261203200948.1595470-3-elder@riscstar.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] reset: tc9564: missing readback to flush posted PCIe write in
  reset_update()
- [Low] reset: tc9564: .name = KBUILD_MODNAME duplicates auxiliary
  driver name
--

commit 6f848968fe16a18419ce4578c31fdc5a7780f95e
Author: Alex Elder <elder@kernel.org>

reset: toshiba: introduce a TC9564 reset driver

This commit adds an auxiliary reset controller driver for the Toshiba TC9564
SoC, using MMIO registers mapped and passed as platform data by the TC9564
clock driver.

> diff --git a/drivers/reset/reset-tc9564.c b/drivers/reset/reset-tc9564.c
> new file mode 100644
> index 0000000000000..218be6dbbb2a3
> --- /dev/null
> +++ b/drivers/reset/reset-tc9564.c

[ ... ]

> +static int reset_update(struct reset_controller_dev *rcdev,
> +			unsigned long id, bool assert)
> +{
> +	struct tc9564_reset *reset = dev_get_drvdata(rcdev->dev);
> +	const struct reset_init *init = &reset_init[id];
> +	void __iomem *reg = reset->regs + init->offset;
> +	u32 mask = BIT(init->bit);
> +	u32 val;
> +
> +	guard(spinlock_irqsave)(&reset->lock);
> +
> +	val = readl(reg);
> +	if (assert)
> +		val |= mask;
> +	else
> +		val &= ~mask;
> +	writel(val, reg);
> +
> +	return 0;
> +}

[Severity: Medium]
Should reset_update() read back reg with readl() after writel() to flush the
posted PCIe write?

The reset registers are on PCIe Function 0 BAR 4, where writel() is posted.
Returning before the write reaches the hardware can shorten consumer reset
delays or let subsequent accesses to XGMAC 1 on Function 1 BAR 4 race with
the reset update.

[ ... ]

> +static struct auxiliary_driver tc9564_reset_driver = {
> +	.name = KBUILD_MODNAME,
> +	.probe = tc9564_reset_probe,
> +	.id_table = tc9564_reset_ids,
> +};
> +module_auxiliary_driver(tc9564_reset_driver);

[Severity: Low]
Does setting .name = KBUILD_MODNAME duplicate the auxiliary driver name?

module_auxiliary_driver() already passes KBUILD_MODNAME as the module name to
__auxiliary_driver_register(), which formats driver.name as "%s.%s" when
auxdrv->name is set.  This registers the driver as reset_tc9564.reset_tc9564
in sysfs and logs; omitting .name registers it as reset_tc9564.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203200948.1595470-1-elder@riscstar.com?part=2

  reply	other threads:[~2026-12-03 20:24 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 [this message]
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
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=sashiko-outbox-248627@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=elder@riscstar.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.