summaryrefslogtreecommitdiff
path: root/xhfc/xhfc_leb.h
diff options
context:
space:
mode:
authorNoé Rubinstein <nrubinstein@proformatique.com>2010-08-04 11:37:50 +0200
committerNoé Rubinstein <nrubinstein@proformatique.com>2010-08-04 11:37:50 +0200
commit8ed88c4d9d3840beaf4cc670e657a8d940c3ab93 (patch)
treefb99c9a78a5817d0f6e9cbe064d840abed432dd0 /xhfc/xhfc_leb.h
parentfe526e59ca388d149ee52f3cef80325343d6b6d4 (diff)
some progress made on the XHFC driver module
Diffstat (limited to 'xhfc/xhfc_leb.h')
-rw-r--r--xhfc/xhfc_leb.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/xhfc/xhfc_leb.h b/xhfc/xhfc_leb.h
index c501229..ac56ee2 100644
--- a/xhfc/xhfc_leb.h
+++ b/xhfc/xhfc_leb.h
@@ -25,11 +25,18 @@
#ifndef _XHFC_LEB_H_
#define _XHFC_LEB_H_
+#include <linux/kernel.h>
#include <linux/pci.h>
#include "xhfc.h"
+#define LEB_CSRBAR 0
+#define LEB_MMBAR 1
+
+#define IRQ_TLP_GPIO_30 31
+
extern uint trigger;
+extern uint debug;
void leb_init(struct xhfc_pi *leb);
@@ -47,16 +54,16 @@ static inline void write_xhfc(struct xhfc * xhfc, u8 reg_addr, u8 value)
writeb(value, &cs_n0[(trigger << 8) + reg_addr]);
}
-#if VERBOSE_TRANSACTIONS
-#define read_xhfc(x, reg) ({ \
- u8 _res = read_xhfc(x, reg); \
- printk(KERN_INFO #reg " -> %02x\n", _res); \
- _res; \
+#ifdef DEBUG
+#define read_xhfc(x, reg) ({ \
+ u8 _res = read_xhfc(x, reg); \
+ if(DBG_REGS) printk(KERN_INFO #reg " -> %02x\n", _res); \
+ _res; \
})
-#define write_xhfc(x, reg, val) ({ \
- printk(KERN_INFO #reg " <- %02x\n", val); \
- write_xhfc(x, reg, val); \
+#define write_xhfc(x, reg, val) ({ \
+ if(DBG_REGS) printk(KERN_INFO #reg " <- %02x\n", val); \
+ write_xhfc(x, reg, val); \
})
#endif