100-compat.patch 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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
  5. @@ -20,7 +20,6 @@
  6. /* get at first the driver configuration */
  7. #include "drv_mei_cpe_config.h"
  8. -#include "ifx_types.h"
  9. #include "drv_mei_cpe_os.h"
  10. #include "drv_mei_cpe_dbg.h"
  11. Index: drv_mei_cpe-1.2.0/configure.in
  12. ===================================================================
  13. --- drv_mei_cpe-1.2.0.orig/configure.in 2012-01-20 17:41:07.000000000 +0100
  14. +++ drv_mei_cpe-1.2.0/configure.in 2013-09-01 21:04:12.197022086 +0200
  15. @@ -140,7 +140,7 @@
  16. AC_ARG_ENABLE(kernelbuild,
  17. AC_HELP_STRING([--enable-kernelbuild=x],[Set the target kernel build path]),
  18. [
  19. - if test -e $enableval/include/linux/autoconf.h; then
  20. + if test -e $enableval/include/generated/autoconf.h; then
  21. AC_SUBST([KERNEL_BUILD_PATH],[$enableval])
  22. else
  23. AC_MSG_ERROR([The kernel build directory is not valid or not configured!])
  24. Index: drv_mei_cpe-1.2.0/configure
  25. ===================================================================
  26. --- drv_mei_cpe-1.2.0.orig/configure 2012-01-20 17:50:02.000000000 +0100
  27. +++ drv_mei_cpe-1.2.0/configure 2013-09-01 21:04:14.361022179 +0200
  28. @@ -617,6 +617,7 @@
  29. am__fastdepCC_FALSE
  30. am__fastdepCC_TRUE
  31. CCDEPMODE
  32. +am__nodep
  33. AMDEPBACKSLASH
  34. AMDEP_FALSE
  35. AMDEP_TRUE
  36. @@ -2367,11 +2368,11 @@
  37. # We need awk for the "check" target. The system "awk" is bad on
  38. # some platforms.
  39. -# Always define AMTAR for backward compatibility.
  40. +# Always define AMTAR for backward compatibility. Yes, it's still used
  41. +# in the wild :-( We should find a proper way to deprecate it ...
  42. +AMTAR='$${TAR-tar}'
  43. -AMTAR=${AMTAR-"${am_missing_run}tar"}
  44. -
  45. -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
  46. +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
  47. @@ -3219,6 +3220,7 @@
  48. if test "x$enable_dependency_tracking" != xno; then
  49. am_depcomp="$ac_aux_dir/depcomp"
  50. AMDEPBACKSLASH='\'
  51. + am__nodep='_no'
  52. fi
  53. if test "x$enable_dependency_tracking" != xno; then
  54. AMDEP_TRUE=
  55. @@ -3243,6 +3245,7 @@
  56. # instance it was reported that on HP-UX the gcc test will end up
  57. # making a dummy file named `D' -- because `-MD' means `put the output
  58. # in D'.
  59. + rm -rf conftest.dir
  60. mkdir conftest.dir
  61. # Copy depcomp to subdir because otherwise we won't find it if we're
  62. # using a relative directory.
  63. @@ -3302,7 +3305,7 @@
  64. break
  65. fi
  66. ;;
  67. - msvisualcpp | msvcmsys)
  68. + msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  69. # This compiler won't grok `-c -o', but also, the minuso test has
  70. # not run yet. These depmodes are late enough in the game, and
  71. # so weak that their functioning should not be impacted.
  72. @@ -3656,7 +3659,7 @@
  73. # Check whether --enable-kernelbuild was given.
  74. if test "${enable_kernelbuild+set}" = set; then :
  75. enableval=$enable_kernelbuild;
  76. - if test -e $enableval/include/linux/autoconf.h; then
  77. + if test -e $enableval/include/generated/autoconf.h; then
  78. KERNEL_BUILD_PATH=$enableval
  79. else
  80. Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_linux.h
  81. ===================================================================
  82. --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_linux.h 2011-07-25 20:41:02.000000000 +0200
  83. +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_linux.h 2013-09-01 21:04:12.197022086 +0200
  84. @@ -34,8 +34,6 @@
  85. #include <linux/sched.h>
  86. #include <linux/interrupt.h>
  87. -#include <asm/ifx/irq.h>
  88. -
  89. #if (MEI_DRV_IFXOS_ENABLE == 0)
  90. #include <linux/version.h>
  91. @@ -44,8 +42,6 @@
  92. #include <linux/poll.h>
  93. #include <linux/types.h>
  94. -#include <asm/ifx/ifx_types.h>
  95. -
  96. #endif /* #if (MEI_DRV_IFXOS_ENABLE == 0)*/
  97. /* ============================================================================
  98. Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_mei_vr9.h
  99. ===================================================================
  100. --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_mei_vr9.h 2011-07-25 20:41:02.000000000 +0200
  101. +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_mei_vr9.h 2013-09-01 21:04:12.197022086 +0200
  102. @@ -40,12 +40,6 @@
  103. #endif
  104. #endif
  105. -#ifdef LINUX
  106. - #include <asm/ifx/ifx_pmu.h>
  107. -#else
  108. - #error "Please check PMU driver path!"
  109. -#endif
  110. -
  111. /* ============================================================================
  112. Module : RCU register address and bits
  113. ========================================================================= */
  114. Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_api_atm_ptm_intern.c
  115. ===================================================================
  116. --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_api_atm_ptm_intern.c 2011-07-25 20:41:02.000000000 +0200
  117. +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_api_atm_ptm_intern.c 2013-09-01 21:04:12.197022086 +0200
  118. @@ -25,11 +25,7 @@
  119. #include "ifx_types.h"
  120. #include "drv_mei_cpe_os.h"
  121. -#ifdef LINUX
  122. - #include <asm/ifx/ifx_atm.h>
  123. -#else
  124. - #error "ATM/PTM internal interface is only supported for Linux!"
  125. -#endif
  126. +#include <lantiq_atm.h>
  127. /** get interface and configuration */
  128. #include "drv_mei_cpe_interface.h"
  129. Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_linux.c
  130. ===================================================================
  131. --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_linux.c 2011-07-25 20:41:02.000000000 +0200
  132. +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_linux.c 2013-09-01 21:04:12.197022086 +0200
  133. @@ -32,11 +32,9 @@
  134. #include <linux/module.h>
  135. #include <linux/version.h>
  136. -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
  137. -#include <linux/utsrelease.h>
  138. -#endif
  139. -#include <linux/init.h>
  140. +#include <generated/utsrelease.h>
  141. +#include <linux/device.h>
  142. #include <linux/ioport.h>
  143. #include <linux/irq.h>
  144. #include <asm/io.h>
  145. @@ -67,6 +65,9 @@
  146. #include "drv_mei_cpe_msg_process.h"
  147. +#undef MEI_SUPPORT_PROCFS_CONFIG
  148. +#undef CONFIG_PROC_FS
  149. +
  150. #if (MEI_SUPPORT_PROCFS_CONFIG == 1)
  151. #include "drv_mei_cpe_linux_proc_config.h"
  152. #endif /* MEI_SUPPORT_PROCFS_CONFIG */
  153. @@ -87,6 +88,8 @@
  154. #include "drv_mei_cpe_device_cntrl.h"
  155. #endif
  156. +#define INT_NUM_IM4_IRL30 (INT_NUM_IM4_IRL0 + 30)
  157. +
  158. /* ===================================
  159. extern function declarations
  160. =================================== */
  161. @@ -122,7 +125,7 @@
  162. size_t length,
  163. loff_t * ppos);
  164. -static int MEI_Ioctl( struct inode *inode, struct file *filp,
  165. +static long MEI_Ioctl(struct file *filp,
  166. unsigned int nCmd, unsigned long nArgument);
  167. static unsigned int MEI_Poll (struct file *filp, poll_table *table);
  168. @@ -137,7 +140,7 @@
  169. static void MEI_IfxFreeIrq(unsigned int usedIrq, void *pUsedDevId);
  170. -static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id, struct pt_regs *regs);
  171. +static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id);
  172. #endif
  173. #if CONFIG_PROC_FS
  174. @@ -194,7 +197,9 @@
  175. /* =================================== */
  176. /* Local variables (LINUX) */
  177. /* =================================== */
  178. -static IFX_uint8_t major_number = 0;
  179. +#define MEI_MAJOR 105
  180. +
  181. +static IFX_uint8_t major_number = MEI_MAJOR;
  182. #ifdef MODULE
  183. #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
  184. MODULE_PARM(major_number, "b");
  185. @@ -242,7 +247,7 @@
  186. MEI_Write,
  187. poll:
  188. MEI_Poll,
  189. - ioctl:
  190. + unlocked_ioctl:
  191. MEI_Ioctl,
  192. open:
  193. MEI_OpenOS,
  194. @@ -457,7 +462,7 @@
  195. 0 and positive values - success,
  196. negative value - ioctl failed
  197. */
  198. -static int MEI_Ioctl( struct inode *inode, struct file *filp,
  199. +static long MEI_Ioctl(struct file *filp,
  200. unsigned int nCmd, unsigned long nArgument)
  201. {
  202. int ret = 0, retSize = sizeof(IOCTL_MEI_ioctl_t);
  203. @@ -1242,7 +1247,7 @@
  204. \remark
  205. None.
  206. */
  207. -static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id, struct pt_regs *regs)
  208. +static irqreturn_t MEI_InterruptLinux(int irq, void *dev_id)
  209. {
  210. IFX_int32_t meiIntCnt = 0;
  211. MEIX_CNTRL_T *pMeiXCntrlList = (MEIX_CNTRL_T*)dev_id;
  212. @@ -1691,6 +1696,7 @@
  213. static int __init MEI_module_init (void)
  214. {
  215. int result;
  216. + static struct class *dsl_class;
  217. printk(KERN_INFO "%s" MEI_DRV_CRLF, &MEI_WHATVERSION[4]);
  218. printk(KERN_INFO "(c) Copyright 2009, Infineon Technologies AG" MEI_DRV_CRLF);
  219. @@ -1730,6 +1736,8 @@
  220. return (result);
  221. }
  222. + dsl_class = class_create(THIS_MODULE, "ifx_mei");
  223. + device_create(dsl_class, NULL, MKDEV(MEI_MAJOR, 0), NULL, "ifx_mei");
  224. return 0;
  225. }
  226. Index: drv_mei_cpe-1.2.0/src/drv_mei_cpe_mei_access_vr9.c
  227. ===================================================================
  228. --- drv_mei_cpe-1.2.0.orig/src/drv_mei_cpe_mei_access_vr9.c 2011-07-25 20:41:02.000000000 +0200
  229. +++ drv_mei_cpe-1.2.0/src/drv_mei_cpe_mei_access_vr9.c 2013-09-01 21:04:12.197022086 +0200
  230. @@ -37,6 +37,7 @@
  231. #include "cmv_message_format.h"
  232. +#include <lantiq_soc.h>
  233. /* ============================================================================
  234. Local macro definition
  235. @@ -1527,32 +1528,35 @@
  236. return IFX_ERROR;
  237. }
  238. +#define PMU_DFE BIT(9)
  239. +
  240. IFX_int32_t MEI_BasicChipInit(IFX_void_t)
  241. {
  242. /* Power up MEI */
  243. - DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);
  244. -
  245. - if (ifx_pmu_pg_dsl_dfe_enable() != 0)
  246. +// DSL_DFE_PMU_SETUP(IFX_PMU_ENABLE);
  247. +ltq_pmu_enable(PMU_DFE);
  248. + /* if (ifx_pmu_pg_dsl_dfe_enable() != 0)
  249. {
  250. PRN_ERR_USR_NL( MEI_MEI_ACCESS, MEI_DRV_PRN_LEVEL_ERR,
  251. ("MEI: ERROR - DSL DFE PG enable failed!" MEI_DRV_CRLF));
  252. return IFX_ERROR;
  253. - }
  254. + }*/
  255. return IFX_SUCCESS;
  256. }
  257. IFX_int32_t MEI_BasicChipExit(IFX_void_t)
  258. {
  259. - if (ifx_pmu_pg_dsl_dfe_disable() != 0)
  260. +/* if (ifx_pmu_pg_dsl_dfe_disable() != 0)
  261. {
  262. PRN_ERR_USR_NL( MEI_MEI_ACCESS, MEI_DRV_PRN_LEVEL_ERR,
  263. ("MEI: ERROR - DSL DFE PG disable failed!" MEI_DRV_CRLF));
  264. return IFX_ERROR;
  265. }
  266. -
  267. +*/
  268. /* Power down MEI */
  269. - DSL_DFE_PMU_SETUP(IFX_PMU_DISABLE);
  270. +// DSL_DFE_PMU_SETUP(IFX_PMU_DISABLE);
  271. +ltq_pmu_disable(PMU_DFE);
  272. return IFX_SUCCESS;
  273. }
  274. Index: drv_mei_cpe-1.2.0/src/Makefile.am
  275. ===================================================================
  276. --- drv_mei_cpe-1.2.0.orig/src/Makefile.am 2013-09-01 21:05:24.581025175 +0200
  277. +++ drv_mei_cpe-1.2.0/src/Makefile.am 2013-09-01 21:05:30.765025452 +0200
  278. @@ -97,8 +97,6 @@
  279. drv_mei_cpe_dbg_driver.h\
  280. drv_mei_cpe_linux.c\
  281. drv_mei_cpe_linux.h\
  282. - drv_mei_cpe_linux_proc_config.c\
  283. - drv_mei_cpe_linux_proc_config.h\
  284. drv_mei_cpe_vxworks.c\
  285. drv_mei_cpe_vxworks.h\
  286. drv_mei_cpe_vxworks_bsp.c\