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 2013-09-01 21:04:12.197022086 +0200
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 2013-09-01 21:04:12.197022086 +0200
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 2013-09-01 21:04:14.361022179 +0200
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 2013-09-01 21:04:12.197022086 +0200
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 2013-09-01 21:04:12.197022086 +0200
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 2013-09-01 21:04:12.197022086 +0200
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 2013-09-01 21:04:12.197022086 +0200
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>
164 #include "drv_mei_cpe_msg_process.h"
166 +#undef MEI_SUPPORT_PROCFS_CONFIG
167 +#undef CONFIG_PROC_FS
169 #if (MEI_SUPPORT_PROCFS_CONFIG == 1)
170 #include "drv_mei_cpe_linux_proc_config.h"
171 #endif /* MEI_SUPPORT_PROCFS_CONFIG */
173 #include "drv_mei_cpe_device_cntrl.h"
176 +#define INT_NUM_IM4_IRL30 (INT_NUM_IM4_IRL0 + 30)
178 /* ===================================
179 extern function declarations
180 =================================== */
185 -static int MEI_Ioctl( struct inode *inode, struct file *filp,
186 +static long MEI_Ioctl(struct file *filp,
187 unsigned int nCmd, unsigned long nArgument);
189 static unsigned int MEI_Poll (struct file *filp, poll_table *table);
192 static void MEI_IfxFreeIrq(unsigned int usedIrq, void *pUsedDevId);
194 -static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id, struct pt_regs *regs);
195 +static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id);
200 /* =================================== */
201 /* Local variables (LINUX) */
202 /* =================================== */
203 -static IFX_uint8_t major_number = 0;
204 +#define MEI_MAJOR 105
206 +static IFX_uint8_t major_number = MEI_MAJOR;
208 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
209 MODULE_PARM(major_number, "b");
220 0 and positive values - success,
221 negative value - ioctl failed
223 -static int MEI_Ioctl( struct inode *inode, struct file *filp,
224 +static long MEI_Ioctl(struct file *filp,
225 unsigned int nCmd, unsigned long nArgument)
227 int ret = 0, retSize = sizeof(IOCTL_MEI_ioctl_t);
228 @@ -1242,7 +1247,7 @@
232 -static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id, struct pt_regs *regs)
233 +static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id)
235 IFX_int32_t meiIntCnt = 0;
236 MEIX_CNTRL_T *pMeiXCntrlList = (MEIX_CNTRL_T*)dev_id;
237 @@ -1691,6 +1696,7 @@
238 static int __init MEI_module_init (void)
241 + static struct class *dsl_class;
243 printk(KERN_INFO "%s" MEI_DRV_CRLF, &MEI_WHATVERSION[4]);
244 printk(KERN_INFO "(c) Copyright 2009, Infineon Technologies AG" MEI_DRV_CRLF);
245 @@ -1730,6 +1736,8 @@
249 + dsl_class = class_create(THIS_MODULE, "ifx_mei");
250 + device_create(dsl_class, NULL, MKDEV(MEI_MAJOR, 0), NULL, "ifx_mei");
254 Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_mei_access_vr9.c
255 ===================================================================
256 --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_mei_access_vr9.c 2011-07-25 20:41:02.000000000 +0200
257 +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_mei_access_vr9.c 2013-09-01 21:04:12.197022086 +0200
260 #include "cmv_message_format.h"
262 +#include <lantiq_soc.h>
264 /* ============================================================================
265 Local macro definition
266 @@ -1527,32 +1528,35 @@
270 +#define PMU_DFE BIT(9)
272 IFX_int32_t MEI_BasicChipInit(IFX_void_t)
275 - DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);
277 - if (ifx_pmu_pg_dsl_dfe_enable() != 0)
278 +// DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);
279 +ltq_pmu_enable(PMU_DFE);
280 + /* if (ifx_pmu_pg_dsl_dfe_enable() != 0)
282 PRN_ERR_USR_NL( MEI_MEI_ACCESS, MEI_DRV_PRN_LEVEL_ERR,
283 ("MEI: ERROR - DSL DFE PG enable failed!" MEI_DRV_CRLF));
291 IFX_int32_t MEI_BasicChipExit(IFX_void_t)
293 - if (ifx_pmu_pg_dsl_dfe_disable() != 0)
294 +/* if (ifx_pmu_pg_dsl_dfe_disable() != 0)
296 PRN_ERR_USR_NL( MEI_MEI_ACCESS, MEI_DRV_PRN_LEVEL_ERR,
297 ("MEI: ERROR - DSL DFE PG disable failed!" MEI_DRV_CRLF));
303 - DSL_DFE_PMU_SETUP(IFX_PMU_DISABLE);
304 +// DSL_DFE_PMU_SETUP(IFX_PMU_DISABLE);
305 +ltq_pmu_disable(PMU_DFE);
309 Index: drv_mei_cpe-1.2.0/src/Makefile.am
310 ===================================================================
311 --- drv_mei_cpe-1.2.0.orig/src/Makefile.am 2013-09-01 21:05:24.581025175 +0200
312 +++ drv_mei_cpe-1.2.0/src/Makefile.am 2013-09-01 21:05:30.765025452 +0200
314 drv_mei_cpe_dbg_driver.h\
317 - drv_mei_cpe_linux_proc_config.c\
318 - drv_mei_cpe_linux_proc_config.h\
319 drv_mei_cpe_vxworks.c\
320 drv_mei_cpe_vxworks.h\
321 drv_mei_cpe_vxworks_bsp.c\