ACPICA: Obsolete the acpi_os_derive_pci_id OSL interface
This function is not OS-dependent and has been replaced by acpi_hw_derive_pci_id, which is now in the ACPICA core code. Local implementations of acpi_os_derive_pci_id are no longer necessary and are removed. ACPICA BZ 857. http://www.acpica.org/bugzilla/show_bug.cgi?id=857 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
@ -622,74 +622,6 @@ acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
|
||||
return (result ? AE_ERROR : AE_OK);
|
||||
}
|
||||
|
||||
/* TODO: Change code to take advantage of driver model more */
|
||||
static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */
|
||||
acpi_handle chandle, /* current node */
|
||||
struct acpi_pci_id **id,
|
||||
int *is_bridge, u8 * bus_number)
|
||||
{
|
||||
acpi_handle handle;
|
||||
struct acpi_pci_id *pci_id = *id;
|
||||
acpi_status status;
|
||||
unsigned long long temp;
|
||||
acpi_object_type type;
|
||||
|
||||
acpi_get_parent(chandle, &handle);
|
||||
if (handle != rhandle) {
|
||||
acpi_os_derive_pci_id_2(rhandle, handle, &pci_id, is_bridge,
|
||||
bus_number);
|
||||
|
||||
status = acpi_get_type(handle, &type);
|
||||
if ((ACPI_FAILURE(status)) || (type != ACPI_TYPE_DEVICE))
|
||||
return;
|
||||
|
||||
status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
|
||||
&temp);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
u64 val;
|
||||
pci_id->device = ACPI_HIWORD(ACPI_LODWORD(temp));
|
||||
pci_id->function = ACPI_LOWORD(ACPI_LODWORD(temp));
|
||||
|
||||
if (*is_bridge)
|
||||
pci_id->bus = *bus_number;
|
||||
|
||||
/* any nicer way to get bus number of bridge ? */
|
||||
status =
|
||||
acpi_os_read_pci_configuration(pci_id, 0x0e, &val,
|
||||
8);
|
||||
if (ACPI_SUCCESS(status)
|
||||
&& ((val & 0x7f) == 1 || (val & 0x7f) == 2)) {
|
||||
status =
|
||||
acpi_os_read_pci_configuration(pci_id, 0x18,
|
||||
&val, 8);
|
||||
if (!ACPI_SUCCESS(status)) {
|
||||
/* Certainly broken... FIX ME */
|
||||
return;
|
||||
}
|
||||
*is_bridge = 1;
|
||||
pci_id->bus = val;
|
||||
status =
|
||||
acpi_os_read_pci_configuration(pci_id, 0x19,
|
||||
&val, 8);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
*bus_number = val;
|
||||
}
|
||||
} else
|
||||
*is_bridge = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */
|
||||
acpi_handle chandle, /* current node */
|
||||
struct acpi_pci_id **id)
|
||||
{
|
||||
int is_bridge = 1;
|
||||
u8 bus_number = (*id)->bus;
|
||||
|
||||
acpi_os_derive_pci_id_2(rhandle, chandle, id, &is_bridge, &bus_number);
|
||||
}
|
||||
|
||||
static void acpi_os_execute_deferred(struct work_struct *work)
|
||||
{
|
||||
struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work);
|
||||
|
Reference in New Issue
Block a user