summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Knispel <gknispel@proformatique.com>2012-01-17 17:10:57 +0100
committerGuillaume Knispel <gknispel@proformatique.com>2012-01-17 17:10:57 +0100
commitff49480735bcc87231c4047de44cfa83d73ffa37 (patch)
tree07e4cee533d4a79bfd6b4fff3700fc22ac69bb11
parent2c6311723ab52b6f6010c7fd64e4335ced5d3aef (diff)
port to 2.6.32 (work in progress)
-rw-r--r--environment_example1
-rw-r--r--tdm/Makefile2
-rw-r--r--tdm/xivo_tdm.c11
-rw-r--r--xhfc/base.c6
-rw-r--r--xivovp/Kbuild5
5 files changed, 16 insertions, 9 deletions
diff --git a/environment_example b/environment_example
index 43f4995..5eea6a3 100644
--- a/environment_example
+++ b/environment_example
@@ -1,5 +1,6 @@
export KSRC=/usr/src/linux-source-2.6.32
export KERNEL_SOURCE_ROOT=$KSRC
+export DAHDI_SYMVERS=~/hard/xivo-drivers/dahdi-linux-2.4.0/drivers/dahdi/Module.symvers
export DAHDI_INCLUDE=~/hard/xivo-drivers/dahdi-linux-2.4.0/include
export ICP_ROOT=/EP805XX
export VP_API=/home/xilun/hard/zarlink/Le71SDKAPIL_P2.17.0
diff --git a/tdm/Makefile b/tdm/Makefile
index 7393f89..e4c3a5a 100644
--- a/tdm/Makefile
+++ b/tdm/Makefile
@@ -17,6 +17,8 @@ CFLAGS_MODULE += $(INCLUDES)
CFLAGS_MODULE += -DEP805XX -D__ep805xx -DTOLAPAI -D__tolapai \
-DIX_HW_COHERENT_MEMORY=1
+KBUILD_EXTRA_SYMBOLS += $(ICP_ROOT)/Acceleration/library/icp_telephony/Module.symvers \
+ $(ICP_ROOT)/Acceleration/drivers/icp_tdm/tdm_setup_driver/Module.symvers
obj-m := xivo_tdm.o
diff --git a/tdm/xivo_tdm.c b/tdm/xivo_tdm.c
index b6ea0c8..4b3afa6 100644
--- a/tdm/xivo_tdm.c
+++ b/tdm/xivo_tdm.c
@@ -45,7 +45,7 @@
#include <asm/msr.h> // rdtscl
static ulong tstamp;
static int dump_count;
-module_param(dump_count, int, 0666);
+module_param(dump_count, int, 0664);
MODULE_PARM_DESC(dump_count, "number of traces to emit "
"(can be reset at runtime via /sys)");
#define DBG_TRACE(...) \
@@ -88,7 +88,7 @@ MODULE_LICENSE("GPL");
#if defined(REF_0_0) && defined(REF_1_1)
-# error don't define both REF_0_0 and REF_1_1
+# error dont define both REF_0_0 and REF_1_1
#endif
#if !defined(REF_0_0) && !defined(REF_1_1)
@@ -104,12 +104,13 @@ MODULE_LICENSE("GPL");
#define RX_BUF_NUM (2048)
/* for Linux < 2.6.19; WARNING: DO NOT USE IN INTERFACES IN THIS CASE!
- * (no ifdef so that this warning can be respected when porting
- * to modern kernel) thanks to a clash between this definition of 'bool'
- * and those of Linux
*/
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
typedef unsigned char bool;
enum { false = 0, true = 1 };
+#else
+# warning "remember to not use bool in interfaces while Linux < 2.6.19 is supported"
+#endif
struct xivo_tdm_callbacks_struct {
diff --git a/xhfc/base.c b/xhfc/base.c
index 0b70dbc..0326b68 100644
--- a/xhfc/base.c
+++ b/xhfc/base.c
@@ -583,7 +583,7 @@ void xhfc_hdlc_hard_xmit(struct dahdi_chan *chan)
#define fifo_test(reg, fifonum, dir) \
(reg[fifonum/4] & (1 << (((fifonum % 4) * 2) + dir)))
-irqreturn_t xhfc_interrupt(int irq, void *dev_id, struct pt_regs* ptregs)
+irqreturn_t xhfc_interrupt(int irq, void *dev_id)
{
struct xhfc_pi *pi = dev_id;
@@ -595,8 +595,6 @@ irqreturn_t xhfc_interrupt(int irq, void *dev_id, struct pt_regs* ptregs)
u8 fifo_irq[SPANS_PER_CHIP];
u8 fifo_fill[SPANS_PER_CHIP];
- (void) ptregs;
-
xhfc = &pi->xhfc;
/* IRQs for other HW with shared IRQ or spurious
@@ -652,7 +650,7 @@ irqreturn_t xhfc_interrupt(int irq, void *dev_id, struct pt_regs* ptregs)
}
static int dbg_rxtx;
-module_param(dbg_rxtx, int, 0666);
+module_param(dbg_rxtx, int, 0664);
MODULE_PARM_DESC(dbg_rxtx, "number of calls to xhfc_rxtx to trace");
#ifdef AUDIO
diff --git a/xivovp/Kbuild b/xivovp/Kbuild
index be1c00e..9021ec6 100644
--- a/xivovp/Kbuild
+++ b/xivovp/Kbuild
@@ -1,6 +1,7 @@
VP_API ?= /bad__vp_api__not_set
KSRC ?= /bad__ksrc__not_set
DAHDI_INCLUDE ?= /bad__dahdi_include__not_set
+DAHDI_SYMVERS ?= /bad__dahdi_symvers__not_set
CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(abspath $(src)/../) -DAUDIO
@@ -8,6 +9,10 @@ EXTRA_CFLAGS := -I$(VP_API)/arch/lkm \
-I$(VP_API)/api_lib/vp890_api/ \
-I$(VP_API)/api_lib/includes/
+KBUILD_EXTRA_SYMBOLS += $(DAHDI_SYMVERS) \
+ $(src)/../gpio/Module.symvers \
+ $(src)/../tdm/Module.symvers
+
obj-m := xivovp.o
xivovp-objs := base.o EVB_Le71HR8921G_rev_E_2M048.o