Lines Matching full:ent
249 struct nubus_dirent ent; in nubus_get_board_dir() local
257 if (nubus_readdir(dir, &ent) == -1) in nubus_get_board_dir()
259 if (nubus_get_subdir(&ent, dir) == -1) in nubus_get_board_dir()
265 int nubus_get_subdir(const struct nubus_dirent *ent, in nubus_get_subdir() argument
268 dir->ptr = dir->base = nubus_dirptr(ent); in nubus_get_subdir()
270 dir->mask = ent->mask; in nubus_get_subdir()
275 int nubus_readdir(struct nubus_dir *nd, struct nubus_dirent *ent) in nubus_readdir() argument
283 ent->base = nd->ptr; in nubus_readdir()
296 ent->type = resid >> 24; in nubus_readdir()
298 ent->data = resid & 0xffffff; in nubus_readdir()
299 ent->mask = nd->mask; in nubus_readdir()
331 struct nubus_dirent *ent) in nubus_find_rsrc() argument
333 while (nubus_readdir(dir, ent) != -1) { in nubus_find_rsrc()
334 if (ent->type == rsrc_type) in nubus_find_rsrc()
350 struct nubus_dirent ent; in nubus_get_block_rsrc_dir() local
355 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_block_rsrc_dir()
358 nubus_get_rsrc_mem(&size, &ent, 4); in nubus_get_block_rsrc_dir()
359 pr_debug(" block (0x%x), size %d\n", ent.type, size); in nubus_get_block_rsrc_dir()
360 nubus_proc_add_rsrc_mem(dir.procdir, &ent, size); in nubus_get_block_rsrc_dir()
370 struct nubus_dirent ent; in nubus_get_display_vidmode() local
375 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_display_vidmode()
376 switch (ent.type) { in nubus_get_display_vidmode()
382 nubus_get_rsrc_mem(&size, &ent, 4); in nubus_get_display_vidmode()
383 pr_debug(" block (0x%x), size %d\n", ent.type, in nubus_get_display_vidmode()
385 nubus_proc_add_rsrc_mem(dir.procdir, &ent, size); in nubus_get_display_vidmode()
390 ent.type, ent.data); in nubus_get_display_vidmode()
391 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 0); in nubus_get_display_vidmode()
399 const struct nubus_dirent *ent) in nubus_get_display_resource() argument
401 switch (ent->type) { in nubus_get_display_resource()
403 pr_debug(" gamma directory offset: 0x%06x\n", ent->data); in nubus_get_display_resource()
404 nubus_get_block_rsrc_dir(fres->board, procdir, ent); in nubus_get_display_resource()
408 ent->type, ent->data); in nubus_get_display_resource()
409 nubus_get_display_vidmode(fres->board, procdir, ent); in nubus_get_display_resource()
413 ent->type, ent->data); in nubus_get_display_resource()
414 nubus_proc_add_rsrc_mem(procdir, ent, 0); in nubus_get_display_resource()
421 const struct nubus_dirent *ent) in nubus_get_network_resource() argument
423 switch (ent->type) { in nubus_get_network_resource()
428 nubus_get_rsrc_mem(addr, ent, 6); in nubus_get_network_resource()
430 nubus_proc_add_rsrc_mem(procdir, ent, 6); in nubus_get_network_resource()
435 ent->type, ent->data); in nubus_get_network_resource()
436 nubus_proc_add_rsrc_mem(procdir, ent, 0); in nubus_get_network_resource()
443 const struct nubus_dirent *ent) in nubus_get_cpu_resource() argument
445 switch (ent->type) { in nubus_get_cpu_resource()
450 nubus_get_rsrc_mem(&meminfo, ent, 8); in nubus_get_cpu_resource()
453 nubus_proc_add_rsrc_mem(procdir, ent, 8); in nubus_get_cpu_resource()
460 nubus_get_rsrc_mem(&rominfo, ent, 8); in nubus_get_cpu_resource()
463 nubus_proc_add_rsrc_mem(procdir, ent, 8); in nubus_get_cpu_resource()
468 ent->type, ent->data); in nubus_get_cpu_resource()
469 nubus_proc_add_rsrc_mem(procdir, ent, 0); in nubus_get_cpu_resource()
476 const struct nubus_dirent *ent) in nubus_get_private_resource() argument
480 nubus_get_display_resource(fres, procdir, ent); in nubus_get_private_resource()
483 nubus_get_network_resource(fres, procdir, ent); in nubus_get_private_resource()
486 nubus_get_cpu_resource(fres, procdir, ent); in nubus_get_private_resource()
490 ent->type, ent->data); in nubus_get_private_resource()
491 nubus_proc_add_rsrc_mem(procdir, ent, 0); in nubus_get_private_resource()
501 struct nubus_dirent ent; in nubus_get_functional_resource() local
516 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_functional_resource()
517 switch (ent.type) { in nubus_get_functional_resource()
522 nubus_get_rsrc_mem(nbtdata, &ent, 8); in nubus_get_functional_resource()
529 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 8); in nubus_get_functional_resource()
537 len = nubus_get_rsrc_str(name, &ent, sizeof(name)); in nubus_get_functional_resource()
539 nubus_proc_add_rsrc_mem(dir.procdir, &ent, len + 1); in nubus_get_functional_resource()
547 ent.data); in nubus_get_functional_resource()
548 nubus_get_block_rsrc_dir(board, dir.procdir, &ent); in nubus_get_functional_resource()
558 nubus_get_rsrc_mem(&base_offset, &ent, 4); in nubus_get_functional_resource()
560 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 4); in nubus_get_functional_resource()
568 nubus_get_rsrc_mem(&length, &ent, 4); in nubus_get_functional_resource()
570 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 4); in nubus_get_functional_resource()
574 pr_debug(" flags: 0x%06x\n", ent.data); in nubus_get_functional_resource()
575 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_functional_resource()
578 pr_debug(" hwdevid: 0x%06x\n", ent.data); in nubus_get_functional_resource()
579 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_functional_resource()
584 &ent); in nubus_get_functional_resource()
594 const struct nubus_dirent *ent) in nubus_get_icon() argument
600 nubus_get_rsrc_mem(&icon, ent, 128); in nubus_get_icon()
606 nubus_proc_add_rsrc_mem(procdir, ent, 128); in nubus_get_icon()
616 struct nubus_dirent ent; in nubus_get_vendorinfo() local
624 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_vendorinfo()
629 len = nubus_get_rsrc_str(name, &ent, sizeof(name)); in nubus_get_vendorinfo()
630 if (ent.type < 1 || ent.type > 5) in nubus_get_vendorinfo()
631 ent.type = 5; in nubus_get_vendorinfo()
632 pr_debug(" %s: %s\n", vendor_fields[ent.type - 1], name); in nubus_get_vendorinfo()
633 nubus_proc_add_rsrc_mem(dir.procdir, &ent, len + 1); in nubus_get_vendorinfo()
642 struct nubus_dirent ent; in nubus_get_board_resource() local
648 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_board_resource()
649 switch (ent.type) { in nubus_get_board_resource()
656 nubus_get_rsrc_mem(nbtdata, &ent, 8); in nubus_get_board_resource()
663 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 8); in nubus_get_board_resource()
670 len = nubus_get_rsrc_str(board->name, &ent, in nubus_get_board_resource()
673 nubus_proc_add_rsrc_mem(dir.procdir, &ent, len + 1); in nubus_get_board_resource()
677 nubus_get_icon(board, dir.procdir, &ent); in nubus_get_board_resource()
680 pr_debug(" board id: 0x%x\n", ent.data); in nubus_get_board_resource()
681 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
684 pr_debug(" primary init offset: 0x%06x\n", ent.data); in nubus_get_board_resource()
685 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
688 nubus_get_vendorinfo(board, dir.procdir, &ent); in nubus_get_board_resource()
691 pr_debug(" flags: 0x%06x\n", ent.data); in nubus_get_board_resource()
692 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
695 pr_debug(" hwdevid: 0x%06x\n", ent.data); in nubus_get_board_resource()
696 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
700 ent.data); in nubus_get_board_resource()
701 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
706 ent.data); in nubus_get_board_resource()
707 nubus_get_block_rsrc_dir(board, dir.procdir, &ent); in nubus_get_board_resource()
712 ent.data); in nubus_get_board_resource()
713 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
717 ent.type, ent.data); in nubus_get_board_resource()
718 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 0); in nubus_get_board_resource()
730 struct nubus_dirent ent; in nubus_add_board() local
799 if (nubus_readdir(&dir, &ent) == -1) { in nubus_add_board()
806 if (ent.type < 1 || ent.type > 127) in nubus_add_board()
811 nubus_get_board_resource(board, slot, &ent); in nubus_add_board()
813 while (nubus_readdir(&dir, &ent) != -1) { in nubus_add_board()
816 fres = nubus_get_functional_resource(board, slot, &ent); in nubus_add_board()