Changeset View
Changeset View
Standalone View
Standalone View
head/sys/mips/mediatek/mtk_xhci.c
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | mtk_xhci_fdt_attach(device_t self) | ||||
struct xhci_softc *sc = device_get_softc(self); | struct xhci_softc *sc = device_get_softc(self); | ||||
int err; | int err; | ||||
int rid; | int rid; | ||||
/* initialise some bus fields */ | /* initialise some bus fields */ | ||||
sc->sc_bus.parent = self; | sc->sc_bus.parent = self; | ||||
sc->sc_bus.devices = sc->sc_devices; | sc->sc_bus.devices = sc->sc_devices; | ||||
sc->sc_bus.devices_max = XHCI_MAX_DEVICES; | sc->sc_bus.devices_max = XHCI_MAX_DEVICES; | ||||
sc->sc_bus.dma_bits = 32; | |||||
rid = 0; | rid = 0; | ||||
sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, | sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, | ||||
RF_ACTIVE); | RF_ACTIVE); | ||||
if (!sc->sc_io_res) { | if (!sc->sc_io_res) { | ||||
device_printf(self, "Could not map memory\n"); | device_printf(self, "Could not map memory\n"); | ||||
goto error; | goto error; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |