Lines Matching refs:PciError
33 pub enum PciError { enum
63 impl Display for PciError { implementation
104 pub fn from_fdt(fdt: &Fdt) -> Result<Self, PciError> { in from_fdt() argument
129 fn pci_node(fdt: &Fdt) -> Result<FdtNode, PciError> { in pci_node() argument
131 .map_err(PciError::FdtErrorPci)? in pci_node()
133 .ok_or(PciError::FdtNoPci) in pci_node()
137 fn parse_cam_range(pci_node: &FdtNode) -> Result<Range<usize>, PciError> { in parse_cam_range() argument
140 .map_err(PciError::FdtErrorReg)? in parse_cam_range()
141 .ok_or(PciError::FdtMissingReg)? in parse_cam_range()
143 .ok_or(PciError::FdtRegEmpty)?; in parse_cam_range()
145 let cam_size = pci_reg.size.ok_or(PciError::FdtRegMissingSize)? as usize; in parse_cam_range()
151 return Err(PciError::CamWrongSize(cam_size)); in parse_cam_range()
159 fn parse_ranges(pci_node: &FdtNode) -> Result<Range<u32>, PciError> { in parse_ranges() argument
165 .map_err(PciError::FdtErrorRanges)? in parse_ranges()
166 .ok_or(PciError::FdtMissingRanges)? in parse_ranges()
188 return Err(PciError::RangeAddressMismatch { bus_address, cpu_physical }); in parse_ranges()
196 return Err(PciError::NoSuitableRange); in parse_ranges()