100-dsl_compat.patch 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036
  1. --- a/src/include/drv_dsl_cpe_device_danube.h
  2. +++ b/src/include/drv_dsl_cpe_device_danube.h
  3. @@ -24,7 +24,7 @@
  4. #include "drv_dsl_cpe_simulator_danube.h"
  5. #else
  6. /* Include for the low level driver interface header file */
  7. -#include "asm/ifx/ifx_mei_bsp.h"
  8. +#include "ifxmips_mei_interface.h"
  9. #endif /* defined(DSL_CPE_SIMULATOR_DRIVER) && defined(WIN32)*/
  10. #define DSL_MAX_LINE_NUMBER 1
  11. --- a/src/common/drv_dsl_cpe_os_linux.c
  12. +++ b/src/common/drv_dsl_cpe_os_linux.c
  13. @@ -11,6 +11,7 @@
  14. #ifdef __LINUX__
  15. #define DSL_INTERN
  16. +#include <linux/device.h>
  17. #include "drv_dsl_cpe_api.h"
  18. #include "drv_dsl_cpe_api_ioctl.h"
  19. @@ -34,9 +35,13 @@ static const char* dsl_cpe_api_version =
  20. static DSL_ssize_t DSL_DRV_Write(DSL_DRV_file_t *pFile, const DSL_char_t * pBuf,
  21. DSL_DRV_size_t nSize, DSL_DRV_offset_t * pLoff);
  22. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
  23. static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode, DSL_DRV_file_t * pFile,
  24. DSL_uint_t nCommand, unsigned long nArg);
  25. -
  26. +#else
  27. +static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_file_t * pFile,
  28. + DSL_uint_t nCommand, unsigned long nArg);
  29. +#endif
  30. static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
  31. static int DSL_DRV_Release(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
  32. @@ -72,7 +77,11 @@ static struct file_operations dslCpeApiO
  33. open: DSL_DRV_Open,
  34. release: DSL_DRV_Release,
  35. write: DSL_DRV_Write,
  36. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
  37. ioctl: DSL_DRV_Ioctls,
  38. +#else
  39. + unlocked_ioctl: DSL_DRV_Ioctls,
  40. +#endif
  41. poll: DSL_DRV_Poll
  42. };
  43. #else
  44. @@ -168,10 +177,17 @@ static DSL_ssize_t DSL_DRV_Write(DSL_DRV
  45. \return Success or failure.
  46. \ingroup Internal
  47. */
  48. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
  49. static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode,
  50. DSL_DRV_file_t * pFile,
  51. DSL_uint_t nCommand,
  52. unsigned long nArg)
  53. +#else
  54. +static DSL_int_t DSL_DRV_Ioctls(
  55. + DSL_DRV_file_t * pFile,
  56. + DSL_uint_t nCommand,
  57. + unsigned long nArg)
  58. +#endif
  59. {
  60. DSL_int_t nErr=0;
  61. DSL_boolean_t bIsInKernel;
  62. @@ -216,16 +232,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_
  63. }
  64. }
  65. }
  66. -
  67. - if (pINode == DSL_NULL)
  68. - {
  69. - bIsInKernel = DSL_TRUE;
  70. - }
  71. - else
  72. - {
  73. - bIsInKernel = DSL_FALSE;
  74. - }
  75. -
  76. + bIsInKernel = DSL_FALSE;
  77. if ( (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API) ||
  78. (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_G997) ||
  79. (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_PM) ||
  80. @@ -1058,6 +1065,7 @@ static void DSL_DRV_DebugInit(void)
  81. /* Entry point of driver */
  82. int __init DSL_ModuleInit(void)
  83. {
  84. + struct class *dsl_class;
  85. DSL_int_t i;
  86. printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
  87. @@ -1104,7 +1112,8 @@ int __init DSL_ModuleInit(void)
  88. }
  89. DSL_DRV_DevNodeInit();
  90. -
  91. + dsl_class = class_create(THIS_MODULE, "dsl_cpe_api");
  92. + device_create(dsl_class, NULL, MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0), NULL, "dsl_cpe_api");
  93. return 0;
  94. }
  95. --- a/src/include/drv_dsl_cpe_os_linux.h
  96. +++ b/src/include/drv_dsl_cpe_os_linux.h
  97. @@ -16,18 +16,18 @@
  98. extern "C" {
  99. #endif
  100. -#include <asm/ioctl.h>
  101. -#include <linux/autoconf.h>
  102. #include <linux/module.h>
  103. #include <linux/kernel.h>
  104. #include <linux/init.h>
  105. #include <linux/ctype.h>
  106. #include <linux/version.h>
  107. #include <linux/spinlock.h>
  108. +#include <linux/sched.h>
  109. -
  110. -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
  111. - #include <linux/utsrelease.h>
  112. +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
  113. +#include <linux/utsrelease.h>
  114. +#else
  115. +#include <generated/utsrelease.h>
  116. #endif
  117. #include <linux/types.h>
  118. @@ -39,7 +39,8 @@
  119. #include <linux/delay.h>
  120. #include <linux/poll.h>
  121. #include <asm/uaccess.h>
  122. -#include <linux/smp_lock.h>
  123. +//#include <linux/smp_lock.h>
  124. +#include <asm/ioctl.h>
  125. #ifdef INCLUDE_DSL_CPE_API_IFXOS_SUPPORT
  126. /** IFXOS includes*/
  127. --- /dev/null
  128. +++ b/src/ifxmips_mei_interface.h
  129. @@ -0,0 +1,702 @@
  130. +/******************************************************************************
  131. +
  132. + Copyright (c) 2009
  133. + Infineon Technologies AG
  134. + Am Campeon 1-12; 81726 Munich, Germany
  135. +
  136. + For licensing information, see the file 'LICENSE' in the root folder of
  137. + this software module.
  138. +
  139. +******************************************************************************/
  140. +
  141. +#ifndef IFXMIPS_MEI_H
  142. +#define IFXMIPS_MEI_H
  143. +
  144. +//#define CONFIG_AMAZON_SE 1
  145. +//#define CONFIG_DANUBE 1
  146. +//#define CONFIG_AR9 1
  147. +
  148. +#if !defined(CONFIG_DANUBE) && !defined(CONFIG_AMAZON_SE) && !defined(CONFIG_AR9) && !defined(CONFIG_VR9)
  149. +#error Platform undefined!!!
  150. +#endif
  151. +
  152. +#ifdef IFX_MEI_BSP
  153. +/** This is the character datatype. */
  154. +typedef char DSL_char_t;
  155. +/** This is the unsigned 8-bit datatype. */
  156. +typedef unsigned char DSL_uint8_t;
  157. +/** This is the signed 8-bit datatype. */
  158. +typedef signed char DSL_int8_t;
  159. +/** This is the unsigned 16-bit datatype. */
  160. +typedef unsigned short DSL_uint16_t;
  161. +/** This is the signed 16-bit datatype. */
  162. +typedef signed short DSL_int16_t;
  163. +/** This is the unsigned 32-bit datatype. */
  164. +typedef unsigned long DSL_uint32_t;
  165. +/** This is the signed 32-bit datatype. */
  166. +typedef signed long DSL_int32_t;
  167. +/** This is the float datatype. */
  168. +typedef float DSL_float_t;
  169. +/** This is the void datatype. */
  170. +typedef void DSL_void_t;
  171. +/** integer type, width is depending on processor arch */
  172. +typedef int DSL_int_t;
  173. +/** unsigned integer type, width is depending on processor arch */
  174. +typedef unsigned int DSL_uint_t;
  175. +typedef struct file DSL_DRV_file_t;
  176. +typedef struct inode DSL_DRV_inode_t;
  177. +
  178. +/**
  179. + * Defines all possible CMV groups
  180. + * */
  181. +typedef enum {
  182. + DSL_CMV_GROUP_CNTL = 1,
  183. + DSL_CMV_GROUP_STAT = 2,
  184. + DSL_CMV_GROUP_INFO = 3,
  185. + DSL_CMV_GROUP_TEST = 4,
  186. + DSL_CMV_GROUP_OPTN = 5,
  187. + DSL_CMV_GROUP_RATE = 6,
  188. + DSL_CMV_GROUP_PLAM = 7,
  189. + DSL_CMV_GROUP_CNFG = 8
  190. +} DSL_CmvGroup_t;
  191. +/**
  192. + * Defines all opcode types
  193. + * */
  194. +typedef enum {
  195. + H2D_CMV_READ = 0x00,
  196. + H2D_CMV_WRITE = 0x04,
  197. + H2D_CMV_INDICATE_REPLY = 0x10,
  198. + H2D_ERROR_OPCODE_UNKNOWN =0x20,
  199. + H2D_ERROR_CMV_UNKNOWN =0x30,
  200. +
  201. + D2H_CMV_READ_REPLY =0x01,
  202. + D2H_CMV_WRITE_REPLY = 0x05,
  203. + D2H_CMV_INDICATE = 0x11,
  204. + D2H_ERROR_OPCODE_UNKNOWN = 0x21,
  205. + D2H_ERROR_CMV_UNKNOWN = 0x31,
  206. + D2H_ERROR_CMV_READ_NOT_AVAILABLE = 0x41,
  207. + D2H_ERROR_CMV_WRITE_ONLY = 0x51,
  208. + D2H_ERROR_CMV_READ_ONLY = 0x61,
  209. +
  210. + H2D_DEBUG_READ_DM = 0x02,
  211. + H2D_DEBUG_READ_PM = 0x06,
  212. + H2D_DEBUG_WRITE_DM = 0x0a,
  213. + H2D_DEBUG_WRITE_PM = 0x0e,
  214. +
  215. + D2H_DEBUG_READ_DM_REPLY = 0x03,
  216. + D2H_DEBUG_READ_FM_REPLY = 0x07,
  217. + D2H_DEBUG_WRITE_DM_REPLY = 0x0b,
  218. + D2H_DEBUG_WRITE_FM_REPLY = 0x0f,
  219. + D2H_ERROR_ADDR_UNKNOWN = 0x33,
  220. +
  221. + D2H_AUTONOMOUS_MODEM_READY_MSG = 0xf1
  222. +} DSL_CmvOpcode_t;
  223. +
  224. +/* mutex macros */
  225. +#define MEI_MUTEX_INIT(id,flag) \
  226. + sema_init(&id,flag)
  227. +#define MEI_MUTEX_LOCK(id) \
  228. + down_interruptible(&id)
  229. +#define MEI_MUTEX_UNLOCK(id) \
  230. + up(&id)
  231. +#define MEI_WAIT(ms) \
  232. + {\
  233. + set_current_state(TASK_INTERRUPTIBLE);\
  234. + schedule_timeout(ms);\
  235. + }
  236. +#define MEI_INIT_WAKELIST(name,queue) \
  237. + init_waitqueue_head(&queue)
  238. +
  239. +/* wait for an event, timeout is measured in ms */
  240. +#define MEI_WAIT_EVENT_TIMEOUT(ev,timeout)\
  241. + interruptible_sleep_on_timeout(&ev,timeout * HZ / 1000)
  242. +#define MEI_WAKEUP_EVENT(ev)\
  243. + wake_up_interruptible(&ev)
  244. +#endif /* IFX_MEI_BSP */
  245. +
  246. +/*** Register address offsets, relative to MEI_SPACE_ADDRESS ***/
  247. +#define ME_DX_DATA (0x0000)
  248. +#define ME_VERSION (0x0004)
  249. +#define ME_ARC_GP_STAT (0x0008)
  250. +#define ME_DX_STAT (0x000C)
  251. +#define ME_DX_AD (0x0010)
  252. +#define ME_DX_MWS (0x0014)
  253. +#define ME_ME2ARC_INT (0x0018)
  254. +#define ME_ARC2ME_STAT (0x001C)
  255. +#define ME_ARC2ME_MASK (0x0020)
  256. +#define ME_DBG_WR_AD (0x0024)
  257. +#define ME_DBG_RD_AD (0x0028)
  258. +#define ME_DBG_DATA (0x002C)
  259. +#define ME_DBG_DECODE (0x0030)
  260. +#define ME_CONFIG (0x0034)
  261. +#define ME_RST_CTRL (0x0038)
  262. +#define ME_DBG_MASTER (0x003C)
  263. +#define ME_CLK_CTRL (0x0040)
  264. +#define ME_BIST_CTRL (0x0044)
  265. +#define ME_BIST_STAT (0x0048)
  266. +#define ME_XDATA_BASE_SH (0x004c)
  267. +#define ME_XDATA_BASE (0x0050)
  268. +#define ME_XMEM_BAR_BASE (0x0054)
  269. +#define ME_XMEM_BAR0 (0x0054)
  270. +#define ME_XMEM_BAR1 (0x0058)
  271. +#define ME_XMEM_BAR2 (0x005C)
  272. +#define ME_XMEM_BAR3 (0x0060)
  273. +#define ME_XMEM_BAR4 (0x0064)
  274. +#define ME_XMEM_BAR5 (0x0068)
  275. +#define ME_XMEM_BAR6 (0x006C)
  276. +#define ME_XMEM_BAR7 (0x0070)
  277. +#define ME_XMEM_BAR8 (0x0074)
  278. +#define ME_XMEM_BAR9 (0x0078)
  279. +#define ME_XMEM_BAR10 (0x007C)
  280. +#define ME_XMEM_BAR11 (0x0080)
  281. +#define ME_XMEM_BAR12 (0x0084)
  282. +#define ME_XMEM_BAR13 (0x0088)
  283. +#define ME_XMEM_BAR14 (0x008C)
  284. +#define ME_XMEM_BAR15 (0x0090)
  285. +#define ME_XMEM_BAR16 (0x0094)
  286. +
  287. +#define WHILE_DELAY 20000
  288. +/*
  289. +** Define where in ME Processor's memory map the Stratify chip lives
  290. +*/
  291. +
  292. +#define MAXSWAPSIZE (8 * 1024) //8k *(32bits)
  293. +
  294. +// Mailboxes
  295. +#define MSG_LENGTH 16 // x16 bits
  296. +#define YES_REPLY 1
  297. +#define NO_REPLY 0
  298. +
  299. +#define CMV_TIMEOUT 1000 //jiffies
  300. +
  301. +// Block size per BAR
  302. +#define SDRAM_SEGMENT_SIZE (64*1024)
  303. +// Number of Bar registers
  304. +#define MAX_BAR_REGISTERS (17)
  305. +
  306. +#define XDATA_REGISTER (15)
  307. +
  308. +// ARC register addresss
  309. +#define ARC_STATUS 0x0
  310. +#define ARC_LP_START 0x2
  311. +#define ARC_LP_END 0x3
  312. +#define ARC_DEBUG 0x5
  313. +#define ARC_INT_MASK 0x10A
  314. +
  315. +#define IRAM0_BASE (0x00000)
  316. +#define IRAM1_BASE (0x04000)
  317. +#if defined(CONFIG_DANUBE)
  318. +#define BRAM_BASE (0x0A000)
  319. +#elif defined(CONFIG_AMAZON_SE) || defined(CONFIG_AR9) || defined(CONFIG_VR9)
  320. +#define BRAM_BASE (0x08000)
  321. +#endif
  322. +#define XRAM_BASE (0x18000)
  323. +#define YRAM_BASE (0x1A000)
  324. +#define EXT_MEM_BASE (0x80000)
  325. +#define ARC_GPIO_CTRL (0xC030)
  326. +#define ARC_GPIO_DATA (0xC034)
  327. +
  328. +#define IRAM0_SIZE (16*1024)
  329. +#define IRAM1_SIZE (16*1024)
  330. +#define BRAM_SIZE (12*1024)
  331. +#define XRAM_SIZE (8*1024)
  332. +#define YRAM_SIZE (8*1024)
  333. +#define EXT_MEM_SIZE (1536*1024)
  334. +
  335. +#define ADSL_BASE (0x20000)
  336. +#define CRI_BASE (ADSL_BASE + 0x11F00)
  337. +#define CRI_CCR0 (CRI_BASE + 0x00)
  338. +#define CRI_RST (CRI_BASE + 0x04*4)
  339. +#define ADSL_DILV_BASE (ADSL_BASE+0x20000)
  340. +
  341. +//
  342. +#define IRAM0_ADDR_BIT_MASK 0xFFF
  343. +#define IRAM1_ADDR_BIT_MASK 0xFFF
  344. +#define BRAM_ADDR_BIT_MASK 0xFFF
  345. +#define RX_DILV_ADDR_BIT_MASK 0x1FFF
  346. +
  347. +/*** Bit definitions ***/
  348. +#define ARC_AUX_HALT (1 << 25)
  349. +#define ARC_DEBUG_HALT (1 << 1)
  350. +#define FALSE 0
  351. +#define TRUE 1
  352. +#define BIT0 (1<<0)
  353. +#define BIT1 (1<<1)
  354. +#define BIT2 (1<<2)
  355. +#define BIT3 (1<<3)
  356. +#define BIT4 (1<<4)
  357. +#define BIT5 (1<<5)
  358. +#define BIT6 (1<<6)
  359. +#define BIT7 (1<<7)
  360. +#define BIT8 (1<<8)
  361. +#define BIT9 (1<<9)
  362. +#define BIT10 (1<<10)
  363. +#define BIT11 (1<<11)
  364. +#define BIT12 (1<<12)
  365. +#define BIT13 (1<<13)
  366. +#define BIT14 (1<<14)
  367. +#define BIT15 (1<<15)
  368. +#define BIT16 (1<<16)
  369. +#define BIT17 (1<<17)
  370. +#define BIT18 (1<<18)
  371. +#define BIT19 (1<<19)
  372. +#define BIT20 (1<<20)
  373. +#define BIT21 (1<<21)
  374. +#define BIT22 (1<<22)
  375. +#define BIT23 (1<<23)
  376. +#define BIT24 (1<<24)
  377. +#define BIT25 (1<<25)
  378. +#define BIT26 (1<<26)
  379. +#define BIT27 (1<<27)
  380. +#define BIT28 (1<<28)
  381. +#define BIT29 (1<<29)
  382. +#define BIT30 (1<<30)
  383. +#define BIT31 (1<<31)
  384. +
  385. +// CRI_CCR0 Register definitions
  386. +#define CLK_2M_MODE_ENABLE BIT6
  387. +#define ACL_CLK_MODE_ENABLE BIT4
  388. +#define FDF_CLK_MODE_ENABLE BIT2
  389. +#define STM_CLK_MODE_ENABLE BIT0
  390. +
  391. +// CRI_RST Register definitions
  392. +#define FDF_SRST BIT3
  393. +#define MTE_SRST BIT2
  394. +#define FCI_SRST BIT1
  395. +#define AAI_SRST BIT0
  396. +
  397. +// MEI_TO_ARC_INTERRUPT Register definitions
  398. +#define MEI_TO_ARC_INT1 BIT3
  399. +#define MEI_TO_ARC_INT0 BIT2
  400. +#define MEI_TO_ARC_CS_DONE BIT1 //need to check
  401. +#define MEI_TO_ARC_MSGAV BIT0
  402. +
  403. +// ARC_TO_MEI_INTERRUPT Register definitions
  404. +#define ARC_TO_MEI_INT1 BIT8
  405. +#define ARC_TO_MEI_INT0 BIT7
  406. +#define ARC_TO_MEI_CS_REQ BIT6
  407. +#define ARC_TO_MEI_DBG_DONE BIT5
  408. +#define ARC_TO_MEI_MSGACK BIT4
  409. +#define ARC_TO_MEI_NO_ACCESS BIT3
  410. +#define ARC_TO_MEI_CHECK_AAITX BIT2
  411. +#define ARC_TO_MEI_CHECK_AAIRX BIT1
  412. +#define ARC_TO_MEI_MSGAV BIT0
  413. +
  414. +// ARC_TO_MEI_INTERRUPT_MASK Register definitions
  415. +#define GP_INT1_EN BIT8
  416. +#define GP_INT0_EN BIT7
  417. +#define CS_REQ_EN BIT6
  418. +#define DBG_DONE_EN BIT5
  419. +#define MSGACK_EN BIT4
  420. +#define NO_ACC_EN BIT3
  421. +#define AAITX_EN BIT2
  422. +#define AAIRX_EN BIT1
  423. +#define MSGAV_EN BIT0
  424. +
  425. +#define MEI_SOFT_RESET BIT0
  426. +
  427. +#define HOST_MSTR BIT0
  428. +
  429. +#define JTAG_MASTER_MODE 0x0
  430. +#define MEI_MASTER_MODE HOST_MSTR
  431. +
  432. +// MEI_DEBUG_DECODE Register definitions
  433. +#define MEI_DEBUG_DEC_MASK (0x3)
  434. +#define MEI_DEBUG_DEC_AUX_MASK (0x0)
  435. +#define ME_DBG_DECODE_DMP1_MASK (0x1)
  436. +#define MEI_DEBUG_DEC_DMP2_MASK (0x2)
  437. +#define MEI_DEBUG_DEC_CORE_MASK (0x3)
  438. +
  439. +#define AUX_STATUS (0x0)
  440. +#define AUX_ARC_GPIO_CTRL (0x10C)
  441. +#define AUX_ARC_GPIO_DATA (0x10D)
  442. +// ARC_TO_MEI_MAILBOX[11] is a special location used to indicate
  443. +// page swap requests.
  444. +#if defined(CONFIG_DANUBE)
  445. +#define OMBOX_BASE 0xDF80
  446. +#define ARC_TO_MEI_MAILBOX 0xDFA0
  447. +#define IMBOX_BASE 0xDFC0
  448. +#define MEI_TO_ARC_MAILBOX 0xDFD0
  449. +#elif defined(CONFIG_AMAZON_SE) || defined(CONFIG_AR9) || defined(CONFIG_VR9)
  450. +#define OMBOX_BASE 0xAF80
  451. +#define ARC_TO_MEI_MAILBOX 0xAFA0
  452. +#define IMBOX_BASE 0xAFC0
  453. +#define MEI_TO_ARC_MAILBOX 0xAFD0
  454. +#endif
  455. +
  456. +#define MEI_TO_ARC_MAILBOXR (MEI_TO_ARC_MAILBOX + 0x2C)
  457. +#define ARC_MEI_MAILBOXR (ARC_TO_MEI_MAILBOX + 0x2C)
  458. +#define OMBOX1 (OMBOX_BASE+0x4)
  459. +
  460. +// Codeswap request messages are indicated by setting BIT31
  461. +#define OMB_CODESWAP_MESSAGE_MSG_TYPE_MASK (0x80000000)
  462. +
  463. +// Clear Eoc messages received are indicated by setting BIT17
  464. +#define OMB_CLEAREOC_INTERRUPT_CODE (0x00020000)
  465. +#define OMB_REBOOT_INTERRUPT_CODE (1 << 18)
  466. +
  467. +/*
  468. +** Swap page header
  469. +*/
  470. +// Page must be loaded at boot time if size field has BIT31 set
  471. +#define BOOT_FLAG (BIT31)
  472. +#define BOOT_FLAG_MASK ~BOOT_FLAG
  473. +
  474. +#define FREE_RELOAD 1
  475. +#define FREE_SHOWTIME 2
  476. +#define FREE_ALL 3
  477. +
  478. +// marcos
  479. +#define IFX_MEI_WRITE_REGISTER_L(data,addr) *((volatile u32*)(addr)) = (u32)(data)
  480. +#define IFX_MEI_READ_REGISTER_L(addr) (*((volatile u32*)(addr)))
  481. +#define SET_BIT(reg, mask) reg |= (mask)
  482. +#define CLEAR_BIT(reg, mask) reg &= (~mask)
  483. +#define CLEAR_BITS(reg, mask) CLEAR_BIT(reg, mask)
  484. +//#define SET_BITS(reg, mask) SET_BIT(reg, mask)
  485. +#define SET_BITFIELD(reg, mask, off, val) {reg &= (~mask); reg |= (val << off);}
  486. +
  487. +#define ALIGN_SIZE ( 1L<<10 ) //1K size align
  488. +#define MEM_ALIGN(addr) (((addr) + ALIGN_SIZE - 1) & ~ (ALIGN_SIZE -1) )
  489. +
  490. +// swap marco
  491. +#define MEI_HALF_WORD_SWAP(data) {data = ((data & 0xffff)<<16) + ((data & 0xffff0000)>>16);}
  492. +#define MEI_BYTE_SWAP(data) {data = ((data & 0xff)<<24) + ((data & 0xff00)<<8)+ ((data & 0xff0000)>>8)+ ((data & 0xff000000)>>24);}
  493. +
  494. +
  495. +#ifdef CONFIG_PROC_FS
  496. +typedef struct reg_entry
  497. +{
  498. + int *flag;
  499. + char name[30]; /* big enough to hold names */
  500. + char description[100]; /* big enough to hold description */
  501. + unsigned short low_ino;
  502. +} reg_entry_t;
  503. +#endif
  504. +// Swap page header describes size in 32-bit words, load location, and image offset
  505. +// for program and/or data segments
  506. +typedef struct _arc_swp_page_hdr {
  507. + u32 p_offset; //Offset bytes of progseg from beginning of image
  508. + u32 p_dest; //Destination addr of progseg on processor
  509. + u32 p_size; //Size in 32-bitwords of program segment
  510. + u32 d_offset; //Offset bytes of dataseg from beginning of image
  511. + u32 d_dest; //Destination addr of dataseg on processor
  512. + u32 d_size; //Size in 32-bitwords of data segment
  513. +} ARC_SWP_PAGE_HDR;
  514. +
  515. +/*
  516. +** Swap image header
  517. +*/
  518. +#define GET_PROG 0 // Flag used for program mem segment
  519. +#define GET_DATA 1 // Flag used for data mem segment
  520. +
  521. +// Image header contains size of image, checksum for image, and count of
  522. +// page headers. Following that are 'count' page headers followed by
  523. +// the code and/or data segments to be loaded
  524. +typedef struct _arc_img_hdr {
  525. + u32 size; // Size of binary image in bytes
  526. + u32 checksum; // Checksum for image
  527. + u32 count; // Count of swp pages in image
  528. + ARC_SWP_PAGE_HDR page[1]; // Should be "count" pages - '1' to make compiler happy
  529. +} ARC_IMG_HDR;
  530. +
  531. +typedef struct smmu_mem_info {
  532. + int type;
  533. + int boot;
  534. + unsigned long nCopy;
  535. + unsigned long size;
  536. + unsigned char *address;
  537. + unsigned char *org_address;
  538. +} smmu_mem_info_t;
  539. +
  540. +#ifdef __KERNEL__
  541. +typedef struct ifx_mei_device_private {
  542. + int modem_ready;
  543. + int arcmsgav;
  544. + int cmv_reply;
  545. + int cmv_waiting;
  546. + // Mei to ARC CMV count, reply count, ARC Indicator count
  547. + int modem_ready_cnt;
  548. + int cmv_count;
  549. + int reply_count;
  550. + unsigned long image_size;
  551. + int nBar;
  552. + u16 Recent_indicator[MSG_LENGTH];
  553. +
  554. + u16 CMV_RxMsg[MSG_LENGTH] __attribute__ ((aligned (4)));
  555. +
  556. + smmu_mem_info_t adsl_mem_info[MAX_BAR_REGISTERS];
  557. + ARC_IMG_HDR *img_hdr;
  558. + // to wait for arc cmv reply, sleep on wait_queue_arcmsgav;
  559. + wait_queue_head_t wait_queue_arcmsgav;
  560. + wait_queue_head_t wait_queue_modemready;
  561. + struct semaphore mei_cmv_sema;
  562. +} ifx_mei_device_private_t;
  563. +#endif
  564. +typedef struct winhost_message {
  565. + union {
  566. + u16 RxMessage[MSG_LENGTH] __attribute__ ((aligned (4)));
  567. + u16 TxMessage[MSG_LENGTH] __attribute__ ((aligned (4)));
  568. + } msg;
  569. +} DSL_DEV_WinHost_Message_t;
  570. +/********************************************************************************************************
  571. + * DSL CPE API Driver Stack Interface Definitions
  572. + * *****************************************************************************************************/
  573. +/** IOCTL codes for bsp driver */
  574. +#define DSL_IOC_MEI_BSP_MAGIC 's'
  575. +
  576. +#define DSL_FIO_BSP_DSL_START _IO (DSL_IOC_MEI_BSP_MAGIC, 0)
  577. +#define DSL_FIO_BSP_RUN _IO (DSL_IOC_MEI_BSP_MAGIC, 1)
  578. +#define DSL_FIO_BSP_FREE_RESOURCE _IO (DSL_IOC_MEI_BSP_MAGIC, 2)
  579. +#define DSL_FIO_BSP_RESET _IO (DSL_IOC_MEI_BSP_MAGIC, 3)
  580. +#define DSL_FIO_BSP_REBOOT _IO (DSL_IOC_MEI_BSP_MAGIC, 4)
  581. +#define DSL_FIO_BSP_HALT _IO (DSL_IOC_MEI_BSP_MAGIC, 5)
  582. +#define DSL_FIO_BSP_BOOTDOWNLOAD _IO (DSL_IOC_MEI_BSP_MAGIC, 6)
  583. +#define DSL_FIO_BSP_JTAG_ENABLE _IO (DSL_IOC_MEI_BSP_MAGIC, 7)
  584. +#define DSL_FIO_FREE_RESOURCE _IO (DSL_IOC_MEI_BSP_MAGIC, 8)
  585. +#define DSL_FIO_ARC_MUX_TEST _IO (DSL_IOC_MEI_BSP_MAGIC, 9)
  586. +#define DSL_FIO_BSP_REMOTE _IOW (DSL_IOC_MEI_BSP_MAGIC, 10, u32)
  587. +#define DSL_FIO_BSP_GET_BASE_ADDRESS _IOR (DSL_IOC_MEI_BSP_MAGIC, 11, u32)
  588. +#define DSL_FIO_BSP_IS_MODEM_READY _IOR (DSL_IOC_MEI_BSP_MAGIC, 12, u32)
  589. +#define DSL_FIO_BSP_GET_VERSION _IOR (DSL_IOC_MEI_BSP_MAGIC, 13, DSL_DEV_Version_t)
  590. +#define DSL_FIO_BSP_CMV_WINHOST _IOWR(DSL_IOC_MEI_BSP_MAGIC, 14, DSL_DEV_WinHost_Message_t)
  591. +#define DSL_FIO_BSP_CMV_READ _IOWR(DSL_IOC_MEI_BSP_MAGIC, 15, DSL_DEV_MeiReg_t)
  592. +#define DSL_FIO_BSP_CMV_WRITE _IOW (DSL_IOC_MEI_BSP_MAGIC, 16, DSL_DEV_MeiReg_t)
  593. +#define DSL_FIO_BSP_DEBUG_READ _IOWR(DSL_IOC_MEI_BSP_MAGIC, 17, DSL_DEV_MeiDebug_t)
  594. +#define DSL_FIO_BSP_DEBUG_WRITE _IOWR(DSL_IOC_MEI_BSP_MAGIC, 18, DSL_DEV_MeiDebug_t)
  595. +#define DSL_FIO_BSP_GET_CHIP_INFO _IOR (DSL_IOC_MEI_BSP_MAGIC, 19, DSL_DEV_HwVersion_t)
  596. +
  597. +#define DSL_DEV_MEIDEBUG_BUFFER_SIZES 512
  598. +
  599. +typedef struct DSL_DEV_MeiDebug
  600. +{
  601. + DSL_uint32_t iAddress;
  602. + DSL_uint32_t iCount;
  603. + DSL_uint32_t buffer[DSL_DEV_MEIDEBUG_BUFFER_SIZES];
  604. +} DSL_DEV_MeiDebug_t; /* meidebug */
  605. +
  606. +/**
  607. + * Structure is used for debug access only.
  608. + * Refer to configure option INCLUDE_ADSL_WINHOST_DEBUG */
  609. +typedef struct struct_meireg
  610. +{
  611. + /*
  612. + * Specifies that address for debug access */
  613. + unsigned long iAddress;
  614. + /*
  615. + * Specifies the pointer to the data that has to be written or returns a
  616. + * pointer to the data that has been read out*/
  617. + unsigned long iData;
  618. +} DSL_DEV_MeiReg_t; /* meireg */
  619. +
  620. +typedef struct DSL_DEV_Device
  621. +{
  622. + DSL_int_t nInUse; /* modem state, update by bsp driver, */
  623. + DSL_void_t *pPriv;
  624. + DSL_uint32_t base_address; /* mei base address */
  625. + DSL_int_t nIrq[2]; /* irq number */
  626. +#define IFX_DFEIR 0
  627. +#define IFX_DYING_GASP 1
  628. + DSL_DEV_MeiDebug_t lop_debugwr; /* dying gasp */
  629. +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0))
  630. + struct module *owner;
  631. +#endif
  632. +} DSL_DEV_Device_t; /* ifx_adsl_device_t */
  633. +
  634. +#define DSL_DEV_PRIVATE(dev) ((ifx_mei_device_private_t*)(dev->pPriv))
  635. +
  636. +typedef struct DSL_DEV_Version /* ifx_adsl_bsp_version */
  637. +{
  638. + unsigned long major;
  639. + unsigned long minor;
  640. + unsigned long revision;
  641. +} DSL_DEV_Version_t; /* ifx_adsl_bsp_version_t */
  642. +
  643. +typedef struct DSL_DEV_ChipInfo
  644. +{
  645. + unsigned long major;
  646. + unsigned long minor;
  647. +} DSL_DEV_HwVersion_t;
  648. +
  649. +typedef struct
  650. +{
  651. + DSL_uint8_t dummy;
  652. +} DSL_DEV_DeviceConfig_t;
  653. +
  654. +/** error code definitions */
  655. +typedef enum DSL_DEV_MeiError
  656. +{
  657. + DSL_DEV_MEI_ERR_SUCCESS = 0,
  658. + DSL_DEV_MEI_ERR_FAILURE = -1,
  659. + DSL_DEV_MEI_ERR_MAILBOX_FULL = -2,
  660. + DSL_DEV_MEI_ERR_MAILBOX_EMPTY = -3,
  661. + DSL_DEV_MEI_ERR_MAILBOX_TIMEOUT = -4
  662. +} DSL_DEV_MeiError_t; /* MEI_ERROR */
  663. +
  664. +typedef enum {
  665. + DSL_BSP_MEMORY_READ=0,
  666. + DSL_BSP_MEMORY_WRITE,
  667. +} DSL_BSP_MemoryAccessType_t; /* ifx_adsl_memory_access_type_t */
  668. +
  669. +typedef enum
  670. +{
  671. + DSL_LED_LINK_ID=0,
  672. + DSL_LED_DATA_ID
  673. +} DSL_DEV_LedId_t; /* ifx_adsl_led_id_t */
  674. +
  675. +typedef enum
  676. +{
  677. + DSL_LED_LINK_TYPE=0,
  678. + DSL_LED_DATA_TYPE
  679. +} DSL_DEV_LedType_t; /* ifx_adsl_led_type_t */
  680. +
  681. +typedef enum
  682. +{
  683. + DSL_LED_HD_CPU=0,
  684. + DSL_LED_HD_FW
  685. +} DSL_DEV_LedHandler_t; /* ifx_adsl_led_handler_t */
  686. +
  687. +typedef enum {
  688. + DSL_LED_ON=0,
  689. + DSL_LED_OFF,
  690. + DSL_LED_FLASH,
  691. +} DSL_DEV_LedMode_t; /* ifx_adsl_led_mode_t */
  692. +
  693. +typedef enum {
  694. + DSL_CPU_HALT=0,
  695. + DSL_CPU_RUN,
  696. + DSL_CPU_RESET,
  697. +} DSL_DEV_CpuMode_t; /* ifx_adsl_cpu_mode_t */
  698. +
  699. +#if 0
  700. +typedef enum {
  701. + DSL_BSP_EVENT_DYING_GASP = 0,
  702. + DSL_BSP_EVENT_CEOC_IRQ,
  703. +} DSL_BSP_Event_id_t; /* ifx_adsl_event_id_t */
  704. +
  705. +typedef union DSL_BSP_CB_Param
  706. +{
  707. + DSL_uint32_t nIrqMessage;
  708. +} DSL_BSP_CB_Param_t; /* ifx_adsl_cbparam_t */
  709. +
  710. +typedef struct DSL_BSP_CB_Event
  711. +{
  712. + DSL_BSP_Event_id_t nID;
  713. + DSL_DEV_Device_t *pDev;
  714. + DSL_BSP_CB_Param_t *pParam;
  715. +} DSL_BSP_CB_Event_t; /* ifx_adsl_cb_event_t */
  716. +#endif
  717. +
  718. +/* external functions (from the BSP Driver) */
  719. +extern DSL_DEV_Device_t* DSL_BSP_DriverHandleGet(int, int);
  720. +extern DSL_int_t DSL_BSP_DriverHandleDelete(DSL_DEV_Device_t *);
  721. +extern DSL_DEV_MeiError_t DSL_BSP_FWDownload(DSL_DEV_Device_t *, const DSL_char_t *, DSL_uint32_t, DSL_int32_t *, DSL_int32_t *);
  722. +extern int DSL_BSP_KernelIoctls(DSL_DEV_Device_t *, unsigned int, unsigned long);
  723. +extern DSL_DEV_MeiError_t DSL_BSP_SendCMV(DSL_DEV_Device_t *, DSL_uint16_t *, DSL_int_t, DSL_uint16_t *);
  724. +extern DSL_DEV_MeiError_t DSL_BSP_AdslLedInit(DSL_DEV_Device_t *, DSL_DEV_LedId_t, DSL_DEV_LedType_t, DSL_DEV_LedHandler_t);
  725. +extern DSL_DEV_MeiError_t DSL_BSP_Showtime(DSL_DEV_Device_t *, DSL_uint32_t, DSL_uint32_t);
  726. +extern int DSL_BSP_ATMLedCBRegister( int (*ifx_adsl_ledcallback)(void));
  727. +extern DSL_DEV_MeiError_t DSL_BSP_MemoryDebugAccess(DSL_DEV_Device_t *, DSL_BSP_MemoryAccessType_t, DSL_uint32_t, DSL_uint32_t *, DSL_uint32_t);
  728. +extern volatile DSL_DEV_Device_t *adsl_dev;
  729. +
  730. +/**
  731. + * Dummy structure by now to show mechanism of extended data that will be
  732. + * provided within event callback itself.
  733. + * */
  734. +typedef struct
  735. +{
  736. + /**
  737. + * Dummy value */
  738. + DSL_uint32_t nDummy1;
  739. +} DSL_BSP_CB_Event1DataDummy_t;
  740. +
  741. +/**
  742. + * Dummy structure by now to show mechanism of extended data that will be
  743. + * provided within event callback itself.
  744. + * */
  745. +typedef struct
  746. +{
  747. + /**
  748. + * Dummy value */
  749. + DSL_uint32_t nDummy2;
  750. +} DSL_BSP_CB_Event2DataDummy_t;
  751. +
  752. +/**
  753. + * encapsulate all data structures that are necessary for status event
  754. + * callbacks.
  755. + * */
  756. +typedef union
  757. +{
  758. + DSL_BSP_CB_Event1DataDummy_t dataEvent1;
  759. + DSL_BSP_CB_Event2DataDummy_t dataEvent2;
  760. +} DSL_BSP_CB_DATA_Union_t;
  761. +
  762. +
  763. +typedef enum
  764. +{
  765. + /**
  766. + * Informs the upper layer driver (DSL CPE API) about a reboot request from the
  767. + * firmware.
  768. + * \note This event does NOT include any additional data.
  769. + * More detailed information upon reboot reason has to be requested from
  770. + * upper layer software via CMV (INFO 109) if necessary. */
  771. + DSL_BSP_CB_FIRST = 0,
  772. + DSL_BSP_CB_DYING_GASP,
  773. + DSL_BSP_CB_CEOC_IRQ,
  774. + DSL_BSP_CB_FIRMWARE_REBOOT,
  775. + /**
  776. + * Delimiter only */
  777. + DSL_BSP_CB_LAST
  778. +} DSL_BSP_CB_Type_t;
  779. +
  780. +/**
  781. + * Specifies the common event type that has to be used for registering and
  782. + * signalling of interrupts/autonomous status events from MEI BSP Driver.
  783. + *
  784. + * \param pDev
  785. + * Context pointer from MEI BSP Driver.
  786. + *
  787. + * \param IFX_ADSL_BSP_CallbackType_t
  788. + * Specifies the event callback type (reason of callback). Regrading to the
  789. + * setting of this value the data which is included in the following union
  790. + * might have different meanings.
  791. + * Please refer to the description of the union to get information about the
  792. + * meaning of the included data.
  793. + *
  794. + * \param pData
  795. + * Data according to \ref DSL_BSP_CB_DATA_Union_t.
  796. + * If this pointer is NULL there is no additional data available.
  797. + *
  798. + * \return depending on event
  799. + */
  800. +typedef int (*DSL_BSP_EventCallback_t)
  801. +(
  802. + DSL_DEV_Device_t *pDev,
  803. + DSL_BSP_CB_Type_t nCallbackType,
  804. + DSL_BSP_CB_DATA_Union_t *pData
  805. +);
  806. +
  807. +typedef struct {
  808. + DSL_BSP_EventCallback_t function;
  809. + DSL_BSP_CB_Type_t event;
  810. + DSL_BSP_CB_DATA_Union_t *pData;
  811. +} DSL_BSP_EventCallBack_t;
  812. +
  813. +extern int DSL_BSP_EventCBRegister(DSL_BSP_EventCallBack_t *);
  814. +extern int DSL_BSP_EventCBUnregister(DSL_BSP_EventCallBack_t *);
  815. +
  816. +/** Modem states */
  817. +#define DSL_DEV_STAT_InitState 0x0000
  818. +#define DSL_DEV_STAT_ReadyState 0x0001
  819. +#define DSL_DEV_STAT_FailState 0x0002
  820. +#define DSL_DEV_STAT_IdleState 0x0003
  821. +#define DSL_DEV_STAT_QuietState 0x0004
  822. +#define DSL_DEV_STAT_GhsState 0x0005
  823. +#define DSL_DEV_STAT_FullInitState 0x0006
  824. +#define DSL_DEV_STAT_ShowTimeState 0x0007
  825. +#define DSL_DEV_STAT_FastRetrainState 0x0008
  826. +#define DSL_DEV_STAT_LoopDiagMode 0x0009
  827. +#define DSL_DEV_STAT_ShortInit 0x000A /* Bis short initialization */
  828. +
  829. +#define DSL_DEV_STAT_CODESWAP_COMPLETE 0x0002
  830. +
  831. +#endif //IFXMIPS_MEI_H
  832. --- a/configure.in
  833. +++ b/configure.in
  834. @@ -310,7 +310,7 @@ dnl Set kernel build path
  835. AC_ARG_ENABLE(kernelbuild,
  836. AC_HELP_STRING(--enable-kernel-build=x,Set the target kernel build path),
  837. [
  838. - if test -e $enableval/include/linux/autoconf.h; then
  839. + if test -e $enableval/include/linux/autoconf.h -o -e $enableval/include/generated/autoconf.h; then
  840. AC_SUBST([KERNEL_BUILD_PATH],[$enableval])
  841. else
  842. AC_MSG_ERROR([The kernel build directory is not valid or not configured!])
  843. @@ -333,12 +333,12 @@ AC_ARG_ENABLE(ifxos-include,
  844. echo Set the lib_ifxos include path $enableval
  845. AC_SUBST([IFXOS_INCLUDE_PATH],[$enableval])
  846. else
  847. - echo -e Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH
  848. + echo Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH
  849. AC_SUBST([IFXOS_INCLUDE_PATH],[$DEFAULT_IFXOS_INCLUDE_PATH])
  850. fi
  851. ],
  852. [
  853. - echo -e Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH
  854. + echo Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH
  855. AC_SUBST([IFXOS_INCLUDE_PATH],[$DEFAULT_IFXOS_INCLUDE_PATH])
  856. ]
  857. )
  858. @@ -1702,73 +1702,73 @@ dnl Set the configure params for dist ch
  859. AC_SUBST([DISTCHECK_CONFIGURE_PARAMS],[$CONFIGURE_OPTIONS])
  860. AC_CONFIG_COMMANDS_PRE([
  861. -echo -e "------------------------------------------------------------------------"
  862. -echo -e " Configuration for drv_dsl_cpe_api:"
  863. -echo -e " Configure model type: $DSL_CONFIG_MODEL_TYPE"
  864. -echo -e " Source code location: $srcdir"
  865. -echo -e " Compiler: $CC"
  866. -echo -e " Compiler c-flags: $CFLAGS"
  867. -echo -e " Extra compiler c-flags: $EXTRA_DRV_CFLAGS"
  868. -echo -e " Host System Type: $host"
  869. -echo -e " Install path: $prefix"
  870. -echo -e " Linux kernel include path: $KERNEL_INCL_PATH"
  871. -echo -e " Linux kernel build path: $KERNEL_BUILD_PATH"
  872. -echo -e " Linux kernel architecture: $KERNEL_ARCH"
  873. -echo -e " Include IFXOS: $INCLUDE_DSL_CPE_API_IFXOS_SUPPORT"
  874. -echo -e " IFXOS include path: $IFXOS_INCLUDE_PATH"
  875. -echo -e " Driver Include Path $DSL_DRIVER_INCL_PATH"
  876. -echo -e " DSL device: $DSL_DEVICE_NAME"
  877. -echo -e " Max device number: $DSL_DRV_MAX_DEVICE_NUMBER"
  878. -echo -e " Channels per line: $DSL_CHANNELS_PER_LINE"
  879. -echo -e " Build lib (only for kernel 2.6) $DSL_CPE_API_LIBRARY_BUILD_2_6"
  880. -echo -e " DSL data led flash frequency: $DSL_DATA_LED_FLASH_FREQUENCY Hz"
  881. -echo -e " Disable debug prints: $DSL_DEBUG_DISABLE"
  882. -echo -e " Preselection of max. debug level: $DSL_DBG_MAX_LEVEL_SET"
  883. -echo -e " Preselected max. debug level: $DSL_DBG_MAX_LEVEL_PRE"
  884. -echo -e " Include deprecated functions: $INCLUDE_DEPRECATED"
  885. -echo -e " Include Device Exception Codes: $INCLUDE_DEVICE_EXCEPTION_CODES"
  886. -echo -e " Include FW request support: $INCLUDE_FW_REQUEST_SUPPORT"
  887. -echo -e " Include ADSL trace buffer: $INCLUDE_DSL_CPE_TRACE_BUFFER"
  888. -echo -e " Include ADSL MIB: $INCLUDE_DSL_ADSL_MIB"
  889. -echo -e " Include ADSL LED: $INCLUDE_ADSL_LED"
  890. -echo -e " Include CEOC: $INCLUDE_DSL_CEOC"
  891. -echo -e " Include config get support: $INCLUDE_DSL_CONFIG_GET"
  892. -echo -e " Include System i/f configuration: $INCLUDE_DSL_SYSTEM_INTERFACE"
  893. -echo -e " Include Resource Statistics: $INCLUDE_DSL_RESOURCE_STATISTICS"
  894. -echo -e " Include Framing Parameters: $INCLUDE_DSL_FRAMING_PARAMETERS"
  895. -echo -e " Include G997 Line Inventory: $INCLUDE_DSL_G997_LINE_INVENTORY"
  896. -echo -e " Include G997 Framing Parameters: $INCLUDE_DSL_G997_FRAMING_PARAMETERS"
  897. -echo -e " Include G997 per tone data: $INCLUDE_DSL_G997_PER_TONE"
  898. -echo -e " Include G997 status: $INCLUDE_DSL_G997_STATUS"
  899. -echo -e " Include G997 alarm: $INCLUDE_DSL_G997_ALARM"
  900. -echo -e " Include DSL Bonding: $INCLUDE_DSL_BONDING"
  901. -echo -e " Include Misc Line Status $INCLUDE_DSL_CPE_MISC_LINE_STATUS"
  902. -echo -e " Include DELT: $INCLUDE_DSL_DELT"
  903. -echo -e " Include DELT data static storage: $DSL_CPE_STATIC_DELT_DATA"
  904. -echo -e " Include PM: $INCLUDE_DSL_PM"
  905. -echo -e " Include PM config: $INCLUDE_DSL_CPE_PM_CONFIG"
  906. -echo -e " Include PM total: $INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS"
  907. -echo -e " Include PM history: $INCLUDE_DSL_CPE_PM_HISTORY"
  908. -echo -e " Include PM showtime: $INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS"
  909. -echo -e " Include PM optional: $INCLUDE_DSL_CPE_PM_OPTIONAL_PARAMETERS"
  910. -echo -e " Include PM line: $INCLUDE_DSL_CPE_PM_LINE_COUNTERS"
  911. -echo -e " Include PM line event showtime: $INCLUDE_DSL_CPE_PM_LINE_EVENT_SHOWTIME_COUNTERS"
  912. -echo -e " Include PM channel: $INCLUDE_DSL_CPE_PM_CHANNEL_COUNTERS"
  913. -echo -e " Include PM channel extended: $INCLUDE_DSL_CPE_PM_CHANNEL_EXT_COUNTERS"
  914. -echo -e " Include PM data path: $INCLUDE_DSL_CPE_PM_DATA_PATH_COUNTERS"
  915. -echo -e " Include PM data path failure: $INCLUDE_DSL_CPE_PM_DATA_PATH_FAILURE_COUNTERS"
  916. -echo -e " Include PM ReTx: $INCLUDE_DSL_CPE_PM_RETX_COUNTERS"
  917. -echo -e " Include PM line threshold: $INCLUDE_DSL_CPE_PM_LINE_THRESHOLDS"
  918. -echo -e " Include PM channel threshold: $INCLUDE_DSL_CPE_PM_CHANNEL_THRESHOLDS"
  919. -echo -e " Include PM data path threshold: $INCLUDE_DSL_CPE_PM_DATA_PATH_THRESHOLDS"
  920. -echo -e " Include PM ReTx threshold: $INCLUDE_DSL_CPE_PM_RETX_THRESHOLDS"
  921. -echo -e " Include FW memory free support: $INCLUDE_DSL_FIRMWARE_MEMORY_FREE"
  922. -echo -e "----------------------- deprectated ! ----------------------------------"
  923. -echo -e " Include PM line failure: $INCLUDE_DSL_CPE_PM_LINE_FAILURE_COUNTERS"
  924. -echo -e ""
  925. -echo -e " Settings:"
  926. -echo -e " Configure options: $CONFIGURE_OPTIONS"
  927. -echo -e "------------------------------------------------------------------------"
  928. +echo "------------------------------------------------------------------------"
  929. +echo " Configuration for drv_dsl_cpe_api:"
  930. +echo " Configure model type: $DSL_CONFIG_MODEL_TYPE"
  931. +echo " Source code location: $srcdir"
  932. +echo " Compiler: $CC"
  933. +echo " Compiler c-flags: $CFLAGS"
  934. +echo " Extra compiler c-flags: $EXTRA_DRV_CFLAGS"
  935. +echo " Host System Type: $host"
  936. +echo " Install path: $prefix"
  937. +echo " Linux kernel include path: $KERNEL_INCL_PATH"
  938. +echo " Linux kernel build path: $KERNEL_BUILD_PATH"
  939. +echo " Linux kernel architecture: $KERNEL_ARCH"
  940. +echo " Include IFXOS: $INCLUDE_DSL_CPE_API_IFXOS_SUPPORT"
  941. +echo " IFXOS include path: $IFXOS_INCLUDE_PATH"
  942. +echo " Driver Include Path $DSL_DRIVER_INCL_PATH"
  943. +echo " DSL device: $DSL_DEVICE_NAME"
  944. +echo " Max device number: $DSL_DRV_MAX_DEVICE_NUMBER"
  945. +echo " Channels per line: $DSL_CHANNELS_PER_LINE"
  946. +echo " Build lib (only for kernel 2.6) $DSL_CPE_API_LIBRARY_BUILD_2_6"
  947. +echo " DSL data led flash frequency: $DSL_DATA_LED_FLASH_FREQUENCY Hz"
  948. +echo " Disable debug prints: $DSL_DEBUG_DISABLE"
  949. +echo " Preselection of max. debug level: $DSL_DBG_MAX_LEVEL_SET"
  950. +echo " Preselected max. debug level: $DSL_DBG_MAX_LEVEL_PRE"
  951. +echo " Include deprecated functions: $INCLUDE_DEPRECATED"
  952. +echo " Include Device Exception Codes: $INCLUDE_DEVICE_EXCEPTION_CODES"
  953. +echo " Include FW request support: $INCLUDE_FW_REQUEST_SUPPORT"
  954. +echo " Include ADSL trace buffer: $INCLUDE_DSL_CPE_TRACE_BUFFER"
  955. +echo " Include ADSL MIB: $INCLUDE_DSL_ADSL_MIB"
  956. +echo " Include ADSL LED: $INCLUDE_ADSL_LED"
  957. +echo " Include CEOC: $INCLUDE_DSL_CEOC"
  958. +echo " Include config get support: $INCLUDE_DSL_CONFIG_GET"
  959. +echo " Include System i/f configuration: $INCLUDE_DSL_SYSTEM_INTERFACE"
  960. +echo " Include Resource Statistics: $INCLUDE_DSL_RESOURCE_STATISTICS"
  961. +echo " Include Framing Parameters: $INCLUDE_DSL_FRAMING_PARAMETERS"
  962. +echo " Include G997 Line Inventory: $INCLUDE_DSL_G997_LINE_INVENTORY"
  963. +echo " Include G997 Framing Parameters: $INCLUDE_DSL_G997_FRAMING_PARAMETERS"
  964. +echo " Include G997 per tone data: $INCLUDE_DSL_G997_PER_TONE"
  965. +echo " Include G997 status: $INCLUDE_DSL_G997_STATUS"
  966. +echo " Include G997 alarm: $INCLUDE_DSL_G997_ALARM"
  967. +echo " Include DSL Bonding: $INCLUDE_DSL_BONDING"
  968. +echo " Include Misc Line Status $INCLUDE_DSL_CPE_MISC_LINE_STATUS"
  969. +echo " Include DELT: $INCLUDE_DSL_DELT"
  970. +echo " Include DELT data static storage: $DSL_CPE_STATIC_DELT_DATA"
  971. +echo " Include PM: $INCLUDE_DSL_PM"
  972. +echo " Include PM config: $INCLUDE_DSL_CPE_PM_CONFIG"
  973. +echo " Include PM total: $INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS"
  974. +echo " Include PM history: $INCLUDE_DSL_CPE_PM_HISTORY"
  975. +echo " Include PM showtime: $INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS"
  976. +echo " Include PM optional: $INCLUDE_DSL_CPE_PM_OPTIONAL_PARAMETERS"
  977. +echo " Include PM line: $INCLUDE_DSL_CPE_PM_LINE_COUNTERS"
  978. +echo " Include PM line event showtime: $INCLUDE_DSL_CPE_PM_LINE_EVENT_SHOWTIME_COUNTERS"
  979. +echo " Include PM channel: $INCLUDE_DSL_CPE_PM_CHANNEL_COUNTERS"
  980. +echo " Include PM channel extended: $INCLUDE_DSL_CPE_PM_CHANNEL_EXT_COUNTERS"
  981. +echo " Include PM data path: $INCLUDE_DSL_CPE_PM_DATA_PATH_COUNTERS"
  982. +echo " Include PM data path failure: $INCLUDE_DSL_CPE_PM_DATA_PATH_FAILURE_COUNTERS"
  983. +echo " Include PM ReTx: $INCLUDE_DSL_CPE_PM_RETX_COUNTERS"
  984. +echo " Include PM line threshold: $INCLUDE_DSL_CPE_PM_LINE_THRESHOLDS"
  985. +echo " Include PM channel threshold: $INCLUDE_DSL_CPE_PM_CHANNEL_THRESHOLDS"
  986. +echo " Include PM data path threshold: $INCLUDE_DSL_CPE_PM_DATA_PATH_THRESHOLDS"
  987. +echo " Include PM ReTx threshold: $INCLUDE_DSL_CPE_PM_RETX_THRESHOLDS"
  988. +echo " Include FW memory free support: $INCLUDE_DSL_FIRMWARE_MEMORY_FREE"
  989. +echo "----------------------- deprectated ! ----------------------------------"
  990. +echo " Include PM line failure: $INCLUDE_DSL_CPE_PM_LINE_FAILURE_COUNTERS"
  991. +echo ""
  992. +echo " Settings:"
  993. +echo " Configure options: $CONFIGURE_OPTIONS"
  994. +echo "------------------------------------------------------------------------"
  995. ])
  996. AC_CONFIG_FILES([Makefile src/Makefile])
  997. --- a/src/Makefile.am
  998. +++ b/src/Makefile.am
  999. @@ -300,7 +300,7 @@ if KERNEL_2_6
  1000. drv_dsl_cpe_api_OBJS = "$(subst .c,.o,$(filter %.c,$(drv_dsl_cpe_api_SOURCES)))"
  1001. drv_dsl_cpe_api.ko: $(drv_dsl_cpe_api_SOURCES)
  1002. - @echo -e "drv_dsl_cpe_api: Making Linux 2.6.x kernel object"
  1003. + @echo "drv_dsl_cpe_api: Making Linux 2.6.x kernel object"
  1004. if test ! -e common/drv_dsl_cpe_api.c ; then \
  1005. echo "copy source files (as links only!)"; \
  1006. for f in $(filter %.c,$(drv_dsl_cpe_api_SOURCES)); do \
  1007. @@ -308,10 +308,10 @@ drv_dsl_cpe_api.ko: $(drv_dsl_cpe_api_SO
  1008. cp -s $(addprefix @abs_srcdir@/,$$f) $(PWD)/`dirname $$f`/ ; \
  1009. done \
  1010. fi
  1011. - @echo -e "# drv_dsl_cpe_api: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild
  1012. - @echo -e "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild
  1013. - @echo -e "$(subst .ko,,$@)-y := $(drv_dsl_cpe_api_OBJS)" >> $(PWD)/Kbuild
  1014. - @echo -e "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(drv_dsl_cpe_api_CFLAGS) $(DSL_DRIVER_INCL_PATH) $(IFXOS_INCLUDE_PATH) -I@abs_srcdir@/include -I$(PWD)/include" >> $(PWD)/Kbuild
  1015. + @echo "# drv_dsl_cpe_api: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild
  1016. + @echo "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild
  1017. + @echo "$(subst .ko,,$@)-y := $(drv_dsl_cpe_api_OBJS)" >> $(PWD)/Kbuild
  1018. + @echo "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(drv_dsl_cpe_api_CFLAGS) $(DSL_DRIVER_INCL_PATH) $(IFXOS_INCLUDE_PATH) -I@abs_srcdir@/include -I$(PWD)/include" >> $(PWD)/Kbuild
  1019. $(MAKE) ARCH=@KERNEL_ARCH@ -C @KERNEL_BUILD_PATH@ O=@KERNEL_BUILD_PATH@ M=$(PWD) modules
  1020. clean-generic: