Lines Matching refs:fdt
3 use fdt::{
68 let fdt = self.fdt_ref()?; in early_scan_device_tree() localVariable
69 self.early_init_scan_nodes(&fdt); in early_scan_device_tree()
80 let fdt_vaddr = boot_params().read().fdt().ok_or(SystemError::ENODEV)?; in fdt_ref()
81 let fdt: Fdt<'_> = unsafe { in fdt_ref() localVariable
82 fdt::Fdt::from_ptr(fdt_vaddr.as_ptr()).map_err(|e| { in fdt_ref()
87 Ok(fdt) in fdt_ref()
90 fn early_init_scan_nodes(&self, fdt: &Fdt) { in early_init_scan_nodes()
91 self.early_init_scan_root(fdt) in early_init_scan_nodes()
94 self.early_init_scan_chosen(fdt).unwrap_or_else(|_| { in early_init_scan_nodes()
98 self.early_init_scan_memory(fdt); in early_init_scan_nodes()
102 fn early_init_scan_root(&self, fdt: &Fdt) -> Result<(), SystemError> { in early_init_scan_root()
103 let node = fdt.find_node("/").ok_or(SystemError::ENODEV)?; in early_init_scan_root()
123 fn early_init_scan_chosen(&self, fdt: &Fdt) -> Result<(), SystemError> { in early_init_scan_chosen()
125 let mut node = fdt.find_node(CHOSEN_NAME1); in early_init_scan_chosen()
128 node = fdt.find_node(CHOSEN_NAME2); in early_init_scan_chosen()
161 fn early_init_scan_memory(&self, fdt: &Fdt) -> bool { in early_init_scan_memory()
163 for node in fdt.all_nodes() { in early_init_scan_memory()
297 let vaddr = boot_params().read().fdt(); in early_init_fdt_scan_reserved_mem()
302 let fdt = unsafe { Fdt::from_ptr(vaddr.data() as *const u8) }; in early_init_fdt_scan_reserved_mem() localVariable
303 if fdt.is_err() { in early_init_fdt_scan_reserved_mem()
307 let fdt = fdt.unwrap(); in early_init_fdt_scan_reserved_mem() localVariable
308 self.early_reserve_fdt_itself(&fdt); in early_init_fdt_scan_reserved_mem()
310 let reserved_mem_nodes = fdt.memory_reservations(); in early_init_fdt_scan_reserved_mem()
321 self.fdt_scan_reserved_mem(&fdt) in early_init_fdt_scan_reserved_mem()
327 fn early_reserve_fdt_itself(&self, fdt: &Fdt) { in early_reserve_fdt_itself()
334 let rsvd_size = page_align_up(fdt_paddr.data() - rsvd_start.data() + fdt.total_size()); in early_reserve_fdt_itself()
342 let _ = fdt; in early_reserve_fdt_itself()
346 fn fdt_scan_reserved_mem(&self, fdt: &Fdt) -> Result<(), SystemError> { in fdt_scan_reserved_mem()
347 let node = fdt in fdt_scan_reserved_mem()
385 fdt: &'b Fdt<'b>, in find_node_by_compatible()
387 ) -> impl Iterator<Item = fdt::node::FdtNode<'b, 'b>> + 'b { in find_node_by_compatible()
389 let r = fdt.all_nodes().filter(move |x| { in find_node_by_compatible()