aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_hpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/pciehp_hpc.c')
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c38
1 files changed, 5 insertions, 33 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index ef79ca1f38da..5358547f9ee1 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -27,16 +27,10 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/types.h> 32#include <linux/types.h>
34#include <linux/slab.h>
35#include <linux/vmalloc.h>
36#include <linux/interrupt.h>
37#include <linux/spinlock.h>
38#include <linux/pci.h> 33#include <linux/pci.h>
39#include <asm/system.h>
40#include "../pci.h" 34#include "../pci.h"
41#include "pciehp.h" 35#include "pciehp.h"
42 36
@@ -217,23 +211,6 @@ static int pcie_cap_base = 0; /* Base of the PCI Express capability item struct
217#define MRL_STATE 0x0020 211#define MRL_STATE 0x0020
218#define PRSN_STATE 0x0040 212#define PRSN_STATE 0x0040
219 213
220struct php_ctlr_state_s {
221 struct php_ctlr_state_s *pnext;
222 struct pci_dev *pci_dev;
223 unsigned int irq;
224 unsigned long flags; /* spinlock's */
225 u32 slot_device_offset;
226 u32 num_slots;
227 struct timer_list int_poll_timer; /* Added for poll event */
228 php_intr_callback_t attention_button_callback;
229 php_intr_callback_t switch_change_callback;
230 php_intr_callback_t presence_change_callback;
231 php_intr_callback_t power_fault_callback;
232 void *callback_instance_id;
233 struct ctrl_reg *creg; /* Ptr to controller register space */
234};
235
236
237static spinlock_t hpc_event_lock; 214static spinlock_t hpc_event_lock;
238 215
239DEFINE_DBG_BUFFER /* Debug string buffer for entire HPC defined here */ 216DEFINE_DBG_BUFFER /* Debug string buffer for entire HPC defined here */
@@ -1248,12 +1225,7 @@ static struct hpc_ops pciehp_hpc_ops = {
1248 .check_lnk_status = hpc_check_lnk_status, 1225 .check_lnk_status = hpc_check_lnk_status,
1249}; 1226};
1250 1227
1251int pcie_init(struct controller * ctrl, 1228int pcie_init(struct controller * ctrl, struct pcie_device *dev)
1252 struct pcie_device *dev,
1253 php_intr_callback_t attention_button_callback,
1254 php_intr_callback_t switch_change_callback,
1255 php_intr_callback_t presence_change_callback,
1256 php_intr_callback_t power_fault_callback)
1257{ 1229{
1258 struct php_ctlr_state_s *php_ctlr, *p; 1230 struct php_ctlr_state_s *php_ctlr, *p;
1259 void *instance_id = ctrl; 1231 void *instance_id = ctrl;
@@ -1362,10 +1334,10 @@ int pcie_init(struct controller * ctrl,
1362 dbg("HPC interrupt = %d\n", php_ctlr->irq); 1334 dbg("HPC interrupt = %d\n", php_ctlr->irq);
1363 1335
1364 /* Save interrupt callback info */ 1336 /* Save interrupt callback info */
1365 php_ctlr->attention_button_callback = attention_button_callback; 1337 php_ctlr->attention_button_callback = pciehp_handle_attention_button;
1366 php_ctlr->switch_change_callback = switch_change_callback; 1338 php_ctlr->switch_change_callback = pciehp_handle_switch_change;
1367 php_ctlr->presence_change_callback = presence_change_callback; 1339 php_ctlr->presence_change_callback = pciehp_handle_presence_change;
1368 php_ctlr->power_fault_callback = power_fault_callback; 1340 php_ctlr->power_fault_callback = pciehp_handle_power_fault;
1369 php_ctlr->callback_instance_id = instance_id; 1341 php_ctlr->callback_instance_id = instance_id;
1370 1342
1371 /* return PCI Controller Info */ 1343 /* return PCI Controller Info */