FreeBSD/sys/dev/altera/atse/if_atse.c
/* Shared between nexus and fdt implementation. */
Shared between nexus and fdt implementation.
Shared between nexus and fdt implementation .
void
atse_detach_resources(device_t dev)
{
	struct atse_softc *sc;
	sc = device_get_softc(dev);
	if (sc->atse_txc_mem_res != NULL) {
		bus_release_resource(dev, SYS_RES_MEMORY, sc->atse_txc_mem_rid,
		    sc->atse_txc_mem_res);
		sc->atse_txc_mem_res = NULL;
	}
	if (sc->atse_tx_mem_res != NULL) {
		bus_release_resource(dev, SYS_RES_MEMORY, sc->atse_tx_mem_rid,
		    sc->atse_tx_mem_res);
		sc->atse_tx_mem_res = NULL;
	}
	if (sc->atse_tx_irq_res != NULL) {
		bus_release_resource(dev, SYS_RES_IRQ, sc->atse_tx_irq_rid,
		    sc->atse_tx_irq_res);
		sc->atse_tx_irq_res = NULL;
	}
	if (sc->atse_rxc_mem_res != NULL) {
		bus_release_resource(dev, SYS_RES_MEMORY, sc->atse_rxc_mem_rid,
		    sc->atse_rxc_mem_res);
		sc->atse_rxc_mem_res = NULL;
	}
	if (sc->atse_rx_mem_res != NULL) {
		bus_release_resource(dev, SYS_RES_MEMORY, sc->atse_rx_mem_rid,
		    sc->atse_rx_mem_res);
		sc->atse_rx_mem_res = NULL;
	}
	if (sc->atse_rx_irq_res != NULL) {
		bus_release_resource(dev, SYS_RES_IRQ, sc->atse_rx_irq_rid,
		    sc->atse_rx_irq_res);
		sc->atse_rx_irq_res = NULL;
	}
	if (sc->atse_mem_res != NULL) {
		bus_release_resource(dev, SYS_RES_MEMORY, sc->atse_mem_rid,
		    sc->atse_mem_res);
		sc->atse_mem_res = NULL;
	}
}
void atse_detach_resources ( device_t dev ) { struct atse_softc * sc ; sc = device_get_softc ( dev ) ; if ( sc -> atse_txc_mem_res != NULL ) { bus_release_resource ( dev , SYS_RES_MEMORY , sc -> atse_txc_mem_rid , sc -> atse_txc_mem_res ) ; sc -> atse_txc_mem_res = NULL ; } if ( sc -> atse_tx_mem_res != NULL ) { bus_release_resource ( dev , SYS_RES_MEMORY , sc -> atse_tx_mem_rid , sc -> atse_tx_mem_res ) ; sc -> atse_tx_mem_res = NULL ; } if ( sc -> atse_tx_irq_res != NULL ) { bus_release_resource ( dev , SYS_RES_IRQ , sc -> atse_tx_irq_rid , sc -> atse_tx_irq_res ) ; sc -> atse_tx_irq_res = NULL ; } if ( sc -> atse_rxc_mem_res != NULL ) { bus_release_resource ( dev , SYS_RES_MEMORY , sc -> atse_rxc_mem_rid , sc -> atse_rxc_mem_res ) ; sc -> atse_rxc_mem_res = NULL ; } if ( sc -> atse_rx_mem_res != NULL ) { bus_release_resource ( dev , SYS_RES_MEMORY , sc -> atse_rx_mem_rid , sc -> atse_rx_mem_res ) ; sc -> atse_rx_mem_res = NULL ; } if ( sc -> atse_rx_irq_res != NULL ) { bus_release_resource ( dev , SYS_RES_IRQ , sc -> atse_rx_irq_rid , sc -> atse_rx_irq_res ) ; sc -> atse_rx_irq_res = NULL ; } if ( sc -> atse_mem_res != NULL ) { bus_release_resource ( dev , SYS_RES_MEMORY , sc -> atse_mem_rid , sc -> atse_mem_res ) ; sc -> atse_mem_res = NULL ; } }
Shared between nexus and fdt implementation.
Shared between nexus and fdt implementation .