diff --git a/sw/device/tests/BUILD b/sw/device/tests/BUILD index 89d174a31694e..00b2f0161915b 100644 --- a/sw/device/tests/BUILD +++ b/sw/device/tests/BUILD @@ -3650,6 +3650,7 @@ opentitan_test( { "//hw/top_earlgrey:fpga_cw310_sival": None, "//hw/top_earlgrey:silicon_creator": None, + "//hw/top_darjeeling:sim_dv": None, }, ), qemu = qemu_params( @@ -3659,8 +3660,7 @@ opentitan_test( }, ), deps = [ - "//hw/top_earlgrey/sw/autogen:top_earlgrey", - "//sw/device/lib/base:mmio", + "//hw/top:dt", "//sw/device/lib/dif:rstmgr", "//sw/device/lib/runtime:log", "//sw/device/lib/testing:rstmgr_testutils", diff --git a/sw/device/tests/rstmgr_sw_req_test.c b/sw/device/tests/rstmgr_sw_req_test.c index 6178a1dbbd557..fb0b3c7d24ad6 100644 --- a/sw/device/tests/rstmgr_sw_req_test.c +++ b/sw/device/tests/rstmgr_sw_req_test.c @@ -2,22 +2,21 @@ // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 -#include "sw/device/lib/base/mmio.h" +#include "dt/dt_rstmgr.h" // Generated #include "sw/device/lib/dif/dif_rstmgr.h" #include "sw/device/lib/runtime/log.h" #include "sw/device/lib/testing/rstmgr_testutils.h" #include "sw/device/lib/testing/test_framework/check.h" #include "sw/device/lib/testing/test_framework/ottf_main.h" -#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h" - static dif_rstmgr_t rstmgr; +static dt_rstmgr_t kRstmgrDt = (dt_rstmgr_t)0; +static_assert(kDtRstmgrCount == 1, "This test requires 1 rstmgr"); OTTF_DEFINE_TEST_CONFIG(); bool test_main(void) { - CHECK_DIF_OK(dif_rstmgr_init( - mmio_region_from_addr(TOP_EARLGREY_RSTMGR_AON_BASE_ADDR), &rstmgr)); + CHECK_DIF_OK(dif_rstmgr_init_from_dt(kRstmgrDt, &rstmgr)); dif_rstmgr_reset_info_bitfield_t reason; reason = rstmgr_testutils_reason_get();