mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-01 22:07:21 +00:00
MPC5200: support setup 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. Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de> Acked-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
aa3511e422
commit
c512389cc4
1 changed files with 4 additions and 0 deletions
|
@ -119,7 +119,9 @@ void ft_cpu_setup(void *blob, bd_t *bd)
|
||||||
{
|
{
|
||||||
int div = in_8((void*)CFG_MBAR + 0x204) & 0x0020 ? 8 : 4;
|
int div = in_8((void*)CFG_MBAR + 0x204) & 0x0020 ? 8 : 4;
|
||||||
char * cpu_path = "/cpus/" OF_CPU;
|
char * cpu_path = "/cpus/" OF_CPU;
|
||||||
|
#ifdef CONFIG_MPC5xxx_FEC
|
||||||
char * eth_path = "/" OF_SOC "/ethernet@3000";
|
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, "timebase-frequency", OF_TBCLK, 1);
|
||||||
do_fixup_by_path_u32(blob, cpu_path, "bus-frequency", bd->bi_busfreq, 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, "bus-frequency", bd->bi_ipbfreq, 1);
|
||||||
do_fixup_by_path_u32(blob, "/" OF_SOC, "system-frequency",
|
do_fixup_by_path_u32(blob, "/" OF_SOC, "system-frequency",
|
||||||
bd->bi_busfreq*div, 1);
|
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, "mac-address", bd->bi_enetaddr, 6, 0);
|
||||||
do_fixup_by_path(blob, eth_path, "local-mac-address", bd->bi_enetaddr, 6, 0);
|
do_fixup_by_path(blob, eth_path, "local-mac-address", bd->bi_enetaddr, 6, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue