1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#include "ops.h"
16#include "stdio.h"
17#include "cuboot.h"
18
19#define TARGET_86xx
20#define TARGET_HAS_ETH1
21#define TARGET_HAS_ETH2
22#define TARGET_HAS_ETH3
23#include "ppcboot.h"
24
25static bd_t bd;
26
27BSS_STACK(16384);
28
29static void mvme7100_fixups(void)
30{
31 void *devp;
32 unsigned long busfreq = bd.bi_busfreq * 1000000;
33
34 dt_fixup_cpu_clocks(bd.bi_intfreq * 1000000, busfreq / 4, busfreq);
35
36 devp = finddevice("/soc@f1000000");
37 if (devp)
38 setprop(devp, "bus-frequency", &busfreq, sizeof(busfreq));
39
40 devp = finddevice("/soc/serial@4500");
41 if (devp)
42 setprop(devp, "clock-frequency", &busfreq, sizeof(busfreq));
43
44 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
45
46 dt_fixup_mac_address_by_alias("ethernet0", bd.bi_enetaddr);
47 dt_fixup_mac_address_by_alias("ethernet1", bd.bi_enet1addr);
48 dt_fixup_mac_address_by_alias("ethernet2", bd.bi_enet2addr);
49 dt_fixup_mac_address_by_alias("ethernet3", bd.bi_enet3addr);
50}
51
52void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
53 unsigned long r6, unsigned long r7)
54{
55 CUBOOT_INIT();
56 fdt_init(_dtb_start);
57 serial_console_init();
58 platform_ops.fixups = mvme7100_fixups;
59}
60