1 // SPDX-License-Identifier: GPL-2.0 2 3 use crate::{ 4 driver::Bar0, 5 falcon::{Falcon, FalconEngine, PFalconBase}, 6 regs::{self, macros::RegisterBase}, 7 }; 8 9 /// Type specifying the `Gsp` falcon engine. Cannot be instantiated. 10 pub(crate) struct Gsp(()); 11 12 impl RegisterBase<PFalconBase> for Gsp { 13 const BASE: usize = 0x00110000; 14 } 15 16 impl FalconEngine for Gsp { 17 const ID: Self = Gsp(()); 18 } 19 20 impl Falcon<Gsp> { 21 /// Clears the SWGEN0 bit in the Falcon's IRQ status clear register to 22 /// allow GSP to signal CPU for processing new messages in message queue. 23 pub(crate) fn clear_swgen0_intr(&self, bar: &Bar0) { 24 regs::NV_PFALCON_FALCON_IRQSCLR::default() 25 .set_swgen0(true) 26 .write(bar, &Gsp::ID); 27 } 28 } 29