]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethoc: set up MII management bus clock
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 3 Feb 2014 23:33:10 +0000 (03:33 +0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Feb 2014 04:19:51 +0000 (20:19 -0800)
commitf523d071c0a313eb29788b6075bdf5393219dbdd
tree7b99892ca02dd681f538e6de9f99ca7dcf225931
parent10d0163c435bf5b8d7be6f01c1974fb338e4d4a6
net: ethoc: set up MII management bus clock

MII management bus clock is derived from the MAC clock by dividing it by
MIIMODER register CLKDIV field value. This value may need to be set up
in case it is undefined or its default value is too high (and
communication with PHY is too slow) or too low (and communication with
PHY is impossible). The value of CLKDIV is not specified directly, but
is derived from the MAC clock for the default MII management bus frequency
of 2.5MHz. The MAC clock may be specified in the platform data, or in
the 'clocks' device tree attribute.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ethoc.c
include/net/ethoc.h