<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Grant Likely schrieb:
<blockquote
cite="mid:fa686aa40803130954m195d6b6br64cd102e4363bc34@mail.gmail.com"
type="cite">
<pre wrap="">On Thu, Mar 13, 2008 at 6:50 AM, André Schwarz
<a class="moz-txt-link-rfc2396E" href="mailto:andre.schwarz@matrix-vision.de"><andre.schwarz@matrix-vision.de></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">include fec specific nodes in ft_cpu_setup only if CONFIG_MPC5xxx_FEC is
defined. Systems without FEC, i.e. no fec node in dtb, should be possible.
Signed-off-by: Andre Schwarz <a class="moz-txt-link-rfc2396E" href="mailto:andre.schwarz@matrix-vision.de"><andre.schwarz@matrix-vision.de></a>
</pre>
</blockquote>
<pre wrap=""><!---->
Hmm; if there is no fec node; then won't this just fail silently? In
which case; I'd rather avoid adding more inline #ifdefs to the code.
(correct me if I'm wrong)
Cheers,
g.
</pre>
</blockquote>
it fails - but not silently. If you don't care for the error messages
on the console you don't need it.<br>
I don't like _any_ error message :-)<br>
<br>
After all it's not a board specific #ifdef ...<br>
<br>
<blockquote
cite="mid:fa686aa40803130954m195d6b6br64cd102e4363bc34@mail.gmail.com"
type="cite">
<pre wrap=""></pre>
<blockquote type="cite">
<pre wrap=""> ---
MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c
index e4d6168..dbfdd97 100644
--- a/cpu/mpc5xxx/cpu.c
+++ b/cpu/mpc5xxx/cpu.c
@@ -119,7 +119,9 @@ void ft_cpu_setup(void *blob, bd_t *bd)
{
int div = in_8((void*)CFG_MBAR + 0x204) & 0x0020 ? 8 : 4;
char * cpu_path = "/cpus/" OF_CPU;
+#ifdef CONFIG_MPC5xxx_FEC
char * eth_path = "/" OF_SOC "/ethernet@3000";
+#endif
do_fixup_by_path_u32(blob, cpu_path, "timebase-frequency", OF_TBCLK, 1);
do_fixup_by_path_u32(blob, cpu_path, "bus-frequency", bd->bi_busfreq, 1);
@@ -127,7 +129,9 @@ void ft_cpu_setup(void *blob, bd_t *bd)
do_fixup_by_path_u32(blob, "/" OF_SOC, "bus-frequency", bd->bi_ipbfreq, 1);
do_fixup_by_path_u32(blob, "/" OF_SOC, "system-frequency",
bd->bi_busfreq*div, 1);
+#ifdef CONFIG_MPC5xxx_FEC
do_fixup_by_path(blob, eth_path, "mac-address", bd->bi_enetaddr, 6, 0);
do_fixup_by_path(blob, eth_path, "local-mac-address", bd->bi_enetaddr, 6, 0);
+#endif
}
#endif
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
<a class="moz-txt-link-freetext" href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a>
_______________________________________________
U-Boot-Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:U-Boot-Users@lists.sourceforge.net">U-Boot-Users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/u-boot-users">https://lists.sourceforge.net/lists/listinfo/u-boot-users</a>
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<br>
<BR>
MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
<BR>
</body>
</html>