fres
FPD_ONE_IN(fres)
case FRES: func = fres; type = XB; break;
FLOATFUNC(fres);
static enum mac8390_type mac8390_ident(struct nubus_rsrc *fres)
switch (fres->dr_sw) {
switch (fres->dr_hw) {
switch (fres->dr_hw) {
if (fres->dr_hw == NUBUS_DRHW_CABLETRON)
switch (fres->dr_hw) {
if (fres->dr_hw == NUBUS_DRHW_SMC9194 ||
fres->dr_hw == NUBUS_DRHW_INTERLAN)
struct nubus_rsrc *fres,
struct nubus_board *board = fres->board;
if (nubus_get_func_dir(fres, &dir) == -1) {
struct nubus_rsrc *fres;
for_each_board_func_rsrc(board, fres) {
if (fres->category != NUBUS_CAT_NETWORK ||
fres->type != NUBUS_TYPE_ETHERNET)
cardtype = mac8390_ident(fres);
if (mac8390_rsrc_init(dev, fres, cardtype))
if (!fres)
struct nubus_rsrc *fres;
for_each_func_rsrc(fres)
if (fres->board->slot == slot)
static int macsonic_ident(struct nubus_rsrc *fres)
if (fres->dr_hw == NUBUS_DRHW_ASANTE_LC &&
fres->dr_sw == NUBUS_DRSW_SONIC_LC)
if (fres->dr_hw == NUBUS_DRHW_SONIC &&
fres->dr_sw == NUBUS_DRSW_APPLE) {
if (strstr(fres->board->name, "DuoDock"))
if (fres->dr_hw == NUBUS_DRHW_SMC9194 &&
fres->dr_sw == NUBUS_DRSW_DAYNA)
if (fres->dr_hw == NUBUS_DRHW_APPLE_SONIC_LC &&
fres->dr_sw == 0) { /* huh? */
struct nubus_rsrc *fres;
for_each_board_func_rsrc(board, fres) {
if (fres->category != NUBUS_CAT_NETWORK ||
fres->type != NUBUS_TYPE_ETHERNET)
id = macsonic_ident(fres);
if (!fres)
struct nubus_rsrc *fres, *tmp;
list_for_each_entry_safe(fres, tmp, &nubus_func_rsrcs, list)
if (fres->board == board) {
list_del(&fres->list);
kfree(fres);
int nubus_get_func_dir(const struct nubus_rsrc *fres, struct nubus_dir *dir)
dir->ptr = dir->base = fres->directory;
dir->mask = fres->board->lanes;
static int __init nubus_get_display_resource(struct nubus_rsrc *fres,
nubus_get_block_rsrc_dir(fres->board, procdir, ent);
nubus_get_display_vidmode(fres->board, procdir, ent);
static int __init nubus_get_network_resource(struct nubus_rsrc *fres,
static int __init nubus_get_cpu_resource(struct nubus_rsrc *fres,
static int __init nubus_get_private_resource(struct nubus_rsrc *fres,
switch (fres->category) {
nubus_get_display_resource(fres, procdir, ent);
nubus_get_network_resource(fres, procdir, ent);
nubus_get_cpu_resource(fres, procdir, ent);
struct nubus_rsrc *fres;
fres = kzalloc_obj(*fres, GFP_ATOMIC);
if (!fres)
fres->resid = parent->type;
fres->directory = dir.base;
fres->board = board;
fres->category = nbtdata[0];
fres->type = nbtdata[1];
fres->dr_sw = nbtdata[2];
fres->dr_hw = nbtdata[3];
nubus_get_private_resource(fres, dir.procdir,
return fres;
struct nubus_rsrc *fres;
fres = nubus_get_functional_resource(board, slot, &ent);
if (fres == NULL)
if (fres->resid <= prev_resid) {
kfree(fres);
prev_resid = fres->resid;
list_add_tail(&fres->list, &nubus_func_rsrcs);
struct nubus_rsrc *fres;
for_each_func_rsrc(fres)
fres->board->slot, fres->category, fres->type,
fres->dr_sw, fres->dr_hw, fres->board->slot_addr);
unsigned int fspi, unsigned int max, unsigned int *fres)
*fres = fin / mxc_clkdivs[i];
unsigned int fspi, unsigned int *fres)
*fres = fin / div;
unsigned int fspi, unsigned int *fres)
*fres = (fin / (pre + 1)) >> post;
int nubus_get_func_dir(const struct nubus_rsrc *fres, struct nubus_dir *dir);