*
* This code is licensed under the GPL
*/
+
#include "qemu/osdep.h"
-#include "hw/hw.h"
+#include "qemu/log.h"
+#include "hw/irq.h"
#include "net/net.h"
+#include "qemu/module.h"
#include "hw/m68k/mcf.h"
#include "hw/m68k/mcf_fec.h"
#include "hw/net/mii.h"
+#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
/* For crc32 */
#include <zlib.h>
case 0x188: return s->emrbr;
case 0x200 ... 0x2e0: return s->mib[(addr & 0x1ff) / 4];
default:
- hw_error("mcf_fec_read: Bad address 0x%x\n", (int)addr);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad address 0x%" HWADDR_PRIX "\n",
+ __func__, addr);
return 0;
}
}
s->mib[(addr & 0x1ff) / 4] = value;
break;
default:
- hw_error("mcf_fec_write Bad address 0x%x\n", (int)addr);
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad address 0x%" HWADDR_PRIX "\n",
+ __func__, addr);
+ return;
}
mcf_fec_update(s);
}
dc->realize = mcf_fec_realize;
dc->desc = "MCF Fast Ethernet Controller network device";
dc->reset = mcf_fec_reset;
- dc->props = mcf_fec_properties;
+ device_class_set_props(dc, mcf_fec_properties);
}
static const TypeInfo mcf_fec_info = {