diff options
author | Bin Meng | 2020-06-08 16:17:39 +0200 |
---|---|---|
committer | Alistair Francis | 2020-06-19 17:25:27 +0200 |
commit | 3e9667cdaa7d552bad232b7da0e116c50e15b3b5 (patch) | |
tree | b58093ebd033e2901dac0a0ca1c5288242a30661 /hw/riscv/sifive_u.c | |
parent | hw/riscv: sifive_u: Add reset functionality (diff) | |
download | qemu-3e9667cdaa7d552bad232b7da0e116c50e15b3b5.tar.gz qemu-3e9667cdaa7d552bad232b7da0e116c50e15b3b5.tar.xz qemu-3e9667cdaa7d552bad232b7da0e116c50e15b3b5.zip |
hw/riscv: sifive_u: Rename serial property get/set functions to a generic name
In prepration to add more properties to this machine, rename the
existing serial property get/set functions to a generic name.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 1591625864-31494-11-git-send-email-bmeng.cn@gmail.com
Message-Id: <1591625864-31494-11-git-send-email-bmeng.cn@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/riscv/sifive_u.c')
-rw-r--r-- | hw/riscv/sifive_u.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c index b9d2185c04..6dac662910 100644 --- a/hw/riscv/sifive_u.c +++ b/hw/riscv/sifive_u.c @@ -478,14 +478,16 @@ static void sifive_u_machine_set_start_in_flash(Object *obj, bool value, Error * s->start_in_flash = value; } -static void sifive_u_machine_get_serial(Object *obj, Visitor *v, const char *name, - void *opaque, Error **errp) +static void sifive_u_machine_get_uint32_prop(Object *obj, Visitor *v, + const char *name, void *opaque, + Error **errp) { visit_type_uint32(v, name, (uint32_t *)opaque, errp); } -static void sifive_u_machine_set_serial(Object *obj, Visitor *v, const char *name, - void *opaque, Error **errp) +static void sifive_u_machine_set_uint32_prop(Object *obj, Visitor *v, + const char *name, void *opaque, + Error **errp) { visit_type_uint32(v, name, (uint32_t *)opaque, errp); } @@ -504,8 +506,8 @@ static void sifive_u_machine_instance_init(Object *obj) s->serial = OTP_SERIAL; object_property_add(obj, "serial", "uint32", - sifive_u_machine_get_serial, - sifive_u_machine_set_serial, NULL, &s->serial); + sifive_u_machine_get_uint32_prop, + sifive_u_machine_set_uint32_prop, NULL, &s->serial); object_property_set_description(obj, "serial", "Board serial number"); } |