[RFC 0/3] arm: mxs: sanitize enet_out clock handling

Wolfram Sang w.sang at pengutronix.de
Tue Jan 29 09:46:10 EST 2013


Handling enet_out on MX28 is cumbersome at the moment. Most boards need it
enabled and for that, they have to add code to mach-mxs.c (see sps1 as an
example). Since this is board specific, we better encode it in the devicetree,
that is the reason it was made for.

My proposal will overwrite the generic "clock" and "clock-names" properties
from imx28.dtsi in the board file. The original one has 2 entries, and boards
needing enet_out will overload it with three entries. The network driver will
enable the clock if it was specified. The old code enabling the clock will be
backward compatible but print a WARN if the legacy mode needs to be used.

This will make adding new board easier, since we don't have to touch mach-mxs.c
for this case. It scales much better.

Tested on a MX28EVK. Please review, comment, apply(?)

Thanks,

   Wolfram


Wolfram Sang (3):
  net: freescale: fec: add support for optional enet_out clk
  arm: mxs: add enet_out clock to devicetree
  arm: mach-mxs: make enabling enet_out a legacy function

 arch/arm/boot/dts/imx28-apf28.dts      |    3 +++
 arch/arm/boot/dts/imx28-apx4devkit.dts |    3 +++
 arch/arm/boot/dts/imx28-cfa10049.dts   |    3 +++
 arch/arm/boot/dts/imx28-evk.dts        |    3 +++
 arch/arm/boot/dts/imx28-sps1.dts       |    3 +++
 arch/arm/boot/dts/imx28-tx28.dts       |    3 +++
 arch/arm/mach-mxs/mach-mxs.c           |   24 ++++++++++++++++--------
 drivers/net/ethernet/freescale/fec.c   |   10 ++++++++++
 drivers/net/ethernet/freescale/fec.h   |    1 +
 9 files changed, 45 insertions(+), 8 deletions(-)

-- 
1.7.10.4




More information about the linux-arm-kernel mailing list