Skip to content
Snippets Groups Projects
Commit 328a3403 authored by Stefan Roese's avatar Stefan Roese
Browse files

ppc4xx: fdt: Cleanup setup of cpu node setup


Now the cpu node setup ("timebase-frequency" and "clock-frequency") is
without using the absolute path to the cpu node. This makes it possible
to use this U-Boot version with both versions of cpu-node naming
"cpu@0" and the former "PowerPC,440EPx@0".

Signed-off-by: default avatarStefan Roese <sr@denx.de>
parent 7812bc4a
No related branches found
No related tags found
No related merge requests found
......@@ -36,13 +36,14 @@ DECLARE_GLOBAL_DATA_PTR;
void ft_cpu_setup(void *blob, bd_t *bd)
{
char *cpu_path = "/cpus/" OF_CPU;
sys_info_t sys_info;
get_sys_info(&sys_info);
do_fixup_by_path_u32(blob, cpu_path, "timebase-frequency", bd->bi_intfreq, 1);
do_fixup_by_path_u32(blob, cpu_path, "clock-frequency", bd->bi_intfreq, 1);
do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, "timebase-frequency",
bd->bi_intfreq, 1);
do_fixup_by_prop_u32(blob, "device_type", "cpu", 4, "clock-frequency",
bd->bi_intfreq, 1);
do_fixup_by_path_u32(blob, "/plb", "clock-frequency", sys_info.freqPLB, 1);
do_fixup_by_path_u32(blob, "/plb/opb", "clock-frequency", sys_info.freqOPB, 1);
do_fixup_by_path_u32(blob, "/plb/opb/ebc", "clock-frequency",
......
......@@ -519,6 +519,5 @@
/* pass open firmware flat tree */
#define CONFIG_OF_LIBFDT 1
#define CONFIG_OF_BOARD_SETUP 1
#define OF_CPU "cpu@0"
#endif /* __CONFIG_H */
......@@ -492,6 +492,5 @@
/* pass open firmware flat tree */
#define CONFIG_OF_LIBFDT 1
#define CONFIG_OF_BOARD_SETUP 1
#define OF_CPU "cpu@0"
#endif /* __CONFIG_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment