|
2 | 2 | // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
3 | 3 | // SPDX-License-Identifier: Apache-2.0 |
4 | 4 |
|
| 5 | +#include "hw/top/dt/dt_csrng.h" |
| 6 | +#include "hw/top/dt/dt_edn.h" |
| 7 | +#include "hw/top/dt/dt_rv_core_ibex.h" |
5 | 8 | #include "sw/device/lib/base/mmio.h" |
6 | 9 | #include "sw/device/lib/dif/dif_csrng.h" |
7 | 10 | #include "sw/device/lib/dif/dif_csrng_shared.h" |
|
16 | 19 | #include "sw/device/lib/testing/test_framework/ottf_main.h" |
17 | 20 |
|
18 | 21 | #include "hw/top/edn_regs.h" // Generated |
19 | | -#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h" |
20 | 22 |
|
21 | 23 | enum { |
22 | 24 | kEdnKatTimeout = (10 * 1000 * 1000), |
@@ -116,15 +118,10 @@ OTTF_DEFINE_TEST_CONFIG(); |
116 | 118 |
|
117 | 119 | // Initializes the peripherals used in this test. |
118 | 120 | static void init_peripherals(void) { |
119 | | - CHECK_DIF_OK(dif_csrng_init( |
120 | | - mmio_region_from_addr(TOP_EARLGREY_CSRNG_BASE_ADDR), &csrng)); |
121 | | - CHECK_DIF_OK( |
122 | | - dif_edn_init(mmio_region_from_addr(TOP_EARLGREY_EDN0_BASE_ADDR), &edn0)); |
123 | | - CHECK_DIF_OK( |
124 | | - dif_edn_init(mmio_region_from_addr(TOP_EARLGREY_EDN1_BASE_ADDR), &edn1)); |
125 | | - CHECK_DIF_OK(dif_rv_core_ibex_init( |
126 | | - mmio_region_from_addr(TOP_EARLGREY_RV_CORE_IBEX_CFG_BASE_ADDR), |
127 | | - &rv_core_ibex)); |
| 121 | + CHECK_DIF_OK(dif_csrng_init_from_dt(kDtCsrng, &csrng)); |
| 122 | + CHECK_DIF_OK(dif_edn_init_from_dt(kDtEdn0, &edn0)); |
| 123 | + CHECK_DIF_OK(dif_edn_init_from_dt(kDtEdn1, &edn1)); |
| 124 | + CHECK_DIF_OK(dif_rv_core_ibex_init_from_dt(kDtRvCoreIbex, &rv_core_ibex)); |
128 | 125 | } |
129 | 126 |
|
130 | 127 | dif_edn_auto_params_t kat_auto_params_build(bool alert_test) { |
|
0 commit comments