diff --git a/hw/arm/bcm2835_dma.c b/hw/arm/bcm2835_dma.c
index 269af62..0b98d8c 100644
--- a/hw/arm/bcm2835_dma.c
+++ b/hw/arm/bcm2835_dma.c
@@ -4,8 +4,6 @@
  */
 
 #include "hw/sysbus.h"
-#include "qemu-common.h"
-#include "hw/qdev.h"
 
 /* DMA CS Control and Status bits */
 #define BCM2708_DMA_ACTIVE      (1 << 0)
@@ -322,7 +320,7 @@ static const MemoryRegionOps bcm2835_dma15_ops = {
 };
 
 static const VMStateDescription vmstate_bcm2835_dma = {
-    .name = "bcm2835_dma",
+    .name = TYPE_BCM2835_DMA,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -366,7 +364,7 @@ static void bcm2835_dma_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_dma_info = {
-    .name          = "bcm2835_dma",
+    .name          = TYPE_BCM2835_DMA,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_dma_state),
     .class_init    = bcm2835_dma_class_init,
diff --git a/hw/arm/bcm2835_emmc.c b/hw/arm/bcm2835_emmc.c
index d22520c..8fdfeb3 100644
--- a/hw/arm/bcm2835_emmc.c
+++ b/hw/arm/bcm2835_emmc.c
@@ -3,12 +3,10 @@
  * This code is licensed under the GNU GPLv2 and later.
  */
 
-#include "hw/sysbus.h"
-#include "qemu-common.h"
-#include "hw/qdev.h"
 #include "qemu/timer.h"
-#include "sysemu/blockdev.h"
 #include "hw/sd.h"
+#include "hw/sysbus.h"
+#include "sysemu/blockdev.h"
 
 /*
  * Controller registers
@@ -464,7 +462,7 @@ static uint64_t bcm2835_emmc_read(void *opaque, hwaddr offset,
                     s->status &= ~SDHCI_DATA_AVAILABLE;
 
                     if (COMPLETION_DELAY > 0) {
-                        now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) / SCALE_US;
+                        now = qemu_clock_get_us(QEMU_CLOCK_VIRTUAL);
                         timer_mod(s->delay_timer,
                             now + COMPLETION_DELAY);
                     } else {
@@ -704,7 +702,7 @@ static void bcm2835_emmc_write(void *opaque, hwaddr offset,
                     /* s->status &= ~SDHCI_SPACE_AVAILABLE; */
 
                     if (COMPLETION_DELAY > 0) {
-                        now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) / SCALE_US;
+                        now = qemu_clock_get_us(QEMU_CLOCK_VIRTUAL);
                         timer_mod(s->delay_timer,
                             now + COMPLETION_DELAY);
                     } else {
@@ -775,7 +773,7 @@ static const MemoryRegionOps bcm2835_emmc_ops = {
 };
 
 static const VMStateDescription vmstate_bcm2835_emmc = {
-    .name = "bcm2835_emmc",
+    .name = TYPE_BCM2835_EMMC,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -826,11 +824,10 @@ static int bcm2835_emmc_init(SysBusDevice *sbd)
     s->acmd = 0;
     s->write_op = 0;
 
-    s->delay_timer = timer_new(QEMU_CLOCK_VIRTUAL,
-        SCALE_US, delayed_completion, s);
+    s->delay_timer = timer_new_us(QEMU_CLOCK_VIRTUAL, delayed_completion, s);
 
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_emmc_ops, s,
-        "bcm2835_emmc", 0x100000);
+        TYPE_BCM2835_EMMC, 0x100000);
     sysbus_init_mmio(sbd, &s->iomem);
     vmstate_register(dev, -1, &vmstate_bcm2835_emmc, s);
 
@@ -847,7 +844,7 @@ static void bcm2835_emmc_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_emmc_info = {
-    .name          = "bcm2835_emmc",
+    .name          = TYPE_BCM2835_EMMC,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_emmc_state),
     .class_init    = bcm2835_emmc_class_init,
diff --git a/hw/arm/bcm2835_fb.c b/hw/arm/bcm2835_fb.c
index 36b5e6e..99eaf9b 100644
--- a/hw/arm/bcm2835_fb.c
+++ b/hw/arm/bcm2835_fb.c
@@ -29,14 +29,11 @@
  */
 
 #include "hw/sysbus.h"
-#include "qemu-common.h"
-#include "hw/qdev.h"
-#include "ui/console.h"
+#include "exec/cpu-common.h"
 #include "hw/display/framebuffer.h"
+#include "ui/console.h"
 #include "ui/pixel_ops.h"
 
-#include "exec/cpu-common.h"
-
 #include "bcm2835_common.h"
 
 /* #define LOG_REG_ACCESS */
@@ -300,7 +297,7 @@ static const MemoryRegionOps bcm2835_fb_ops = {
 };
 
 static const VMStateDescription vmstate_bcm2835_fb = {
-    .name = "bcm2835_fb",
+    .name = TYPE_BCM2835_FB,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -350,7 +347,7 @@ static int bcm2835_fb_init(SysBusDevice *sbd)
     bcm2835_fb.lock = 0;
 
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_fb_ops, s,
-        "bcm2835_fb", 0x10);
+        TYPE_BCM2835_FB, 0x10);
     sysbus_init_mmio(sbd, &s->iomem);
     vmstate_register(dev, -1, &vmstate_bcm2835_fb, s);
 
@@ -365,7 +362,7 @@ static void bcm2835_fb_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_fb_info = {
-    .name          = "bcm2835_fb",
+    .name          = TYPE_BCM2835_FB,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_fb_state),
     .class_init    = bcm2835_fb_class_init,
diff --git a/hw/arm/bcm2835_ic.c b/hw/arm/bcm2835_ic.c
index b535b3f..4db2555 100644
--- a/hw/arm/bcm2835_ic.c
+++ b/hw/arm/bcm2835_ic.c
@@ -203,7 +203,7 @@ static int bcm2835_ic_init(SysBusDevice *sbd)
     bcm2835_ic_state *s = BCM2835_IC(dev);
 
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_ic_ops, s,
-        "bcm2835_ic", 0x200);
+        TYPE_BCM2835_IC, 0x200);
     /* sysbus_init_mmio(dev, &s->iomem); */
     sysbus_init_mmio(sbd, &s->iomem);
 
@@ -217,7 +217,7 @@ static int bcm2835_ic_init(SysBusDevice *sbd)
 }
 
 static const VMStateDescription vmstate_bcm2835_ic = {
-    .name = "bcm2835_ic",
+    .name = TYPE_BCM2835_IC,
     .version_id = 1,
     .minimum_version_id = 1,
     .fields = (VMStateField[]) {
@@ -241,7 +241,7 @@ static void bcm2835_ic_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_ic_info = {
-    .name          = "bcm2835_ic",
+    .name          = TYPE_BCM2835_IC,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_ic_state),
     .class_init    = bcm2835_ic_class_init,
diff --git a/hw/arm/bcm2835_mphi.c b/hw/arm/bcm2835_mphi.c
index c6dfc20..28d03ef 100644
--- a/hw/arm/bcm2835_mphi.c
+++ b/hw/arm/bcm2835_mphi.c
@@ -4,8 +4,6 @@
  */
 
 #include "hw/sysbus.h"
-#include "qemu-common.h"
-#include "hw/qdev.h"
 
 /* #define LOG_REG_ACCESS */
 
@@ -137,7 +135,7 @@ static const MemoryRegionOps bcm2835_mphi_ops = {
 };
 
 static const VMStateDescription vmstate_bcm2835_mphi = {
-    .name = "bcm2835_mphi",
+    .name = TYPE_BCM2835_MPHI,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -159,7 +157,7 @@ static int bcm2835_mphi_init(SysBusDevice *sbd)
     s->mphi_intstat = 0;
 
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_mphi_ops, s,
-        "bcm2835_mphi", 0x1000);
+        TYPE_BCM2835_MPHI, 0x1000);
     sysbus_init_mmio(sbd, &s->iomem);
     vmstate_register(dev, -1, &vmstate_bcm2835_mphi, s);
 
@@ -176,7 +174,7 @@ static void bcm2835_mphi_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_mphi_info = {
-    .name          = "bcm2835_mphi",
+    .name          = TYPE_BCM2835_MPHI,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_mphi_state),
     .class_init    = bcm2835_mphi_class_init,
diff --git a/hw/arm/bcm2835_power.c b/hw/arm/bcm2835_power.c
index 48c90c5..63da88d 100644
--- a/hw/arm/bcm2835_power.c
+++ b/hw/arm/bcm2835_power.c
@@ -4,8 +4,6 @@
  */
 
 #include "hw/sysbus.h"
-#include "qemu-common.h"
-#include "hw/qdev.h"
 
 #include "bcm2835_common.h"
 
@@ -68,7 +66,7 @@ static const MemoryRegionOps bcm2835_power_ops = {
 
 
 static const VMStateDescription vmstate_bcm2835_power = {
-    .name = "bcm2835_power",
+    .name = TYPE_BCM2835_POWER,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -87,7 +85,7 @@ static int bcm2835_power_init(SysBusDevice *sbd)
 
     sysbus_init_irq(sbd, &s->mbox_irq);
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_power_ops, s,
-        "bcm2835_power", 0x10);
+        TYPE_BCM2835_POWER, 0x10);
     sysbus_init_mmio(sbd, &s->iomem);
     vmstate_register(dev, -1, &vmstate_bcm2835_power, s);
 
@@ -103,7 +101,7 @@ static void bcm2835_power_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_power_info = {
-    .name          = "bcm2835_power",
+    .name          = TYPE_BCM2835_POWER,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_power_state),
     .class_init    = bcm2835_power_class_init,
diff --git a/hw/arm/bcm2835_property.c b/hw/arm/bcm2835_property.c
index 8a82fd2..2f52013 100644
--- a/hw/arm/bcm2835_property.c
+++ b/hw/arm/bcm2835_property.c
@@ -3,11 +3,9 @@
  * This code is licensed under the GNU GPLv2 and later.
  */
 
+#include "hw/display/framebuffer.h"
 #include "hw/sysbus.h"
-#include "qemu-common.h"
-#include "hw/qdev.h"
 #include "ui/console.h"
-#include "hw/display/framebuffer.h"
 #include "ui/pixel_ops.h"
 
 #include "bcm2835_common.h"
@@ -363,7 +361,7 @@ static const MemoryRegionOps bcm2835_property_ops = {
 
 
 static const VMStateDescription vmstate_bcm2835_property = {
-    .name = "bcm2835_property",
+    .name = TYPE_BCM2835_PROPERTY,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -383,7 +381,7 @@ static int bcm2835_property_init(SysBusDevice *sbd)
 
     sysbus_init_irq(sbd, &s->mbox_irq);
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_property_ops, s,
-        "bcm2835_property", 0x10);
+        TYPE_BCM2835_PROPERTY, 0x10);
     sysbus_init_mmio(sbd, &s->iomem);
     vmstate_register(dev, -1, &vmstate_bcm2835_property, s);
 
@@ -399,7 +397,7 @@ static void bcm2835_property_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_property_info = {
-    .name          = "bcm2835_property",
+    .name          = TYPE_BCM2835_PROPERTY,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_property_state),
     .class_init    = bcm2835_property_class_init,
diff --git a/hw/arm/bcm2835_sbm.c b/hw/arm/bcm2835_sbm.c
index 7608c2c..caee954 100644
--- a/hw/arm/bcm2835_sbm.c
+++ b/hw/arm/bcm2835_sbm.c
@@ -4,8 +4,6 @@
  */
 
 #include "hw/sysbus.h"
-#include "qemu-common.h"
-#include "hw/qdev.h"
 
 #include "bcm2835_common.h"
 
@@ -236,7 +234,7 @@ static const MemoryRegionOps bcm2835_sbm_ops = {
 };
 
 static const VMStateDescription vmstate_bcm2835_sbm = {
-    .name = "bcm2835_sbm",
+    .name = TYPE_BCM2835_SBM,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -263,7 +261,7 @@ static int bcm2835_sbm_init(SysBusDevice *sbd)
     qdev_init_gpio_in(dev, bcm2835_sbm_set_irq, MBOX_CHAN_COUNT);
 
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_sbm_ops, s,
-        "bcm2835_sbm", 0x400);
+        TYPE_BCM2835_SBM, 0x400);
     sysbus_init_mmio(sbd, &s->iomem);
     vmstate_register(dev, -1, &vmstate_bcm2835_sbm, s);
 
@@ -279,7 +277,7 @@ static void bcm2835_sbm_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_sbm_info = {
-    .name          = "bcm2835_sbm",
+    .name          = TYPE_BCM2835_SBM,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_sbm_state),
     .class_init    = bcm2835_sbm_class_init,
diff --git a/hw/arm/bcm2835_st.c b/hw/arm/bcm2835_st.c
index 2bc86d7..f1186be 100644
--- a/hw/arm/bcm2835_st.c
+++ b/hw/arm/bcm2835_st.c
@@ -5,10 +5,8 @@
 
 /* Based on several timers code found in various QEMU source files. */
 
-#include "hw/sysbus.h"
 #include "qemu/timer.h"
-#include "qemu-common.h"
-#include "hw/qdev.h"
+#include "hw/sysbus.h"
 
 /* #define LOG_REG_ACCESS */
 
@@ -27,7 +25,7 @@ typedef struct bcm2835_st_state {
 
 static void bcm2835_st_update(bcm2835_st_state *s)
 {
-    int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) / SCALE_US;
+    int64_t now = qemu_clock_get_us(QEMU_CLOCK_VIRTUAL);
     uint32_t clo = (uint32_t)now;
     uint32_t delta = -1;
     int i;
@@ -66,7 +64,7 @@ static uint64_t bcm2835_st_read(void *opaque, hwaddr offset,
 {
     bcm2835_st_state *s = (bcm2835_st_state *)opaque;
     uint32_t res = 0;
-    int64_t now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) / SCALE_US;
+    int64_t now = qemu_clock_get_us(QEMU_CLOCK_VIRTUAL);
 
     assert(size == 4);
 
@@ -159,7 +157,7 @@ static const MemoryRegionOps bcm2835_st_ops = {
 };
 
 static const VMStateDescription vmstate_bcm2835_st = {
-    .name = "bcm2835_st",
+    .name = TYPE_BCM2835_ST,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -183,12 +181,12 @@ static int bcm2835_st_init(SysBusDevice *sbd)
     }
     s->match = 0;
 
-    s->timer = timer_new(QEMU_CLOCK_VIRTUAL, SCALE_US, bcm2835_st_tick, s);
+    s->timer = timer_new_us(QEMU_CLOCK_VIRTUAL, bcm2835_st_tick, s);
 
     bcm2835_st_update(s);
 
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_st_ops, s,
-        "bcm2835_st", 0x1000);
+        TYPE_BCM2835_ST, 0x1000);
     sysbus_init_mmio(sbd, &s->iomem);
     vmstate_register(dev, -1, &vmstate_bcm2835_st, s);
 
@@ -204,7 +202,7 @@ static void bcm2835_st_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_st_info = {
-    .name          = "bcm2835_st",
+    .name          = TYPE_BCM2835_ST,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_st_state),
     .class_init    = bcm2835_st_class_init,
diff --git a/hw/arm/bcm2835_timer.c b/hw/arm/bcm2835_timer.c
index b392ae7..8cdebf4 100644
--- a/hw/arm/bcm2835_timer.c
+++ b/hw/arm/bcm2835_timer.c
@@ -3,11 +3,9 @@
  * This code is licensed under the GNU GPLv2 and later.
  */
 
-#include "hw/sysbus.h"
-#include "qemu-common.h"
 #include "qemu/main-loop.h"
-#include "hw/qdev.h"
 #include "hw/ptimer.h"
+#include "hw/sysbus.h"
 
 /* #define LOG_REG_ACCESS */
 
@@ -200,7 +198,7 @@ static const MemoryRegionOps bcm2835_timer_ops = {
 };
 
 static const VMStateDescription vmstate_bcm2835_timer = {
-    .name = "bcm2835_timer",
+    .name = TYPE_BCM2835_TIMER,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -229,7 +227,7 @@ static int bcm2835_timer_init(SysBusDevice *sbd)
     s->frc_timer = ptimer_init(bh);
 
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_timer_ops, s,
-        "bcm2835_timer", 0x100);
+        TYPE_BCM2835_TIMER, 0x100);
     sysbus_init_mmio(sbd, &s->iomem);
     vmstate_register(dev, -1, &vmstate_bcm2835_timer, s);
 
@@ -246,7 +244,7 @@ static void bcm2835_timer_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_timer_info = {
-    .name          = "bcm2835_timer",
+    .name          = TYPE_BCM2835_TIMER,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_timer_state),
     .class_init    = bcm2835_timer_class_init,
diff --git a/hw/arm/bcm2835_todo.c b/hw/arm/bcm2835_todo.c
index aa7d556..c6e4e03 100644
--- a/hw/arm/bcm2835_todo.c
+++ b/hw/arm/bcm2835_todo.c
@@ -4,8 +4,6 @@
  */
 
 #include "hw/sysbus.h"
-#include "qemu-common.h"
-#include "hw/qdev.h"
 
 /* #define LOG_REG_ACCESS */
 
@@ -47,7 +45,7 @@ static const MemoryRegionOps bcm2835_todo_ops = {
 };
 
 static const VMStateDescription vmstate_bcm2835_todo = {
-    .name = "bcm2835_todo",
+    .name = TYPE_BCM2835_TODO,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -63,7 +61,7 @@ static int bcm2835_todo_init(SysBusDevice *sbd)
     bcm2835_todo_state *s = BCM2835_TODO(dev);
 
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_todo_ops, s,
-        "bcm2835_todo", 0x1000000);
+        TYPE_BCM2835_TODO, 0x1000000);
     sysbus_init_mmio(sbd, &s->iomem);
 
     vmstate_register(dev, -1, &vmstate_bcm2835_todo, s);
@@ -79,7 +77,7 @@ static void bcm2835_todo_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_todo_info = {
-    .name          = "bcm2835_todo",
+    .name          = TYPE_BCM2835_TODO,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_todo_state),
     .class_init    = bcm2835_todo_class_init,
diff --git a/hw/arm/bcm2835_usb.c b/hw/arm/bcm2835_usb.c
index 44a8461..540c7f8 100644
--- a/hw/arm/bcm2835_usb.c
+++ b/hw/arm/bcm2835_usb.c
@@ -5,12 +5,10 @@
 
 /* This is wrong at so many levels, but well, I'm releasing it anyway */
 
-#include "hw/sysbus.h"
-#include "qemu-common.h"
 #include "qemu/timer.h"
-#include "hw/qdev.h"
-#include "sysemu/dma.h"
+#include "hw/sysbus.h"
 #include "hw/usb.h"
+#include "sysemu/dma.h"
 
 #include "bcm2835_usb_regs.h"
 
@@ -139,7 +137,7 @@ static void bcm2835_usb_sof_tick(void *opaque)
 
     bcm2835_usb_update_irq(s);
 
-    now = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) / SCALE_US;
+    now = qemu_clock_get_us(QEMU_CLOCK_VIRTUAL);
     timer_mod(s->sof_timer, now + SOF_DELAY);
 }
 
@@ -669,7 +667,7 @@ static const MemoryRegionOps bcm2835_usb_ops = {
 };
 
 static const VMStateDescription vmstate_bcm2835_usb = {
-    .name = "bcm2835_usb",
+    .name = TYPE_BCM2835_USB,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -737,7 +735,7 @@ static int bcm2835_usb_init(SysBusDevice *sbd)
     }
 
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_usb_ops, s,
-        "bcm2835_usb", 0x20000);
+        TYPE_BCM2835_USB, 0x20000);
     sysbus_init_mmio(sbd, &s->iomem);
     vmstate_register(dev, -1, &vmstate_bcm2835_usb, s);
 
@@ -746,8 +744,7 @@ static int bcm2835_usb_init(SysBusDevice *sbd)
     s->attached = 0;
     s->reset_done = 0;
 
-    s->sof_timer = timer_new(QEMU_CLOCK_VIRTUAL, SCALE_US,
-                       bcm2835_usb_sof_tick, s);
+    s->sof_timer = timer_new_us(QEMU_CLOCK_VIRTUAL, bcm2835_usb_sof_tick, s);
 
     usb_bus_new(&s->bus, sizeof(s->bus), &bcm2835_usb_bus_ops, dev);
     usb_register_port(&s->bus, &s->port, s, 0, &bcm2835_usb_port_ops,
@@ -763,7 +760,7 @@ static void bcm2835_usb_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_usb_info = {
-    .name          = "bcm2835_usb",
+    .name          = TYPE_BCM2835_USB,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_usb_state),
     .class_init    = bcm2835_usb_class_init,
diff --git a/hw/arm/bcm2835_vchiq.c b/hw/arm/bcm2835_vchiq.c
index 1bb3edb..0beeb75 100644
--- a/hw/arm/bcm2835_vchiq.c
+++ b/hw/arm/bcm2835_vchiq.c
@@ -4,8 +4,6 @@
  */
 
 #include "hw/sysbus.h"
-#include "qemu-common.h"
-#include "hw/qdev.h"
 
 #include "bcm2835_common.h"
 
@@ -68,7 +66,7 @@ static const MemoryRegionOps bcm2835_vchiq_ops = {
 
 
 static const VMStateDescription vmstate_bcm2835_vchiq = {
-    .name = "bcm2835_vchiq",
+    .name = TYPE_BCM2835_VCHIQ,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
@@ -87,7 +85,7 @@ static int bcm2835_vchiq_init(SysBusDevice *sbd)
 
     sysbus_init_irq(sbd, &s->mbox_irq);
     memory_region_init_io(&s->iomem, OBJECT(s), &bcm2835_vchiq_ops, s,
-        "bcm2835_vchiq", 0x10);
+        TYPE_BCM2835_VCHIQ, 0x10);
     sysbus_init_mmio(sbd, &s->iomem);
     vmstate_register(dev, -1, &vmstate_bcm2835_vchiq, s);
 
@@ -103,7 +101,7 @@ static void bcm2835_vchiq_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo bcm2835_vchiq_info = {
-    .name          = "bcm2835_vchiq",
+    .name          = TYPE_BCM2835_VCHIQ,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(bcm2835_vchiq_state),
     .class_init    = bcm2835_vchiq_class_init,
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 0a88acc..c549dd2 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -15,12 +15,12 @@
  * This code is licensed under the GPL.
  */
 
-#include "hw/sysbus.h"
-#include "hw/arm/arm.h"
+#include "hw/boards.h"
 #include "hw/devices.h"
 #include "hw/loader.h"
+#include "hw/sysbus.h"
+#include "hw/arm/arm.h"
 #include "sysemu/sysemu.h"
-#include "hw/boards.h"
 #include "exec/address-spaces.h"
 #include "bcm2835_common.h"
 
@@ -30,36 +30,37 @@
 hwaddr bcm2835_vcram_base;
 
 const uint32_t bootloader_0[] = {
-0xea000006,
-0xe1a00000,
-0xe1a00000,
-0xe1a00000,
-0xe1a00000,
-0xe1a00000,
-0xe1a00000,
-0xe1a00000,
-
-0xe3a00000,
-0xe3a01042,
-0xe3811c0c,
-0xe59f2000,
-0xe59ff000,
-0x00000100,
-0x00008000
+    0xea000006,
+    0xe1a00000,
+    0xe1a00000,
+    0xe1a00000,
+    0xe1a00000,
+    0xe1a00000,
+    0xe1a00000,
+    0xe1a00000,
+
+    0xe3a00000,
+    0xe3a01042,
+    0xe3811c0c,
+    0xe59f2000,
+    0xe59ff000,
+    0x00000100,
+    0x00008000
 };
 
 uint32_t bootloader_100[] = {
-0x00000005,
-0x54410001,
-0x00000001,
-0x00001000,
-0x00000000,
-0x00000004,
-0x54410002,
-0x08000000, /* It will be overwritten by dynamically calculated memory size */
-0x00000000,
-0x00000000,
-0x00000000
+    0x00000005,
+    0x54410001,
+    0x00000001,
+    0x00001000,
+    0x00000000,
+    0x00000004,
+    0x54410002,
+    /* It will be overwritten by dynamically calculated memory size */
+    0x08000000,
+    0x00000000,
+    0x00000000,
+    0x00000000
 };
 
 
