diff options
Diffstat (limited to 'hw/qdev-addr.c')
-rw-r--r-- | hw/qdev-addr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/qdev-addr.c b/hw/qdev-addr.c index b711b6bf96..de0ba8726e 100644 --- a/hw/qdev-addr.c +++ b/hw/qdev-addr.c @@ -1,12 +1,12 @@ #include "qdev.h" #include "qdev-addr.h" -#include "targphys.h" +#include "hwaddr.h" /* --- target physical address --- */ static int parse_taddr(DeviceState *dev, Property *prop, const char *str) { - target_phys_addr_t *ptr = qdev_get_prop_ptr(dev, prop); + hwaddr *ptr = qdev_get_prop_ptr(dev, prop); *ptr = strtoull(str, NULL, 16); return 0; @@ -14,7 +14,7 @@ static int parse_taddr(DeviceState *dev, Property *prop, const char *str) static int print_taddr(DeviceState *dev, Property *prop, char *dest, size_t len) { - target_phys_addr_t *ptr = qdev_get_prop_ptr(dev, prop); + hwaddr *ptr = qdev_get_prop_ptr(dev, prop); return snprintf(dest, len, "0x" TARGET_FMT_plx, *ptr); } @@ -23,7 +23,7 @@ static void get_taddr(Object *obj, Visitor *v, void *opaque, { DeviceState *dev = DEVICE(obj); Property *prop = opaque; - target_phys_addr_t *ptr = qdev_get_prop_ptr(dev, prop); + hwaddr *ptr = qdev_get_prop_ptr(dev, prop); int64_t value; value = *ptr; @@ -35,7 +35,7 @@ static void set_taddr(Object *obj, Visitor *v, void *opaque, { DeviceState *dev = DEVICE(obj); Property *prop = opaque; - target_phys_addr_t *ptr = qdev_get_prop_ptr(dev, prop); + hwaddr *ptr = qdev_get_prop_ptr(dev, prop); Error *local_err = NULL; int64_t value; @@ -49,12 +49,12 @@ static void set_taddr(Object *obj, Visitor *v, void *opaque, error_propagate(errp, local_err); return; } - if ((uint64_t)value <= (uint64_t) ~(target_phys_addr_t)0) { + if ((uint64_t)value <= (uint64_t) ~(hwaddr)0) { *ptr = value; } else { error_set(errp, QERR_PROPERTY_VALUE_OUT_OF_RANGE, dev->id?:"", name, value, (uint64_t) 0, - (uint64_t) ~(target_phys_addr_t)0); + (uint64_t) ~(hwaddr)0); } } @@ -67,7 +67,7 @@ PropertyInfo qdev_prop_taddr = { .set = set_taddr, }; -void qdev_prop_set_taddr(DeviceState *dev, const char *name, target_phys_addr_t value) +void qdev_prop_set_taddr(DeviceState *dev, const char *name, hwaddr value) { Error *errp = NULL; object_property_set_int(OBJECT(dev), value, name, &errp); |