Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/bhnd/bhndb/bhndb_pci.c
Show First 20 Lines • Show All 503 Lines • ▼ Show 20 Lines | bhndb_pci_read_core_table(device_t dev, struct bhnd_chipid *chipid, | ||||
erom = NULL; | erom = NULL; | ||||
erom_cores = NULL; | erom_cores = NULL; | ||||
/* Fetch our chipid hint (if any) and generic hardware configuration */ | /* Fetch our chipid hint (if any) and generic hardware configuration */ | ||||
cfg = BHNDB_BUS_GET_GENERIC_HWCFG(parent_dev, dev); | cfg = BHNDB_BUS_GET_GENERIC_HWCFG(parent_dev, dev); | ||||
hint = BHNDB_BUS_GET_CHIPID(parent_dev, dev); | hint = BHNDB_BUS_GET_CHIPID(parent_dev, dev); | ||||
/* Allocate our host resources */ | /* Allocate our host resources */ | ||||
if ((error = bhndb_alloc_host_resources(parent_dev, cfg, &hr))) | if ((error = bhndb_alloc_host_resources(&hr, dev, parent_dev, cfg))) | ||||
return (error); | return (error); | ||||
/* Initialize our erom I/O state */ | /* Initialize our erom I/O state */ | ||||
if ((error = bhndb_pci_eio_init(&pio, dev, parent_dev, hr))) | if ((error = bhndb_pci_eio_init(&pio, dev, parent_dev, hr))) | ||||
goto failed; | goto failed; | ||||
/* Map the first bus core from our bridged bhnd(4) bus */ | /* Map the first bus core from our bridged bhnd(4) bus */ | ||||
error = bhndb_pci_eio_map(&pio.eio, BHND_DEFAULT_CHIPC_ADDR, | error = bhndb_pci_eio_map(&pio.eio, BHND_DEFAULT_CHIPC_ADDR, | ||||
▲ Show 20 Lines • Show All 961 Lines • Show Last 20 Lines |