netduino2.c (d598911b6f5e7bf7bafb63b8e1d074729e94aca7) netduino2.c (e264d29de28c5b0be3d063307ce9fb613b427cc3)
1/*
2 * Netduino 2 Machine Model
3 *
4 * Copyright (c) 2014 Alistair Francis <alistair@alistair23.me>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 29 unchanged lines hidden (view full) ---

38 qdev_prop_set_string(dev, "cpu-model", "cortex-m3");
39 object_property_set_bool(OBJECT(dev), true, "realized", &err);
40 if (err != NULL) {
41 error_report("%s", error_get_pretty(err));
42 exit(1);
43 }
44}
45
1/*
2 * Netduino 2 Machine Model
3 *
4 * Copyright (c) 2014 Alistair Francis <alistair@alistair23.me>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

--- 29 unchanged lines hidden (view full) ---

38 qdev_prop_set_string(dev, "cpu-model", "cortex-m3");
39 object_property_set_bool(OBJECT(dev), true, "realized", &err);
40 if (err != NULL) {
41 error_report("%s", error_get_pretty(err));
42 exit(1);
43 }
44}
45
46static QEMUMachine netduino2_machine = {
47 .name = "netduino2",
48 .desc = "Netduino 2 Machine",
49 .init = netduino2_init,
50};
51
52static void netduino2_machine_init(void)
46static void netduino2_machine_init(MachineClass *mc)
53{
47{
54 qemu_register_machine(&netduino2_machine);
48 mc->desc = "Netduino 2 Machine";
49 mc->init = netduino2_init;
55}
56
50}
51
57machine_init(netduino2_machine_init);
52DEFINE_MACHINE("netduino2", netduino2_machine_init)