net: axienet: Enable more clocks
authorRobert Hancock <robert.hancock@calian.com>
Fri, 26 Mar 2021 00:04:38 +0000 (18:04 -0600)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Mar 2021 22:17:17 +0000 (15:17 -0700)
commitb11bfb9a19f9d790eea10cbd338b6b7f086c6dca
treecba9ceadaf439408c6d5e10fe8e4636ddb004d9e
parenta0e55dcd2fa9198fae0e9e088a65d36897748760
net: axienet: Enable more clocks

This driver was only enabling the first clock on the device, regardless
of its name. However, this controller logic can have multiple clocks
which should all be enabled. Add support for enabling additional clocks.
The clock names used are matching those used in the Xilinx version of this
driver as well as the Xilinx device tree generator, except for mgt_clk
which is not present there.

For backward compatibility, if no named clocks are present, the first
clock present is used for determining the MDIO bus clock divider.

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_axienet.h
drivers/net/ethernet/xilinx/xilinx_axienet_main.c
drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c