]> git.baikalelectronics.ru Git - kernel.git/commit
net: macb: shrink macb_platform_data structure
authorNicolas Ferre <nicolas.ferre@microchip.com>
Fri, 3 May 2019 10:36:58 +0000 (12:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 May 2019 14:26:15 +0000 (10:26 -0400)
commitb4698998a28f2bc7c4fea02ca25980e1e1eaf6fc
treedcb3e4bfbc775efba2c09c210b40923fd370077f
parent38e62620c0346d161859b5cd7a42b6dd2d96c902
net: macb: shrink macb_platform_data structure

This structure was used intensively for machine specific values
when DT was not used. Since the removal of AVR32 from the kernel,
this structure is only used for passing clocks from PCI macb wrapper, all
other fields being 0.
All other known platforms use DT.

Remove the leftovers but make sure that PCI macb still works as
expected by using default values:
- phydev->irq is set to PHY_POLL by mdiobus_alloc()
- mii_bus->phy_mask is cleared while allocating it
- bp->phy_interface is set to PHY_INTERFACE_MODE_MII if mode not found
in DT.

This simplifies driver probe path and particularly phy handling.

Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb_main.c
include/linux/platform_data/macb.h