Re: Forked android kernel development from linux kernel mainline

From: Florian Fainelli
Date: Thu Nov 11 2010 - 06:16:14 EST


Hello Roland,

Le Thursday 11 November 2010 01:33:38, Roland Dreier a écrit :
> > Isn't the openwrt stuff just drivers and some arch specific code?
> > Nothing that is core infrastructure, and nothing preventing them from
> > submitting the drivers and arch code if they want to, right?
>
> Actually openwrt has some core infrastructure for managing (ethernet)
> switches as extra-fancy multiport PHYs. That means that all the drivers
> in openwrt for the typical 5-8 port switches in home routers don't
> really apply to mainline.

This is called "swconfig" in OpenWrt and it works in two parts:

- a swconfig driver, which interfaces the getting and setting of switches
attributes using netlink, therefore there is an user-space counter-part

- the switch drivers are implemented as phylib drivers with a phylib fixup
callback to allow proper detection of these (you cannot alwasy simply read the
standard PHY ID), the config_init callback will set correct defaults for the
switch to be usable even without swconfig

The rationale behind swconfig comes from the fact that the Marvell DSA switch
infrastructure is both too complex and too-specific to driver relatively
simpler switches.

One could therefore just use the "phylib switch driver" without swconfig and
have it working.
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/