1 --- a/src/drv_vmmc_access.h
2 +++ b/src/drv_vmmc_access.h
4 #include "drv_mps_vmmc.h"
7 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
8 +# define IFX_MPS IFXMIPS_MPS_BASE_ADDR
11 /* ============================= */
13 /* ============================= */
14 --- a/src/drv_vmmc_bbd.c
15 +++ b/src/drv_vmmc_bbd.c
16 @@ -1072,7 +1072,11 @@
17 IFX_uint8_t padBytes = 0;
19 IFX_uint16_t cram_offset, cram_crc,
20 - pCmd [MAX_CMD_WORD] = {0};
22 +#if defined (__GNUC__) || defined (__GNUG__)
23 + __attribute__ ((aligned(4)))
28 cpb2w (&cram_offset, &bbd_cram->pData[0], sizeof (IFX_uint16_t));
29 --- a/src/drv_vmmc_danube.h
30 +++ b/src/drv_vmmc_danube.h
34 #if defined SYSTEM_DANUBE
35 -#include <asm/ifx/ifx_gpio.h>
36 +#include <xway/xway.h>
39 #error no system selected
42 -#define VMMC_TAPI_GPIO_MODULE_ID IFX_GPIO_MODULE_TAPI_VMMC
43 +#define VMMC_TAPI_GPIO_MODULE_ID IFX_GPIO_MODULE_TAPI_VMMC
47 #define VMMC_PCM_IF_CFG_HOOK(mode, GPIOreserved, ret) \
49 - ret = VMMC_statusOk; \
50 - /* Reserve P0.0 as TDM/FSC */ \
51 - if (!GPIOreserved) \
52 - ret |= ifx_gpio_pin_reserve(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
53 - ret |= ifx_gpio_altsel0_set(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
54 - ret |= ifx_gpio_altsel1_set(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
55 - ret |= ifx_gpio_open_drain_set(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID);\
57 - /* Reserve P1.9 as TDM/DO */ \
58 - if (!GPIOreserved) \
59 - ret |= ifx_gpio_pin_reserve(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
60 - ret |= ifx_gpio_altsel0_set(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
61 - ret |= ifx_gpio_altsel1_clear(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
62 - ret |= ifx_gpio_dir_out_set(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
63 - ret |= ifx_gpio_open_drain_set(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
65 - /* Reserve P1.10 as TDM/DI */ \
66 - if (!GPIOreserved) \
67 - ret |= ifx_gpio_pin_reserve(IFX_GPIO_PIN_ID(1,10), VMMC_TAPI_GPIO_MODULE_ID); \
68 - ret |= ifx_gpio_altsel0_clear(IFX_GPIO_PIN_ID(1,10), VMMC_TAPI_GPIO_MODULE_ID); \
69 - ret |= ifx_gpio_altsel1_set(IFX_GPIO_PIN_ID(1,10), VMMC_TAPI_GPIO_MODULE_ID);\
70 - ret |= ifx_gpio_dir_in_set(IFX_GPIO_PIN_ID(1,10), VMMC_TAPI_GPIO_MODULE_ID); \
72 - /* Reserve P1.11 as TDM/DCL */ \
73 - if (!GPIOreserved) \
74 - ret |= ifx_gpio_pin_reserve(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
75 - ret |= ifx_gpio_altsel0_set(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
76 - ret |= ifx_gpio_altsel1_clear(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
77 - ret |= ifx_gpio_open_drain_set(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
80 - /* TDM/FSC+DCL Master */ \
81 - ret |= ifx_gpio_dir_out_set(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
82 - ret |= ifx_gpio_dir_out_set(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
84 - /* TDM/FSC+DCL Slave */ \
85 - ret |= ifx_gpio_dir_in_set(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
86 - ret |= ifx_gpio_dir_in_set(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
93 #define VMMC_DRIVER_UNLOAD_HOOK(ret) \
95 - ret = VMMC_statusOk; \
96 - ret |= ifx_gpio_pin_free(IFX_GPIO_PIN_ID(0, 0), VMMC_TAPI_GPIO_MODULE_ID); \
97 - ret |= ifx_gpio_pin_free(IFX_GPIO_PIN_ID(1, 9), VMMC_TAPI_GPIO_MODULE_ID); \
98 - ret |= ifx_gpio_pin_free(IFX_GPIO_PIN_ID(1,10), VMMC_TAPI_GPIO_MODULE_ID); \
99 - ret |= ifx_gpio_pin_free(IFX_GPIO_PIN_ID(1,11), VMMC_TAPI_GPIO_MODULE_ID); \
102 #endif /* _DRV_VMMC_AMAZON_S_H */
103 --- a/src/drv_vmmc_init.c
104 +++ b/src/drv_vmmc_init.c
107 #endif /* PMU_SUPPORTED */
109 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
110 +# define IFX_MPS_CAD0SR IFXMIPS_MPS_CAD0SR
111 +# define IFX_MPS_CAD1SR IFXMIPS_MPS_CAD1SR
112 +# define IFX_MPS_CVC0SR IFXMIPS_MPS_CVC0SR
113 +# define IFX_MPS_CVC1SR IFXMIPS_MPS_CVC1SR
114 +# define IFX_MPS_CVC2SR IFXMIPS_MPS_CVC2SR
115 +# define IFX_MPS_CVC3SR IFXMIPS_MPS_CVC3SR
118 /* ============================= */
119 /* Local Macros & Definitions */
120 --- a/src/drv_vmmc_init_cap.c
121 +++ b/src/drv_vmmc_init_cap.c
123 #include "drv_mps_vmmc.h"
124 #include "drv_mps_vmmc_device.h"
126 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
127 +# define IFX_MPS_CHIPID_VERSION_GET IFXMIPS_MPS_CHIPID_VERSION_GET
128 +# define IFX_MPS_CHIPID IFXMIPS_MPS_CHIPID
131 /* ============================= */
132 /* Configuration defintions */
133 /* ============================= */
134 --- a/src/mps/drv_mps_vmmc_common.c
135 +++ b/src/mps/drv_mps_vmmc_common.c
138 /* ============================= */
139 #include "drv_config.h"
140 +#include "drv_vmmc_init.h"
142 #undef USE_PLAIN_VOICE_FIRMWARE
143 #undef PRINT_ON_ERR_INTERRUPT
145 #include "ifxos_interrupt.h"
146 #include "ifxos_time.h"
148 -#include <asm/ifx/ifx_regs.h>
149 -#include <asm/ifx/ifx_gptu.h>
150 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
151 +# include <lantiq.h>
153 +# include <lantiq_timer.h>
155 +# define ifx_gptu_timer_request lq_request_timer
156 +# define ifx_gptu_timer_start lq_start_timer
157 +# define ifx_gptu_countvalue_get lq_get_count_value
158 +# define ifx_gptu_timer_free lq_free_timer
160 +# define IFX_MPS_SRAM IFXMIPS_MPS_SRAM
161 +# define IFX_MPS_AD0ENR IFXMIPS_MPS_AD0ENR
162 +# define IFX_MPS_AD1ENR IFXMIPS_MPS_AD1ENR
163 +# define IFX_MPS_VC0ENR IFXMIPS_MPS_VC0ENR
164 +# define IFX_MPS_SAD0SR IFXMIPS_MPS_SAD0SR
165 +# define IFX_MPS_RAD0SR IFXMIPS_MPS_RAD0SR
166 +# define IFX_MPS_RAD1SR IFXMIPS_MPS_RAD1SR
167 +# define IFX_MPS_CAD0SR IFXMIPS_MPS_CAD0SR
168 +# define IFX_MPS_CAD1SR IFXMIPS_MPS_CAD1SR
169 +# define IFX_MPS_RVC0SR IFXMIPS_MPS_RVC0SR
170 +# define IFX_MPS_CVC0SR IFXMIPS_MPS_CVC0SR
172 +# define INT_NUM_IM4_IRL14 (INT_NUM_IM4_IRL0 + 14)
174 +# define bsp_mask_and_ack_irq lq_mask_and_ack_irq
176 +# include <asm/ifx/ifx_regs.h>
177 +# include <asm/ifx/ifx_gptu.h>
180 #include "drv_mps_vmmc.h"
181 #include "drv_mps_vmmc_dbg.h"
184 IFX_void_t *ifx_mps_fastbuf_malloc (IFX_size_t size, IFX_int32_t priority)
186 - IFX_uint32_t ptr, flags;
187 + unsigned long flags;
189 IFX_int32_t index = fastbuf_index;
191 if (fastbuf_initialized == 0)
194 IFX_void_t ifx_mps_fastbuf_free (const IFX_void_t * ptr)
196 - IFX_uint32_t flags;
197 + unsigned long flags;
198 IFX_int32_t index = fastbuf_index;
200 IFXOS_LOCKINT (flags);
203 static IFX_int32_t ifx_mps_bufman_inc_level (IFX_uint32_t value)
205 - IFX_uint32_t flags;
206 + unsigned long flags;
208 if (mps_buffer.buf_level + value > MPS_BUFFER_MAX_LEVEL)
212 static IFX_int32_t ifx_mps_bufman_dec_level (IFX_uint32_t value)
214 - IFX_uint32_t flags;
215 + unsigned long flags;
217 if (mps_buffer.buf_level < value)
220 mps_mbx_dev * pMBDev, IFX_int32_t bcommand,
221 IFX_boolean_t from_kernel)
223 - IFX_uint32_t flags;
224 + unsigned long flags;
226 IFXOS_LOCKINT (flags);
228 @@ -1062,7 +1091,7 @@
229 IFX_void_t ifx_mps_release_structures (mps_comm_dev * pDev)
232 - IFX_uint32_t flags;
233 + unsigned long flags;
235 IFXOS_LOCKINT (flags);
236 IFXOS_BlockFree (pFW_img_data);
237 @@ -1558,7 +1587,7 @@
238 IFX_uint32_t * bytes)
241 - IFX_uint32_t flags;
242 + unsigned long flags;
244 IFXOS_LOCKINT (flags);
246 @@ -1768,7 +1797,7 @@
250 - IFX_uint32_t flags;
251 + unsigned long flags;
252 IFX_int32_t retval = -EAGAIN;
253 IFX_int32_t retries = 0;
254 IFX_uint32_t word = 0;
255 @@ -2163,6 +2192,7 @@
256 TRACE (MPS, DBG_LEVEL_HIGH,
257 ("%s(): Invalid device ID %d !\n", __FUNCTION__, pMBDev->devID));
263 @@ -2186,7 +2216,7 @@
264 mps_mbx_dev *mbx_dev;
266 IFX_uint32_t bytes_read = 0;
267 - IFX_uint32_t flags;
268 + unsigned long flags;
271 /* set pointer to data upstream mailbox, no matter if 0,1,2 or 3 because
272 @@ -2277,7 +2307,7 @@
274 ifx_mps_bufman_dec_level (1);
275 if ((ifx_mps_bufman_get_level () <= mps_buffer.buf_threshold) &&
276 - (atomic_read (&pMPSDev->provide_buffer->object.count) == 0))
277 + ((volatile unsigned int)pMPSDev->provide_buffer->object.count == 0))
279 IFXOS_LockRelease (pMPSDev->provide_buffer);
281 @@ -2320,7 +2350,7 @@
282 #endif /* CONFIG_PROC_FS */
283 ifx_mps_bufman_dec_level (1);
284 if ((ifx_mps_bufman_get_level () <= mps_buffer.buf_threshold) &&
285 - (atomic_read (&pMPSDev->provide_buffer->object.count) == 0))
286 + ((volatile unsigned int)pMPSDev->provide_buffer->object.count == 0))
288 IFXOS_LockRelease (pMPSDev->provide_buffer);
290 @@ -2350,7 +2380,7 @@
291 IFX_void_t ifx_mps_mbx_cmd_upstream (IFX_ulong_t dummy)
294 - IFX_uint32_t flags;
295 + unsigned long flags;
297 /* set pointer to upstream command mailbox */
298 mbx = &(pMPSDev->cmd_upstrm_fifo);
299 @@ -2398,7 +2428,7 @@
301 IFX_int32_t length = 0;
302 IFX_int32_t read_length = 0;
303 - IFX_uint32_t flags;
304 + unsigned long flags;
306 /* set pointer to upstream event mailbox */
307 mbx = &(pMPSDev->event_upstrm_fifo);
308 @@ -2641,7 +2671,7 @@
310 IFX_void_t ifx_mps_dd_mbx_int_enable (IFX_void_t)
312 - IFX_uint32_t flags;
313 + unsigned long flags;
316 IFXOS_LOCKINT (flags);
317 @@ -2667,7 +2697,7 @@
319 IFX_void_t ifx_mps_dd_mbx_int_disable (IFX_void_t)
321 - IFX_uint32_t flags;
322 + unsigned long flags;
325 IFXOS_LOCKINT (flags);
326 @@ -2794,6 +2824,7 @@
331 if (MPS_Ad0StatusReg.fld.du_mbx)
333 #ifdef CONFIG_PROC_FS
334 @@ -3087,7 +3118,8 @@
336 IFX_return_t ifx_mps_init_gpt ()
338 - IFX_uint32_t flags, timer_flags, timer, loops = 0;
339 + unsigned long flags;
340 + IFX_uint32_t timer_flags, timer, loops = 0;
342 #if defined(SYSTEM_AR9) || defined(SYSTEM_VR9)
344 --- a/src/mps/drv_mps_vmmc_danube.c
345 +++ b/src/mps/drv_mps_vmmc_danube.c
347 #include "ifxos_select.h"
348 #include "ifxos_interrupt.h"
350 -#include <asm/ifx/ifx_regs.h>
351 -#include <asm/ifx/ifx_gpio.h>
352 -#include <asm/ifx/common_routines.h>
353 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
354 +# include <lantiq.h>
356 +# include <lantiq_timer.h>
357 +# include <linux/dma-mapping.h>
360 +# define LQ_RCU_RST ((u32 *)(LQ_RCU_BASE_ADDR + 0x0010))
361 +#define IFX_RCU_RST_REQ_CPU1 (1 << 3)
362 +# define IFX_RCU_RST_REQ LQ_RCU_RST
364 +# include <asm/ifx/ifx_regs.h>
365 +# include <asm/ifx_vpe.h>
366 +# include <asm/ifx/ifx_gpio.h>
369 #include "drv_mps_vmmc.h"
370 #include "drv_mps_vmmc_dbg.h"
372 /* Local function definition */
373 /* ============================= */
375 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
376 +IFX_uint32_t ifx_get_cp1_size(IFX_void_t)
381 +unsigned int *lq_get_cp1_base(void);
383 +IFX_uint32_t *ifx_get_cp1_base(IFX_void_t)
385 + return lq_get_cp1_base();
389 /******************************************************************************
390 * DANUBE Specific Routines
391 ******************************************************************************/
395 /* check if FW image fits in available memory space */
396 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
397 + if (mem > ifx_get_cp1_size()<<20)
399 + TRACE (MPS, DBG_LEVEL_HIGH,
400 + ("[%s %s %d]: error, firmware memory exceeds reserved space (%i > %i)!\n",
401 + __FILE__, __func__, __LINE__, mem, ifx_get_cp1_size()<<20));
405 if (mem > ifx_get_cp1_size())
407 TRACE (MPS, DBG_LEVEL_HIGH,
409 __FILE__, __func__, __LINE__, mem, ifx_get_cp1_size()));
414 /* reset the driver */
418 IFX_void_t ifx_mps_wdog_expiry()
420 - IFX_uint32_t flags;
421 + unsigned long flags;
423 IFXOS_LOCKINT (flags);
424 /* recalculate and compare the firmware checksum */
425 --- a/src/mps/drv_mps_vmmc_device.h
426 +++ b/src/mps/drv_mps_vmmc_device.h
429 *******************************************************************************/
431 -#include <asm/ifx/ifx_regs.h>
432 -#include <asm/ifx_vpe.h>
433 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
434 +# include <lantiq.h>
436 +# include <xway/xway.h>
439 +# include <asm/ifx/ifx_regs.h>
440 +# include <asm/ifx_vpe.h>
443 /* ============================= */
444 /* MPS Common defines */
445 --- a/src/mps/drv_mps_vmmc_linux.c
446 +++ b/src/mps/drv_mps_vmmc_linux.c
448 #include <linux/moduleparam.h>
452 -#include <asm/ifx/irq.h>
453 -#include <asm/ifx/ifx_regs.h>
454 -#include <asm/ifx_vpe.h>
455 +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
456 +#include "drv_vmmc_init.h"
457 +# include <lantiq.h>
460 +# define IFX_MPS_AD0ENR IFXMIPS_MPS_AD0ENR
461 +# define IFX_MPS_AD1ENR IFXMIPS_MPS_AD1ENR
462 +# define IFX_MPS_RAD0SR IFXMIPS_MPS_RAD0SR
463 +# define IFX_MPS_RAD1SR IFXMIPS_MPS_RAD1SR
464 +# define IFX_MPS_VC0ENR IFXMIPS_MPS_VC0ENR
465 +# define IFX_MPS_RVC0SR IFXMIPS_MPS_RVC0SR
467 +# define INT_NUM_IM4_IRL14 (INT_NUM_IM4_IRL0 + 14)
468 +# define INT_NUM_IM4_IRL18 (INT_NUM_IM4_IRL0 + 18)
469 +# define INT_NUM_IM4_IRL19 (INT_NUM_IM4_IRL0 + 19)
470 +#define LQ_ICU_BASE_ADDR (KSEG1 | 0x1F880200)
471 +# define IFX_ICU_IM4_IER (LQ_ICU_BASE_ADDR + 0x00A8)
473 +# include <asm/ifx/irq.h>
474 +# include <asm/ifx/ifx_regs.h>
475 +# include <asm/ifx_vpe.h>
478 /* lib_ifxos headers */
479 #include "ifx_types.h"
481 #endif /* MPS_FIFO_BLOCKING_WRITE */
482 case FIO_MPS_GET_STATUS:
484 - IFX_uint32_t flags;
485 + unsigned long flags;
487 /* get the status of the channel */
490 #if CONFIG_MPS_HISTORY_SIZE > 0
491 case FIO_MPS_GET_CMD_HISTORY:
493 - IFX_uint32_t flags;
494 + unsigned long flags;
498 @@ -1641,6 +1659,7 @@
499 sprintf (buf + len, " minLv: \t %8d\n",
500 ifx_mps_dev.voice_mb[i].upstrm_fifo->min_space);
506 --- a/src/drv_vmmc_init.h
507 +++ b/src/drv_vmmc_init.h
509 extern IFX_int32_t VMMC_DeviceDriverStart(IFX_void_t);
510 extern IFX_void_t VMMC_DeviceDriverStop(IFX_void_t);
513 +#define IFXMIPS_MPS_BASE_ADDR (KSEG1 + 0x1F107000)
514 +#define IFXMIPS_MPS_SRAM ((u32 *)(KSEG1 + 0x1F200000))
516 +#define IFXMIPS_MPS_CHIPID ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0344))
517 +#define IFXMIPS_MPS_VC0ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0000))
518 +#define IFXMIPS_MPS_VC1ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0004))
519 +#define IFXMIPS_MPS_VC2ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0008))
520 +#define IFXMIPS_MPS_VC3ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x000C))
521 +#define IFXMIPS_MPS_RVC0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0010))
522 +#define IFXMIPS_MPS_RVC1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0014))
523 +#define IFXMIPS_MPS_RVC2SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0018))
524 +#define IFXMIPS_MPS_RVC3SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x001C))
525 +#define IFXMIPS_MPS_SVC0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0020))
526 +#define IFXMIPS_MPS_SVC1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0024))
527 +#define IFXMIPS_MPS_SVC2SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0028))
528 +#define IFXMIPS_MPS_SVC3SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x002C))
529 +#define IFXMIPS_MPS_CVC0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0030))
530 +#define IFXMIPS_MPS_CVC1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0034))
531 +#define IFXMIPS_MPS_CVC2SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0038))
532 +#define IFXMIPS_MPS_CVC3SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x003C))
533 +#define IFXMIPS_MPS_RAD0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0040))
534 +#define IFXMIPS_MPS_RAD1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0044))
535 +#define IFXMIPS_MPS_SAD0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0048))
536 +#define IFXMIPS_MPS_SAD1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x004C))
537 +#define IFXMIPS_MPS_CAD0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0050))
538 +#define IFXMIPS_MPS_CAD1SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0054))
539 +#define IFXMIPS_MPS_AD0ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0058))
540 +#define IFXMIPS_MPS_AD1ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x005C))
542 +#define IFXMIPS_MPS_CHIPID_VERSION_GET(value) (((value) >> 28) & ((1 << 4) - 1))
543 +#define IFXMIPS_MPS_CHIPID_VERSION_SET(value) ((((1 << 4) - 1) & (value)) << 28)
544 +#define IFXMIPS_MPS_CHIPID_PARTNUM_GET(value) (((value) >> 12) & ((1 << 16) - 1))
545 +#define IFXMIPS_MPS_CHIPID_PARTNUM_SET(value) ((((1 << 16) - 1) & (value)) << 12)
546 +#define IFXMIPS_MPS_CHIPID_MANID_GET(value) (((value) >> 1) & ((1 << 10) - 1))
547 +#define IFXMIPS_MPS_CHIPID_MANID_SET(value) ((((1 << 10) - 1) & (value)) << 1)
549 #endif /* _DRV_VMMC_INIT_H */
550 --- a/src/drv_vmmc_ioctl.c
551 +++ b/src/drv_vmmc_ioctl.c
554 /* ============================= */
556 +#include "drv_vmmc_init.h"
557 #include "drv_vmmc_api.h"
558 #include "drv_vmmc_bbd.h"