/* * Initialize the vars from the right source for this platform. * Return 0 on success, nonzero on error. */ int srom_var_init(uint bus, void *curmap, void *osh, char **vars, int *count) { if (vars == NULL) return (0); switch (bus) { case SB_BUS: /* These two could be asserts ... */ *vars = NULL; *count = 0; return(0); case PCI_BUS: ASSERT(curmap); /* can not be NULL */ return(initvars_srom_pci(curmap, vars, count)); case PCMCIA_BUS: return(initvars_cis_pcmcia(osh, vars, count)); default: ASSERT(0); } return (-1); }
/* * Initialize local vars from the right source for this platform. * Return 0 on success, nonzero on error. */ int srom_var_init(void *sbh, uint bustype, void *curmap, osl_t *osh, char **vars, uint *count) { ASSERT(bustype == BUSTYPE(bustype)); if (vars == NULL || count == NULL) return (0); switch (BUSTYPE(bustype)) { case SB_BUS: case JTAG_BUS: return initvars_flash_sb(sbh, vars, count); case PCI_BUS: ASSERT(curmap); /* can not be NULL */ return initvars_srom_pci(sbh, curmap, vars, count); case PCMCIA_BUS: return initvars_cis_pcmcia(sbh, osh, vars, count); default: ASSERT(0); } return (-1); }
/* * Initialize local vars from the right source for this platform. * Return 0 on success, nonzero on error. */ int srom_var_init(si_t *sih, uint bustype, void *curmap, char **vars, uint *count) { uint len; len = 0; ASSERT(bustype == bustype); if (vars == NULL || count == NULL) return 0; *vars = NULL; *count = 0; switch (bustype) { case SI_BUS: case JTAG_BUS: return initvars_srom_si(sih, curmap, vars, count); case PCI_BUS: ASSERT(curmap != NULL); if (curmap == NULL) return -1; return initvars_srom_pci(sih, curmap, vars, count); #ifdef BCMSDIO case SDIO_BUS: return initvars_cis_sdio(vars, count); #endif /* BCMSDIO */ default: ASSERT(0); } return -1; }