All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/3] arm: mxs: sanitize enet_out clock handling
@ 2013-01-29 14:46 ` Wolfram Sang
  0 siblings, 0 replies; 23+ messages in thread
From: Wolfram Sang @ 2013-01-29 14:46 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: netdev, Shawn Guo, Wolfram Sang

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

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2013-03-18  6:40 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-29 14:46 [RFC 0/3] arm: mxs: sanitize enet_out clock handling Wolfram Sang
2013-01-29 14:46 ` Wolfram Sang
2013-01-29 14:46 ` [RFC 1/3] net: freescale: fec: add support for optional enet_out clk Wolfram Sang
2013-01-29 14:46   ` Wolfram Sang
2013-01-30  5:25   ` Shawn Guo
2013-01-30  5:25     ` Shawn Guo
2013-01-31 15:12     ` Wolfram Sang
2013-01-31 15:12       ` Wolfram Sang
2013-01-29 14:46 ` [RFC 2/3] arm: mxs: add enet_out clock to devicetree Wolfram Sang
2013-01-29 14:46   ` Wolfram Sang
2013-01-29 14:46 ` [RFC 3/3] arm: mach-mxs: make enabling enet_out a legacy function Wolfram Sang
2013-01-29 14:46   ` Wolfram Sang
2013-01-30  5:48   ` Shawn Guo
2013-01-30  5:48     ` Shawn Guo
2013-01-30  7:58     ` Wolfram Sang
2013-01-30  7:58       ` Wolfram Sang
2013-01-30 12:29       ` Shawn Guo
2013-01-30 12:29         ` Shawn Guo
2013-03-15  5:30 ` [RFC 0/3] arm: mxs: sanitize enet_out clock handling Trent Piepho
2013-03-15 21:27 ` Trent Piepho
2013-03-15 21:27   ` Trent Piepho
2013-03-18  6:40   ` Shawn Guo
2013-03-18  6:40     ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.