Skip to contentSkip to conversation

mpc5200 without fec

PATCH New André Schwarz 3 participants 6 messages Mar 13, 2008 – Mar 25, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpc5200 without fec

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.

---

MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff_fec
Url: http://lists.denx.de/pipermail/u-boot/attachments/20080313/c2b3e8cd/attachment.txt

#1 lore raw

PATCH 1/1 mpc5200 without fec

Quoted 4 lines · Andr? Schwarz

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.

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.

Quoted 41 lines

---

MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

cpu/mpc5xxx/cpu.c +0 -1
 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 at 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.
 http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#2 lore raw

PATCH 1/1 mpc5200 without fec

Quoted 9 lines · Grant Likely
Quoted 5 lines · Andr? Schwarz

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.

Quoted 8 lines

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.

it fails - but not silently. If you don't care for the error messages on the console you don't need it.
I don't like _any_ error message :-)

After all it's not a board specific #ifdef ...

Quoted 31 lines
Quoted 31 lines

---

MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

cpu/mpc5xxx/cpu.c +0 -0
 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 at 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
Quoted 15 lines
Quoted 11 lines

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080313/c2ec8934/attachment.htm

#3 lore raw

PATCH 1/1 mpc5200 without fec

Quoted 6 lines · Andre Schwarz

it fails - but not silently. If you don't care for the error messages on
the console you don't need it.
I don't like _any_ error message :-)

After all it's not a board specific #ifdef ...

Okay then.

Wolfgang, can you please pick this one up?

Thanks,
g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#5 lore raw

PATCH 1/1 mpc5200 without fec

In reply to André Schwarz
Quoted 9 lines · In message <[email protected]> you wrote:

This is a multi-part message in MIME format. --------------090008080204070507060201
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

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.

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Things are not as simple as they seem at first.        - Edward Thorp
#4 lore raw

PATCH 1/1 mpc5200 without fec

In reply to Grant Likely
Quoted 6 lines · In message <[email protected]> you…

Okay then.

Wolfgang, can you please pick this one up?

Sure - done.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Every time history repeats itself the price goes up.