fn parse_device(
        &self,
        node: &Node,
        comp: &StringList,
        props: &InheritProps,
    ) -> DeviceResult<DevWithInterrupt> {
        debug!(
            "device-tree: parsing node {:?} with compatible {:?}",
            node.name, comp
        );
        // parse interrupt controller
        let res = if node.has_prop("interrupt-controller") {
            self.parse_intc(node, comp, props)
        } else {
            // parse other device
            match comp {
                #[cfg(feature = "virtio")]
                c if c.contains("virtio,mmio") => self.parse_virtio(node, props),
                c if c.contains("ns16550a") => self.parse_uart(node, comp, props),
                _ => Err(DeviceError::NotSupported),
            }
        };

        if let Err(err) = &res {
            if !matches!(err, DeviceError::NotSupported) {
                warn!(
                    "device-tree: failed to parsing node {:?}: {:?}",
                    node.name, err
                );
            }
        }
        res
    }
/// Parse nodes for interrupt generating devices.
Parse nodes for interrupt generating devices.
Parse nodes for interrupt generating devices .
fn parse_device(
        &self,
        node: &Node,
        comp: &StringList,
        props: &InheritProps,
    ) -> DeviceResult<DevWithInterrupt> {
        debug!(
            "device-tree: parsing node {:?} with compatible {:?}",
            node.name, comp
        );
        // parse interrupt controller
        let res = if node.has_prop("interrupt-controller") {
            self.parse_intc(node, comp, props)
        } else {
            // parse other device
            match comp {
                #[cfg(feature = "virtio")]
                c if c.contains("virtio,mmio") => self.parse_virtio(node, props),
                c if c.contains("ns16550a") => self.parse_uart(node, comp, props),
                _ => Err(DeviceError::NotSupported),
            }
        };
        if let Err(err) = &res {
            if !matches!(err, DeviceError::NotSupported) {
                warn!(
                    "device-tree: failed to parsing node {:?}: {:?}",
                    node.name, err
                );
            }
        }
        res
    }
fn parse_device ( & self , node : & Node , comp : & StringList , props : & InheritProps , ) -> DeviceResult < DevWithInterrupt > { debug ! ( " " node name comp ) ; // parse interrupt controller let res = if node . has_prop ( " " ) { self . parse_intc ( node , comp , props ) } else { // parse other device match comp { # [ cfg ( feature " " ) ] c if c . contains ( " " ) => self . parse_virtio ( node , props ) , c if c . contains ( " " ) => self . parse_uart ( node , comp , props ) , _ => Err ( DeviceError :: NotSupported ) , } } ; if let Err ( err ) = & res { if ! matches ! ( err DeviceError NotSupported ) { warn ! ( " " node name err ) ; } } res }
Parse nodes for interrupt generating devices.
Parse nodes for interrupt generating devices .
&self
node
&Node
comp
&StringList
props
&InheritProps
&self
node
&Node
comp
&StringList
props
&InheritProps