public inbox for cip-dev@lists.cip-project.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: John Madieu <john.madieu.xa@bp.renesas.com>
Cc: cip-dev@lists.cip-project.org,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
Subject: Re: [PATCH 6.1.y-cip 12/25] pinctrl: renesas: rzg2l: Fix OEN resume
Date: Tue, 4 Nov 2025 13:55:23 +0100	[thread overview]
Message-ID: <aQn3uxHX0ebCjGta@duo.ucw.cz> (raw)
In-Reply-To: <20251103113608.36240-13-john.madieu.xa@bp.renesas.com>

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

Hi!

> From: Biju Das <biju.das.jz@bp.renesas.com>
> 
> [ Upstream commit 30247fc3254a4502465ab809d49e2167ace5a6f2 ]
> 
> Writing to the PFC_OEN register is controlled by the write protect
> register (PWPR).  Currently the OEN register write in resume() is done
> without enabling write access in PWPR leading to incorrect
> operation.

> @@ -3150,7 +3152,16 @@ static int rzg2l_pinctrl_resume_noirq(struct device *dev)
>  	}
>  
>  	writeb(cache->qspi, pctrl->base + QSPI);
> +	if (pctrl->data->hwcfg->oen_pwpr_lock) {
> +		spin_lock_irqsave(&pctrl->lock, flags);
> +		pwpr = readb(pctrl->base + regs->pwpr);
> +		writeb(pwpr | PWPR_REGWE_B, pctrl->base + regs->pwpr);
> +	}
>  	writeb(cache->oen, pctrl->base + pctrl->data->hwcfg->regs.oen);
> +	if (pctrl->data->hwcfg->oen_pwpr_lock) {
> +		writeb(pwpr & ~PWPR_REGWE_B, pctrl->base + regs->pwpr);
> +		spin_unlock_irqrestore(&pctrl->lock, flags);
> +	}
>  	for (u8 i = 0; i < 2; i++) {
>  		if (regs->sd_ch)
>  			writeb(cache->sd_ch[i], pctrl->base +
>  	SD_CH(regs->sd_ch, i));

This is "interesting" piece of code (just take the spinlock always?),
plus we already have similar code in rzg2l_write_oen, could it be
shared?

Best regards,
								Pavel
-- 
In cooperation with DENX Software Engineering GmbH, HRB 165235 Munich,
Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

  reply	other threads:[~2025-11-04 12:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03 11:35 [PATCH 6.1.y-cip 00/25] Add RZ/G3E GBETH support John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 01/25] pinctrl: renesas: rzg2l: Suppress binding attributes John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 02/25] soc: renesas: Add config option for RZ/V2N (R9A09G056) SoC John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 03/25] dt-bindings: pinctrl: renesas: Document RZ/V2N SoC John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 04/25] pinctrl: renesas: rzg2l: Add support for " John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 05/25] pinctrl: renesas: rzg2l: Fix invalid unsigned return in rzg3s_oen_read() John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 06/25] pinctrl: renesas: rzg2l: Parameterize OEN register offset John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 07/25] pinctrl: renesas: rzg2l: Unify OEN access by making pin-to-bit mapping configurable John Madieu
2025-11-04 12:50   ` Pavel Machek
2025-11-04 17:27     ` John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 08/25] pinctrl: renesas: rzg2l: Remove OEN ops for RZ/G3E John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 09/25] pinctrl: renesas: rzg2l: Unify OEN handling across RZ/{G2L,V2H,V2N} John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 10/25] pinctrl: renesas: rzg2l: Add PFC_OEN support for RZ/G3E SoC John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 11/25] pinctrl: renesas: rzg2l: Drop oen_read and oen_write callbacks John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 12/25] pinctrl: renesas: rzg2l: Fix OEN resume John Madieu
2025-11-04 12:55   ` Pavel Machek [this message]
2025-11-04 20:56     ` John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 13/25] clk: renesas: r9a09g047: Add clock and reset signals for the GBETH IPs John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 14/25] dt-bindings: net: Document support for Renesas RZ/V2H(P) GBETH John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 15/25] dt-bindings: net: renesas-gbeth: Add support for RZ/G3E (R9A09G047) SoC John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 16/25] dt-bindings: net: Rename renesas,r9a09g057-gbeth.yaml John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 17/25] net: stmmac: platform: Add snps,dwmac-5.20 IP compatible string John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 18/25] net: phy: Add helper for mapping RGMII link speed to clock rate John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 19/25] net: stmmac: provide set_clk_tx_rate() hook John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 20/25] net: stmmac: provide generic implementation for set_clk_tx_rate method John Madieu
2025-11-04 12:57   ` Pavel Machek
2025-11-04 19:42     ` John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 21/25] net: stmmac: provide stmmac_pltfr_find_clk() John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 22/25] net: stmmac: Add DWMAC glue layer for Renesas GBETH John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 23/25] arm64: dts: renesas: r9a09g047: Add GBETH nodes John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 24/25] arm64: dts: renesas: rzg3e-smarc-som: Enable eth{0-1} (GBETH) interfaces John Madieu
2025-11-03 11:35 ` [PATCH 6.1.y-cip 25/25] arm64: dts: renesas: r9a09g047: Enable Tx coe support John Madieu
2025-11-03 18:30 ` [PATCH 6.1.y-cip 00/25] Add RZ/G3E GBETH support Pavel Machek
2025-11-03 18:38   ` John Madieu
2025-11-06 19:15 ` Pavel Machek

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=aQn3uxHX0ebCjGta@duo.ucw.cz \
    --to=pavel@denx.de \
    --cc=cip-dev@lists.cip-project.org \
    --cc=john.madieu.xa@bp.renesas.com \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    /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