]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
ppc4xx: fdt: Cleanup setup of cpu node setup
authorStefan Roese <sr@denx.de>
Tue, 18 Dec 2007 07:44:51 +0000 (08:44 +0100)
committerStefan Roese <sr@denx.de>
Thu, 27 Dec 2007 18:35:34 +0000 (19:35 +0100)
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: Stefan Roese <sr@denx.de>
cpu/ppc4xx/fdt.c
include/configs/kilauea.h
include/configs/sequoia.h

index f351b8bf3c02a88da105f18dd155e118e9d3c182..afcb9740685770a00cc6b30b222078fd2bd710a7 100644 (file)
@@ -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",
index bec9fde73aaa97b942530a8cb6d0e3acda9d3a56..f3e8601d850e94c1d0210e9443547fc89b29f58f 100644 (file)
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
 #define CONFIG_OF_BOARD_SETUP  1
-#define OF_CPU                 "cpu@0"
 
 #endif /* __CONFIG_H */
index 419ee7334981d5a6287187f3b88a884a25fe51e1..48a64e3fd839c7ddd47025e3c2629a07c6d54c61 100644 (file)
 /* pass open firmware flat tree */
 #define CONFIG_OF_LIBFDT       1
 #define CONFIG_OF_BOARD_SETUP  1
-#define OF_CPU                 "cpu@0"
 
 #endif /* __CONFIG_H */