Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
pci_root.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/mutex.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/pci.h>
#include <linux/pci-acpi.h>
#include <linux/pci-aspm.h>
#include <linux/acpi.h>
#include <linux/slab.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
#include <acpi/apei.h>

Go to the source code of this file.

Data Structures

struct  acpi_handle_node
 

Macros

#define PREFIX   "ACPI: "
 
#define _COMPONENT   ACPI_PCI_COMPONENT
 
#define ACPI_PCI_ROOT_CLASS   "pci_bridge"
 
#define ACPI_PCI_ROOT_DEVICE_NAME   "PCI Root Bridge"
 
#define ACPI_PCIE_REQ_SUPPORT
 

Functions

 ACPI_MODULE_NAME ("pci_root")
 
 MODULE_DEVICE_TABLE (acpi, root_device_ids)
 
int acpi_pci_register_driver (struct acpi_pci_driver *driver)
 
 EXPORT_SYMBOL (acpi_pci_register_driver)
 
void acpi_pci_unregister_driver (struct acpi_pci_driver *driver)
 
 EXPORT_SYMBOL (acpi_pci_unregister_driver)
 
acpi_handle acpi_get_pci_rootbridge_handle (unsigned int seg, unsigned int bus)
 
 EXPORT_SYMBOL_GPL (acpi_get_pci_rootbridge_handle)
 
int acpi_is_root_bridge (acpi_handle handle)
 
 EXPORT_SYMBOL_GPL (acpi_is_root_bridge)
 
struct acpi_pci_root * acpi_pci_find_root (acpi_handle handle)
 
 EXPORT_SYMBOL_GPL (acpi_pci_find_root)
 
struct pci_devacpi_get_pci_dev (acpi_handle handle)
 
 EXPORT_SYMBOL_GPL (acpi_get_pci_dev)
 
acpi_status acpi_pci_osc_control_set (acpi_handle handle, u32 *mask, u32 req)
 
 EXPORT_SYMBOL (acpi_pci_osc_control_set)
 
 subsys_initcall (acpi_pci_root_init)
 

Macro Definition Documentation

#define _COMPONENT   ACPI_PCI_COMPONENT

Definition at line 44 of file pci_root.c.

#define ACPI_PCI_ROOT_CLASS   "pci_bridge"

Definition at line 46 of file pci_root.c.

#define ACPI_PCI_ROOT_DEVICE_NAME   "PCI Root Bridge"

Definition at line 47 of file pci_root.c.

#define ACPI_PCIE_REQ_SUPPORT
Value:
(OSC_EXT_PCI_CONFIG_SUPPORT \
| OSC_ACTIVE_STATE_PWR_SUPPORT \
| OSC_CLOCK_PWR_CAPABILITY_SUPPORT \
| OSC_MSI_SUPPORT)

Definition at line 52 of file pci_root.c.

#define PREFIX   "ACPI: "

Definition at line 42 of file pci_root.c.

Function Documentation

struct pci_dev* acpi_get_pci_dev ( acpi_handle  handle)
read

acpi_get_pci_dev - convert ACPI CA handle to struct pci_dev : the handle in question

Given an ACPI CA handle, the desired PCI device is located in the list of PCI devices.

If the device is found, its reference count is increased and this function returns a pointer to its data structure. The caller must decrement the reference count by calling pci_dev_put(). If no device is found, NULL is returned.

Definition at line 302 of file pci_root.c.

acpi_handle acpi_get_pci_rootbridge_handle ( unsigned int  seg,
unsigned int  bus 
)

Definition at line 112 of file pci_root.c.

int acpi_is_root_bridge ( acpi_handle  handle)

acpi_is_root_bridge - determine whether an ACPI CA node is a PCI root bridge - the ACPI CA node in question.

Note: we could make this API take a struct acpi_device * instead, but for now, it's more convenient to operate on an acpi_handle.

Definition at line 137 of file pci_root.c.

ACPI_MODULE_NAME ( "pci_root"  )
struct acpi_pci_root* acpi_pci_find_root ( acpi_handle  handle)
read

Definition at line 270 of file pci_root.c.

acpi_status acpi_pci_osc_control_set ( acpi_handle  handle,
u32 mask,
u32  req 
)

acpi_pci_osc_control_set - Request control of PCI root _OSC features. : ACPI handle of a PCI root bridge (or PCIe Root Complex). : Mask of _OSC bits to request control of, place to store control mask. : Mask of _OSC bits the control of is essential to the caller.

Run _OSC query for and if that is successful, compare the returned mask of control bits with . If all of the bits are set in the returned mask, run _OSC request for it.

The variable at the address may be modified regardless of whether or not the function returns success. On success it will contain the mask of _OSC bits the BIOS has granted control of, but its contents are meaningless on failure.

Definition at line 392 of file pci_root.c.

int acpi_pci_register_driver ( struct acpi_pci_driver *  driver)

Definition at line 81 of file pci_root.c.

void acpi_pci_unregister_driver ( struct acpi_pci_driver *  driver)

Definition at line 99 of file pci_root.c.

EXPORT_SYMBOL ( acpi_pci_register_driver  )
EXPORT_SYMBOL ( acpi_pci_unregister_driver  )
EXPORT_SYMBOL ( acpi_pci_osc_control_set  )
EXPORT_SYMBOL_GPL ( acpi_get_pci_rootbridge_handle  )
EXPORT_SYMBOL_GPL ( acpi_is_root_bridge  )
EXPORT_SYMBOL_GPL ( acpi_pci_find_root  )
EXPORT_SYMBOL_GPL ( acpi_get_pci_dev  )
MODULE_DEVICE_TABLE ( acpi  ,
root_device_ids   
)
subsys_initcall ( acpi_pci_root_init  )