From 97ced71534ee3cf08bfcbeb399defce0a000eb1f Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Fri, 15 Dec 2023 13:25:25 +0100 Subject: [PATCH] drivers/soc_ifc: Add method to enable mbox interrupts Signed-off-by: Arthur Heymans --- drivers/src/soc_ifc.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/src/soc_ifc.rs b/drivers/src/soc_ifc.rs index e3290fe9b7..857615df35 100644 --- a/drivers/src/soc_ifc.rs +++ b/drivers/src/soc_ifc.rs @@ -311,6 +311,16 @@ impl SocIfc { let ext_info = soc_ifc_regs.cptra_fw_extended_error_info(); ext_info.at(0).write(|_| err); } + + pub fn enable_mbox_notif_interrupts(&mut self) { + let soc_ifc_regs = self.soc_ifc.regs_mut(); + let intr_block = soc_ifc_regs.intr_block_rf(); + + intr_block + .notif_intr_en_r() + .write(|w| w.notif_cmd_avail_en(true)); + intr_block.global_intr_en_r().write(|w| w.notif_en(true)); + } } bitflags::bitflags! {