aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/hpilo.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/hpilo.h')
-rw-r--r--drivers/misc/hpilo.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/misc/hpilo.h b/drivers/misc/hpilo.h
index 03a14c82aad9..54e43adbdea1 100644
--- a/drivers/misc/hpilo.h
+++ b/drivers/misc/hpilo.h
@@ -44,13 +44,27 @@ struct ilo_hwinfo {
44 44
45 struct pci_dev *ilo_dev; 45 struct pci_dev *ilo_dev;
46 46
47 /*
48 * open_lock serializes ccb_cnt during open and close
49 * [ irq disabled ]
50 * -> alloc_lock used when adding/removing/searching ccb_alloc,
51 * which represents all ccbs open on the device
52 * --> fifo_lock controls access to fifo queues shared with hw
53 *
54 * Locks must be taken in this order, but open_lock and alloc_lock
55 * are optional, they do not need to be held in order to take a
56 * lower level lock.
57 */
58 spinlock_t open_lock;
47 spinlock_t alloc_lock; 59 spinlock_t alloc_lock;
48 spinlock_t fifo_lock; 60 spinlock_t fifo_lock;
49 61
50 struct cdev cdev; 62 struct cdev cdev;
51}; 63};
52 64
53/* offset from mmio_vaddr */ 65/* offset from mmio_vaddr for enabling doorbell interrupts */
66#define DB_IRQ 0xB2
67/* offset from mmio_vaddr for outbound communications */
54#define DB_OUT 0xD4 68#define DB_OUT 0xD4
55/* DB_OUT reset bit */ 69/* DB_OUT reset bit */
56#define DB_RESET 26 70#define DB_RESET 26
@@ -65,21 +79,21 @@ struct ilo_hwinfo {
65struct ccb { 79struct ccb {
66 union { 80 union {
67 char *send_fifobar; 81 char *send_fifobar;
68 u64 padding1; 82 u64 send_fifobar_pa;
69 } ccb_u1; 83 } ccb_u1;
70 union { 84 union {
71 char *send_desc; 85 char *send_desc;
72 u64 padding2; 86 u64 send_desc_pa;
73 } ccb_u2; 87 } ccb_u2;
74 u64 send_ctrl; 88 u64 send_ctrl;
75 89
76 union { 90 union {
77 char *recv_fifobar; 91 char *recv_fifobar;
78 u64 padding3; 92 u64 recv_fifobar_pa;
79 } ccb_u3; 93 } ccb_u3;
80 union { 94 union {
81 char *recv_desc; 95 char *recv_desc;
82 u64 padding4; 96 u64 recv_desc_pa;
83 } ccb_u4; 97 } ccb_u4;
84 u64 recv_ctrl; 98 u64 recv_ctrl;
85 99
@@ -131,6 +145,9 @@ struct ccb_data {
131 /* pointer to hardware device info */ 145 /* pointer to hardware device info */
132 struct ilo_hwinfo *ilo_hw; 146 struct ilo_hwinfo *ilo_hw;
133 147
148 /* queue for this ccb to wait for recv data */
149 wait_queue_head_t ccb_waitq;
150
134 /* usage count, to allow for shared ccb's */ 151 /* usage count, to allow for shared ccb's */
135 int ccb_cnt; 152 int ccb_cnt;
136 153