mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Biju Das <biju.das.au@gmail.com>
Cc: Ulf Hansson <ulfh@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Biju Das <biju.das.jz@bp.renesas.com>
Subject: Re: [PATCH v25 03/11] mmc: renesas_sdhi: Add clk_mask to support wider clock dividers
Date: Wed, 11 Nov 2026 11:07:04 +0100	[thread overview]
Message-ID: <avQ-SIf0ZEsr51SB@shikoro> (raw)
In-Reply-To: <20261028-rzg3l_sdhi-v25-3-57f16691c2ed@bp.renesas.com>

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

On Wed, Oct 28, 2026 at 12:51:20PM +0000, Biju Das wrote:
> From: Biju Das <biju.das.jz@bp.renesas.com>
> 
> The clock divider on the RZ/G3L SoC is 11 bits wide, which needs a
> clock mask of 0x200000200 in renesas_sdhi_set_clock() instead of the
> hardcoded 0x80000080 used so far.
> 
> Add a u64 clk_mask field to struct renesas_sdhi_of_data and struct
> tmio_mmc_data so SoC-specific match data can supply its own mask, and
> widen the clk and clock variables in renesas_sdhi_set_clock() from
> u32 to u64 to hold it.
> 
> While at it, clamp the initial clock value to a minimum of 1. If
> actual_clock / 512 evaluates to 0, the loop condition
> "new_clock + clk_margin >= (clock << 1)" is always true, and the
> loop never terminates.
> 
> In probe, copy clk_mask from the OF data and fall back to
> SDHI_CLK_MASK_DEFAULT when none is provided, so existing
> SoCs keep their current behaviour.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-11-11 10:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 12:51 [PATCH v25 00/11] Add Renesas RZ/G3L SD/eMMC support Biju Das
2026-10-28 12:51 ` [PATCH v25 01/11] dt-bindings: mmc: renesas,sdhi: Document RZ/G3L (r9a08g046) SoC Biju Das
2026-10-28 12:51 ` [PATCH v25 02/11] mmc: renesas_sdhi: Clean up whitespace and add OF table sentinels Biju Das
2026-10-28 12:51 ` [PATCH v25 03/11] mmc: renesas_sdhi: Add clk_mask to support wider clock dividers Biju Das
2026-11-11 10:07   ` Wolfram Sang [this message]
2026-10-28 12:51 ` [PATCH v25 04/11] mmc: renesas_sdhi: Add max_divider field to support SoC-specific clock ranges Biju Das
2026-11-11 10:13   ` Wolfram Sang
2026-10-28 12:51 ` [PATCH v25 05/11] mmc: renesas_sdhi: Add SDHI_SD_CLK_CTL_DIV1 macro for 1/1 option Biju Das
2026-10-28 12:51 ` [PATCH v25 06/11] mmc: renesas_sdhi: Make clock divider mask configurable Biju Das
2026-11-11 10:14   ` Wolfram Sang
2026-10-28 12:51 ` [PATCH v25 07/11] mmc: renesas_sdhi: Add tuning delay support for RZ/G2L Biju Das
2026-11-11 10:28   ` Wolfram Sang
2026-10-28 12:51 ` [PATCH v25 08/11] mmc: renesas_sdhi: Add TMIO_MMC_INTERNAL_DIVIDER flag Biju Das
2026-11-11 10:32   ` Wolfram Sang
2026-10-28 12:51 ` [PATCH v25 09/11] mmc: renesas_sdhi: Add optional axis/axim reset controls Biju Das
2026-10-28 12:51 ` [PATCH v25 10/11] mmc: renesas_sdhi: Add write32_hook for CTL_SD_CARD_CLK_CTL register writes Biju Das
2026-11-11 10:36   ` Wolfram Sang
2026-10-28 12:51 ` [PATCH v25 11/11] mmc: renesas_sdhi: Add RZ/G3L SDHI support Biju Das

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=avQ-SIf0ZEsr51SB@shikoro \
    --to=wsa+renesas@sang-engineering.com \
    --cc=biju.das.au@gmail.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=ulfh@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

all inboxes | Powered by JetHome®