All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akshay Belsare <akshay.belsare@amd.com>
To: <u-boot@lists.u-boot-project.org>, <michal.simek@amd.com>
Cc: <git@amd.com>, <padmarao.begari@amd.com>,
	Akshay Belsare <akshay.belsare@amd.com>,
	Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>
Subject: [PATCH 1/2] reset: zynqmp: move reset assert helper into firmware driver
Date: Thu, 20 Aug 2026 21:02:38 +0530	[thread overview]
Message-ID: <20260820153258.261076-2-akshay.belsare@amd.com> (raw)
In-Reply-To: <20260820153258.261076-1-akshay.belsare@amd.com>

zynqmp_pm_reset_assert() is currently implemented in the reset driver,
requiring reset-zynqmp.c to invoke the PM firmware interface directly.
 
Move the helper into firmware-zynqmp.c and expose it through the
firmware layer instead. Since reset assertion has no non-firmware
implementation, this keeps the firmware-specific logic localized to the
firmware driver and simplifies the reset driver.

Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
---
 drivers/firmware/firmware-zynqmp.c | 7 +++++++
 drivers/reset/reset-zynqmp.c       | 7 -------
 include/zynqmp_firmware.h          | 2 ++
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index fae66ccb3d8..9f5556751be 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -175,6 +175,13 @@ unsigned int zynqmp_firmware_version(void)
 	return pm_api_version;
 };
 
+int zynqmp_pm_reset_assert(const u32 reset,
+			   const enum zynqmp_pm_reset_action assert_flag)
+{
+	return xilinx_pm_request(PM_RESET_ASSERT, reset, assert_flag, 0, 0,
+				 0, 0, NULL);
+}
+
 #if defined(CONFIG_ARCH_VERSAL2)
 /*
  * Poll the M-PHY TX/RX config-ready status until it settles or @timeout_us
diff --git a/drivers/reset/reset-zynqmp.c b/drivers/reset/reset-zynqmp.c
index 2b58f3a75b4..eb2f6d0bdfe 100644
--- a/drivers/reset/reset-zynqmp.c
+++ b/drivers/reset/reset-zynqmp.c
@@ -18,13 +18,6 @@ struct zynqmp_reset_priv {
 	u32 nr_reset;
 };
 
-static int zynqmp_pm_reset_assert(const u32 reset,
-				  const enum zynqmp_pm_reset_action assert_flag)
-{
-	return xilinx_pm_request(PM_RESET_ASSERT, reset, assert_flag, 0, 0,
-				 0, 0, NULL);
-}
-
 static int zynqmp_reset_assert(struct reset_ctl *rst)
 {
 	struct zynqmp_reset_priv *priv = dev_get_priv(rst->dev);
diff --git a/include/zynqmp_firmware.h b/include/zynqmp_firmware.h
index f753a67ac27..86f3ccf8932 100644
--- a/include/zynqmp_firmware.h
+++ b/include/zynqmp_firmware.h
@@ -463,6 +463,8 @@ int zynqmp_pm_set_gem_config(u32 node, enum pm_gem_config_type config,
 int zynqmp_pm_is_function_supported(const u32 api_id, const u32 id);
 int zynqmp_mmio_read(const u32 address, u32 *value);
 int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
+int zynqmp_pm_reset_assert(const u32 reset,
+			   const enum zynqmp_pm_reset_action assert_flag);
 int zynqmp_pm_feature(const u32 api_id);
 u32 zynqmp_pm_get_bootmode_reg(void);
 u32 zynqmp_pm_get_pmc_multi_boot_reg(void);
-- 
2.34.1


  reply	other threads:[~2026-08-20 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 15:32 [PATCH 0/2] reset: zynqmp: move reset_assert() into firmware driver Akshay Belsare
2026-08-20 15:32 ` Akshay Belsare [this message]
2026-08-20 15:32 ` [PATCH 2/2] board: xilinx: zynqmp: use reset assert helper in reset_cpu() Akshay Belsare

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=20260820153258.261076-2-akshay.belsare@amd.com \
    --to=akshay.belsare@amd.com \
    --cc=git@amd.com \
    --cc=michal.simek@amd.com \
    --cc=padmarao.begari@amd.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.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 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.