Lines Matching refs:dir
227 struct nubus_dir *dir) in nubus_get_root_dir() argument
229 dir->ptr = dir->base = board->directory; in nubus_get_root_dir()
230 dir->done = 0; in nubus_get_root_dir()
231 dir->mask = board->lanes; in nubus_get_root_dir()
237 int nubus_get_func_dir(const struct nubus_rsrc *fres, struct nubus_dir *dir) in nubus_get_func_dir() argument
239 dir->ptr = dir->base = fres->directory; in nubus_get_func_dir()
240 dir->done = 0; in nubus_get_func_dir()
241 dir->mask = fres->board->lanes; in nubus_get_func_dir()
247 struct nubus_dir *dir) in nubus_get_board_dir() argument
251 dir->ptr = dir->base = board->directory; in nubus_get_board_dir()
252 dir->done = 0; in nubus_get_board_dir()
253 dir->mask = board->lanes; in nubus_get_board_dir()
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()
266 struct nubus_dir *dir) in nubus_get_subdir() argument
268 dir->ptr = dir->base = nubus_dirptr(ent); in nubus_get_subdir()
269 dir->done = 0; in nubus_get_subdir()
270 dir->mask = ent->mask; in nubus_get_subdir()
304 int nubus_rewinddir(struct nubus_dir *dir) in nubus_rewinddir() argument
306 dir->ptr = dir->base; in nubus_rewinddir()
307 dir->done = 0; in nubus_rewinddir()
330 nubus_find_rsrc(struct nubus_dir *dir, unsigned char rsrc_type, in nubus_find_rsrc() argument
333 while (nubus_readdir(dir, ent) != -1) { in nubus_find_rsrc()
349 struct nubus_dir dir; in nubus_get_block_rsrc_dir() local
352 nubus_get_subdir(parent, &dir); in nubus_get_block_rsrc_dir()
353 dir.procdir = nubus_proc_add_rsrc_dir(procdir, parent, board); in nubus_get_block_rsrc_dir()
355 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_block_rsrc_dir()
360 nubus_proc_add_rsrc_mem(dir.procdir, &ent, size); in nubus_get_block_rsrc_dir()
369 struct nubus_dir dir; in nubus_get_display_vidmode() local
372 nubus_get_subdir(parent, &dir); in nubus_get_display_vidmode()
373 dir.procdir = nubus_proc_add_rsrc_dir(procdir, parent, board); in nubus_get_display_vidmode()
375 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_display_vidmode()
385 nubus_proc_add_rsrc_mem(dir.procdir, &ent, size); in nubus_get_display_vidmode()
391 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 0); in nubus_get_display_vidmode()
500 struct nubus_dir dir; in nubus_get_functional_resource() local
505 nubus_get_subdir(parent, &dir); in nubus_get_functional_resource()
506 dir.procdir = nubus_proc_add_rsrc_dir(board->procdir, parent, board); in nubus_get_functional_resource()
513 fres->directory = dir.base; in nubus_get_functional_resource()
516 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_functional_resource()
529 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 8); in nubus_get_functional_resource()
539 nubus_proc_add_rsrc_mem(dir.procdir, &ent, len + 1); in nubus_get_functional_resource()
548 nubus_get_block_rsrc_dir(board, dir.procdir, &ent); in nubus_get_functional_resource()
560 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 4); in nubus_get_functional_resource()
570 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 4); in nubus_get_functional_resource()
575 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_functional_resource()
579 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_functional_resource()
583 nubus_get_private_resource(fres, dir.procdir, in nubus_get_functional_resource()
615 struct nubus_dir dir; in nubus_get_vendorinfo() local
621 nubus_get_subdir(parent, &dir); in nubus_get_vendorinfo()
622 dir.procdir = nubus_proc_add_rsrc_dir(procdir, parent, board); in nubus_get_vendorinfo()
624 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_vendorinfo()
633 nubus_proc_add_rsrc_mem(dir.procdir, &ent, len + 1); in nubus_get_vendorinfo()
641 struct nubus_dir dir; in nubus_get_board_resource() local
645 nubus_get_subdir(parent, &dir); in nubus_get_board_resource()
646 dir.procdir = nubus_proc_add_rsrc_dir(board->procdir, parent, board); in nubus_get_board_resource()
648 while (nubus_readdir(&dir, &ent) != -1) { in nubus_get_board_resource()
663 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 8); 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()
681 nubus_proc_add_rsrc(dir.procdir, &ent); 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()
692 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
696 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
701 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
707 nubus_get_block_rsrc_dir(board, dir.procdir, &ent); in nubus_get_board_resource()
713 nubus_proc_add_rsrc(dir.procdir, &ent); in nubus_get_board_resource()
718 nubus_proc_add_rsrc_mem(dir.procdir, &ent, 0); in nubus_get_board_resource()
729 struct nubus_dir dir; in nubus_add_board() local
788 nubus_get_root_dir(board, &dir); in nubus_add_board()
799 if (nubus_readdir(&dir, &ent) == -1) { in nubus_add_board()
813 while (nubus_readdir(&dir, &ent) != -1) { in nubus_add_board()