[dif] Implement the function dif_csrng_stop
Signed-off-by: Douglas Reis <doreis@lowrisc.org>
diff --git a/sw/device/lib/dif/dif_edn.c b/sw/device/lib/dif/dif_edn.c
index 3b2e3fc..b5849f9 100644
--- a/sw/device/lib/dif/dif_edn.c
+++ b/sw/device/lib/dif/dif_edn.c
@@ -5,3 +5,14 @@
#include "sw/device/lib/dif/dif_edn.h"
#include "edn_regs.h" // Generated
+
+OT_WARN_UNUSED_RESULT
+dif_result_t dif_edn_stop(const dif_edn_t *edn) {
+ if (edn == NULL) {
+ return kDifBadArg;
+ }
+
+ mmio_region_write32(edn->base_addr, EDN_CTRL_REG_OFFSET, EDN_CTRL_REG_RESVAL);
+
+ return kDifOk;
+}