Skip to content

Commit ee8bf76

Browse files
committed
[ot] hw/opentitan: use OT_COMMON_DEV_ID in OT device properties
Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
1 parent f67d837 commit ee8bf76

28 files changed

+42
-35
lines changed

hw/opentitan/ot_alert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ static void ot_alert_fill_access_table(OtAlertState *s)
960960
}
961961

962962
static Property ot_alert_properties[] = {
963-
DEFINE_PROP_STRING("ot_id", OtAlertState, ot_id),
963+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtAlertState, ot_id),
964964
DEFINE_PROP_UINT16("n_alerts", OtAlertState, n_alerts, 0),
965965
DEFINE_PROP_UINT8("n_lpg", OtAlertState, n_low_power_groups, 1u),
966966
DEFINE_PROP_UINT8("n_classes", OtAlertState, n_classes, 4u),

hw/opentitan/ot_aon_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ static const MemoryRegionOps ot_aon_timer_ops = {
510510
};
511511

512512
static Property ot_aon_timer_properties[] = {
513-
DEFINE_PROP_STRING("ot_id", OtAonTimerState, ot_id),
513+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtAonTimerState, ot_id),
514514
DEFINE_PROP_UINT32("pclk", OtAonTimerState, pclk, 0u),
515515
DEFINE_PROP_END_OF_LIST(),
516516
};

hw/opentitan/ot_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ unsigned ot_common_check_rom_configuration(void)
160160
OtCommonObjectNode *ctrl_node, *ctrl_next;
161161
QSIMPLEQ_FOREACH_SAFE(ctrl_node, &ctrl_nodes.list, node, ctrl_next) {
162162
Error *errp;
163-
char *ot_id =
164-
object_property_get_str(ctrl_node->obj, "ot_id", &errp);
163+
char *ot_id = object_property_get_str(ctrl_node->obj,
164+
OT_COMMON_DEV_ID, &errp);
165165
bool remove_img = !ot_id;
166166
bool remove_ctrl = false;
167167
if (ot_id) {

hw/opentitan/ot_dev_proxy.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ static void ot_dev_proxy_enumerate_devices(OtDevProxyState *s)
369369
for (unsigned dix = 0; dix < ARRAY_SIZE(SUPPORTED_DEVICES); dix++) {
370370
if (object_dynamic_cast(item->obj,
371371
SUPPORTED_DEVICES[dix].typename)) {
372-
oid = object_property_get_str(item->obj, "ot_id", &error_fatal);
372+
oid = object_property_get_str(item->obj, OT_COMMON_DEV_ID,
373+
&error_fatal);
373374
(void)snprintf(desc, sizeof(desc), "%s%s", item->prefix, oid);
374375
break;
375376
}
@@ -1031,7 +1032,7 @@ ot_dev_proxy_route_interrupt(OtDevProxyState *s, OtDevProxyItem *item,
10311032
const char *group, unsigned grp_n, unsigned irq_n)
10321033
{
10331034
const char *dev_name = object_get_typename(item->obj);
1034-
char *dev_id = object_property_get_str(item->obj, "ot_id", NULL);
1035+
char *dev_id = object_property_get_str(item->obj, OT_COMMON_DEV_ID, NULL);
10351036
char *irq_name = g_strdup_printf("%s[%u]", group, irq_n);
10361037

10371038
OtDevProxyIrq *proxy_irq =
@@ -1084,7 +1085,7 @@ static void ot_dev_proxy_restore_interrupt(OtDevProxyItem *item,
10841085
const char *group, unsigned irq_n)
10851086
{
10861087
const char *dev_name = object_get_typename(item->obj);
1087-
char *dev_id = object_property_get_str(item->obj, "ot_id", NULL);
1088+
char *dev_id = object_property_get_str(item->obj, OT_COMMON_DEV_ID, NULL);
10881089
char *irq_name = g_strdup_printf("%s[%u]", group, irq_n);
10891090

10901091
if (!item->iirq_ht) {
@@ -1271,7 +1272,7 @@ static void ot_dev_proxy_signal_interrupt(OtDevProxyState *s)
12711272

12721273
const char *dev_name = object_get_typename(item->obj);
12731274
Error *errp = NULL;
1274-
char *dev_id = object_property_get_str(item->obj, "ot_id", &errp);
1275+
char *dev_id = object_property_get_str(item->obj, OT_COMMON_DEV_ID, &errp);
12751276
if (errp) {
12761277
error_free(errp);
12771278
}
@@ -1444,7 +1445,7 @@ static void ot_dev_proxy_intercepted_irq(void *opaque, int irq, int level)
14441445

14451446
const char *dev_name = object_get_typename(item->obj);
14461447
Error *errp = NULL;
1447-
char *dev_id = object_property_get_str(item->obj, "ot_id", &errp);
1448+
char *dev_id = object_property_get_str(item->obj, OT_COMMON_DEV_ID, &errp);
14481449
if (errp) {
14491450
error_free(errp);
14501451
}

hw/opentitan/ot_dma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,7 @@ static void ot_dma_regs_write(void *opaque, hwaddr addr, uint64_t val64,
13261326
};
13271327

13281328
static Property ot_dma_properties[] = {
1329-
DEFINE_PROP_STRING("ot_id", OtDMAState, ot_id),
1329+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtDMAState, ot_id),
13301330
DEFINE_PROP_STRING("ot_as_name", OtDMAState, ot_as_name),
13311331
DEFINE_PROP_STRING("ctn_as_name", OtDMAState, ctn_as_name),
13321332
DEFINE_PROP_STRING("sys_as_name", OtDMAState, sys_as_name),

hw/opentitan/ot_gpio_dj.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ static const MemoryRegionOps ot_gpio_dj_regs_ops = {
798798
};
799799

800800
static Property ot_gpio_dj_properties[] = {
801-
DEFINE_PROP_STRING("ot_id", OtGpioDjState, ot_id),
801+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtGpioDjState, ot_id),
802802
DEFINE_PROP_STRING("log_id", OtGpioDjState, log_id),
803803
DEFINE_PROP_UINT32("in", OtGpioDjState, reset_in, 0u),
804804
DEFINE_PROP_UINT32("out", OtGpioDjState, reset_out, 0u),

hw/opentitan/ot_gpio_eg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ static const MemoryRegionOps ot_gpio_eg_regs_ops = {
697697
};
698698

699699
static Property ot_gpio_eg_properties[] = {
700-
DEFINE_PROP_STRING("ot_id", OtGpioEgState, ot_id),
700+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtGpioEgState, ot_id),
701701
DEFINE_PROP_UINT32("in", OtGpioEgState, reset_in, 0u),
702702
DEFINE_PROP_UINT32("out", OtGpioEgState, reset_out, 0u),
703703
DEFINE_PROP_UINT32("oe", OtGpioEgState, reset_oe, 0u),

hw/opentitan/ot_hmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ static void ot_hmac_regs_write(void *opaque, hwaddr addr, uint64_t value,
11881188
}
11891189

11901190
static Property ot_hmac_properties[] = {
1191-
DEFINE_PROP_STRING("ot_id", OtHMACState, ot_id),
1191+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtHMACState, ot_id),
11921192
DEFINE_PROP_END_OF_LIST(),
11931193
};
11941194

hw/opentitan/ot_i2c_dj.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
#include "qemu/log.h"
5656
#include "hw/i2c/i2c.h"
5757
#include "hw/opentitan/ot_alert.h"
58+
#include "hw/opentitan/ot_common.h"
5859
#include "hw/opentitan/ot_fifo32.h"
5960
#include "hw/opentitan/ot_i2c_dj.h"
6061
#include "hw/qdev-clock.h"
@@ -955,7 +956,7 @@ static const MemoryRegionOps ot_i2c_dj_ops = {
955956
};
956957

957958
static Property ot_i2c_dj_properties[] = {
958-
DEFINE_PROP_STRING("ot_id", OtI2CDjState, ot_id),
959+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtI2CDjState, ot_id),
959960
DEFINE_PROP_UINT32("pclk", OtI2CDjState, pclk, 0u),
960961
DEFINE_PROP_END_OF_LIST(),
961962
};

hw/opentitan/ot_ibex_wrapper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ static void ot_ibex_wrapper_fill_tables(OtIbexWrapperState *s)
13661366

13671367
/* all properties are optional */
13681368
static Property ot_ibex_wrapper_properties[] = {
1369-
DEFINE_PROP_STRING("ot_id", OtIbexWrapperState, ot_id),
1369+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtIbexWrapperState, ot_id),
13701370
DEFINE_PROP_LINK("edn", OtIbexWrapperState, edn, TYPE_OT_EDN, OtEDNState *),
13711371
DEFINE_PROP_LINK("vmapper", OtIbexWrapperState, vmapper, TYPE_OT_VMAPPER,
13721372
OtVMapperState *),

hw/opentitan/ot_lc_ctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ static void ot_lc_ctrl_configure_transitions(
20432043
}
20442044

20452045
static Property ot_lc_ctrl_properties[] = {
2046-
DEFINE_PROP_STRING("ot_id", OtLcCtrlState, ot_id),
2046+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtLcCtrlState, ot_id),
20472047
DEFINE_PROP_LINK("otp_ctrl", OtLcCtrlState, otp_ctrl, TYPE_OT_OTP,
20482048
OtOTPState *),
20492049
DEFINE_PROP_LINK("kmac", OtLcCtrlState, kmac, TYPE_OT_KMAC, OtKMACState *),

hw/opentitan/ot_mbx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ static MemTxResult ot_mbx_sys_regs_write_with_attrs(
730730
}
731731

732732
static Property ot_mbx_properties[] = {
733-
DEFINE_PROP_STRING("ot_id", OtMbxState, ot_id),
733+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtMbxState, ot_id),
734734
DEFINE_PROP_STRING("ram_as_name", OtMbxState, ram_as_name),
735735
DEFINE_PROP_END_OF_LIST(),
736736
};

hw/opentitan/ot_otp_dj.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3793,7 +3793,7 @@ static void ot_otp_dj_configure_sram(OtOTPDjState *s)
37933793
}
37943794

37953795
static Property ot_otp_dj_properties[] = {
3796-
DEFINE_PROP_STRING("ot_id", OtOTPDjState, ot_id),
3796+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtOTPDjState, ot_id),
37973797
DEFINE_PROP_DRIVE("drive", OtOTPDjState, blk),
37983798
DEFINE_PROP_LINK("backend", OtOTPDjState, otp_backend, TYPE_OT_OTP_BE_IF,
37993799
OtOtpBeIf *),

hw/opentitan/ot_otp_eg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ ot_otp_eg_ctrl_get_entropy_cfg(const OtOTPState *s)
12261226
}
12271227

12281228
static Property ot_otp_eg_properties[] = {
1229-
DEFINE_PROP_STRING("ot_id", OtOTPEgState, ot_id),
1229+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtOTPEgState, ot_id),
12301230
DEFINE_PROP_DRIVE("drive", OtOTPEgState, blk),
12311231
DEFINE_PROP_LINK("backend", OtOTPEgState, otp_backend, TYPE_OT_OTP_BE_IF,
12321232
OtOtpBeIf *),

hw/opentitan/ot_otp_ot_be.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
#include "qemu/osdep.h"
3232
#include "qemu/log.h"
33+
#include "hw/opentitan/ot_common.h"
3334
#include "hw/opentitan/ot_otp.h"
3435
#include "hw/opentitan/ot_otp_be_if.h"
3536
#include "hw/opentitan/ot_otp_ot_be.h"
@@ -203,7 +204,7 @@ static bool ot_otp_ot_be_is_ecc_enabled(OtOtpBeIf *beif)
203204
}
204205

205206
static Property ot_otp_ot_be_properties[] = {
206-
DEFINE_PROP_STRING("ot_id", OtOtpOtBeState, ot_id),
207+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtOtpOtBeState, ot_id),
207208
DEFINE_PROP_LINK("parent", OtOtpOtBeState, parent, TYPE_DEVICE,
208209
DeviceState*),
209210
DEFINE_PROP_END_OF_LIST(),

hw/opentitan/ot_plic_ext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static void ot_plic_ext_alert_write(void *opaque, hwaddr addr, uint64_t val64,
214214
}
215215

216216
static Property ot_plic_ext_properties[] = {
217-
DEFINE_PROP_STRING("ot_id", OtPlicExtState, ot_id),
217+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtPlicExtState, ot_id),
218218
DEFINE_PROP_END_OF_LIST(),
219219
};
220220

hw/opentitan/ot_pwrmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* QEMU OpenTitan Power Manager device
33
*
4-
* Copyright (c) 2023-2024 Rivos, Inc.
4+
* Copyright (c) 2023-2025 Rivos, Inc.
55
*
66
* Author(s):
77
* Emmanuel Blot <eblot@rivosinc.com>
@@ -899,7 +899,7 @@ static void ot_pwrmgr_regs_write(void *opaque, hwaddr addr, uint64_t val64,
899899
};
900900

901901
static Property ot_pwrmgr_properties[] = {
902-
DEFINE_PROP_STRING("ot_id", OtPwrMgrState, ot_id),
902+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtPwrMgrState, ot_id),
903903
DEFINE_PROP_UINT8("num-rom", OtPwrMgrState, num_rom, 0),
904904
DEFINE_PROP_UINT8("version", OtPwrMgrState, version, UINT8_MAX),
905905
DEFINE_PROP_BOOL("fetch-ctrl", OtPwrMgrState, fetch_ctrl, false),

hw/opentitan/ot_rom_ctrl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* QEMU OpenTitan ROM controller
33
*
4-
* Copyright (c) 2023-2024 Rivos, Inc.
4+
* Copyright (c) 2023-2025 Rivos, Inc.
55
*
66
* Author(s):
77
* Loïc Lefort <loic@rivosinc.com>
@@ -1041,7 +1041,7 @@ static void ot_rom_ctrl_parse_hexstr(const char *name, uint8_t **buf,
10411041
}
10421042

10431043
static Property ot_rom_ctrl_properties[] = {
1044-
DEFINE_PROP_STRING("ot_id", OtRomCtrlState, ot_id),
1044+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtRomCtrlState, ot_id),
10451045
DEFINE_PROP_UINT32("size", OtRomCtrlState, size, 0u),
10461046
DEFINE_PROP_LINK("kmac", OtRomCtrlState, kmac, TYPE_OT_KMAC, OtKMACState *),
10471047
DEFINE_PROP_UINT8("kmac-app", OtRomCtrlState, kmac_app, UINT8_MAX),

hw/opentitan/ot_rstmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ static void ot_rstmgr_regs_write(void *opaque, hwaddr addr, uint64_t val64,
493493
};
494494

495495
static Property ot_rstmgr_properties[] = {
496-
DEFINE_PROP_STRING("ot_id", OtRstMgrState, ot_id),
496+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtRstMgrState, ot_id),
497497
DEFINE_PROP_UINT32("fatal_reset", OtRstMgrState, fatal_reset, 0),
498498
/* this property is only used to store initial reset reason state */
499499
DEFINE_PROP_BOOL("por", OtRstMgrState, por, true),

hw/opentitan/ot_soc_proxy.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "qemu/log.h"
3636
#include "exec/memory.h"
3737
#include "hw/opentitan/ot_alert.h"
38+
#include "hw/opentitan/ot_common.h"
3839
#include "hw/opentitan/ot_soc_proxy.h"
3940
#include "hw/qdev-properties.h"
4041
#include "hw/registerfields.h"
@@ -227,7 +228,7 @@ static void ot_soc_proxy_regs_write(void *opaque, hwaddr addr, uint64_t val64,
227228
}
228229

229230
static Property ot_soc_proxy_properties[] = {
230-
DEFINE_PROP_STRING("ot_id", OtSoCProxyState, ot_id),
231+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtSoCProxyState, ot_id),
231232
DEFINE_PROP_END_OF_LIST(),
232233
};
233234

hw/opentitan/ot_socdbg_ctrl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "qemu/log.h"
3131
#include "qemu/main-loop.h"
3232
#include "hw/opentitan/ot_alert.h"
33+
#include "hw/opentitan/ot_common.h"
3334
#include "hw/opentitan/ot_lc_ctrl.h"
3435
#include "hw/opentitan/ot_pwrmgr.h"
3536
#include "hw/opentitan/ot_socdbg_ctrl.h"
@@ -710,7 +711,7 @@ static void ot_socdbg_ctrl_dmi_write(void *opaque, hwaddr addr, uint64_t value,
710711
}
711712

712713
static Property ot_socdbg_ctrl_properties[] = {
713-
DEFINE_PROP_STRING("ot_id", OtSoCDbgCtrlState, ot_id),
714+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtSoCDbgCtrlState, ot_id),
714715
DEFINE_PROP_UINT8("dbg_unlocked", OtSoCDbgCtrlState, dbg_unlocked,
715716
DEFAULT_DBG_UNLOCKED),
716717
DEFINE_PROP_UINT8("dbg_locked", OtSoCDbgCtrlState, dbg_locked,

hw/opentitan/ot_spi_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2082,7 +2082,7 @@ static int ot_spi_device_chr_be_change(void *opaque)
20822082
}
20832083

20842084
static Property ot_spi_device_properties[] = {
2085-
DEFINE_PROP_STRING("ot_id", OtSPIDeviceState, ot_id),
2085+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtSPIDeviceState, ot_id),
20862086
DEFINE_PROP_CHR("chardev", OtSPIDeviceState, chr),
20872087
DEFINE_PROP_END_OF_LIST(),
20882088
};

hw/opentitan/ot_spi_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ static const MemoryRegionOps ot_spi_host_ops = {
12691269
/* clang-format on */
12701270

12711271
static Property ot_spi_host_properties[] = {
1272-
DEFINE_PROP_STRING("ot_id", OtSPIHostState, ot_id),
1272+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtSPIHostState, ot_id),
12731273
DEFINE_PROP_UINT32("num-cs", OtSPIHostState, num_cs, 1u),
12741274
DEFINE_PROP_UINT32("bus-num", OtSPIHostState, bus_num, 0u),
12751275
DEFINE_PROP_UINT32("pclk", OtSPIHostState, pclk, 0u),

hw/opentitan/ot_sram_ctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ static MemTxResult ot_sram_ctrl_mem_init_write_with_attrs(
651651
}
652652

653653
static Property ot_sram_ctrl_properties[] = {
654-
DEFINE_PROP_STRING("ot_id", OtSramCtrlState, ot_id),
654+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtSramCtrlState, ot_id),
655655
DEFINE_PROP_LINK("otp_ctrl", OtSramCtrlState, otp_ctrl, TYPE_OT_OTP,
656656
OtOTPState *),
657657
DEFINE_PROP_UINT32("size", OtSramCtrlState, size, 0u),

hw/opentitan/ot_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static const MemoryRegionOps ot_timer_ops = {
356356
};
357357

358358
static Property ot_timer_properties[] = {
359-
DEFINE_PROP_STRING("ot_id", OtTimerState, ot_id),
359+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtTimerState, ot_id),
360360
DEFINE_PROP_UINT32("pclk", OtTimerState, pclk, 0u),
361361
DEFINE_PROP_END_OF_LIST(),
362362
};

hw/opentitan/ot_uart.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "qemu/module.h"
3737
#include "chardev/char-fe.h"
3838
#include "hw/opentitan/ot_alert.h"
39+
#include "hw/opentitan/ot_common.h"
3940
#include "hw/opentitan/ot_uart.h"
4041
#include "hw/qdev-properties-system.h"
4142
#include "hw/qdev-properties.h"
@@ -565,7 +566,7 @@ static const MemoryRegionOps ot_uart_ops = {
565566
};
566567

567568
static Property ot_uart_properties[] = {
568-
DEFINE_PROP_STRING("ot_id", OtUARTState, ot_id),
569+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtUARTState, ot_id),
569570
DEFINE_PROP_CHR("chardev", OtUARTState, chr),
570571
DEFINE_PROP_UINT32("pclk", OtUARTState, pclk, 0u),
571572
DEFINE_PROP_END_OF_LIST(),

hw/opentitan/ot_unimp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static const MemoryRegionOps ot_unimp_ops = {
222222
/* clang-format on */
223223

224224
static Property ot_unimp_properties[] = {
225-
DEFINE_PROP_STRING("ot_id", OtUnimpState, ot_id),
225+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtUnimpState, ot_id),
226226
DEFINE_PROP_UINT32("size", OtUnimpState, size, 0),
227227
DEFINE_PROP_UINT32("irq-ro-mask", OtUnimpState, irq_ro_mask, 0),
228228
DEFINE_PROP_UINT8("irq-count", OtUnimpState, irq_count, 0),

hw/opentitan/ot_vmapper.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "exec/exec-all.h"
3232
#include "exec/page-protection.h"
3333
#include "hw/boards.h"
34+
#include "hw/opentitan/ot_common.h"
3435
#include "hw/opentitan/ot_vmapper.h"
3536
#include "hw/qdev-properties.h"
3637
#include "hw/riscv/ibex_common.h"
@@ -712,7 +713,7 @@ static void ot_vmapper_override_vcpu_config(OtVMapperState *s)
712713
}
713714

714715
static Property ot_vmapper_properties[] = {
715-
DEFINE_PROP_STRING("ot_id", OtVMapperState, ot_id),
716+
DEFINE_PROP_STRING(OT_COMMON_DEV_ID, OtVMapperState, ot_id),
716717
DEFINE_PROP_UINT8("cpu_index", OtVMapperState, cpu_idx, UINT8_MAX),
717718
DEFINE_PROP_UINT8("trans_count", OtVMapperState, trans_count, UINT8_MAX),
718719
DEFINE_PROP_END_OF_LIST(),

0 commit comments

Comments
 (0)