Hi Timothee,

Timothée Manaud wrote:
I'm new to this list, so Hello everyone!
I'm currently developping on a Coldfire M5234BCC, and after removing dBUG,
for U-Boot, the MDIO init wasnt done anymore.
So I either had to do mw.b 40100047 F0 1
to change the FEC/I2C Pin Assignment Register (PAR_FECI2C): IPSBAR +
0x10_0047 (8bits)
or add the following patch for the FEC driver.
If anyone can tell me what best: I've to submit patches for this plateform
(soon), but I'm quite new in the embedded linux, are there any guideline?

This list is the best place to send ColdFire related patches.
In terms of HOWTO, the best doco is the kernels:

  linux-2.6.x/Documentation/SubmittingPatches


--- uClinux-dist/linux-2.6.x/drivers/net/fec.c.new      2009-07-15
15:27:24.000000000 +0200
+++ uClinux-dist/linux-2.6.x/drivers/net/fec.c  2009-07-15
15:27:09.000000000 +0200

One tip, always diff with <old> before <new> :-)


@@ -1413,7 +1413,7 @@
        }
 #endif
-#if defined(CONFIG_M523x) || defined(CONFIG_M527x)
+#if defined(CONFIG_M527x)
        /* Set up gpio outputs for MII lines */
        {
                volatile u8 *gpio_par_fec;

This code has changed a bit in the current head. This setup
is actually now done in arch/m68knommu/platform/523x/config.c.
So I re-did this change as this patch:

diff -u -r1.13 config.c
--- arch/m68knommu/platform/523x/config.c       22 Jul 2009 12:52:37 -0000      
1.13
+++ arch/m68knommu/platform/523x/config.c       12 Aug 2009 06:09:50 -0000
@@ -121,6 +121,8 @@
 static void __init m523x_fec_init(void)
 {
        u32 imr;
+       u16 par;
+       u8 v;

        /* Unmask FEC interrupts at ColdFire interrupt controller */
        writeb(0x28, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_ICR0 + 23);
@@ -133,6 +135,12 @@
        imr = readl(MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL);
        imr &= ~0xff800001;
        writel(imr, MCF_IPSBAR + MCFICM_INTC0 + MCFINTC_IMRL);
+
+       /* Set multi-function pins to ethernet use */
+       par = readw(MCF_IPSBAR + 0x100082);
+       writew(par | 0xf00, MCF_IPSBAR + 0x100082);
+       v = readb(MCF_IPSBAR + 0x100078);
+       writeb(v | 0xc0, MCF_IPSBAR + 0x100078);
 }


/***************************************************************************/


Thanks
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     g...@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, 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