2 * Motload compatibility for the Emerson/Artesyn MVME7100
4 * Copyright 2016 Elettra-Sincrotrone Trieste S.C.p.A.
6 * Author: Alessio Igor Bogani <alessio.bogani@elettra.eu>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
20 #define TARGET_HAS_ETH1
21 #define TARGET_HAS_ETH2
22 #define TARGET_HAS_ETH3
29 static void mvme7100_fixups(void)
32 unsigned long busfreq = bd.bi_busfreq * 1000000;
34 dt_fixup_cpu_clocks(bd.bi_intfreq * 1000000, busfreq / 4, busfreq);
36 devp = finddevice("/soc@f1000000");
38 setprop(devp, "bus-frequency", &busfreq, sizeof(busfreq));
40 devp = finddevice("/soc/serial@4500");
42 setprop(devp, "clock-frequency", &busfreq, sizeof(busfreq));
44 dt_fixup_memory(bd.bi_memstart, bd.bi_memsize);
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);
52 void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
53 unsigned long r6, unsigned long r7)
57 serial_console_init();
58 platform_ops.fixups = mvme7100_fixups;