net: phy: Replace phy driver features u32 with link_mode bitmap
authorAndrew Lunn <andrew@lunn.ch>
Sat, 29 Sep 2018 21:04:16 +0000 (23:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Oct 2018 05:55:36 +0000 (22:55 -0700)
commit719655a149715f26fc4de904fe0aa83068bd5b9e
treedbdfdb37ec1f5ea39fe6f26215dbaabc6bb40d8d
parentd0939c26c53a2b2cecfbe6953858a58abb0158c7
net: phy: Replace phy driver features u32 with link_mode bitmap

This is one step in allowing phylib to make use of link_mode bitmaps,
instead of u32 for supported and advertised features. Convert the phy
drivers to use bitmaps to indicates the features they support.

Build bitmap equivalents of the u32 values at runtime, and have the
drivers point to the appropriate bitmap. These bitmaps are shared, and
we don't want a driver to modify them. So mark them __ro_after_init.

Within phylib, the features bitmap is currently turned back into a
u32. This will be removed once the whole of phylib, and the drivers
are converted to use bitmaps.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/pxa168_eth.c
drivers/net/phy/aquantia.c
drivers/net/phy/bcm63xx.c
drivers/net/phy/marvell.c
drivers/net/phy/marvell10g.c
drivers/net/phy/microchip_t1.c
drivers/net/phy/phy_device.c
include/linux/linkmode.h
include/linux/phy.h