Lines Matching refs:ent
242 struct nubus_dirent ent; in nubus_get_board_dir() local
250 if (nubus_readdir(dir, &ent) == -1) in nubus_get_board_dir()
252 if (nubus_get_subdir(&ent, dir) == -1) in nubus_get_board_dir()
258 int nubus_get_subdir(const struct nubus_dirent *ent, in nubus_get_subdir() argument
261 dir->ptr = dir->base = nubus_dirptr(ent); in nubus_get_subdir()
263 dir->mask = ent->mask; in nubus_get_subdir()
268 int nubus_readdir(struct nubus_dir *nd, struct nubus_dirent *ent) in nubus_readdir() argument
276 ent->base = nd->ptr; in nubus_readdir()
289 ent->type = resid >> 24; in nubus_readdir()
291 ent->data = resid & 0xffffff; in nubus_readdir()
292 ent->mask = nd->mask; in nubus_readdir()
324 struct nubus_dirent *ent) in nubus_find_rsrc() argument
326 while (nubus_readdir(dir, ent) != -1) { in nubus_find_rsrc()
327 if (ent->type == rsrc_type) in nubus_find_rsrc()
343 struct nubus_dirent ent; in nubus_get_block_rsrc_dir() local
348 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_block_rsrc_dir()
351 nubus_get_rsrc_mem(&size, &ent, 4); in nubus_get_block_rsrc_dir()
352 pr_debug(" block (0x%x), size %d\n", ent.type, size); in nubus_get_block_rsrc_dir()
353 nubus_proc_add_rsrc_mem(dir.procdir, &ent, size); in nubus_get_block_rsrc_dir()
363 struct nubus_dirent ent; in nubus_get_display_vidmode() local
368 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_display_vidmode()
369 switch (ent.type) { in nubus_get_display_vidmode()
375 nubus_get_rsrc_mem(&size, &ent, 4); in nubus_get_display_vidmode()
376 pr_debug(" block (0x%x), size %d\n", ent.type, in nubus_get_display_vidmode()
378 nubus_proc_add_rsrc_mem(dir.procdir, &ent, size); in nubus_get_display_vidmode()
383 ent.type, ent.data); in nubus_get_display_vidmode()
384 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 0); in nubus_get_display_vidmode()
392 const struct nubus_dirent *ent) in nubus_get_display_resource() argument
394 switch (ent->type) { in nubus_get_display_resource()
396 pr_debug(" gamma directory offset: 0x%06x\n", ent->data); in nubus_get_display_resource()
397 nubus_get_block_rsrc_dir(fres->board, procdir, ent); in nubus_get_display_resource()
401 ent->type, ent->data); in nubus_get_display_resource()
402 nubus_get_display_vidmode(fres->board, procdir, ent); in nubus_get_display_resource()
406 ent->type, ent->data); in nubus_get_display_resource()
407 nubus_proc_add_rsrc_mem(procdir, ent, 0); in nubus_get_display_resource()
414 const struct nubus_dirent *ent) in nubus_get_network_resource() argument
416 switch (ent->type) { in nubus_get_network_resource()
421 nubus_get_rsrc_mem(addr, ent, 6); in nubus_get_network_resource()
423 nubus_proc_add_rsrc_mem(procdir, ent, 6); in nubus_get_network_resource()
428 ent->type, ent->data); in nubus_get_network_resource()
429 nubus_proc_add_rsrc_mem(procdir, ent, 0); in nubus_get_network_resource()
436 const struct nubus_dirent *ent) in nubus_get_cpu_resource() argument
438 switch (ent->type) { in nubus_get_cpu_resource()
443 nubus_get_rsrc_mem(&meminfo, ent, 8); in nubus_get_cpu_resource()
446 nubus_proc_add_rsrc_mem(procdir, ent, 8); in nubus_get_cpu_resource()
453 nubus_get_rsrc_mem(&rominfo, ent, 8); in nubus_get_cpu_resource()
456 nubus_proc_add_rsrc_mem(procdir, ent, 8); in nubus_get_cpu_resource()
461 ent->type, ent->data); in nubus_get_cpu_resource()
462 nubus_proc_add_rsrc_mem(procdir, ent, 0); in nubus_get_cpu_resource()
469 const struct nubus_dirent *ent) in nubus_get_private_resource() argument
473 nubus_get_display_resource(fres, procdir, ent); in nubus_get_private_resource()
476 nubus_get_network_resource(fres, procdir, ent); in nubus_get_private_resource()
479 nubus_get_cpu_resource(fres, procdir, ent); in nubus_get_private_resource()
483 ent->type, ent->data); in nubus_get_private_resource()
484 nubus_proc_add_rsrc_mem(procdir, ent, 0); in nubus_get_private_resource()
494 struct nubus_dirent ent; in nubus_get_functional_resource() local
509 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_functional_resource()
510 switch (ent.type) { in nubus_get_functional_resource()
515 nubus_get_rsrc_mem(nbtdata, &ent, 8); in nubus_get_functional_resource()
522 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 8); in nubus_get_functional_resource()
530 len = nubus_get_rsrc_str(name, &ent, sizeof(name)); in nubus_get_functional_resource()
532 nubus_proc_add_rsrc_mem(dir.procdir, &ent, len + 1); in nubus_get_functional_resource()
540 ent.data); in nubus_get_functional_resource()
541 nubus_get_block_rsrc_dir(board, dir.procdir, &ent); in nubus_get_functional_resource()
551 nubus_get_rsrc_mem(&base_offset, &ent, 4); in nubus_get_functional_resource()
553 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 4); in nubus_get_functional_resource()
561 nubus_get_rsrc_mem(&length, &ent, 4); in nubus_get_functional_resource()
563 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 4); in nubus_get_functional_resource()
567 pr_debug(" flags: 0x%06x\n", ent.data); in nubus_get_functional_resource()
568 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_functional_resource()
571 pr_debug(" hwdevid: 0x%06x\n", ent.data); in nubus_get_functional_resource()
572 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_functional_resource()
577 nubus_get_private_resource(fres, dir.procdir, &ent); in nubus_get_functional_resource()
587 const struct nubus_dirent *ent) in nubus_get_icon() argument
593 nubus_get_rsrc_mem(&icon, ent, 128); in nubus_get_icon()
599 nubus_proc_add_rsrc_mem(procdir, ent, 128); in nubus_get_icon()
609 struct nubus_dirent ent; in nubus_get_vendorinfo() local
617 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_vendorinfo()
622 len = nubus_get_rsrc_str(name, &ent, sizeof(name)); in nubus_get_vendorinfo()
623 if (ent.type < 1 || ent.type > 5) in nubus_get_vendorinfo()
624 ent.type = 5; in nubus_get_vendorinfo()
625 pr_debug(" %s: %s\n", vendor_fields[ent.type - 1], name); in nubus_get_vendorinfo()
626 nubus_proc_add_rsrc_mem(dir.procdir, &ent, len + 1); in nubus_get_vendorinfo()
635 struct nubus_dirent ent; in nubus_get_board_resource() local
641 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_board_resource()
642 switch (ent.type) { in nubus_get_board_resource()
649 nubus_get_rsrc_mem(nbtdata, &ent, 8); in nubus_get_board_resource()
656 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 8); in nubus_get_board_resource()
663 len = nubus_get_rsrc_str(board->name, &ent, in nubus_get_board_resource()
666 nubus_proc_add_rsrc_mem(dir.procdir, &ent, len + 1); in nubus_get_board_resource()
670 nubus_get_icon(board, dir.procdir, &ent); in nubus_get_board_resource()
673 pr_debug(" board id: 0x%x\n", ent.data); in nubus_get_board_resource()
674 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
677 pr_debug(" primary init offset: 0x%06x\n", ent.data); in nubus_get_board_resource()
678 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
681 nubus_get_vendorinfo(board, dir.procdir, &ent); in nubus_get_board_resource()
684 pr_debug(" flags: 0x%06x\n", ent.data); in nubus_get_board_resource()
685 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
688 pr_debug(" hwdevid: 0x%06x\n", ent.data); in nubus_get_board_resource()
689 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
693 ent.data); in nubus_get_board_resource()
694 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
699 ent.data); in nubus_get_board_resource()
700 nubus_get_block_rsrc_dir(board, dir.procdir, &ent); in nubus_get_board_resource()
705 ent.data); in nubus_get_board_resource()
706 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
710 ent.type, ent.data); in nubus_get_board_resource()
711 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 0); in nubus_get_board_resource()
723 struct nubus_dirent ent; in nubus_add_board() local
792 if (nubus_readdir(&dir, &ent) == -1) { in nubus_add_board()
799 if (ent.type < 1 || ent.type > 127) in nubus_add_board()
804 nubus_get_board_resource(board, slot, &ent); in nubus_add_board()
806 while (nubus_readdir(&dir, &ent) != -1) { in nubus_add_board()
809 fres = nubus_get_functional_resource(board, slot, &ent); in nubus_add_board()