Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bhnd/bcma/bcma_bhndb.c
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Supports attachment of bcma(4) bus devices via a bhndb bridge. | * Supports attachment of bcma(4) bus devices via a bhndb bridge. | ||||
*/ | */ | ||||
static int | static int | ||||
bcma_bhndb_probe(device_t dev) | bcma_bhndb_probe(device_t dev) | ||||
{ | { | ||||
const struct bhnd_chipid *cid; | const struct bhnd_chipid *cid; | ||||
int error; | |||||
/* Defer to default probe implementation */ | |||||
if ((error = bcma_probe(dev)) > 0) | |||||
return (error); | |||||
/* Check bus type */ | /* Check bus type */ | ||||
cid = BHNDB_GET_CHIPID(device_get_parent(dev), dev); | cid = BHNDB_GET_CHIPID(device_get_parent(dev), dev); | ||||
if (cid->chip_type != BHND_CHIPTYPE_BCMA) | if (cid->chip_type != BHND_CHIPTYPE_BCMA) | ||||
return (ENXIO); | return (ENXIO); | ||||
/* Delegate to default probe implementation */ | /* Set device description */ | ||||
return (bcma_probe(dev)); | bhnd_set_default_bus_desc(dev, cid); | ||||
return (error); | |||||
} | } | ||||
static int | static int | ||||
bcma_bhndb_attach(device_t dev) | bcma_bhndb_attach(device_t dev) | ||||
{ | { | ||||
struct bcma_softc *sc; | struct bcma_softc *sc; | ||||
const struct bhnd_chipid *cid; | const struct bhnd_chipid *cid; | ||||
struct resource *erom_res; | struct resource *erom_res; | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |