aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/cpci_hotplug.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/pci/hotplug/cpci_hotplug.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/pci/hotplug/cpci_hotplug.h')
-rw-r--r--drivers/pci/hotplug/cpci_hotplug.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/cpci_hotplug.h b/drivers/pci/hotplug/cpci_hotplug.h
new file mode 100644
index 000000000000..3ddd75937a40
--- /dev/null
+++ b/drivers/pci/hotplug/cpci_hotplug.h
@@ -0,0 +1,96 @@
1/*
2 * CompactPCI Hot Plug Core Functions
3 *
4 * Copyright (C) 2002 SOMA Networks, Inc.
5 * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
6 * Copyright (C) 2001 IBM Corp.
7 *
8 * All rights reserved.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or (at
13 * your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
18 * NON INFRINGEMENT. See the GNU General Public License for more
19 * details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 * Send feedback to <scottm@somanetworks.com>
26 */
27
28#ifndef _CPCI_HOTPLUG_H
29#define _CPCI_HOTPLUG_H
30
31#include <linux/types.h>
32#include <linux/pci.h>
33
34/* PICMG 2.12 R2.0 HS CSR bits: */
35#define HS_CSR_INS 0x0080
36#define HS_CSR_EXT 0x0040
37#define HS_CSR_PI 0x0030
38#define HS_CSR_LOO 0x0008
39#define HS_CSR_PIE 0x0004
40#define HS_CSR_EIM 0x0002
41#define HS_CSR_DHA 0x0001
42
43struct slot {
44 u8 number;
45 unsigned int devfn;
46 struct pci_bus *bus;
47 struct pci_dev *dev;
48 unsigned int extracting;
49 struct hotplug_slot *hotplug_slot;
50 struct list_head slot_list;
51};
52
53struct cpci_hp_controller_ops {
54 int (*query_enum) (void);
55 int (*enable_irq) (void);
56 int (*disable_irq) (void);
57 int (*check_irq) (void *dev_id);
58 int (*hardware_test) (struct slot* slot, u32 value);
59 u8 (*get_power) (struct slot* slot);
60 int (*set_power) (struct slot* slot, int value);
61};
62
63struct cpci_hp_controller {
64 unsigned int irq;
65 unsigned long irq_flags;
66 char *devname;
67 void *dev_id;
68 char *name;
69 struct cpci_hp_controller_ops *ops;
70};
71
72extern int cpci_hp_register_controller(struct cpci_hp_controller *controller);
73extern int cpci_hp_unregister_controller(struct cpci_hp_controller *controller);
74extern int cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last);
75extern int cpci_hp_unregister_bus(struct pci_bus *bus);
76extern int cpci_hp_start(void);
77extern int cpci_hp_stop(void);
78
79/*
80 * Internal function prototypes, these functions should not be used by
81 * board/chassis drivers.
82 */
83extern u8 cpci_get_attention_status(struct slot *slot);
84extern u8 cpci_get_latch_status(struct slot *slot);
85extern u8 cpci_get_adapter_status(struct slot *slot);
86extern u16 cpci_get_hs_csr(struct slot * slot);
87extern int cpci_set_attention_status(struct slot *slot, int status);
88extern int cpci_check_and_clear_ins(struct slot * slot);
89extern int cpci_check_ext(struct slot * slot);
90extern int cpci_clear_ext(struct slot * slot);
91extern int cpci_led_on(struct slot * slot);
92extern int cpci_led_off(struct slot * slot);
93extern int cpci_configure_slot(struct slot *slot);
94extern int cpci_unconfigure_slot(struct slot *slot);
95
96#endif /* _CPCI_HOTPLUG_H */