]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/net/mcf_fec.c
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.2-20200818' into staging
[mirror_qemu.git] / hw / net / mcf_fec.c
index bfa6b4bccefeacaf06e23500e00cd55f72a7725b..281345862c27f1ba78cee93f54bc591399662c67 100644 (file)
@@ -5,16 +5,19 @@
  *
  * 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>
-#include "exec/address-spaces.h"
 
 //#define DEBUG_FEC 1
 
@@ -389,7 +392,8 @@ static uint64_t mcf_fec_read(void *opaque, hwaddr addr,
     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;
     }
 }
@@ -489,7 +493,9 @@ static void mcf_fec_write(void *opaque, hwaddr addr,
         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);
 }
@@ -667,7 +673,7 @@ static void mcf_fec_class_init(ObjectClass *oc, void *data)
     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 = {