Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sdhci/sdhci_pci.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/* Scan all slots. */ | /* Scan all slots. */ | ||||
for (i = 0; i < slots; i++) { | for (i = 0; i < slots; i++) { | ||||
struct sdhci_slot *slot = &sc->slots[sc->num_slots]; | struct sdhci_slot *slot = &sc->slots[sc->num_slots]; | ||||
/* Allocate memory. */ | /* Allocate memory. */ | ||||
rid = PCIR_BAR(bar + i); | rid = PCIR_BAR(bar + i); | ||||
sc->mem_res[i] = bus_alloc_resource(dev, SYS_RES_MEMORY, | sc->mem_res[i] = bus_alloc_resource(dev, SYS_RES_MEMORY, | ||||
&rid, 0ul, ~0ul, 0x100, RF_ACTIVE); | &rid, 0, ~0, 0x100, RF_ACTIVE); | ||||
if (sc->mem_res[i] == NULL) { | if (sc->mem_res[i] == NULL) { | ||||
device_printf(dev, "Can't allocate memory for slot %d\n", i); | device_printf(dev, "Can't allocate memory for slot %d\n", i); | ||||
continue; | continue; | ||||
} | } | ||||
slot->quirks = sc->quirks; | slot->quirks = sc->quirks; | ||||
if (sdhci_init_slot(dev, slot, i) != 0) | if (sdhci_init_slot(dev, slot, i) != 0) | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |