400-falcon.patch 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968
  1. --- a/configure.in
  2. +++ b/configure.in
  3. @@ -956,14 +956,15 @@ AC_DEFINE([VMMC],[1],[enable VMMC suppor
  4. AM_CONDITIONAL(DANUBE, false)
  5. AM_CONDITIONAL(AR9, false)
  6. AM_CONDITIONAL(VR9, false)
  7. +AM_CONDITIONAL(FALCON, false)
  8. AC_ARG_WITH(device,
  9. AC_HELP_STRING(
  10. - [--with-device=DANUBE|TWINPASS|AR9|VR9],
  11. + [--with-device=DANUBE|TWINPASS|AR9|VR9|FALCON],
  12. [Set device type, default is DANUBE]
  13. ),
  14. [
  15. if test "$withval" = yes; then
  16. - AC_MSG_ERROR([Set device type! Valid choices are DANUBE|TWINPASS|AR9|VR9]);
  17. + AC_MSG_ERROR([Set device type! Valid choices are DANUBE|TWINPASS|AR9|VR9|FALCON]);
  18. else
  19. case $withval in
  20. DANUBE)
  21. @@ -986,8 +987,13 @@ AC_ARG_WITH(device,
  22. AC_DEFINE([SYSTEM_VR9],[1],[enable VR9 specific code])
  23. AM_CONDITIONAL(VR9, true)
  24. ;;
  25. + FALCON)
  26. + AC_MSG_RESULT(FALCON device is used);
  27. + AC_DEFINE([SYSTEM_FALCON],[1],[enable FALCON specific code])
  28. + AM_CONDITIONAL(FALCON, true)
  29. + ;;
  30. *)
  31. - AC_MSG_ERROR([Set device type! Valid choices are DANUBE|TWINPASS|AR9|VR9]);
  32. + AC_MSG_ERROR([Set device type! Valid choices are DANUBE|TWINPASS|AR9|VR9|FALCON]);
  33. ;;
  34. esac
  35. fi
  36. --- a/src/Makefile.am
  37. +++ b/src/Makefile.am
  38. @@ -70,6 +70,11 @@ drv_vmmc_SOURCES +=\
  39. mps/drv_mps_vmmc_ar9.c
  40. endif
  41. +if FALCON
  42. +drv_vmmc_SOURCES +=\
  43. + mps/drv_mps_vmmc_falcon.c
  44. +endif
  45. +
  46. endif
  47. if PMC_SUPPORT
  48. --- a/drv_version.h
  49. +++ b/drv_version.h
  50. @@ -36,6 +36,10 @@
  51. #define MIN_FW_MAJORSTEP 2
  52. #define MIN_FW_MINORSTEP 1
  53. #define MIN_FW_HOTFIXSTEP 0
  54. +#elif defined(SYSTEM_FALCON)
  55. +#define MIN_FW_MAJORSTEP 0
  56. +#define MIN_FW_MINORSTEP 1
  57. +#define MIN_FW_HOTFIXSTEP 0
  58. #else
  59. #error unknown system
  60. #endif
  61. --- a/src/drv_vmmc_bbd.c
  62. +++ b/src/drv_vmmc_bbd.c
  63. @@ -34,6 +34,7 @@
  64. #define VMMC_WL_SDD_BASIC_CFG 0x04000400
  65. #define VMMC_WL_SDD_RING_CFG 0x04000500
  66. #define VMMC_WL_SDD_DCDC_CFG 0x04000C00
  67. +#define VMMC_WL_SDD_MWI_CFG 0x04000600
  68. #define IDLE_EXT_TOGGLE_SLEEP_MS 5
  69. @@ -52,6 +53,8 @@
  70. #define BBD_VMMC_MAGIC 0x41523921 /* "AR9" */
  71. #elif defined(SYSTEM_VR9)
  72. #define BBD_VMMC_MAGIC 0x56523921 /* "VR9" */
  73. +#elif defined(SYSTEM_FALCON)
  74. +#define BBD_VMMC_MAGIC 0x46414C43 /* "FALC" */
  75. #else
  76. #error system undefined
  77. #endif
  78. @@ -525,9 +528,6 @@ static IFX_int32_t VMMC_BBD_BlockHandler
  79. IFX_uint16_t slic_val;
  80. IFX_int32_t ret = IFX_SUCCESS;
  81. - TRACE(VMMC, DBG_LEVEL_LOW,
  82. - ("bbd block with tag 0x%04X passed\n", pBBDblock->tag));
  83. -
  84. /* for FXO line allowed blocks are FXO_CRAM and TRANSPARENT */
  85. if (pCh->pALM->line_type_fxs != IFX_TRUE)
  86. {
  87. @@ -686,6 +686,7 @@ static IFX_int32_t VMMC_BBD_BlockHandler
  88. break;
  89. }
  90. } /* if */
  91. +
  92. return ret;
  93. }
  94. @@ -1026,6 +1027,7 @@ static IFX_int32_t vmmc_BBD_WhiteListedC
  95. }
  96. case VMMC_WL_SDD_RING_CFG:
  97. case VMMC_WL_SDD_DCDC_CFG:
  98. + case VMMC_WL_SDD_MWI_CFG:
  99. ret = CmdWrite (pCh->pParent, Msg.val, Msg.cmd.LENGTH);
  100. break;
  101. @@ -1068,7 +1070,7 @@ static IFX_int32_t vmmc_BBD_DownloadChCr
  102. IFX_uint32_t countWords;
  103. IFX_uint32_t posBytes = 0;
  104. IFX_uint8_t lenBytes, *pByte;
  105. -#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  106. +#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  107. IFX_uint8_t padBytes = 0;
  108. #endif
  109. IFX_uint16_t cram_offset, cram_crc,
  110. @@ -1088,7 +1090,7 @@ static IFX_int32_t vmmc_BBD_DownloadChCr
  111. #ifdef SYSTEM_DANUBE
  112. /* CMD1 is a COP command */
  113. pCmd[0] = (0x0200) | (pCh->nChannel - 1);
  114. -#elif defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  115. +#elif defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  116. /* SDD_Coef command */
  117. pCmd[0] = (0x0400) | (pCh->nChannel - 1);
  118. pCmd[1] = (0x0D00);
  119. @@ -1111,7 +1113,7 @@ static IFX_int32_t vmmc_BBD_DownloadChCr
  120. pCmd[1] = ((cram_offset + (posBytes >> 1)) << 8);
  121. /* set CRAM data while taking care of endianess */
  122. cpb2w (&pCmd[2], &pByte[posBytes], lenBytes);
  123. -#elif defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  124. +#elif defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  125. /* calculate length to download (in words = 16bit),
  126. maximum allowed length for this message is 56 Bytes = 28 Words */
  127. if (countWords > ((MAX_CMD_WORD - CMD_HDR_CNT - 1)))
  128. @@ -1140,7 +1142,7 @@ static IFX_int32_t vmmc_BBD_DownloadChCr
  129. /* write Data */
  130. #if defined SYSTEM_DANUBE
  131. ret = CmdWrite (pCh->pParent, (IFX_uint32_t *) pCmd, lenBytes);
  132. -#elif defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  133. +#elif defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  134. #if 1
  135. /* lenBytes + 2 bytes for block offset/length which are not calculated
  136. in the download progress */
  137. --- a/src/mps/drv_mps_version.h
  138. +++ b/src/mps/drv_mps_version.h
  139. @@ -17,7 +17,7 @@
  140. #define VERSIONSTEP 2
  141. #define VERS_TYPE 5
  142. -#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  143. +#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  144. #define IFX_MPS_PLATFORM_NAME "MIPS34KEc"
  145. #elif defined(SYSTEM_DANUBE)
  146. #define IFX_MPS_PLATFORM_NAME "MIPS24KEc"
  147. --- a/src/mps/drv_mps_vmmc_linux.c
  148. +++ b/src/mps/drv_mps_vmmc_linux.c
  149. @@ -2225,7 +2225,7 @@ IFX_int32_t __init ifx_mps_init_module (
  150. #if defined(CONFIG_MIPS) && !defined(CONFIG_MIPS_UNCACHED)
  151. #if defined(SYSTEM_DANUBE)
  152. bDoCacheOps = IFX_TRUE; /* on Danube always perform cache ops */
  153. -#elif defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  154. +#elif defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  155. /* on AR9/VR9 cache is configured by BSP;
  156. here we check whether the D-cache is shared or partitioned;
  157. 1) in case of shared D-cache all cache operations are omitted;
  158. @@ -2255,7 +2255,8 @@ IFX_int32_t __init ifx_mps_init_module (
  159. /* reset the device before initializing the device driver */
  160. ifx_mps_reset ();
  161. - result = request_irq (INT_NUM_IM4_IRL18,
  162. +
  163. + result = request_irq (INT_NUM_IM4_IRL18,
  164. #ifdef LINUX_2_6
  165. ifx_mps_ad0_irq, IRQF_DISABLED
  166. #else /* */
  167. @@ -2396,7 +2397,7 @@ IFX_int32_t __init ifx_mps_init_module (
  168. if (result = ifx_mps_init_gpt_danube ())
  169. return result;
  170. #endif /*DANUBE*/
  171. - TRACE (MPS, DBG_LEVEL_HIGH, ("Downloading Firmware...\n"));
  172. + TRACE (MPS, DBG_LEVEL_HIGH, ("Downloading Firmware...\n"));
  173. ifx_mps_download_firmware (IFX_NULL, (mps_fw *) 0xa0a00000);
  174. udelay (500);
  175. TRACE (MPS, DBG_LEVEL_HIGH, ("Providing Buffers...\n"));
  176. --- /dev/null
  177. +++ b/src/mps/drv_mps_vmmc_falcon.c
  178. @@ -0,0 +1,463 @@
  179. +/******************************************************************************
  180. +
  181. + Copyright (c) 2009
  182. + Lantiq Deutschland GmbH
  183. + Am Campeon 3; 85579 Neubiberg, Germany
  184. +
  185. + For licensing information, see the file 'LICENSE' in the root folder of
  186. + this software module.
  187. +
  188. +****************************************************************************
  189. + Module : drv_mps_vmmc_falcon.c
  190. + Description : This file contains the implementation of the FALC-ON specific
  191. + driver functions.
  192. +*******************************************************************************/
  193. +
  194. +/* ============================= */
  195. +/* Includes */
  196. +/* ============================= */
  197. +#include "drv_config.h"
  198. +
  199. +#if defined(SYSTEM_FALCON) /* defined in drv_config.h */
  200. +
  201. +/* lib_ifxos headers */
  202. +#include "ifx_types.h"
  203. +#include "ifxos_linux_drv.h"
  204. +#include "ifxos_copy_user_space.h"
  205. +#include "ifxos_event.h"
  206. +#include "ifxos_lock.h"
  207. +#include "ifxos_select.h"
  208. +#include "ifxos_interrupt.h"
  209. +#include <linux/gpio.h>
  210. +#include <sys1_reg.h>
  211. +#include <falcon.h>
  212. +#include <falcon_irq.h>
  213. +#include <vpe.h>
  214. +#include <sysctrl.h>
  215. +void (*ifx_bsp_basic_mps_decrypt)(unsigned int addr, int n) = (void (*)(unsigned int, int))0xbf000290;
  216. +
  217. +#define IFX_MPS_SRAM IFXMIPS_MPS_SRAM
  218. +
  219. +/*#define USE_PLAIN_VOICE_FIRMWARE*/
  220. +/* board specific headers */
  221. +
  222. +/* device specific headers */
  223. +#include "drv_mps_vmmc.h"
  224. +#include "drv_mps_vmmc_dbg.h"
  225. +#include "drv_mps_vmmc_device.h"
  226. +
  227. +/* ============================= */
  228. +/* Local Macros & Definitions */
  229. +/* ============================= */
  230. +/* Firmware watchdog timer counter address */
  231. +#define VPE1_WDOG_CTR_ADDR ((IFX_uint32_t)((IFX_uint8_t* )IFX_MPS_SRAM + 432))
  232. +
  233. +/* Firmware watchdog timeout range, values in ms */
  234. +#define VPE1_WDOG_TMOUT_MIN 20
  235. +#define VPE1_WDOG_TMOUT_MAX 5000
  236. +
  237. +/* ============================= */
  238. +/* Global variable definition */
  239. +/* ============================= */
  240. +extern mps_comm_dev *pMPSDev;
  241. +
  242. +/* ============================= */
  243. +/* Global function declaration */
  244. +/* ============================= */
  245. +IFX_void_t ifx_mps_release (IFX_void_t);
  246. +extern IFX_uint32_t ifx_mps_reset_structures (mps_comm_dev * pMPSDev);
  247. +extern IFX_int32_t ifx_mps_bufman_close (IFX_void_t);
  248. +IFX_int32_t ifx_mps_wdog_callback (IFX_uint32_t wdog_cleared_ok_count);
  249. +extern IFXOS_event_t fw_ready_evt;
  250. +/* ============================= */
  251. +/* Local function declaration */
  252. +/* ============================= */
  253. +static IFX_int32_t ifx_mps_fw_wdog_start_ar9(IFX_void_t);
  254. +
  255. +/* ============================= */
  256. +/* Local variable definition */
  257. +/* ============================= */
  258. +static IFX_int32_t vpe1_started = 0;
  259. +/* VMMC watchdog timer callback */
  260. +IFX_int32_t (*ifx_wdog_callback) (IFX_uint32_t flags) = IFX_NULL;
  261. +
  262. +/* ============================= */
  263. +/* Local function definition */
  264. +/* ============================= */
  265. +
  266. +/******************************************************************************
  267. + * AR9 Specific Routines
  268. + ******************************************************************************/
  269. +
  270. +/**
  271. + * Start AR9 EDSP firmware watchdog mechanism.
  272. + * Called after download and startup of VPE1.
  273. + *
  274. + * \param none
  275. + * \return 0 IFX_SUCCESS
  276. + * \return -1 IFX_ERROR
  277. + * \ingroup Internal
  278. + */
  279. +IFX_int32_t ifx_mps_fw_wdog_start_ar9()
  280. +{
  281. + return IFX_SUCCESS;
  282. +}
  283. +
  284. +/**
  285. + * Firmware download to Voice CPU
  286. + * This function performs a firmware download to the coprocessor.
  287. + *
  288. + * \param pMBDev Pointer to mailbox device structure
  289. + * \param pFWDwnld Pointer to firmware structure
  290. + * \return 0 IFX_SUCCESS, firmware ready
  291. + * \return -1 IFX_ERROR, firmware not downloaded.
  292. + * \ingroup Internal
  293. + */
  294. +IFX_int32_t ifx_mps_download_firmware (mps_mbx_dev *pMBDev, mps_fw *pFWDwnld)
  295. +{
  296. + IFX_uint32_t mem, cksum;
  297. + IFX_uint8_t crc;
  298. + IFX_boolean_t bMemReqNotPresent = IFX_FALSE;
  299. +
  300. + /* VCC register */
  301. + /* dummy accesss on GTC for GPONC-55, otherwise upper bits are random on read */
  302. + ltq_r32 ((u32 *)((KSEG1 | 0x1DC000B0)));
  303. + /* NTR Frequency Select 1536 kHz per default or take existing,
  304. + NTR Output Enable and NTR8K Output Enable */
  305. + if ((ltq_r32 ((u32 *)(GPON_SYS_BASE + 0xBC)) & 7) == 0)
  306. + ltq_w32_mask (0x10187, 0x183, (u32 *)(GPON_SYS_BASE + 0xBC));
  307. + else
  308. + ltq_w32_mask (0x10180, 0x180, (u32 *)(GPON_SYS_BASE + 0xBC));
  309. +#if 0
  310. + /* BIU-ICU1-IM1_ISR - IM1:FSCT_CMP1=1 and FSC_ROOT=1
  311. + (0x1f880328 = 0x00002800) */
  312. + ltq_w32 (0x00002800, (u32 *)(GPON_ICU1_BASE + 0x30));
  313. +#endif
  314. + /* copy FW footer from user space */
  315. + if (IFX_NULL == IFXOS_CpyFromUser(pFW_img_data,
  316. + pFWDwnld->data+pFWDwnld->length/4-sizeof(*pFW_img_data)/4,
  317. + sizeof(*pFW_img_data)))
  318. + {
  319. + TRACE (MPS, DBG_LEVEL_HIGH,
  320. + (KERN_ERR "[%s %s %d]: copy_from_user error\r\n",
  321. + __FILE__, __func__, __LINE__));
  322. + return IFX_ERROR;
  323. + }
  324. +
  325. + mem = pFW_img_data->mem;
  326. +
  327. + /* memory requirement sanity check */
  328. + if ((crc = ~((mem >> 16) + (mem >> 8) + mem)) != (mem >> 24))
  329. + {
  330. + TRACE (MPS, DBG_LEVEL_HIGH,
  331. + ("[%s %s %d]: warning, image does not contain size - assuming 1MB!\n",
  332. + __FILE__, __func__, __LINE__));
  333. + mem = 1 * 1024 * 1024;
  334. + bMemReqNotPresent = IFX_TRUE;
  335. + }
  336. + else
  337. + {
  338. + mem &= 0x00FFFFFF;
  339. + }
  340. +
  341. + /* check if FW image fits in available memory space */
  342. + if (mem > vpe1_get_max_mem(0))
  343. + {
  344. + TRACE (MPS, DBG_LEVEL_HIGH,
  345. + ("[%s %s %d]: error, firmware memory exceeds reserved space (%i > %i)!\n",
  346. + __FILE__, __func__, __LINE__, mem, vpe1_get_max_mem(0)));
  347. + return IFX_ERROR;
  348. + }
  349. +
  350. + /* reset the driver */
  351. + ifx_mps_reset ();
  352. +
  353. + /* call BSP to get cpu1 base address */
  354. + cpu1_base_addr = (IFX_uint32_t *)vpe1_get_load_addr(0);
  355. +
  356. + /* check if CPU1 base address is sane
  357. + \todo: check if address is 1MB aligned,
  358. + also make it visible in a /proc fs */
  359. + if (!cpu1_base_addr)
  360. + {
  361. + TRACE (MPS, DBG_LEVEL_HIGH,
  362. + (KERN_ERR "IFX_MPS: CPU1 base address is invalid!\r\n"));
  363. + return IFX_ERROR;
  364. + }
  365. + /* further use uncached value */
  366. + cpu1_base_addr = (IFX_uint32_t *)KSEG1ADDR(cpu1_base_addr);
  367. +
  368. + /* free all data buffers that might be currently used by FW */
  369. + if (IFX_NULL != ifx_mps_bufman_freeall)
  370. + {
  371. + ifx_mps_bufman_freeall();
  372. + }
  373. +
  374. + if(FW_FORMAT_NEW)
  375. + {
  376. + /* adjust download length */
  377. + pFWDwnld->length -= (sizeof(*pFW_img_data)-sizeof(IFX_uint32_t));
  378. + }
  379. + else
  380. + {
  381. + pFWDwnld->length -= sizeof(IFX_uint32_t);
  382. +
  383. + /* handle unlikely case if FW image does not contain memory requirement -
  384. + assumed for old format only */
  385. + if (IFX_TRUE == bMemReqNotPresent)
  386. + pFWDwnld->length += sizeof(IFX_uint32_t);
  387. +
  388. + /* in case of old FW format always assume that FW is encrypted;
  389. + use compile switch USE_PLAIN_VOICE_FIRMWARE for plain FW */
  390. +#ifndef USE_PLAIN_VOICE_FIRMWARE
  391. + pFW_img_data->enc = 1;
  392. +#else
  393. +#warning Using unencrypted firmware!
  394. + pFW_img_data->enc = 0;
  395. +#endif /* USE_PLAIN_VOICE_FIRMWARE */
  396. + /* initializations for the old format */
  397. + pFW_img_data->st_addr_crc = 2*sizeof(IFX_uint32_t) +
  398. + FW_AR9_OLD_FMT_XCPT_AREA_SZ;
  399. + pFW_img_data->en_addr_crc = pFWDwnld->length;
  400. + pFW_img_data->fw_vers = 0;
  401. + pFW_img_data->magic = 0;
  402. + }
  403. +
  404. + /* copy FW image to base address of CPU1 */
  405. + if (IFX_NULL ==
  406. + IFXOS_CpyFromUser ((IFX_void_t *)cpu1_base_addr,
  407. + (IFX_void_t *)pFWDwnld->data, pFWDwnld->length))
  408. + {
  409. + TRACE (MPS, DBG_LEVEL_HIGH,
  410. + (KERN_ERR "[%s %s %d]: copy_from_user error\r\n", __FILE__,
  411. + __func__, __LINE__));
  412. + return IFX_ERROR;
  413. + }
  414. +
  415. + /* process firmware decryption */
  416. + if (pFW_img_data->enc == 1)
  417. + {
  418. + if(FW_FORMAT_NEW)
  419. + {
  420. + /* adjust decryption length (avoid decrypting CRC32 checksum) */
  421. + pFWDwnld->length -= sizeof(IFX_uint32_t);
  422. + }
  423. + /* BootROM actually decrypts n+4 bytes if n bytes were passed for
  424. + decryption. Subtract sizeof(u32) from length to avoid decryption
  425. + of data beyond the FW image code */
  426. + pFWDwnld->length -= sizeof(IFX_uint32_t);
  427. + ifx_bsp_basic_mps_decrypt((unsigned int)cpu1_base_addr, pFWDwnld->length);
  428. + }
  429. +
  430. + /* calculate CRC32 checksum over downloaded image */
  431. + cksum = ifx_mps_fw_crc32(cpu1_base_addr, pFW_img_data);
  432. +
  433. + /* verify the checksum */
  434. + if(FW_FORMAT_NEW)
  435. + {
  436. + if (cksum != pFW_img_data->crc32)
  437. + {
  438. + TRACE (MPS, DBG_LEVEL_HIGH,
  439. + ("MPS: FW checksum error: img=0x%08x calc=0x%08x\r\n",
  440. + pFW_img_data->crc32, cksum));
  441. + /*return IFX_ERROR;*/
  442. + }
  443. + }
  444. + else
  445. + {
  446. + /* just store self-calculated checksum */
  447. + pFW_img_data->crc32 = cksum;
  448. + }
  449. +
  450. + /* start VPE1 */
  451. + ifx_mps_release ();
  452. +#if 0
  453. + /* start FW watchdog mechanism */
  454. + ifx_mps_fw_wdog_start_ar9();
  455. +#endif
  456. + /* get FW version */
  457. + return ifx_mps_get_fw_version (0);
  458. +}
  459. +
  460. +
  461. +/**
  462. + * Restart CPU1
  463. + * This function restarts CPU1 by accessing the reset request register and
  464. + * reinitializes the mailbox.
  465. + *
  466. + * \return 0 IFX_SUCCESS, successful restart
  467. + * \return -1 IFX_ERROR, if reset failed
  468. + * \ingroup Internal
  469. + */
  470. +IFX_int32_t ifx_mps_restart (IFX_void_t)
  471. +{
  472. + /* raise reset request for CPU1 and reset driver structures */
  473. + ifx_mps_reset ();
  474. + /* Disable GPTC Interrupt to CPU1 */
  475. + ifx_mps_shutdown_gpt ();
  476. + /* re-configure GPTC */
  477. + ifx_mps_init_gpt ();
  478. + /* let CPU1 run */
  479. + ifx_mps_release ();
  480. + /* start FW watchdog mechanism */
  481. + ifx_mps_fw_wdog_start_ar9();
  482. + TRACE (MPS, DBG_LEVEL_HIGH, ("IFX_MPS: Restarting firmware..."));
  483. + return ifx_mps_get_fw_version (0);
  484. +}
  485. +
  486. +/**
  487. + * Shutdown MPS - stop VPE1
  488. + * This function stops VPE1
  489. + *
  490. + * \ingroup Internal
  491. + */
  492. +IFX_void_t ifx_mps_shutdown (IFX_void_t)
  493. +{
  494. + if (vpe1_started)
  495. + {
  496. + /* stop software watchdog timer */
  497. + vpe1_sw_wdog_stop (0);
  498. + /* clean up the BSP callback function */
  499. + vpe1_sw_wdog_register_reset_handler (IFX_NULL);
  500. + /* stop VPE1 */
  501. + vpe1_sw_stop (0);
  502. + vpe1_started = 0;
  503. + }
  504. + /* free GPTC */
  505. + ifx_mps_shutdown_gpt ();
  506. +}
  507. +
  508. +/**
  509. + * Reset CPU1
  510. + * This function causes a reset of CPU1 by clearing the CPU0 boot ready bit
  511. + * in the reset request register RCU_RST_REQ.
  512. + * It does not change the boot configuration registers for CPU0 or CPU1.
  513. + *
  514. + * \return 0 IFX_SUCCESS, cannot fail
  515. + * \ingroup Internal
  516. + */
  517. +IFX_void_t ifx_mps_reset (IFX_void_t)
  518. +{
  519. + /* if VPE1 is already started, stop it */
  520. + if (vpe1_started)
  521. + {
  522. + /* stop software watchdog timer first */
  523. + vpe1_sw_wdog_stop (0);
  524. + vpe1_sw_stop (0);
  525. + vpe1_started = 0;
  526. + }
  527. +
  528. + /* reset driver */
  529. + ifx_mps_reset_structures (pMPSDev);
  530. + ifx_mps_bufman_close ();
  531. + return;
  532. +}
  533. +
  534. +/**
  535. + * Let CPU1 run
  536. + * This function starts VPE1
  537. + *
  538. + * \return none
  539. + * \ingroup Internal
  540. + */
  541. +IFX_void_t ifx_mps_release (IFX_void_t)
  542. +{
  543. + IFX_int_t ret;
  544. + IFX_int32_t RetCode = 0;
  545. +
  546. + /* Start VPE1 */
  547. + if (IFX_SUCCESS !=
  548. + vpe1_sw_start ((IFX_void_t *)cpu1_base_addr, 0, 0))
  549. + {
  550. + TRACE (MPS, DBG_LEVEL_HIGH, (KERN_ERR "Error starting VPE1\r\n"));
  551. + return;
  552. + }
  553. + vpe1_started = 1;
  554. +
  555. + /* sleep 3 seconds until FW is ready */
  556. + ret = IFXOS_EventWait (&fw_ready_evt, 3000, &RetCode);
  557. + if ((ret == IFX_ERROR) && (RetCode == 1))
  558. + {
  559. + /* timeout */
  560. + TRACE (MPS, DBG_LEVEL_HIGH,
  561. + (KERN_ERR "[%s %s %d]: Timeout waiting for firmware ready.\r\n",
  562. + __FILE__, __func__, __LINE__));
  563. + /* recalculate and compare the firmware checksum */
  564. + ifx_mps_fw_crc_compare(cpu1_base_addr, pFW_img_data);
  565. + /* dump exception area on a console */
  566. + ifx_mps_dump_fw_xcpt(cpu1_base_addr, pFW_img_data);
  567. + }
  568. +}
  569. +
  570. +/**
  571. + * WDT callback.
  572. + * This function is called by BSP (module softdog_vpe) in case if software
  573. + * watchdog timer expiration is detected by BSP.
  574. + * This function needs to be registered at BSP as WDT callback using
  575. + * vpe1_sw_wdog_register_reset_handler() API.
  576. + *
  577. + * \return 0 IFX_SUCCESS, cannot fail
  578. + * \ingroup Internal
  579. + */
  580. +IFX_int32_t ifx_mps_wdog_callback (IFX_uint32_t wdog_cleared_ok_count)
  581. +{
  582. +#ifdef DEBUG
  583. + TRACE (MPS, DBG_LEVEL_HIGH,
  584. + ("MPS: watchdog callback! arg=0x%08x\r\n", wdog_cleared_ok_count));
  585. +#endif /* DEBUG */
  586. +
  587. + /* reset SmartSLIC is done by FW */
  588. + /* recalculate and compare the firmware checksum */
  589. + ifx_mps_fw_crc_compare(cpu1_base_addr, pFW_img_data);
  590. +
  591. + /* dump exception area on a console */
  592. + ifx_mps_dump_fw_xcpt(cpu1_base_addr, pFW_img_data);
  593. +
  594. + if (IFX_NULL != ifx_wdog_callback)
  595. + {
  596. + /* call VMMC driver */
  597. + ifx_wdog_callback (wdog_cleared_ok_count);
  598. + }
  599. + else
  600. + {
  601. + TRACE (MPS, DBG_LEVEL_HIGH,
  602. + (KERN_WARNING "MPS: VMMC watchdog timer callback is NULL.\r\n"));
  603. + }
  604. + return 0;
  605. +}
  606. +
  607. +/**
  608. + * Register WDT callback.
  609. + * This function is called by VMMC driver to register its callback in
  610. + * the MPS driver.
  611. + *
  612. + * \return 0 IFX_SUCCESS, cannot fail
  613. + * \ingroup Internal
  614. + */
  615. +IFX_int32_t
  616. +ifx_mps_register_wdog_callback (IFX_int32_t (*pfn) (IFX_uint32_t flags))
  617. +{
  618. + ifx_wdog_callback = pfn;
  619. + return 0;
  620. +}
  621. +
  622. +/**
  623. + Hardware setup on FALC ON
  624. +*/
  625. +void sys_hw_setup (void)
  626. +{
  627. + /* Set INFRAC register bit 1: clock enable of the GPE primary clock. */
  628. + sys_gpe_hw_activate (0);
  629. + /* enable 1.5 V */
  630. + ltq_w32_mask (0xf, 0x0b, (u32 *)(GPON_SYS1_BASE | 0xbc));
  631. + /* SYS1-CLKEN:GPTC = 1 and MPS, no longer FSCT = 1 */
  632. + sys1_hw_activate (ACTS_MPS | ACTS_GPTC);
  633. + /* GPTC:CLC:RMC = 1 */
  634. + ltq_w32 (0x00000100, (u32 *)(KSEG1 | 0x1E100E00));
  635. +}
  636. +
  637. +#ifndef VMMC_WITH_MPS
  638. +EXPORT_SYMBOL (ifx_mps_register_wdog_callback);
  639. +#endif /* !VMMC_WITH_MPS */
  640. +
  641. +#endif /* SYSTEM_FALCON */
  642. --- a/src/mps/drv_mps_vmmc_common.c
  643. +++ b/src/mps/drv_mps_vmmc_common.c
  644. @@ -66,6 +66,10 @@ static void inline bsp_mask_and_ack_irq(
  645. # include <asm/ifx/ifx_regs.h>
  646. # include <asm/ifx/ifx_gptu.h>
  647. #endif
  648. +#if defined(SYSTEM_FALCON)
  649. +#include <sys1_reg.h>
  650. +#include <sysctrl.h>
  651. +#endif
  652. #include "drv_mps_vmmc.h"
  653. #include "drv_mps_vmmc_dbg.h"
  654. @@ -1156,7 +1160,12 @@ IFX_uint32_t ifx_mps_init_structures (mp
  655. mailbox, * upstream and downstream direction. */
  656. memset (
  657. /* avoid to overwrite CPU boot registers */
  658. +#if defined(SYSTEM_FALCON)
  659. + (IFX_void_t *) MBX_Memory +
  660. + 2 * sizeof (mps_boot_cfg_reg),
  661. +#else
  662. (IFX_void_t *) MBX_Memory,
  663. +#endif
  664. 0,
  665. sizeof (mps_mbx_reg) - 2 * sizeof (mps_boot_cfg_reg));
  666. MBX_Memory->MBX_UPSTR_CMD_BASE =
  667. @@ -2651,7 +2660,6 @@ IFX_void_t ifx_mps_enable_mailbox_int ()
  668. #endif
  669. *IFX_MPS_AD0ENR = Ad0Reg.val;
  670. -
  671. }
  672. /**
  673. @@ -2669,6 +2677,7 @@ IFX_void_t ifx_mps_disable_mailbox_int (
  674. Ad0Reg.fld.cu_mbx = 0;
  675. Ad0Reg.fld.du_mbx = 0;
  676. *IFX_MPS_AD0ENR = Ad0Reg.val;
  677. +
  678. }
  679. /**
  680. @@ -2766,11 +2775,13 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t
  681. /* handle only enabled interrupts */
  682. MPS_Ad0StatusReg.val &= *IFX_MPS_AD0ENR;
  683. +#if !defined(SYSTEM_FALCON)
  684. #ifdef LINUX_2_6
  685. bsp_mask_and_ack_irq (irq);
  686. #else /* */
  687. mask_and_ack_danube_irq (irq);
  688. #endif /* */
  689. +#endif /* !defined(SYSTEM_FALCON) */
  690. /* FW is up and ready to process commands */
  691. if (MPS_Ad0StatusReg.fld.dl_end)
  692. {
  693. @@ -2919,11 +2930,13 @@ irqreturn_t ifx_mps_ad1_irq (IFX_int32_t
  694. /* handle only enabled interrupts */
  695. MPS_Ad1StatusReg.val &= *IFX_MPS_AD1ENR;
  696. +#if !defined(SYSTEM_FALCON)
  697. #ifdef LINUX_2_6
  698. bsp_mask_and_ack_irq (irq);
  699. #else /* */
  700. mask_and_ack_danube_irq (irq);
  701. #endif /* */
  702. +#endif /* !defined(SYSTEM_FALCON) */
  703. pMPSDev->event.MPS_Ad1Reg.val = MPS_Ad1StatusReg.val;
  704. /* use callback function or queue wake up to notify about data reception */
  705. @@ -2977,11 +2990,13 @@ irqreturn_t ifx_mps_vc_irq (IFX_int32_t
  706. IFX_MPS_CVC0SR[chan] = MPS_VCStatusReg.val;
  707. /* handle only enabled interrupts */
  708. MPS_VCStatusReg.val &= IFX_MPS_VC0ENR[chan];
  709. +#if !defined(SYSTEM_FALCON)
  710. #ifdef LINUX_2_6
  711. bsp_mask_and_ack_irq (irq);
  712. #else /* */
  713. mask_and_ack_danube_irq (irq);
  714. #endif /* */
  715. +#endif /* !defined(SYSTEM_FALCON) */
  716. pMPSDev->event.MPS_VCStatReg[chan].val = MPS_VCStatusReg.val;
  717. #ifdef PRINT_ON_ERR_INTERRUPT
  718. @@ -3126,6 +3141,7 @@ IFX_int32_t ifx_mps_get_fw_version (IFX_
  719. */
  720. IFX_return_t ifx_mps_init_gpt ()
  721. {
  722. +#if !defined(SYSTEM_FALCON)
  723. unsigned long flags;
  724. IFX_uint32_t timer_flags, timer, loops = 0;
  725. IFX_ulong_t count;
  726. @@ -3134,7 +3150,11 @@ IFX_return_t ifx_mps_init_gpt ()
  727. #else /* Danube */
  728. timer = TIMER1B;
  729. #endif /* SYSTEM_AR9 || SYSTEM_VR9 */
  730. +#endif
  731. +#if defined(SYSTEM_FALCON)
  732. + sys_hw_setup ();
  733. +#else
  734. /* calibration loop - required to syncronize GPTC interrupt with falling
  735. edge of FSC clock */
  736. timer_flags =
  737. @@ -3179,7 +3199,7 @@ Probably already in use.\r\n", __FILE__,
  738. #endif /* DEBUG */
  739. IFXOS_UNLOCKINT (flags);
  740. -
  741. +#endif
  742. return IFX_SUCCESS;
  743. }
  744. @@ -3194,6 +3214,9 @@ Probably already in use.\r\n", __FILE__,
  745. */
  746. IFX_void_t ifx_mps_shutdown_gpt (IFX_void_t)
  747. {
  748. +#if defined(SYSTEM_FALCON)
  749. + sys1_hw_deactivate (ACTS_MPS);
  750. +#else
  751. IFX_uint32_t timer;
  752. #if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  753. timer = TIMER1A;
  754. @@ -3202,6 +3225,7 @@ IFX_void_t ifx_mps_shutdown_gpt (IFX_voi
  755. #endif /* SYSTEM_AR9 || SYSTEM_VR9 */
  756. ifx_gptu_timer_free (timer);
  757. +#endif
  758. }
  759. /**
  760. --- a/src/mps/drv_mps_vmmc_device.h
  761. +++ b/src/mps/drv_mps_vmmc_device.h
  762. @@ -22,7 +22,12 @@
  763. # include <lantiq_soc.h>
  764. # include <gpio.h>
  765. #define IFXMIPS_MPS_SRAM ((u32 *)(KSEG1 + 0x1F200000))
  766. +#if defined(SYSTEM_FALCON)
  767. +#define IFXMIPS_MPS_BASE_ADDR (KSEG1 + 0x1D004000)
  768. +#else
  769. #define IFXMIPS_MPS_BASE_ADDR (KSEG1 + 0x1F107000)
  770. +#endif
  771. +
  772. #define IFXMIPS_MPS_CHIPID ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0344))
  773. #define IFXMIPS_MPS_VC0ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0000))
  774. #define IFXMIPS_MPS_RVC0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0010))
  775. @@ -73,10 +78,11 @@
  776. /* MPS Common defines */
  777. /* ============================= */
  778. -#define MPS_BASEADDRESS 0xBF107000
  779. -#define MPS_RAD0SR MPS_BASEADDRESS + 0x0004
  780. -
  781. +#if defined(SYSTEM_FALCON)
  782. +#define MBX_BASEADDRESS 0xBF200040
  783. +#else
  784. #define MBX_BASEADDRESS 0xBF200000
  785. +#endif
  786. #define VCPU_BASEADDRESS 0xBF208000 /* 0xBF108000 */
  787. /*---------------------------------------------------------------------------*/
  788. #if !defined(CONFIG_LANTIQ)
  789. @@ -118,7 +124,6 @@
  790. /*---------------------------------------------------------------------------*/
  791. #ifdef CONFIG_MPS_EVENT_MBX
  792. -
  793. #define MBX_CMD_FIFO_SIZE 64 /**< Size of command FIFO in bytes */
  794. #define MBX_DATA_UPSTRM_FIFO_SIZE 64
  795. #define MBX_DATA_DNSTRM_FIFO_SIZE 128
  796. @@ -294,6 +299,10 @@ typedef struct
  797. #ifdef CONFIG_MPS_EVENT_MBX
  798. typedef struct
  799. {
  800. +#if defined(SYSTEM_FALCON)
  801. + mps_boot_cfg_reg MBX_CPU0_BOOT_CFG; /**< CPU0 Boot Configuration */
  802. + mps_boot_cfg_reg MBX_CPU1_BOOT_CFG; /**< CPU1 Boot Configuration */
  803. +#endif
  804. volatile IFX_uint32_t *MBX_UPSTR_CMD_BASE; /**< Upstream Command FIFO Base Address */
  805. volatile IFX_uint32_t MBX_UPSTR_CMD_SIZE; /**< Upstream Command FIFO size in byte */
  806. volatile IFX_uint32_t *MBX_DNSTR_CMD_BASE; /**< Downstream Command FIFO Base Address */
  807. @@ -317,13 +326,19 @@ typedef struct
  808. volatile IFX_uint32_t MBX_UPSTR_EVENT_WRITE; /**< Upstream Event FIFO Write Index */
  809. volatile IFX_uint32_t MBX_EVENT[MBX_EVENT_DATA_WORDS];
  810. volatile IFX_uint32_t reserved[4];
  811. +#if !defined(SYSTEM_FALCON)
  812. mps_boot_cfg_reg MBX_CPU0_BOOT_CFG; /**< CPU0 Boot Configuration */
  813. mps_boot_cfg_reg MBX_CPU1_BOOT_CFG; /**< CPU1 Boot Configuration */
  814. +#endif
  815. } mps_mbx_reg;
  816. #else /* */
  817. typedef struct
  818. {
  819. +#if defined(SYSTEM_FALCON)
  820. + mps_boot_cfg_reg MBX_CPU0_BOOT_CFG; /**< CPU0 Boot Configuration */
  821. + mps_boot_cfg_reg MBX_CPU1_BOOT_CFG; /**< CPU1 Boot Configuration */
  822. +#endif
  823. volatile IFX_uint32_t *MBX_UPSTR_CMD_BASE; /**< Upstream Command FIFO Base Address */
  824. volatile IFX_uint32_t MBX_UPSTR_CMD_SIZE; /**< Upstream Command FIFO size in byte */
  825. volatile IFX_uint32_t *MBX_DNSTR_CMD_BASE; /**< Downstream Command FIFO Base Address */
  826. @@ -341,8 +356,10 @@ typedef struct
  827. volatile IFX_uint32_t MBX_DNSTR_DATA_READ; /**< Downstream Data FIFO Read Index */
  828. volatile IFX_uint32_t MBX_DNSTR_DATA_WRITE; /**< Downstream Data FIFO Write Index */
  829. volatile IFX_uint32_t MBX_DATA[MBX_DATA_WORDS];
  830. +#if !defined(SYSTEM_FALCON)
  831. mps_boot_cfg_reg MBX_CPU0_BOOT_CFG; /**< CPU0 Boot Configuration */
  832. mps_boot_cfg_reg MBX_CPU1_BOOT_CFG; /**< CPU1 Boot Configuration */
  833. +#endif
  834. } mps_mbx_reg;
  835. #endif /* CONFIG_MPS_EVENT_MBX */
  836. --- a/src/drv_api.h
  837. +++ b/src/drv_api.h
  838. @@ -183,7 +183,7 @@
  839. #endif
  840. /* TAPI FXS Phone Detection feature is not available for Danube platform */
  841. -#if defined(TAPI_PHONE_DETECTION) && (defined(SYSTEM_AR9) || defined(SYSTEM_VR9))
  842. +#if defined(TAPI_PHONE_DETECTION) && (defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON))
  843. #define VMMC_CFG_ADD_FEAT_PHONE_DETECTION VMMC_FEAT_PHONE_DETECTION
  844. #else
  845. #define VMMC_CFG_ADD_FEAT_PHONE_DETECTION 0
  846. --- a/src/drv_vmmc_alm.c
  847. +++ b/src/drv_vmmc_alm.c
  848. @@ -800,7 +800,7 @@ IFX_void_t VMMC_ALM_Free_Ch_Structures (
  849. }
  850. -#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  851. +#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  852. /**
  853. Check whether SmartSLIC is connected
  854. @@ -836,7 +836,7 @@ IFX_boolean_t VMMC_ALM_SmartSLIC_IsConne
  855. #endif /*SYSTEM_AR9 || SYSTEM_VR9*/
  856. -#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  857. +#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  858. /**
  859. Read the number of channels on the SmartSLIC.
  860. @@ -1876,7 +1876,7 @@ IFX_int32_t VMMC_TAPI_LL_ALM_VMMC_Test_L
  861. /* write updated message contents */
  862. ret = CmdWrite (pDev, (IFX_uint32_t *)((IFX_void_t *)&debugCfg),
  863. DCCTL_CMD_LEN);
  864. -#elif defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  865. +#elif defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  866. IFX_uint32_t dcctrlLoop[2];
  867. IFX_uint32_t ch = (IFX_uint32_t)(pCh->nChannel - 1);
  868. --- a/src/drv_vmmc_alm.h
  869. +++ b/src/drv_vmmc_alm.h
  870. @@ -65,7 +65,7 @@ extern IFX_void_t irq_VMMC_ALM_LineDisab
  871. extern IFX_void_t VMMC_ALM_CorrectLinemodeCache (VMMC_CHANNEL *pCh,
  872. IFX_uint16_t lm);
  873. -#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  874. +#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  875. extern IFX_boolean_t VMMC_ALM_SmartSLIC_IsConnected (
  876. VMMC_DEVICE *pDev);
  877. --- a/src/drv_vmmc_init.c
  878. +++ b/src/drv_vmmc_init.c
  879. @@ -52,15 +52,6 @@
  880. #include "ifx_pmu.h"
  881. #endif /* PMU_SUPPORTED */
  882. -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
  883. -# define IFX_MPS_CAD0SR IFXMIPS_MPS_CAD0SR
  884. -# define IFX_MPS_CAD1SR IFXMIPS_MPS_CAD1SR
  885. -# define IFX_MPS_CVC0SR IFXMIPS_MPS_CVC0SR
  886. -# define IFX_MPS_CVC1SR IFXMIPS_MPS_CVC1SR
  887. -# define IFX_MPS_CVC2SR IFXMIPS_MPS_CVC2SR
  888. -# define IFX_MPS_CVC3SR IFXMIPS_MPS_CVC3SR
  889. -#endif
  890. -
  891. /* ============================= */
  892. /* Local Macros & Definitions */
  893. /* ============================= */
  894. @@ -820,7 +811,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init(
  895. MIN_FW_HOTFIXSTEP};
  896. IFX_uint8_t tmp1, tmp2;
  897. IFX_TAPI_RESOURCE nResource;
  898. -#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  899. +#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  900. IFX_uint8_t nChannels, nFXOChannels;
  901. #endif /*SYSTEM_AR9 || SYSTEM_VR9*/
  902. IFX_int32_t ret = VMMC_statusOk;
  903. @@ -874,7 +865,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init(
  904. pDev->bSmartSlic = IFX_FALSE;
  905. pDev->bSlicSupportsIdleMode = IFX_FALSE;
  906. -#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  907. +#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  908. if (VMMC_SUCCESS(ret))
  909. {
  910. /* Reduce the number of ALM channels in the capabilities if the SLIC
  911. --- a/src/drv_vmmc_ioctl.c
  912. +++ b/src/drv_vmmc_ioctl.c
  913. @@ -273,7 +273,7 @@ IFX_int32_t VMMC_Dev_Spec_Ioctl (IFX_TAP
  914. case FIO_GET_VERS:
  915. {
  916. VMMC_IO_VERSION *pVers;
  917. -#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  918. +#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  919. VMMC_SDD_REVISION_READ_t *pSDDVersCmd = IFX_NULL;
  920. #endif /*SYSTEM_AR9 || SYSTEM_VR9*/
  921. SYS_VER_t *pCmd;
  922. @@ -322,7 +322,7 @@ IFX_int32_t VMMC_Dev_Spec_Ioctl (IFX_TAP
  923. pVers->nTapiVers = 3;
  924. pVers->nDrvVers = MAJORSTEP << 24 | MINORSTEP << 16 |
  925. VERSIONSTEP << 8 | VERS_TYPE;
  926. -#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
  927. +#if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) || defined(SYSTEM_FALCON)
  928. /* in case of SmartSLIC based systems, we can give some more
  929. versions.*/
  930. if (VMMC_ALM_SmartSLIC_IsConnected(pDev))