From: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
To: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "Linus Walleij"
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"Vivien Didelot"
<vivien.didelot-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Antti Seppälä"
<a.seppala-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Roman Yeryomin" <roman-9zmcapQ0v8Q@public.gmane.org>,
"Colin Leitner"
<colin.leitner-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>,
"Gabor Juhos" <juhosg-p3rKhJxN3npAfugRpC6u6w@public.gmane.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs
Date: Thu, 30 Nov 2017 00:36:54 +0100 [thread overview]
Message-ID: <20171129233654.GA7483@lunn.ch> (raw)
In-Reply-To: <f9bfa1e1-7f05-1e2b-6663-09d4d3bf6a12-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> While Andrew's suggestion to use of_mdiobus_register() even for the
> built-in DSA created slave_mii_bus makes sense, I would rather recommend
> you instantiate your own bus (ala mv88e6xxx), such that your DT will
> likely look like:
Hi Florian
I could still look like this, if the built in slave_mii_bus looked for
the mdio node.
Something like:
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 44e3fb7dec8c..6b64c09413bf 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -312,6 +312,7 @@ static void dsa_port_teardown(struct dsa_port *dp)
static int dsa_switch_setup(struct dsa_switch *ds)
{
+ struct device_node *node;
int err;
/* Initialize ds->phys_mii_mask before registering the slave MDIO bus
@@ -347,7 +348,11 @@ static int dsa_switch_setup(struct dsa_switch *ds)
dsa_slave_mii_bus_init(ds);
- err = mdiobus_register(ds->slave_mii_bus);
+ if (ds->dev->of_node &&
+ node = of_get_child_by_name(pdev->dev.of_node, "mdio"))
+ err = of_mdiobus_register(ds->slave_mii_bus, node);
+ else
+ err = mdiobus_register(ds->slave_mii_bus);
if (err < 0)
return err;
}
Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-11-29 23:36 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-05 23:19 [PATCH 0/4] RFC: Realtek 83xx SMI driver core Linus Walleij
2017-11-05 23:19 ` [PATCH 1/4] RFC: net/dsa: Allow DSA PHYs to define link IRQs Linus Walleij
2017-11-05 23:19 ` [PATCH 2/4] RFC: net: phy: realtek: Support RTL8366RB variant Linus Walleij
2017-11-05 23:19 ` [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs Linus Walleij
2017-11-05 23:48 ` Andrew Lunn
[not found] ` <20171105234831.GA24822-g2DYL2Zd6BY@public.gmane.org>
2017-11-29 12:24 ` Linus Walleij
2017-11-29 15:56 ` Andrew Lunn
2017-11-29 21:28 ` Linus Walleij
[not found] ` <CACRpkdZVXgFMiHpyUqw7ONYDcq6Htn3rTMRaBJkzd6T3WtX36A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-29 21:48 ` Florian Fainelli
2017-11-29 21:56 ` Andrew Lunn
[not found] ` <20171129215659.GC1706-g2DYL2Zd6BY@public.gmane.org>
2017-11-29 23:19 ` Linus Walleij
2017-11-29 23:26 ` Florian Fainelli
[not found] ` <f9bfa1e1-7f05-1e2b-6663-09d4d3bf6a12-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-29 23:36 ` Andrew Lunn [this message]
2017-12-02 12:56 ` Linus Walleij
[not found] ` <CACRpkdYoMVNh8eaTnaDQ59bsh4bC88biLaYSXyhnc4W83PMWzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-04 22:50 ` Andrew Lunn
2017-11-05 23:19 ` [PATCH 4/4] RFC: net: dsa: realtek-smi: Add Realtek SMI driver Linus Walleij
2017-11-05 23:59 ` Andrew Lunn
2017-11-06 8:25 ` Linus Walleij
2017-11-09 12:49 ` Roman Yeryomin
2017-11-09 13:24 ` Andrew Lunn
2017-11-09 15:11 ` Roman Yeryomin
2017-11-09 15:38 ` Andrew Lunn
2017-11-09 17:21 ` Roman Yeryomin
2017-11-09 17:24 ` Andrew Lunn
2017-11-09 18:08 ` Florian Fainelli
2017-11-10 8:16 ` Linus Walleij
2017-11-10 12:05 ` Roman Yeryomin
2017-11-10 12:02 ` Roman Yeryomin
2017-11-10 13:51 ` Andrew Lunn
2017-11-10 12:17 ` Egil Hjelmeland
2017-11-10 14:01 ` Andrew Lunn
2018-04-02 16:10 ` [PATCH 0/4] RFC: Realtek 83xx SMI driver core Carl-Daniel Hailfinger
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=20171129233654.GA7483@lunn.ch \
--to=andrew-g2dyl2zd6by@public.gmane.org \
--cc=a.seppala-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=colin.leitner-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=juhosg-p3rKhJxN3npAfugRpC6u6w@public.gmane.org \
--cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roman-9zmcapQ0v8Q@public.gmane.org \
--cc=vivien.didelot-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).