net: phy: micrel: add generic clock-mode-select support
commit63f44b2bfccdd98193bbd602747f780c0fae0f02
authorJohan Hovold <johan@kernel.org>
Wed, 19 Nov 2014 11:59:18 +0000 (19 12:59 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Nov 2014 19:08:56 +0000 (21 14:08 -0500)
treeef8014fc235bcd828034384706fbd34195e675ea
parent0f95903ef60868a1aba0f9fb2e61419fc3a697f2
net: phy: micrel: add generic clock-mode-select support

Add generic RMII-Reference-Clock-Select support.

Several Micrel PHY have an RMII-Reference-Clock-Select bit to select
25 MHz or 50 MHz clock mode. Recently, support for configuring this
through device tree for KSZ8021 and KSZ8031 was added.

Generalise this support so that it can be configured for other PHY types
as well.

Note that some PHY revisions (of the same type) has this bit inverted.
This should be either configurable through a new device-tree property,
or preferably, determined based on PHY ID if possible.

Also note that this removes support for setting 25 MHz mode from board
files which was also added by the above mentioned commit 45f56cb82e45
("net/phy: micrel: Add clock support for KSZ8021/KSZ8031").

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/micrel.c
include/linux/micrel_phy.h