Lines Matching refs:dev
31 __FBSDID("$FreeBSD: releng/11.0/sys/dev/bhnd/bcma/bcma_bhndb.c 300445 2016-05-23 03:47:44Z adrian $");
38 #include <dev/bhnd/bhnd_ids.h>
39 #include <dev/bhnd/bhndb/bhndbvar.h>
40 #include <dev/bhnd/bhndb/bhndb_hwdata.h>
52 bcma_bhndb_probe(device_t dev)
57 cid = BHNDB_GET_CHIPID(device_get_parent(dev), dev);
62 return (bcma_probe(dev));
66 bcma_bhndb_attach(device_t dev)
74 sc = device_get_softc(dev);
77 cid = BHNDB_GET_CHIPID(device_get_parent(dev), dev);
79 erom_res = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, cid->enum_addr,
83 device_printf(dev, "failed to allocate EROM resource\n");
87 error = bcma_add_children(dev, erom_res, BCMA_EROM_TABLE_START);
90 bus_release_resource(dev, SYS_RES_MEMORY, rid, erom_res);
95 error = BHNDB_INIT_FULL_CONFIG(device_get_parent(dev), dev,
101 sc->hostb_dev = BHNDB_FIND_HOSTB_DEVICE(device_get_parent(dev), dev);
104 return (bcma_attach(dev));
108 bcma_bhndb_suspend_child(device_t dev, device_t child)
113 if (device_get_parent(child) != dev)
114 BUS_SUSPEND_CHILD(device_get_parent(dev), child);
122 if ((error = bhnd_generic_br_suspend_child(dev, child)))
127 BHNDB_SUSPEND_RESOURCE(device_get_parent(dev), dev,
134 bcma_bhndb_resume_child(device_t dev, device_t child)
139 if (device_get_parent(child) != dev)
140 BUS_SUSPEND_CHILD(device_get_parent(dev), child);
149 error = BHNDB_RESUME_RESOURCE(device_get_parent(dev), dev,
156 if ((error = bhnd_generic_br_resume_child(dev, child))) {
159 BHNDB_SUSPEND_RESOURCE(device_get_parent(dev), dev,