[OpenWrt-Devel] b53 switch platform_data vs. device tree

Daniel Golle daniel at makrotopia.org
Fri Feb 6 14:16:32 EST 2015


Hi!

I started using Jonas' b53 driver for the Lamobo R1 board in OpenWrt.
To make things more convenient, I'd like to have the port mapping
inside the device-tree, so port enumeration would be consistent.
swconfig supports that (of_switch_load_portmap), apparently FONERA20N
is the only board making use of that feature for now.
Given the absurdity of the port mapping on the Lamobo R1 board, I'd
love to use the feature there as well:
    LAN    WAN
 (4 0 1 2) (3)

However, b53 doesn't implement OF support but rather still makes use of
platform_data.
Thus dev->of_node is unset for the b53 switches, and therefore
of_switch_load_portmap can't do the job right now :(

Are you planning on migrating from platform_data to device-tree any time
soon? Doing that for b53 doesn't look hard to me, however, from what I
can see, the only users of b53_platform_data are brcm63xx boards
VR-3025u, VR-3025un and WAP5813n. I never touched that platform
(nor any other broadcom target), thus it's hard for me to tell how far
away OpenWrt is from the pressumed goal of deprecating b53_platform_data.
Hacks such as assigning ethX aliases via platform_data could then be
replaced by semantically more pleasing ways to assign non-MDIO connected
b53 to a specific NIC.

I'm not interested in brcm63xx and don't have any such hardware flying
around. I can implement minimal OF support and make sure at least
dev->of_node is set. This shoudn't do any harm and would allow a
graceful migration path.

What do you think?


Cheers


Daniel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list