Hi Steven,

On 24/05/12 07:52, Steven King wrote:
The m5441x enet-fec aren't quite the same as the fec found on other Coldfire
parts, so we need a quirk to help the fec do the right thing and on the
twr-mcf5441x atleast, we need to force the phy into RMII mode.


Signed-off-by: Steven King<sfk...@fdwdc.com>
---
  arch/m68k/platform/coldfire/device.c |   19 +++++++++++++++++--
  1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/arch/m68k/platform/coldfire/device.c 
b/arch/m68k/platform/coldfire/device.c
index 11ecd23..ab88b69 100644
--- a/arch/m68k/platform/coldfire/device.c
+++ b/arch/m68k/platform/coldfire/device.c
@@ -13,6 +13,7 @@
  #include<linux/io.h>
  #include<linux/spi/spi.h>
  #include<linux/gpio.h>
+#include<linux/fec.h>
  #include<asm/traps.h>
  #include<asm/coldfire.h>
  #include<asm/mcfsim.h>
@@ -89,6 +90,18 @@ static struct platform_device mcf_uart = {
  };

  #ifdef CONFIG_FEC
+
+#ifdef CONFIG_M5441x
+#define FEC_NAME       "enet-fec"

So I see that the iMX guys have used a device type prefix here for
the fec name. Does it make any sense to use something like that
for the 5441x as well?  So "5441x-fec"?  Or will we just not
need to distinguish it this way?

Otherwise the patch looks good.

Regards
Greg


+static struct fec_platform_data fec_pdata = {
+       .phy            = PHY_INTERFACE_MODE_RMII,
+};
+#define FEC_PDATA      (&fec_pdata)
+#else
+#define FEC_NAME       "fec"
+#define FEC_PDATA      NULL
+#endif
+
  /*
   *    Some ColdFire cores contain the Fast Ethernet Controller (FEC)
   *    block. It is Freescale's own hardware block. Some ColdFires
@@ -118,10 +131,11 @@ static struct resource mcf_fec0_resources[] = {
  };

  static struct platform_device mcf_fec0 = {
-       .name                   = "fec",
+       .name                   = FEC_NAME,
        .id                     = 0,
        .num_resources          = ARRAY_SIZE(mcf_fec0_resources),
        .resource               = mcf_fec0_resources,
+       .dev.platform_data      = FEC_PDATA,
  };

  #ifdef MCFFEC_BASE1
@@ -149,10 +163,11 @@ static struct resource mcf_fec1_resources[] = {
  };

  static struct platform_device mcf_fec1 = {
-       .name                   = "fec",
+       .name                   = FEC_NAME,
        .id                     = 1,
        .num_resources          = ARRAY_SIZE(mcf_fec1_resources),
        .resource               = mcf_fec1_resources,
+       .dev.platform_data      = FEC_PDATA,
  };
  #endif /* MCFFEC_BASE1 */
  #endif /* CONFIG_FEC */





--
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     g...@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to