From: Frank Wunderlich <linux@fw-web.de>
To: u-boot@lists.denx.de
Subject: [PATCH 3/5] reset: add basic reset controller for pciesys
Date: Mon, 10 Aug 2020 16:58:49 +0200 [thread overview]
Message-ID: <20200810145851.43381-4-linux@fw-web.de> (raw)
In-Reply-To: <20200810145851.43381-1-linux@fw-web.de>
From: Frank Wunderlich <frank-w@public-files.de>
bind reset controller to pciesys
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
drivers/clk/mediatek/clk-mt7622.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
index bd86b5b974..95c5232957 100644
--- a/drivers/clk/mediatek/clk-mt7622.c
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -594,6 +594,20 @@ static int mt7622_pciesys_probe(struct udevice *dev)
return mtk_common_clk_gate_init(dev, &mt7622_clk_tree, pcie_cgs);
}
+static int mt7622_pciesys_bind(struct udevice *dev)
+{
+ int ret = 0;
+
+#if CONFIG_IS_ENABLED(RESET_MEDIATEK)
+// PCIESYS uses in linux also 0x34 = ETHSYS reset controller
+ ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1);
+ if (ret)
+ debug("Warning: failed to bind reset controller\n");
+#endif
+
+ return ret;
+}
+
static int mt7622_ethsys_probe(struct udevice *dev)
{
return mtk_common_clk_gate_init(dev, &mt7622_clk_tree, eth_cgs);
@@ -710,6 +724,7 @@ U_BOOT_DRIVER(mtk_clk_pciesys) = {
.id = UCLASS_CLK,
.of_match = mt7622_pciesys_compat,
.probe = mt7622_pciesys_probe,
+ .bind = mt7622_pciesys_bind,
.priv_auto_alloc_size = sizeof(struct mtk_cg_priv),
.ops = &mtk_clk_gate_ops,
};
--
2.25.1
next prev parent reply other threads:[~2020-08-10 14:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 14:58 [PATCH 0/5] add SATA/AHCI support for BananaPi R64 Frank Wunderlich
2020-08-10 14:58 ` [PATCH 1/5] arm: dts: mt7622: add SATA reset constants Frank Wunderlich
2020-08-10 14:58 ` [PATCH 2/5] phy: mtk-tphy: add PHY_TYPE_SATA Frank Wunderlich
2020-08-10 14:58 ` Frank Wunderlich [this message]
2020-08-10 14:58 ` [PATCH 4/5] ahci: mediatek: add ahci driver Frank Wunderlich
2020-08-10 14:58 ` [PATCH 5/5] dts: r64: add sata- and asm_sel nodes Frank Wunderlich
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=20200810145851.43381-4-linux@fw-web.de \
--to=linux@fw-web.de \
--cc=u-boot@lists.denx.de \
/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.