From: Igor Prusov <ivprusov@sberdevices.ru>
To: <u-boot@lists.denx.de>, Michal Simek <michal.simek@amd.com>,
Daniel Schwierzeck <daniel.schwierzeck@gmail.com>,
Lukasz Majewski <lukma@denx.de>,
Sean Anderson <seanga2@gmail.com>,
Ryan Chen <ryan_chen@aspeedtech.com>,
Chia-Wei Wang <chiawei_wang@aspeedtech.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Stefan Roese <sr@denx.de>,
Patrick Delaunay <patrick.delaunay@foss.st.com>,
Patrice Chotard <patrice.chotard@foss.st.com>
Cc: <prusovigor@gmail.com>, <kernel@sberdevices.ru>,
Igor Prusov <ivprusov@sberdevices.ru>,
Aspeed BMC SW team <BMC-SW@aspeedtech.com>,
Joel Stanley <joel@jms.id.au>, <u-boot-amlogic@groups.io>,
<uboot-stm32@st-md-mailman.stormreply.com>
Subject: [PATCH v6 2/8] clk: ast2600: Move soc_clk_dump function
Date: Sun, 5 Nov 2023 11:38:03 +0300 [thread overview]
Message-ID: <20231105083809.3293-3-ivprusov@sberdevices.ru> (raw)
In-Reply-To: <20231105083809.3293-1-ivprusov@sberdevices.ru>
Move clock dump function to avoid forward declaration after switching to
dump in clk_ops.
Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru>
---
drivers/clk/aspeed/clk_ast2600.c | 70 ++++++++++++++++----------------
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/clk/aspeed/clk_ast2600.c b/drivers/clk/aspeed/clk_ast2600.c
index e5ada5b6d4..b3cc8392fa 100644
--- a/drivers/clk/aspeed/clk_ast2600.c
+++ b/drivers/clk/aspeed/clk_ast2600.c
@@ -1104,41 +1104,6 @@ static int ast2600_clk_enable(struct clk *clk)
return 0;
}
-struct clk_ops ast2600_clk_ops = {
- .get_rate = ast2600_clk_get_rate,
- .set_rate = ast2600_clk_set_rate,
- .enable = ast2600_clk_enable,
-};
-
-static int ast2600_clk_probe(struct udevice *dev)
-{
- struct ast2600_clk_priv *priv = dev_get_priv(dev);
-
- priv->scu = devfdt_get_addr_ptr(dev);
- if (IS_ERR(priv->scu))
- return PTR_ERR(priv->scu);
-
- ast2600_init_rgmii_clk(priv->scu, &rgmii_clk_defconfig);
- ast2600_init_rmii_clk(priv->scu, &rmii_clk_defconfig);
- ast2600_configure_mac12_clk(priv->scu);
- ast2600_configure_mac34_clk(priv->scu);
- ast2600_configure_rsa_ecc_clk(priv->scu);
-
- return 0;
-}
-
-static int ast2600_clk_bind(struct udevice *dev)
-{
- int ret;
-
- /* The reset driver does not have a device node, so bind it here */
- ret = device_bind_driver(gd->dm_root, "ast_sysreset", "reset", &dev);
- if (ret)
- debug("Warning: No reset driver: ret=%d\n", ret);
-
- return 0;
-}
-
struct aspeed_clks {
ulong id;
const char *name;
@@ -1203,6 +1168,41 @@ int soc_clk_dump(void)
return 0;
}
+struct clk_ops ast2600_clk_ops = {
+ .get_rate = ast2600_clk_get_rate,
+ .set_rate = ast2600_clk_set_rate,
+ .enable = ast2600_clk_enable,
+};
+
+static int ast2600_clk_probe(struct udevice *dev)
+{
+ struct ast2600_clk_priv *priv = dev_get_priv(dev);
+
+ priv->scu = devfdt_get_addr_ptr(dev);
+ if (IS_ERR(priv->scu))
+ return PTR_ERR(priv->scu);
+
+ ast2600_init_rgmii_clk(priv->scu, &rgmii_clk_defconfig);
+ ast2600_init_rmii_clk(priv->scu, &rmii_clk_defconfig);
+ ast2600_configure_mac12_clk(priv->scu);
+ ast2600_configure_mac34_clk(priv->scu);
+ ast2600_configure_rsa_ecc_clk(priv->scu);
+
+ return 0;
+}
+
+static int ast2600_clk_bind(struct udevice *dev)
+{
+ int ret;
+
+ /* The reset driver does not have a device node, so bind it here */
+ ret = device_bind_driver(gd->dm_root, "ast_sysreset", "reset", &dev);
+ if (ret)
+ debug("Warning: No reset driver: ret=%d\n", ret);
+
+ return 0;
+}
+
static const struct udevice_id ast2600_clk_ids[] = {
{ .compatible = "aspeed,ast2600-scu", },
{ },
--
2.34.1
next prev parent reply other threads:[~2023-11-05 8:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-05 8:38 [PATCH v6 0/8] clk: Switch from soc_clk_dump to clk_ops function Igor Prusov
2023-11-05 8:38 ` [PATCH v6 1/8] clk: zynq: Move soc_clk_dump to Zynq clock driver Igor Prusov
2023-11-05 8:38 ` Igor Prusov [this message]
2023-11-05 8:38 ` [PATCH v6 3/8] clk: k210: Move soc_clk_dump function Igor Prusov
2023-11-05 8:38 ` [PATCH v6 4/8] clk: amlogic: Move driver and ops structs Igor Prusov
2023-11-05 8:38 ` [PATCH v6 5/8] clk: Add dump operation to clk_ops Igor Prusov
2023-11-08 16:59 ` Sean Anderson
2023-11-05 8:38 ` [PATCH v6 6/8] cmd: clk: Use dump function from clk_ops Igor Prusov
2023-11-08 16:59 ` Sean Anderson
2023-11-05 8:38 ` [PATCH v6 7/8] clk: treewide: switch to clock dump " Igor Prusov
2023-11-08 17:02 ` Sean Anderson
2023-11-09 10:38 ` Igor Prusov
2023-11-05 8:38 ` [PATCH v6 8/8] cmd: clk: Make soc_clk_dump static Igor Prusov
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=20231105083809.3293-3-ivprusov@sberdevices.ru \
--to=ivprusov@sberdevices.ru \
--cc=BMC-SW@aspeedtech.com \
--cc=chiawei_wang@aspeedtech.com \
--cc=daniel.schwierzeck@gmail.com \
--cc=joel@jms.id.au \
--cc=kernel@sberdevices.ru \
--cc=lukma@denx.de \
--cc=michal.simek@amd.com \
--cc=neil.armstrong@linaro.org \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@foss.st.com \
--cc=prusovigor@gmail.com \
--cc=ryan_chen@aspeedtech.com \
--cc=seanga2@gmail.com \
--cc=sr@denx.de \
--cc=u-boot-amlogic@groups.io \
--cc=u-boot@lists.denx.de \
--cc=uboot-stm32@st-md-mailman.stormreply.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 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.