From: Igor Prusov <ivprusov@sberdevices.ru>
To: 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@lists.denx.de>,
<u-boot-amlogic@groups.io>,
<uboot-stm32@st-md-mailman.stormreply.com>
Subject: [PATCH v5 4/8] clk: amlogic: Move driver and ops structs
Date: Thu, 2 Nov 2023 15:20:13 +0300 [thread overview]
Message-ID: <20231102122017.56995-5-ivprusov@sberdevices.ru> (raw)
In-Reply-To: <20231102122017.56995-1-ivprusov@sberdevices.ru>
Move driver and ops structs to avoid forward declaration after switching
to dump in clk_ops.
Signed-off-by: Igor Prusov <ivprusov@sberdevices.ru>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
---
drivers/clk/meson/a1.c | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/clk/meson/a1.c b/drivers/clk/meson/a1.c
index 1075ba7333..e3fa9db7d0 100644
--- a/drivers/clk/meson/a1.c
+++ b/drivers/clk/meson/a1.c
@@ -601,14 +601,6 @@ static int meson_clk_set_parent(struct clk *clk, struct clk *parent_clk)
return meson_mux_set_parent_by_id(clk, parent_clk->id);
}
-static struct clk_ops meson_clk_ops = {
- .disable = meson_clk_disable,
- .enable = meson_clk_enable,
- .get_rate = meson_clk_get_rate,
- .set_rate = meson_clk_set_rate,
- .set_parent = meson_clk_set_parent,
-};
-
static int meson_clk_probe(struct udevice *dev)
{
struct meson_clk *priv = dev_get_priv(dev);
@@ -638,15 +630,6 @@ static const struct udevice_id meson_clk_ids[] = {
{ }
};
-U_BOOT_DRIVER(meson_clk) = {
- .name = "meson-clk-a1",
- .id = UCLASS_CLK,
- .of_match = meson_clk_ids,
- .priv_auto = sizeof(struct meson_clk),
- .ops = &meson_clk_ops,
- .probe = meson_clk_probe,
-};
-
static const char *meson_clk_get_name(struct clk *clk, int id)
{
const struct meson_clk_info *info;
@@ -727,3 +710,20 @@ int soc_clk_dump(void)
return 0;
}
+
+static struct clk_ops meson_clk_ops = {
+ .disable = meson_clk_disable,
+ .enable = meson_clk_enable,
+ .get_rate = meson_clk_get_rate,
+ .set_rate = meson_clk_set_rate,
+ .set_parent = meson_clk_set_parent,
+};
+
+U_BOOT_DRIVER(meson_clk) = {
+ .name = "meson-clk-a1",
+ .id = UCLASS_CLK,
+ .of_match = meson_clk_ids,
+ .priv_auto = sizeof(struct meson_clk),
+ .ops = &meson_clk_ops,
+ .probe = meson_clk_probe,
+};
--
2.34.1
next prev parent reply other threads:[~2023-11-02 12:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 12:20 [PATCH v5 0/8] clk: Switch from soc_clk_dump to clk_ops function Igor Prusov
2023-11-02 12:20 ` [PATCH v5 1/8] clk: zynq: Move soc_clk_dump to Zynq clock driver Igor Prusov
2023-11-02 12:20 ` [PATCH v5 2/8] clk: ast2600: Move soc_clk_dump function Igor Prusov
2023-11-02 12:20 ` [PATCH v5 3/8] clk: k210: " Igor Prusov
2023-11-02 12:20 ` Igor Prusov [this message]
2023-11-02 12:20 ` [PATCH v5 5/8] clk: Add dump operation to clk_ops Igor Prusov
2023-11-04 15:24 ` Sean Anderson
2023-11-04 18:09 ` Igor Prusov
2023-11-04 18:40 ` Sean Anderson
2023-11-04 18:46 ` Igor Prusov
2023-11-02 12:20 ` [PATCH v5 6/8] cmd: clk: Use dump function from clk_ops Igor Prusov
2023-11-04 15:23 ` Sean Anderson
2023-11-02 12:20 ` [PATCH v5 7/8] clk: treewide: switch to clock dump " Igor Prusov
2023-11-02 12:20 ` [PATCH v5 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=20231102122017.56995-5-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox