Lines Matching refs:hsc

133 	struct hme_sbus_softc *hsc;  in hme_sbus_attach()  local
139 hsc = device_get_softc(dev); in hme_sbus_attach()
140 sc = &hsc->hsc_hme; in hme_sbus_attach()
154 hsc->hsc_seb_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in hme_sbus_attach()
156 if (hsc->hsc_seb_res == NULL) { in hme_sbus_attach()
161 sc->sc_sebt = rman_get_bustag(hsc->hsc_seb_res); in hme_sbus_attach()
162 sc->sc_sebh = rman_get_bushandle(hsc->hsc_seb_res); in hme_sbus_attach()
165 hsc->hsc_etx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in hme_sbus_attach()
167 if (hsc->hsc_etx_res == NULL) { in hme_sbus_attach()
172 sc->sc_etxt = rman_get_bustag(hsc->hsc_etx_res); in hme_sbus_attach()
173 sc->sc_etxh = rman_get_bushandle(hsc->hsc_etx_res); in hme_sbus_attach()
176 hsc->hsc_erx_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in hme_sbus_attach()
178 if (hsc->hsc_erx_res == NULL) { in hme_sbus_attach()
183 sc->sc_erxt = rman_get_bustag(hsc->hsc_erx_res); in hme_sbus_attach()
184 sc->sc_erxh = rman_get_bushandle(hsc->hsc_erx_res); in hme_sbus_attach()
187 hsc->hsc_mac_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in hme_sbus_attach()
189 if (hsc->hsc_mac_res == NULL) { in hme_sbus_attach()
194 sc->sc_mact = rman_get_bustag(hsc->hsc_mac_res); in hme_sbus_attach()
195 sc->sc_mach = rman_get_bushandle(hsc->hsc_mac_res); in hme_sbus_attach()
202 hsc->hsc_mif_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in hme_sbus_attach()
204 if (hsc->hsc_mif_res == NULL) { in hme_sbus_attach()
211 if (start < rman_get_start(hsc->hsc_mac_res) || in hme_sbus_attach()
212 start + count - 1 > rman_get_end(hsc->hsc_mac_res)) { in hme_sbus_attach()
220 start - rman_get_start(hsc->hsc_mac_res), count, in hme_sbus_attach()
223 sc->sc_mift = rman_get_bustag(hsc->hsc_mif_res); in hme_sbus_attach()
224 sc->sc_mifh = rman_get_bushandle(hsc->hsc_mif_res); in hme_sbus_attach()
228 hsc->hsc_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ, in hme_sbus_attach()
230 if (hsc->hsc_ires == NULL) { in hme_sbus_attach()
257 if ((error = bus_setup_intr(dev, hsc->hsc_ires, INTR_TYPE_NET | in hme_sbus_attach()
258 INTR_MPSAFE, NULL, hme_intr, sc, &hsc->hsc_ih)) != 0) { in hme_sbus_attach()
267 rman_get_rid(hsc->hsc_ires), hsc->hsc_ires); in hme_sbus_attach()
269 if (hsc->hsc_mif_res != NULL) { in hme_sbus_attach()
271 rman_get_rid(hsc->hsc_mif_res), hsc->hsc_mif_res); in hme_sbus_attach()
275 rman_get_rid(hsc->hsc_mac_res), hsc->hsc_mac_res); in hme_sbus_attach()
278 rman_get_rid(hsc->hsc_erx_res), hsc->hsc_erx_res); in hme_sbus_attach()
281 rman_get_rid(hsc->hsc_etx_res), hsc->hsc_etx_res); in hme_sbus_attach()
284 rman_get_rid(hsc->hsc_seb_res), hsc->hsc_seb_res); in hme_sbus_attach()
293 struct hme_sbus_softc *hsc; in hme_sbus_detach() local
296 hsc = device_get_softc(dev); in hme_sbus_detach()
297 sc = &hsc->hsc_hme; in hme_sbus_detach()
298 bus_teardown_intr(dev, hsc->hsc_ires, hsc->hsc_ih); in hme_sbus_detach()
301 rman_get_rid(hsc->hsc_ires), hsc->hsc_ires); in hme_sbus_detach()
302 if (hsc->hsc_mif_res != NULL) { in hme_sbus_detach()
304 rman_get_rid(hsc->hsc_mif_res), hsc->hsc_mif_res); in hme_sbus_detach()
307 rman_get_rid(hsc->hsc_mac_res), hsc->hsc_mac_res); in hme_sbus_detach()
309 rman_get_rid(hsc->hsc_erx_res), hsc->hsc_erx_res); in hme_sbus_detach()
311 rman_get_rid(hsc->hsc_etx_res), hsc->hsc_etx_res); in hme_sbus_detach()
313 rman_get_rid(hsc->hsc_seb_res), hsc->hsc_seb_res); in hme_sbus_detach()
321 struct hme_sbus_softc *hsc; in hme_sbus_suspend() local
323 hsc = device_get_softc(dev); in hme_sbus_suspend()
324 hme_suspend(&hsc->hsc_hme); in hme_sbus_suspend()
331 struct hme_sbus_softc *hsc; in hme_sbus_resume() local
333 hsc = device_get_softc(dev); in hme_sbus_resume()
334 hme_resume(&hsc->hsc_hme); in hme_sbus_resume()