|
@@ -33,77 +33,6 @@
|
|
|
#define _COMPONENT ACPI_PCI_COMPONENT
|
|
|
ACPI_MODULE_NAME("pci_bind");
|
|
|
|
|
|
-struct acpi_pci_data {
|
|
|
- struct acpi_pci_id id;
|
|
|
- struct pci_bus *bus;
|
|
|
- struct pci_dev *dev;
|
|
|
-};
|
|
|
-
|
|
|
-static int acpi_pci_bind(struct acpi_device *device);
|
|
|
-static int acpi_pci_unbind(struct acpi_device *device);
|
|
|
-
|
|
|
-static void acpi_pci_data_handler(acpi_handle handle, u32 function,
|
|
|
- void *context)
|
|
|
-{
|
|
|
-
|
|
|
- /* TBD: Anything we need to do here? */
|
|
|
-
|
|
|
- return;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * acpi_get_pci_id
|
|
|
- * ------------------
|
|
|
- * This function is used by the ACPI Interpreter (a.k.a. Core Subsystem)
|
|
|
- * to resolve PCI information for ACPI-PCI devices defined in the namespace.
|
|
|
- * This typically occurs when resolving PCI operation region information.
|
|
|
- */
|
|
|
-acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id)
|
|
|
-{
|
|
|
- int result = 0;
|
|
|
- acpi_status status = AE_OK;
|
|
|
- struct acpi_device *device = NULL;
|
|
|
- struct acpi_pci_data *data = NULL;
|
|
|
-
|
|
|
-
|
|
|
- if (!id)
|
|
|
- return AE_BAD_PARAMETER;
|
|
|
-
|
|
|
- result = acpi_bus_get_device(handle, &device);
|
|
|
- if (result) {
|
|
|
- printk(KERN_ERR PREFIX
|
|
|
- "Invalid ACPI Bus context for device %s\n",
|
|
|
- acpi_device_bid(device));
|
|
|
- return AE_NOT_EXIST;
|
|
|
- }
|
|
|
-
|
|
|
- status = acpi_get_data(handle, acpi_pci_data_handler, (void **)&data);
|
|
|
- if (ACPI_FAILURE(status) || !data) {
|
|
|
- ACPI_EXCEPTION((AE_INFO, status,
|
|
|
- "Invalid ACPI-PCI context for device %s",
|
|
|
- acpi_device_bid(device)));
|
|
|
- return status;
|
|
|
- }
|
|
|
-
|
|
|
- *id = data->id;
|
|
|
-
|
|
|
- /*
|
|
|
- id->segment = data->id.segment;
|
|
|
- id->bus = data->id.bus;
|
|
|
- id->device = data->id.device;
|
|
|
- id->function = data->id.function;
|
|
|
- */
|
|
|
-
|
|
|
- ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
|
|
- "Device %s has PCI address %04x:%02x:%02x.%d\n",
|
|
|
- acpi_device_bid(device), id->segment, id->bus,
|
|
|
- id->device, id->function));
|
|
|
-
|
|
|
- return AE_OK;
|
|
|
-}
|
|
|
-
|
|
|
-EXPORT_SYMBOL(acpi_get_pci_id);
|
|
|
-
|
|
|
static int acpi_pci_unbind(struct acpi_device *device)
|
|
|
{
|
|
|
struct pci_dev *dev;
|