1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Motload compatibility for the Emerson/Artesyn MVME7100
5 * Copyright 2016 Elettra-Sincrotrone Trieste S.C.p.A.
7 * Author: Alessio Igor Bogani <alessio.bogani@elettra.eu>
15 #define TARGET_HAS_ETH1
16 #define TARGET_HAS_ETH2
17 #define TARGET_HAS_ETH3
24 static void mvme7100_fixups(void)
27 unsigned long busfreq
= bd
.bi_busfreq
* 1000000;
29 dt_fixup_cpu_clocks(bd
.bi_intfreq
* 1000000, busfreq
/ 4, busfreq
);
31 devp
= finddevice("/soc@f1000000");
33 setprop(devp
, "bus-frequency", &busfreq
, sizeof(busfreq
));
35 devp
= finddevice("/soc/serial@4500");
37 setprop(devp
, "clock-frequency", &busfreq
, sizeof(busfreq
));
39 dt_fixup_memory(bd
.bi_memstart
, bd
.bi_memsize
);
41 dt_fixup_mac_address_by_alias("ethernet0", bd
.bi_enetaddr
);
42 dt_fixup_mac_address_by_alias("ethernet1", bd
.bi_enet1addr
);
43 dt_fixup_mac_address_by_alias("ethernet2", bd
.bi_enet2addr
);
44 dt_fixup_mac_address_by_alias("ethernet3", bd
.bi_enet3addr
);
47 void platform_init(unsigned long r3
, unsigned long r4
, unsigned long r5
,
48 unsigned long r6
, unsigned long r7
)
52 serial_console_init();
53 platform_ops
.fixups
= mvme7100_fixups
;