1 Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_common.c
2 ===================================================================
3 --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_common.c 2011-10-26 00:49:51.000000000 +0200
4 +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_common.c 2012-11-28 15:14:10.421633418 +0100
6 /* get at first the driver configuration */
7 #include "drv_mei_cpe_config.h"
9 -#include "ifx_types.h"
10 #include "drv_mei_cpe_os.h"
11 #include "drv_mei_cpe_dbg.h"
13 Index: drv_mei_cpe-1.2.0/configure.in
14 ===================================================================
15 --- drv_mei_cpe-1.2.0.orig/configure.in 2012-01-20 17:41:07.000000000 +0100
16 +++ drv_mei_cpe-1.2.0/configure.in 2012-11-28 15:14:10.421633418 +0100
18 AC_ARG_ENABLE(kernelbuild,
19 AC_HELP_STRING([--enable-kernelbuild=x],[Set the target kernel build path]),
21 - if test -e $enableval/include/linux/autoconf.h; then
22 + if test -e $enableval/include/generated/autoconf.h; then
23 AC_SUBST([KERNEL_BUILD_PATH],[$enableval])
25 AC_MSG_ERROR([The kernel build directory is not valid or not configured!])
26 Index: drv_mei_cpe-1.2.0/configure
27 ===================================================================
28 --- drv_mei_cpe-1.2.0.orig/configure 2012-01-20 17:50:02.000000000 +0100
29 +++ drv_mei_cpe-1.2.0/configure 2012-11-28 15:14:56.637634577 +0100
38 @@ -2367,11 +2368,11 @@
40 # We need awk for the "check" target. The system "awk" is bad on
42 -# Always define AMTAR for backward compatibility.
43 +# Always define AMTAR for backward compatibility. Yes, it's still used
44 +# in the wild :-( We should find a proper way to deprecate it ...
47 -AMTAR=${AMTAR-"${am_missing_run}tar"}
49 -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
50 +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
55 if test "x$enable_dependency_tracking" != xno; then
56 am_depcomp="$ac_aux_dir/depcomp"
60 if test "x$enable_dependency_tracking" != xno; then
63 # instance it was reported that on HP-UX the gcc test will end up
64 # making a dummy file named `D' -- because `-MD' means `put the output
68 # Copy depcomp to subdir because otherwise we won't find it if we're
69 # using a relative directory.
74 - msvisualcpp | msvcmsys)
75 + msvc7 | msvc7msys | msvisualcpp | msvcmsys)
76 # This compiler won't grok `-c -o', but also, the minuso test has
77 # not run yet. These depmodes are late enough in the game, and
78 # so weak that their functioning should not be impacted.
80 # Check whether --enable-kernelbuild was given.
81 if test "${enable_kernelbuild+set}" = set; then :
82 enableval=$enable_kernelbuild;
83 - if test -e $enableval/include/linux/autoconf.h; then
84 + if test -e $enableval/include/generated/autoconf.h; then
85 KERNEL_BUILD_PATH=$enableval
88 Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_linux.h
89 ===================================================================
90 --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_linux.h 2011-07-25 20:41:02.000000000 +0200
91 +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_linux.h 2012-11-28 15:14:10.429633419 +0100
93 #include <linux/sched.h>
94 #include <linux/interrupt.h>
96 -#include <asm/ifx/irq.h>
98 #if (MEI_DRV_IFXOS_ENABLE == 0)
100 #include <linux/version.h>
102 #include <linux/poll.h>
103 #include <linux/types.h>
105 -#include <asm/ifx/ifx_types.h>
107 #endif /* #if (MEI_DRV_IFXOS_ENABLE == 0)*/
109 /* ============================================================================
110 Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_mei_vr9.h
111 ===================================================================
112 --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_mei_vr9.h 2011-07-25 20:41:02.000000000 +0200
113 +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_mei_vr9.h 2012-11-28 15:14:10.429633419 +0100
119 - #include <asm/ifx/ifx_pmu.h>
121 - #error "Please check PMU driver path!"
124 /* ============================================================================
125 Module : RCU register address and bits
126 ========================================================================= */
127 Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_api_atm_ptm_intern.c
128 ===================================================================
129 --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_api_atm_ptm_intern.c 2011-07-25 20:41:02.000000000 +0200
130 +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_api_atm_ptm_intern.c 2012-11-28 15:14:10.429633419 +0100
132 #include "ifx_types.h"
133 #include "drv_mei_cpe_os.h"
136 - #include <asm/ifx/ifx_atm.h>
138 - #error "ATM/PTM internal interface is only supported for Linux!"
140 +#include <lantiq_atm.h>
142 /** get interface and configuration */
143 #include "drv_mei_cpe_interface.h"
144 Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_linux.c
145 ===================================================================
146 --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_linux.c 2011-07-25 20:41:02.000000000 +0200
147 +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_linux.c 2012-11-28 15:24:56.269649609 +0100
149 #include <linux/module.h>
150 #include <linux/version.h>
152 -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
153 -#include <linux/utsrelease.h>
155 -#include <linux/init.h>
156 +#include <generated/utsrelease.h>
158 +#include <linux/device.h>
159 #include <linux/ioport.h>
160 #include <linux/irq.h>
163 #include "drv_mei_cpe_device_cntrl.h"
166 +#define INT_NUM_IM4_IRL30 (INT_NUM_IM4_IRL0 + 30)
168 /* ===================================
169 extern function declarations
170 =================================== */
175 -static int MEI_Ioctl( struct inode *inode, struct file *filp,
176 +static long MEI_Ioctl(struct file *filp,
177 unsigned int nCmd, unsigned long nArgument);
179 static unsigned int MEI_Poll (struct file *filp, poll_table *table);
182 static void MEI_IfxFreeIrq(unsigned int usedIrq, void *pUsedDevId);
184 -static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id, struct pt_regs *regs);
185 +static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id);
190 /* =================================== */
191 /* Local variables (LINUX) */
192 /* =================================== */
193 -static IFX_uint8_t major_number = 0;
194 +#define MEI_MAJOR 105
196 +static IFX_uint8_t major_number = MEI_MAJOR;
198 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
199 MODULE_PARM(major_number, "b");
210 0 and positive values - success,
211 negative value - ioctl failed
213 -static int MEI_Ioctl( struct inode *inode, struct file *filp,
214 +static long MEI_Ioctl(struct file *filp,
215 unsigned int nCmd, unsigned long nArgument)
217 int ret = 0, retSize = sizeof(IOCTL_MEI_ioctl_t);
218 @@ -1242,7 +1246,7 @@
222 -static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id, struct pt_regs *regs)
223 +static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id)
225 IFX_int32_t meiIntCnt = 0;
226 MEIX_CNTRL_T *pMeiXCntrlList = (MEIX_CNTRL_T*)dev_id;
227 @@ -1691,6 +1695,7 @@
228 static int __init MEI_module_init (void)
231 + static struct class *dsl_class;
233 printk(KERN_INFO "%s" MEI_DRV_CRLF, &MEI_WHATVERSION[4]);
234 printk(KERN_INFO "(c) Copyright 2009, Infineon Technologies AG" MEI_DRV_CRLF);
235 @@ -1730,6 +1735,8 @@
239 + dsl_class = class_create(THIS_MODULE, "ifx_mei");
240 + device_create(dsl_class, NULL, MKDEV(MEI_MAJOR, 0), NULL, "ifx_mei");
244 Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_mei_access_vr9.c
245 ===================================================================
246 --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_mei_access_vr9.c 2011-07-25 20:41:02.000000000 +0200
247 +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_mei_access_vr9.c 2012-11-28 15:14:10.433633419 +0100
250 #include "cmv_message_format.h"
252 +#include <lantiq_soc.h>
254 /* ============================================================================
255 Local macro definition
256 @@ -1527,32 +1528,35 @@
260 +#define PMU_DFE BIT(9)
262 IFX_int32_t MEI_BasicChipInit(IFX_void_t)
265 - DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);
267 - if (ifx_pmu_pg_dsl_dfe_enable() != 0)
268 +// DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);
269 +ltq_pmu_enable(PMU_DFE);
270 + /* if (ifx_pmu_pg_dsl_dfe_enable() != 0)
272 PRN_ERR_USR_NL( MEI_MEI_ACCESS, MEI_DRV_PRN_LEVEL_ERR,
273 ("MEI: ERROR - DSL DFE PG enable failed!" MEI_DRV_CRLF));
281 IFX_int32_t MEI_BasicChipExit(IFX_void_t)
283 - if (ifx_pmu_pg_dsl_dfe_disable() != 0)
284 +/* if (ifx_pmu_pg_dsl_dfe_disable() != 0)
286 PRN_ERR_USR_NL( MEI_MEI_ACCESS, MEI_DRV_PRN_LEVEL_ERR,
287 ("MEI: ERROR - DSL DFE PG disable failed!" MEI_DRV_CRLF));
293 - DSL_DFE_PMU_SETUP(IFX_PMU_DISABLE);
294 +// DSL_DFE_PMU_SETUP(IFX_PMU_DISABLE);
295 +ltq_pmu_disable(PMU_DFE);