public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: jh80.chung@samsung.com
Cc: u-boot@lists.denx.de, sbabic@denx.de, tharvey@gateworks.com,
	marex@denx.de, aford173@gmail.com, ye.li@nxp.com,
	peng.fan@nxp.com, Fabio Estevam <festevam@denx.de>
Subject: [PATCH] power: imx8m-power-domain: Add delay to align with kernel driver
Date: Sat,  6 May 2023 13:14:02 -0300	[thread overview]
Message-ID: <20230506161402.2711105-1-festevam@gmail.com> (raw)

From: Fabio Estevam <festevam@denx.de>

In the imx8m power domain kernel driver, there is an extra udelay(5)
prior to requesting the domain to power up:

https://github.com/torvalds/linux/blob/v6.3/drivers/soc/imx/gpcv2.c#L347-L375

Haven't observed any issues due to the lack of this delay in U-Boot yet,
but better to align it with the kernel driver implementation.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
---
Changes since RFC:
- Added Marek's Reviewed-by tag.

 drivers/power/domain/imx8m-power-domain.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/power/domain/imx8m-power-domain.c b/drivers/power/domain/imx8m-power-domain.c
index 145f6ec0cd32..df5d7d695621 100644
--- a/drivers/power/domain/imx8m-power-domain.c
+++ b/drivers/power/domain/imx8m-power-domain.c
@@ -338,6 +338,9 @@ static int imx8m_power_domain_on(struct power_domain *power_domain)
 		}
 	}
 
+	/* delay for reset to propagate */
+	udelay(5);
+
 	if (domain->bits.pxx) {
 		/* request the domain to power up */
 		setbits_le32(base + regs->pup, domain->bits.pxx);
-- 
2.34.1


             reply	other threads:[~2023-05-06 16:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06 16:14 Fabio Estevam [this message]
2023-07-11 19:45 ` [PATCH] power: imx8m-power-domain: Add delay to align with kernel driver sbabic

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=20230506161402.2711105-1-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=aford173@gmail.com \
    --cc=festevam@denx.de \
    --cc=jh80.chung@samsung.com \
    --cc=marex@denx.de \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=tharvey@gateworks.com \
    --cc=u-boot@lists.denx.de \
    --cc=ye.li@nxp.com \
    /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