Hi John,
Adamson, John wrote:
This message has two purposes:
1) to check and see if uclinux-dev is up and accepting messages and
2) summarizing the resolution to a problem with the hope that it helps someone
else.
My apologies if the logjam suddenly clears and my previous messages make it through...my mail client assures me that it has given up on them completely.
I'm in the process of bringing up the latest uClinux-dist-20080808 and 2.6 kernel on my hardware and was having networking problems. The hardware is a near duplicate to the M5272C3, so I configure uClinux as such. A critical piece, however, is the absence of Freescale's dBug bootloader on my hardware. I'm using a custom bootloader.
I modified fec.c (temporarily) so that it gets the MAC address from fec.c rather than reading a location in the dBug flash.
At that point, the board was coming up, but printing a "No phy device found" message. Skipping to the solution, it turns out that the M5272C3 config of uClinux does not set the GPIO pins for the FEC, apparently relying on the bootloader to do this.
I'm not sure where general opinion lies regarding how 'standalone' the configured uClinux image should be, and I suppose it could also be argued that I'm not really running on a M5272C3 if, by definition, the M5272C3 includes dBug. If the intent is to make the image as independent of the bootloader as possible, then I've included a proposed change to the 5272 config.c file below.
There are probably better CONFIG switches to use, perhaps a combination of
CONFIG_5272 and whatever gets set when the Coldfire FEC is enabled? I'm afraid
I'm still trying to sort out the config routines.
John (not Adam <G>)
--- uClinux-dist/linux-2.6.x/arch/m68knommu/platform/5272/config.c
2008-06-19 21:22:23.000000000 -0400
+++ uClinux-changes/linux-2.6.x/arch/m68knommu/platform/5272/config.c
2008-08-27 14:21:53.000000000 -0400
@@ -143,6 +143,13 @@ void __init config_BSP(char *commandp, i
/* Copy command line from FLASH to local buffer... */
memcpy(commandp, (char *) 0xf0010000, size);
commandp[size-1] = 0;
+#elif defined(CONFIG_M5272C3)
+ u32 v;
+
+ /* Enable the lines for the FEC */
+ v = readl(MCF_MBAR + MCFSIM_PBCNT);
+ v = (v & ~0xffff0000) | 0x55550000;
+ writel(v, MCF_MBAR + MCFSIM_PBCNT);
#endif
mcf_timervector = 69;
For most other board types this is currently handled in fec.c
itself. To be consistent with those I would put the above code
in CONFIG_M5272 specific fec_request_intrs() function. So I have
gone ahead and put it there.
Ultimately I plan on moving this type of board specific setup
into the separate config.c files. (I have already done this
for the serial port support - just haven't gotten around to
the ethernet ports yet).
Ofcourse if you feel brave you code code this up now, using
the serial port setup code in arch/m68knommu/platform/5272/config.c
as an example :-)
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Chief Software Dude EMAIL: [EMAIL PROTECTED]
Secure Computing Corporation 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
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev