Linux Kernel
3.7.1
|
#include <linux/interrupt.h>
#include <asm/io.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/sched.h>
#include <asm/pci_x86.h>
Go to the source code of this file.
Data Structures | |
struct | smbios_system_slot |
struct | smbios_generic |
struct | smbios_entry_point |
struct | ctrl_reg |
struct | hrt |
struct | slot_rt |
struct | pci_func |
struct | slot |
struct | pci_resource |
struct | event_info |
struct | controller |
struct | irq_mapping |
struct | resource_lists |
Macros | |
#define | MY_NAME "cpqphp" |
#define | dbg(fmt, arg...) do { if (cpqhp_debug) printk(KERN_DEBUG "%s: " fmt , MY_NAME , ## arg); } while (0) |
#define | err(format, arg...) printk(KERN_ERR "%s: " format , MY_NAME , ## arg) |
#define | info(format, arg...) printk(KERN_INFO "%s: " format , MY_NAME , ## arg) |
#define | warn(format, arg...) printk(KERN_WARNING "%s: " format , MY_NAME , ## arg) |
#define | ROM_PHY_ADDR 0x0F0000 |
#define | ROM_PHY_LEN 0x00ffff |
#define | PCI_HPC_ID 0xA0F7 |
#define | PCI_SUB_HPC_ID 0xA2F7 |
#define | PCI_SUB_HPC_ID2 0xA2F8 |
#define | PCI_SUB_HPC_ID3 0xA2F9 |
#define | PCI_SUB_HPC_ID_INTC 0xA2FA |
#define | PCI_SUB_HPC_ID4 0xA2FD |
#define | INT_BUTTON_IGNORE 0 |
#define | INT_PRESENCE_ON 1 |
#define | INT_PRESENCE_OFF 2 |
#define | INT_SWITCH_CLOSE 3 |
#define | INT_SWITCH_OPEN 4 |
#define | INT_POWER_FAULT 5 |
#define | INT_POWER_FAULT_CLEAR 6 |
#define | INT_BUTTON_PRESS 7 |
#define | INT_BUTTON_RELEASE 8 |
#define | INT_BUTTON_CANCEL 9 |
#define | STATIC_STATE 0 |
#define | BLINKINGON_STATE 1 |
#define | BLINKINGOFF_STATE 2 |
#define | POWERON_STATE 3 |
#define | POWEROFF_STATE 4 |
#define | PCISLOT_INTERLOCK_CLOSED 0x00000001 |
#define | PCISLOT_ADAPTER_PRESENT 0x00000002 |
#define | PCISLOT_POWERED 0x00000004 |
#define | PCISLOT_66_MHZ_OPERATION 0x00000008 |
#define | PCISLOT_64_BIT_OPERATION 0x00000010 |
#define | PCISLOT_REPLACE_SUPPORTED 0x00000020 |
#define | PCISLOT_ADD_SUPPORTED 0x00000040 |
#define | PCISLOT_INTERLOCK_SUPPORTED 0x00000080 |
#define | PCISLOT_66_MHZ_SUPPORTED 0x00000100 |
#define | PCISLOT_64_BIT_SUPPORTED 0x00000200 |
#define | PCI_TO_PCI_BRIDGE_CLASS 0x00060400 |
#define | INTERLOCK_OPEN 0x00000002 |
#define | ADD_NOT_SUPPORTED 0x00000003 |
#define | CARD_FUNCTIONING 0x00000005 |
#define | ADAPTER_NOT_SAME 0x00000006 |
#define | NO_ADAPTER_PRESENT 0x00000009 |
#define | NOT_ENOUGH_RESOURCES 0x0000000B |
#define | DEVICE_TYPE_NOT_SUPPORTED 0x0000000C |
#define | POWER_FAILURE 0x0000000E |
#define | REMOVE_NOT_SUPPORTED 0x00000003 |
#define | msg_initialization_err "Initialization failure, error=%d\n" |
#define | msg_HPC_rev_error "Unsupported revision of the PCI hot plug controller found.\n" |
#define | msg_HPC_non_compaq_or_intel "The PCI hot plug controller is not supported by this driver.\n" |
#define | msg_HPC_not_supported "this system is not supported by this version of cpqphpd. Upgrade to a newer version of cpqphpd\n" |
#define | msg_unable_to_save "unable to store PCI hot plug add resource information. This system must be rebooted before adding any PCI devices.\n" |
#define | msg_button_on "PCI slot #%d - powering on due to button press.\n" |
#define | msg_button_off "PCI slot #%d - powering off due to button press.\n" |
#define | msg_button_cancel "PCI slot #%d - action canceled due to button press.\n" |
#define | msg_button_ignore "PCI slot #%d - button press ignored. (action in progress...)\n" |
Enumerations | |
enum | smbios_system_slot_offsets { SMBIOS_SLOT_GENERIC_TYPE = offsetof(struct smbios_system_slot, type), SMBIOS_SLOT_GENERIC_LENGTH = offsetof(struct smbios_system_slot, length), SMBIOS_SLOT_GENERIC_HANDLE = offsetof(struct smbios_system_slot, handle), SMBIOS_SLOT_NAME_STRING_NUM = offsetof(struct smbios_system_slot, name_string_num), SMBIOS_SLOT_TYPE = offsetof(struct smbios_system_slot, slot_type), SMBIOS_SLOT_WIDTH = offsetof(struct smbios_system_slot, slot_width), SMBIOS_SLOT_CURRENT_USAGE = offsetof(struct smbios_system_slot, slot_current_usage), SMBIOS_SLOT_LENGTH = offsetof(struct smbios_system_slot, slot_length), SMBIOS_SLOT_NUMBER = offsetof(struct smbios_system_slot, slot_number), SMBIOS_SLOT_PROPERTIES1 = offsetof(struct smbios_system_slot, properties1), SMBIOS_SLOT_PROPERTIES2 = offsetof(struct smbios_system_slot, properties2) } |
enum | smbios_generic_offsets { SMBIOS_GENERIC_TYPE = offsetof(struct smbios_generic, type), SMBIOS_GENERIC_LENGTH = offsetof(struct smbios_generic, length), SMBIOS_GENERIC_HANDLE = offsetof(struct smbios_generic, handle) } |
enum | smbios_entry_point_offsets { ANCHOR = offsetof(struct smbios_entry_point, anchor[0]), EP_CHECKSUM = offsetof(struct smbios_entry_point, ep_checksum), EP_LENGTH = offsetof(struct smbios_entry_point, ep_length), MAJOR_VERSION = offsetof(struct smbios_entry_point, major_version), MINOR_VERSION = offsetof(struct smbios_entry_point, minor_version), MAX_SIZE_ENTRY = offsetof(struct smbios_entry_point, max_size_entry), EP_REV = offsetof(struct smbios_entry_point, ep_rev), INT_ANCHOR = offsetof(struct smbios_entry_point, int_anchor[0]), INT_CHECKSUM = offsetof(struct smbios_entry_point, int_checksum), ST_LENGTH = offsetof(struct smbios_entry_point, st_length), ST_ADDRESS = offsetof(struct smbios_entry_point, st_address), NUMBER_OF_ENTRYS = offsetof(struct smbios_entry_point, number_of_entrys), BCD_REV = offsetof(struct smbios_entry_point, bcd_rev) } |
enum | ctrl_offsets { SLOT_RST = offsetof(struct ctrl_reg, slot_RST), SLOT_ENABLE = offsetof(struct ctrl_reg, slot_enable), MISC = offsetof(struct ctrl_reg, misc), LED_CONTROL = offsetof(struct ctrl_reg, led_control), INT_INPUT_CLEAR = offsetof(struct ctrl_reg, int_input_clear), INT_MASK = offsetof(struct ctrl_reg, int_mask), CTRL_RESERVED0 = offsetof(struct ctrl_reg, reserved0), CTRL_RESERVED1 = offsetof(struct ctrl_reg, reserved1), CTRL_RESERVED2 = offsetof(struct ctrl_reg, reserved1), GEN_OUTPUT_AB = offsetof(struct ctrl_reg, gen_output_AB), NON_INT_INPUT = offsetof(struct ctrl_reg, non_int_input), CTRL_RESERVED3 = offsetof(struct ctrl_reg, reserved3), CTRL_RESERVED4 = offsetof(struct ctrl_reg, reserved4), CTRL_RESERVED5 = offsetof(struct ctrl_reg, reserved5), CTRL_RESERVED6 = offsetof(struct ctrl_reg, reserved6), CTRL_RESERVED7 = offsetof(struct ctrl_reg, reserved7), CTRL_RESERVED8 = offsetof(struct ctrl_reg, reserved8), SLOT_MASK = offsetof(struct ctrl_reg, slot_mask), CTRL_RESERVED9 = offsetof(struct ctrl_reg, reserved9), CTRL_RESERVED10 = offsetof(struct ctrl_reg, reserved10), CTRL_RESERVED11 = offsetof(struct ctrl_reg, reserved11), SLOT_SERR = offsetof(struct ctrl_reg, slot_SERR), SLOT_POWER = offsetof(struct ctrl_reg, slot_power), NEXT_CURR_FREQ = offsetof(struct ctrl_reg, next_curr_freq), RESET_FREQ_MODE = offsetof(struct ctrl_reg, reset_freq_mode), BASE_OFFSET = offsetof(struct ctrl_reg, base_offset), SLOT_AVAIL1 = offsetof(struct ctrl_reg, slot_avail1), SLOT_AVAIL2 = offsetof(struct ctrl_reg, slot_avail2), SLOT_CONFIG = offsetof(struct ctrl_reg, slot_config), SEC_BUS_CONFIG = offsetof(struct ctrl_reg, sec_bus_config), MSI_CTRL = offsetof(struct ctrl_reg, msi_ctrl), PROG_INTERFACE = offsetof(struct ctrl_reg, prog_interface), CMD = offsetof(struct ctrl_reg, cmd), CMD_STATUS = offsetof(struct ctrl_reg, cmd_status), INTR_LOC = offsetof(struct ctrl_reg, intr_loc), SERR_LOC = offsetof(struct ctrl_reg, serr_loc), SERR_INTR_ENABLE = offsetof(struct ctrl_reg, serr_intr_enable), SLOT1 = offsetof(struct ctrl_reg, slot1) } |
enum | hrt_offsets { SIG0 = offsetof(struct hrt, sig0), SIG1 = offsetof(struct hrt, sig1), SIG2 = offsetof(struct hrt, sig2), SIG3 = offsetof(struct hrt, sig3), UNUSED_IRQ = offsetof(struct hrt, unused_IRQ), NUMBER_OF_ENTRIES = offsetof(struct hrt, number_of_entries), REVISION = offsetof(struct hrt, revision), HRT_RESERVED1 = offsetof(struct hrt, reserved1), HRT_RESERVED2 = offsetof(struct hrt, reserved2) } |
enum | slot_rt_offsets { DEV_FUNC = offsetof(struct slot_rt, dev_func), PRIMARY_BUS = offsetof(struct slot_rt, primary_bus), SECONDARY_BUS = offsetof(struct slot_rt, secondary_bus), MAX_BUS = offsetof(struct slot_rt, max_bus), IO_BASE = offsetof(struct slot_rt, io_base), IO_LENGTH = offsetof(struct slot_rt, io_length), MEM_BASE = offsetof(struct slot_rt, mem_base), MEM_LENGTH = offsetof(struct slot_rt, mem_length), PRE_MEM_BASE = offsetof(struct slot_rt, pre_mem_base), PRE_MEM_LENGTH = offsetof(struct slot_rt, pre_mem_length) } |
#define dbg | ( | fmt, | |
arg... | |||
) | do { if (cpqhp_debug) printk(KERN_DEBUG "%s: " fmt , MY_NAME , ## arg); } while (0) |
#define msg_HPC_non_compaq_or_intel "The PCI hot plug controller is not supported by this driver.\n" |
#define msg_HPC_rev_error "Unsupported revision of the PCI hot plug controller found.\n" |
#define warn | ( | format, | |
arg... | |||
) | printk(KERN_WARNING "%s: " format , MY_NAME , ## arg) |
enum ctrl_offsets |
enum hrt_offsets |
enum slot_rt_offsets |
|
read |
Definition at line 171 of file esd_usb2.c.
int cpqhp_configure_board | ( | struct controller * | ctrl, |
struct pci_func * | func | ||
) |
Definition at line 946 of file cpqphp_pci.c.
int cpqhp_configure_device | ( | struct controller * | ctrl, |
struct pci_func * | func | ||
) |
Definition at line 84 of file cpqphp_pci.c.
void cpqhp_create_debugfs_files | ( | struct controller * | ctrl | ) |
Definition at line 229 of file cpqphp_sysfs.c.
irqreturn_t cpqhp_ctrl_intr | ( | int | IRQ, |
void * | data | ||
) |
Definition at line 891 of file cpqphp_ctrl.c.
Definition at line 1519 of file cpqphp_pci.c.
void cpqhp_destroy_resource_list | ( | struct resource_lists * | resources | ) |
Definition at line 1472 of file cpqphp_pci.c.
Definition at line 1766 of file cpqphp_ctrl.c.
Definition at line 1778 of file cpqphp_ctrl.c.
int cpqhp_find_available_resources | ( | struct controller * | ctrl, |
void __iomem * | rom_start | ||
) |
Definition at line 1166 of file cpqphp_pci.c.
Definition at line 277 of file cpqphp_pci.c.
int cpqhp_hardware_test | ( | struct controller * | ctrl, |
int | test_num | ||
) |
cpqhp_hardware_test - runs hardware tests : target controller : the number written to the "test" file in sysfs.
For hot plug ctrl folks to play with.
Definition at line 2188 of file cpqphp_ctrl.c.
Definition at line 218 of file cpqphp_sysfs.c.
int cpqhp_process_SI | ( | struct controller * | ctrl, |
struct pci_func * | func | ||
) |
Definition at line 1989 of file cpqphp_ctrl.c.
int cpqhp_process_SS | ( | struct controller * | ctrl, |
struct pci_func * | func | ||
) |
Definition at line 2084 of file cpqphp_ctrl.c.
cpqhp_pushbutton_thread - handle pushbutton events : target slot (struct)
Scheduled procedure to handle blocking stuff for the pushbuttons. Handles all pending events and exits.
Definition at line 1925 of file cpqphp_ctrl.c.
void cpqhp_remove_debugfs_files | ( | struct controller * | ctrl | ) |
Definition at line 235 of file cpqphp_sysfs.c.
int cpqhp_resource_sort_and_combine | ( | struct pci_resource ** | head | ) |
cpqhp_resource_sort_and_combine - sort nodes by base addresses and clean up : the list to sort and clean up
Description: Sorts all of the nodes in the list in ascending order by their base addresses. Also does garbage collection by combining adjacent nodes.
Returns %0 if success.
Definition at line 827 of file cpqphp_ctrl.c.
int cpqhp_return_board_resources | ( | struct pci_func * | func, |
struct resource_lists * | resources | ||
) |
Definition at line 1416 of file cpqphp_pci.c.
int cpqhp_save_base_addr_length | ( | struct controller * | ctrl, |
struct pci_func * | func | ||
) |
Definition at line 546 of file cpqphp_pci.c.
int cpqhp_save_config | ( | struct controller * | ctrl, |
int | busnumber, | ||
int | is_hot_plug | ||
) |
Definition at line 298 of file cpqphp_pci.c.
int cpqhp_save_slot_config | ( | struct controller * | ctrl, |
struct pci_func * | new_slot | ||
) |
Definition at line 462 of file cpqphp_pci.c.
int cpqhp_save_used_resources | ( | struct controller * | ctrl, |
struct pci_func * | func | ||
) |
Definition at line 683 of file cpqphp_pci.c.
Definition at line 155 of file cpqphp_pci.c.
Definition at line 224 of file cpqphp_sysfs.c.
cpqhp_slot_create - Creates a node and adds it to the proper bus. : bus where new node is to be located
Returns pointer to the new node or NULL if unsuccessful.
Definition at line 969 of file cpqphp_ctrl.c.
cpqhp_slot_find - Looks for a node by bus, and device, multiple functions accessed : bus to find : device to find : is %0 for first function found, %1 for the second...
Returns pointer to the node if successful, NULL otherwise.
Definition at line 1082 of file cpqphp_ctrl.c.
Definition at line 120 of file cpqphp_pci.c.
int cpqhp_valid_replace | ( | struct controller * | ctrl, |
struct pci_func * | func | ||
) |
Definition at line 1024 of file cpqphp_pci.c.
struct controller* cpqhp_ctrl_list |
Definition at line 52 of file cpqphp_core.c.
int cpqhp_debug |
Definition at line 50 of file cpqphp_core.c.
u8 cpqhp_disk_irq |
Definition at line 43 of file cpqphp_pci.c.
int cpqhp_legacy_mode |
Definition at line 51 of file cpqphp_core.c.
u8 cpqhp_nic_irq |
Definition at line 42 of file cpqphp_pci.c.
struct irq_routing_table* cpqhp_routing_table |
Definition at line 54 of file cpqphp_core.c.
Definition at line 53 of file cpqphp_core.c.