pub struct BrcmstbGisb {
regs: MmioRegion,
offsets: GisbOffsets,
error_count: AtomicU64,
big_endian: bool,
saved_timeout: u32,
master_names: Vec<String>,
power_state: PowerState,
}Fields§
§regs: MmioRegion§offsets: GisbOffsets§error_count: AtomicU64§big_endian: bool§saved_timeout: u32§master_names: Vec<String>§power_state: PowerStateImplementations§
Source§impl BrcmstbGisb
impl BrcmstbGisb
Sourcepub fn new(offsets: GisbOffsets) -> Self
pub fn new(offsets: GisbOffsets) -> Self
Creates a new instance.
Sourcepub fn set_big_endian(&mut self, big_endian: bool)
pub fn set_big_endian(&mut self, big_endian: bool)
Sets big endian.
Sourcepub fn set_master_names<I: IntoIterator<Item = String>>(&mut self, names: I)
pub fn set_master_names<I: IntoIterator<Item = String>>(&mut self, names: I)
Replaces the bus-master name table.
Entry i names the hardware master whose ID reads back as i
from arb_err_cap_master/arb_bp_cap_master. Tables are
generation-specific; they must be supplied by platform code
(DeviceTree/board support), mirroring Linux’s
gisb_master_names_*[] per-SoC tables.
Sourcepub fn add_master_name(&mut self, name: String)
pub fn add_master_name(&mut self, name: String)
Appends one entry to the master-name table (see Self::set_master_names).
Entries are appended in order, so this positions the name at the
next free master-ID slot.
Sourcepub fn master_name(&self, master: Option<u32>) -> String
pub fn master_name(&self, master: Option<u32>) -> String
Resolves a captured master ID to its human-readable name.
None(generation without a master register) =>"none";- ID present in the configured table => the platform-provided name;
- otherwise =>
"master<N>", still more useful than an empty string.
Sourcefn write_gisb(&self, offset: usize, val: u32)
fn write_gisb(&self, offset: usize, val: u32)
Writes gisb.
Sourcepub fn get_timeout(&self) -> u32
pub fn get_timeout(&self) -> u32
Returns timeout.
Sourcepub fn set_timeout(&self, val: u32)
pub fn set_timeout(&self, val: u32)
Sets timeout.
Sourcepub fn format_error(&self, info: &GisbErrorInfo) -> String
pub fn format_error(&self, info: &GisbErrorInfo) -> String
Formats a captured GISB error into a one-line human-readable report,
e.g. gisb timeout write addr=0x00000000deadbeef master=ethsw.
This is the string platform IRQ handlers should emit in their logs.
Sourcepub fn handle_timeout_irq(&self) -> Option<GisbErrorInfo>
pub fn handle_timeout_irq(&self) -> Option<GisbErrorInfo>
Handles timeout irq.
Sourcepub fn handle_bp_irq(&self) -> Option<GisbErrorInfo>
pub fn handle_bp_irq(&self) -> Option<GisbErrorInfo>
Handles bp irq.
Trait Implementations§
Source§impl BusDriver for BrcmstbGisb
impl BusDriver for BrcmstbGisb
Source§fn compatible(&self) -> &[&str]
fn compatible(&self) -> &[&str]
Performs the compatible operation.
Source§fn error_count(&self) -> u64
fn error_count(&self) -> u64
Performs the error count operation.
Source§fn handle_irq(&mut self) -> bool
fn handle_irq(&mut self) -> bool
Handles irq.
Source§fn as_firewall(&self) -> Option<&dyn FirewallController>
fn as_firewall(&self) -> Option<&dyn FirewallController>
FirewallController] capability, if any. Read more