struct nubus_dir { unsignedchar *base; unsignedchar *ptr; int done; int mask; struct proc_dir_entry *procdir;
};
struct nubus_dirent { unsignedchar *base; unsignedchar type;
__u32 data; /* Actually 24 bits used */ int mask;
};
struct nubus_board { struct device dev;
/* Only 9-E actually exist, though 0-8 are also theoretically possible, and 0 is a special case which represents the
motherboard and onboard peripherals (Ethernet, video) */ int slot; /* For slot 0, this is bogus. */ char name[64];
unsignedlong slot_addr; /* Offset to root directory (sometimes) */ unsignedlong doffset; /* Length over which to compute the crc */ unsignedlong rom_length; /* Completely useless most of the time */ unsignedlong crc; unsignedchar rev; unsignedchar format; unsignedchar lanes;
/* Directory entry in /proc/bus/nubus */ struct proc_dir_entry *procdir;
};
struct nubus_rsrc { struct list_head list;
/* The functional resource ID */ unsignedchar resid; /* These are mostly here for convenience; we could always read
them from the ROMs if we wanted to */ unsignedshort category; unsignedshort type; unsignedshort dr_sw; unsignedshort dr_hw;
/* Functional directory */ unsignedchar *directory; /* Much of our info comes from here */ struct nubus_board *board;
};
/* This is all NuBus functional resources (used to find devices later on) */ externstruct list_head nubus_func_rsrcs;
#define for_each_func_rsrc(f) \ for (f = nubus_first_rsrc_or_null(); f; f = nubus_next_rsrc_or_null(f))
#define for_each_board_func_rsrc(b, f) \
for_each_func_rsrc(f) if (f->board != b) {} else
/* These are somewhat more NuBus-specific. They all return 0 for
success and -1 for failure, as you'd expect. */
/* The root directory which contains the board and functional
directories */ int nubus_get_root_dir(conststruct nubus_board *board, struct nubus_dir *dir); /* The board directory */ int nubus_get_board_dir(conststruct nubus_board *board, struct nubus_dir *dir); /* The functional directory */ int nubus_get_func_dir(conststruct nubus_rsrc *fres, struct nubus_dir *dir);
/* These work on any directory gotten via the above */ int nubus_readdir(struct nubus_dir *dir, struct nubus_dirent *ent); int nubus_find_rsrc(struct nubus_dir *dir, unsignedchar rsrc_type, struct nubus_dirent *ent); int nubus_rewinddir(struct nubus_dir *dir);
/* Things to do with directory entries */ int nubus_get_subdir(conststruct nubus_dirent *ent, struct nubus_dir *dir); void nubus_get_rsrc_mem(void *dest, conststruct nubus_dirent *dirent, unsignedint len); unsignedint nubus_get_rsrc_str(char *dest, conststruct nubus_dirent *dirent, unsignedint len); void nubus_seq_write_rsrc_mem(struct seq_file *m, conststruct nubus_dirent *dirent, unsignedint len); unsignedchar *nubus_dirptr(conststruct nubus_dirent *nd);
/* Declarations relating to driver model objects */ int nubus_parent_device_register(void); int nubus_device_register(struct nubus_board *board); int nubus_driver_register(struct nubus_driver *ndrv); void nubus_driver_unregister(struct nubus_driver *ndrv); int nubus_proc_show(struct seq_file *m, void *data);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.