fn parse_uart(
        &self,
        node: &Node,
        comp: &StringList,
        props: &InheritProps,
    ) -> DeviceResult<DevWithInterrupt> {
        let interrupts_extended = parse_interrupts(node, props)?;
        let base_vaddr = parse_reg(node, props).and_then(|(paddr, size)| {
            self.io_mapper
                .query_or_map(paddr as usize, size as usize)
                .ok_or(DeviceError::NoResources)
        });

        use crate::uart::*;
        let dev = Device::Uart(match comp {
            c if c.contains("ns16550a") => {
                Arc::new(unsafe { Uart16550Mmio::<u8>::new(base_vaddr?) })
            }
            _ => return Err(DeviceError::NotSupported),
        });

        Ok(DevWithInterrupt {
            phandle: None,
            interrupt_cells: None,
            interrupts_extended,
            dev,
        })
    }
/// Parse nodes for UART devices.
Parse nodes for UART devices.
Parse nodes for UART devices .
fn parse_uart(
        &self,
        node: &Node,
        comp: &StringList,
        props: &InheritProps,
    ) -> DeviceResult<DevWithInterrupt> {
        let interrupts_extended = parse_interrupts(node, props)?;
        let base_vaddr = parse_reg(node, props).and_then(|(paddr, size)| {
            self.io_mapper
                .query_or_map(paddr as usize, size as usize)
                .ok_or(DeviceError::NoResources)
        });
        use crate::uart::*;
        let dev = Device::Uart(match comp {
            c if c.contains("ns16550a") => {
                Arc::new(unsafe { Uart16550Mmio::<u8>::new(base_vaddr?) })
            }
            _ => return Err(DeviceError::NotSupported),
        });
        Ok(DevWithInterrupt {
            phandle: None,
            interrupt_cells: None,
            interrupts_extended,
            dev,
        })
    }
fn parse_uart ( & self , node : & Node , comp : & StringList , props : & InheritProps , ) -> DeviceResult < DevWithInterrupt > { let interrupts_extended = parse_interrupts ( node , props ) ? ; let base_vaddr = parse_reg ( node , props ) . and_then ( | ( paddr , size ) | { self . io_mapper . query_or_map ( paddr as usize , size as usize ) . ok_or ( DeviceError :: NoResources ) } ) ; use crate :: uart :: * ; let dev = Device :: Uart ( match comp { c if c . contains ( " " ) => { Arc :: new ( unsafe { Uart16550Mmio :: < u8 > :: new ( base_vaddr ? ) } ) } _ => return Err ( DeviceError :: NotSupported ) , } ) ; Ok ( DevWithInterrupt { phandle : None , interrupt_cells : None , interrupts_extended , dev , } ) }
Parse nodes for UART devices.
Parse nodes for UART devices .
&self
node
&Node
comp
&StringList
props
&InheritProps
&self
node
&Node
comp
&StringList
props
&InheritProps