From: Andrew Lunn <andrew@lunn.ch>
To: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: ethernet "bus" number in DTS ?
Date: Tue, 23 Oct 2018 19:08:54 +0200 [thread overview]
Message-ID: <20181023170854.GW26497@lunn.ch> (raw)
In-Reply-To: <88328977dfeaf667a98d791074b721fe730d285b.camel@infinera.com>
On Tue, Oct 23, 2018 at 04:49:59PM +0000, Joakim Tjernlund wrote:
> SPI (and others) has a way to define bus number in a aliases:
> aliases {
> ethernet4 = &enet4;
> ethernet0 = &enet0;
> ethernet1 = &enet1;
> ethernet2 = &enet2;
> ethernet3 = &enet3;
> spi0 = &spi0
> };
> The 0 in the spi0 alias will translate to bus num 0 so one can control the /dev nodes, like /dev/spidev0
> I am looking for the same for ethernet devices:
> ethernet4 = &enet4; /* should become eth4 */
> ethernet0 = &enet0; /* should become eth0 */
> but I cannot find something like that for eth devices.
>
> Could such functionality be added?
Hi Jocke
This has been discussed before. Take a look at
arch/arm/boot/dts/armada-38x.dtsi
/*
* As a special exception to the "order by
* register address" rule, the eth0 node is
* placed here to ensure that it gets
* registered as the first interface, since
* the network subsystem doesn't allow naming
* interfaces using DT aliases. Without this,
* the ordering of interfaces is different
* from the one used in U-Boot and the
* labeling of interfaces on the boards, which
* is very confusing for users.
*/
You should be able to find the discuss about this, and why aliases
cannot be used.
Andrew
prev parent reply other threads:[~2018-10-24 1:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-23 16:49 ethernet "bus" number in DTS ? Joakim Tjernlund
2018-10-23 17:03 ` Florian Fainelli
2018-10-23 18:02 ` Joakim Tjernlund
2018-10-23 18:20 ` Florian Fainelli
2018-10-23 20:02 ` Joakim Tjernlund
2018-10-23 20:07 ` Florian Fainelli
2018-10-23 22:15 ` Joakim Tjernlund
2018-10-24 6:22 ` Michal Suchánek
2018-10-26 13:00 ` Joakim Tjernlund
2018-10-26 22:57 ` Florian Fainelli
2018-10-28 18:25 ` Michal Suchánek
2018-10-23 17:08 ` Andrew Lunn [this message]
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=20181023170854.GW26497@lunn.ch \
--to=andrew@lunn.ch \
--cc=Joakim.Tjernlund@infinera.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.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).