0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include "ops.h"
0011 #include "stdio.h"
0012 #include "cuboot.h"
0013
0014 #define TARGET_8xx
0015 #define TARGET_HAS_ETH1
0016 #include "ppcboot.h"
0017
0018 static bd_t bd;
0019
0020 static void platform_fixups(void)
0021 {
0022 void *node;
0023
0024 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
0025 dt_fixup_mac_addresses(bd.bi_enetaddr, bd.bi_enet1addr);
0026 dt_fixup_cpu_clocks(bd.bi_intfreq, bd.bi_busfreq / 16, bd.bi_busfreq);
0027
0028 node = finddevice("/soc/cpm");
0029 if (node)
0030 setprop(node, "clock-frequency", &bd.bi_busfreq, 4);
0031
0032 node = finddevice("/soc/cpm/brg");
0033 if (node)
0034 setprop(node, "clock-frequency", &bd.bi_busfreq, 4);
0035 }
0036
0037 void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
0038 unsigned long r6, unsigned long r7)
0039 {
0040 CUBOOT_INIT();
0041 fdt_init(_dtb_start);
0042 serial_console_init();
0043 platform_ops.fixups = platform_fixups;
0044 }