Home | History | Annotate | Download | only in acpi

Lines Matching defs:ad

171 acpi_pcidev_scan(struct acpi_devnode *ad)
178 ad->ad_pciinfo = NULL;
184 * have changed since ad->ad_devinfo->CurrentStatus was set.
186 if (ad->ad_devinfo->Type != ACPI_TYPE_DEVICE)
189 if (!acpi_device_present(ad->ad_handle))
192 if (ad->ad_devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) {
202 rv = acpi_eval_integer(ad->ad_handle, "_SEG", &val);
208 rv = acpi_pcidev_pciroot_bus(ad->ad_handle, &ap->ap_downbus);
211 rv = acpi_eval_integer(ad->ad_handle, "_BBN", &val);
218 aprint_error_dev(ad->ad_root,
219 "invalid PCI downstream bus for %s\n", ad->ad_name);
232 if (ad->ad_devinfo->Valid & ACPI_VALID_ADR) {
235 ACPI_HILODWORD(ad->ad_devinfo->Address);
237 ACPI_LOLODWORD(ad->ad_devinfo->Address);
241 aprint_error_dev(ad->ad_root,
242 "invalid PCI address for %s\n", ad->ad_name);
247 ad->ad_pciinfo = ap;
252 if ((ad->ad_parent != NULL) &&
253 (ad->ad_parent->ad_pciinfo != NULL) &&
254 (ad->ad_parent->ad_pciinfo->ap_flags & ACPI_PCI_INFO_BRIDGE) &&
255 (ad->ad_devinfo->Valid & ACPI_VALID_ADR)) {
264 ap->ap_pc = ad->ad_parent->ad_pciinfo->ap_pc;
265 ap->ap_segment = ad->ad_parent->ad_pciinfo->ap_segment;
266 ap->ap_bus = ad->ad_parent->ad_pciinfo->ap_downbus;
268 ap->ap_device = ACPI_HILODWORD(ad->ad_devinfo->Address);
269 ap->ap_function = ACPI_LOLODWORD(ad->ad_devinfo->Address);
273 aprint_error_dev(ad->ad_root,
274 "invalid PCI address for %s\n", ad->ad_name);
292 ad->ad_parent->ad_pciinfo->ap_pc,
300 ad->ad_pciinfo = ap;
306 SIMPLEQ_FOREACH(child, &ad->ad_child_head, ad_child_list) {
369 struct acpi_devnode *ad;
374 SIMPLEQ_FOREACH(ad, &sc->sc_head, ad_list) {
376 if (ad->ad_pciinfo != NULL &&
377 (ad->ad_pciinfo->ap_flags & ACPI_PCI_INFO_DEVICE) &&
378 ad->ad_pciinfo->ap_segment == segment &&
379 ad->ad_pciinfo->ap_bus == bus &&
380 ad->ad_pciinfo->ap_device == device &&
381 ad->ad_pciinfo->ap_function == function)
382 return ad;
397 struct acpi_devnode *ad;
399 ad = acpi_pcidev_find(segment, bus, device, function);
400 if (ad == NULL || ad->ad_pciinfo == NULL)
403 return ad->ad_pciinfo->ap_pc;
417 struct acpi_devnode *ad;
422 SIMPLEQ_FOREACH(ad, &sc->sc_head, ad_list) {
424 if (ad->ad_pciinfo != NULL &&
425 (ad->ad_pciinfo->ap_flags & ACPI_PCI_INFO_BRIDGE) &&
426 ad->ad_pciinfo->ap_segment == segment &&
427 ad->ad_pciinfo->ap_bus == bus)
428 return ad;
441 acpi_pcidev_find_dev(struct acpi_devnode *ad)
448 if (ad == NULL)
451 if (ad->ad_pciinfo == NULL)
454 ap = ad->ad_pciinfo;
490 struct acpi_devnode *ad;
499 ad = acpi_pcidev_find(segment, b, d, f);
501 if (ad != NULL && (hdl = ad->ad_handle) != NULL) {