[Feature][task-view-306]merge P56U08(patch6) version

Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: I8e809511ac30c97228dd110c304b4a08f4af36d7
diff --git a/ap/os/linux/linux-3.4.x/drivers/cpko/cpko_main.c b/ap/os/linux/linux-3.4.x/drivers/cpko/cpko_main.c
index e77e5fe..143d906 100755
--- a/ap/os/linux/linux-3.4.x/drivers/cpko/cpko_main.c
+++ b/ap/os/linux/linux-3.4.x/drivers/cpko/cpko_main.c
@@ -80,36 +80,39 @@
 zDrvVp_AudioDataOpen(UINT32 audioType,UINT32 sampleRate);extern SINT32 
 zDrvVp_AudioDataClose(void);extern SINT32 zDrvVp_GetVpLoop_Wrap(VOID);extern 
 VOID zDrvVp_Status(UINT32*sample_rate,UINT32*voice_status);extern VOID 
-zDrvVp_UpdateVoiceNv(UINT8*voice_nv_update);typedef struct cpko_section{unsigned
+zDrvVp_UpdateVoiceNv(UINT8*voice_nv_update);extern int zDrvVp_SetVoiceProc_Wrap(
+int val);extern int zDrvVp_GetVoiceProc_Wrap(void);extern int 
+zDrvVp_SetVoiceBuffer_Wrap(int en,int type);extern void 
+zDrvVp_GetVoiceBuffer_Wrap(int*en,int*type);typedef struct cpko_section{unsigned
  int cpko_text_start;unsigned int cpko_rodata_start;unsigned int 
 __utran_modem_text_start;unsigned int __lte_modem_text_start;unsigned int 
 __comm_modem_text_start;unsigned int modem_text_end;unsigned int cpko_data_start
 ;unsigned int cpko_bss_start;unsigned int cpko_text_offset;}cpko_section_layout;
 cpko_section_layout cpko_ps_section;int raise(int signo){return
-(0x9e6+3955-0x1959);}extern unsigned int SysEntry(void);static int 
+(0x16b0+2518-0x2086);}extern unsigned int SysEntry(void);static int 
 ko_Main_Thread(void*data){struct sched_param param={.sched_priority=
-MAX_USER_RT_PRIO/(0x19ec+1080-0x1e22)-(0x1448+357-0x15aa)};int ret=
-(0x20f+6386-0x1b01);sched_setscheduler(current,SCHED_FIFO,&param);ret=SysEntry()
-;if(ret!=(0x381+2774-0xe57))panic("Main_Thread\n");param.sched_priority=
-MAX_USER_RT_PRIO-(0x839+7013-0x2370);sched_setscheduler(kthreadd_task,SCHED_FIFO
-,&param);return(0xef+5068-0x14bb);}int zte_modem_ko_start(void){kthread_run(
+MAX_USER_RT_PRIO/(0x159+508-0x353)-(0x120+2540-0xb09)};int ret=
+(0x728+7281-0x2399);sched_setscheduler(current,SCHED_FIFO,&param);ret=SysEntry()
+;if(ret!=(0x1817+3383-0x254e))panic("Main_Thread\n");param.sched_priority=
+MAX_USER_RT_PRIO-(0xb3+8564-0x21f9);sched_setscheduler(kthreadd_task,SCHED_FIFO,
+&param);return(0x931+5194-0x1d7b);}int zte_modem_ko_start(void){kthread_run(
 ko_Main_Thread,NULL,"\x5a\x54\x45\x4d\x61\x69\x6e\x54\x68\x72\x65\x61\x64");
-return(0x12ac+2426-0x1c26);}static void cpko_sectioninfo_set(void){int ret;
-struct file*fp;mm_segment_t old_fs;loff_t cpko_pos=(0x8bd+6473-0x2206);struct 
+return(0x12af+143-0x133e);}static void cpko_sectioninfo_set(void){int ret;struct
+ file*fp;mm_segment_t old_fs;loff_t cpko_pos=(0xd8c+1096-0x11d4);struct 
 cpps_globalModem globalVar;fp=filp_open(
 "\x2f\x6c\x69\x62\x2f\x63\x70\x6b\x6f\x2f\x63\x70\x6b\x6f\x5f\x73\x65\x63\x69\x6e\x66\x6f\x2e\x62\x69\x6e"
-,(0x81a+3218-0x14ac),(0x1263+2589-0x1c80));if(IS_ERR(fp)||fp==NULL)panic(
+,(0x72+2723-0xb15),(0x16a2+2739-0x2155));if(IS_ERR(fp)||fp==NULL)panic(
 "\x6f\x70\x65\x6e\x20\x66\x69\x6c\x65\x20\x65\x72\x72\x6f\x72" "\n");old_fs=
 get_fs();set_fs(KERNEL_DS);ret=vfs_read(fp,(char*)&cpko_ps_section,sizeof(
-cpko_section_layout),&cpko_pos);if(ret<=(0xa02+7211-0x262d))panic(
+cpko_section_layout),&cpko_pos);if(ret<=(0x3fa+382-0x578))panic(
 "\x72\x65\x61\x64\x20\x66\x69\x6c\x65\x20\x65\x72\x72\x6f\x72" "\n");filp_close(
 fp,NULL);
 #ifdef CONFIG_MODEM_CODE_IS_MAPPING
 fp=filp_open(
 "\x2f\x6c\x69\x62\x2f\x63\x70\x6b\x6f\x2f\x63\x70\x6b\x6f\x2e\x6b\x6f",
-(0xaf4+502-0xcea),(0xe41+3977-0x1dca));if(IS_ERR(fp)||fp==NULL)panic(
+(0x12c9+821-0x15fe),(0x9b6+3449-0x172f));if(IS_ERR(fp)||fp==NULL)panic(
 "\x6f\x70\x65\x6e\x20\x66\x69\x6c\x65\x20\x65\x72\x72\x6f\x72" "\n");fp->f_ra.
-ra_pages=(0x370+4606-0x156e);
+ra_pages=(0x83b+7536-0x25ab);
 #endif
 if(cpko_ps_section.cpko_text_start){globalVar.cpko_text_start=(unsigned long)
 cpko_ps_section.cpko_text_start;globalVar.cpko_rodata_start=(unsigned long)
@@ -129,7 +132,7 @@
 vfree_modem_section(globalVar.cpko_text_start,globalVar.modem_text_end);
 #endif
 }else panic("\x66\x69\x6c\x65\x20\x65\x72\x72\x6f\x72" "\n");}static int 
-cpko_start(void){struct cpps_callbacks callback={(0xef6+2228-0x17aa)};callback.
+cpko_start(void){struct cpps_callbacks callback={(0xd71+5956-0x24b5)};callback.
 zOss_ResetNVFactory=zOss_ResetNVFactory;callback.zOss_NvramFlush=zOss_NvramFlush
 ;callback.zOss_NvItemWrite=zOss_NvItemWrite;callback.zOss_NvItemWriteFactory=
 zOss_NvItemWriteFactory;callback.zOss_NvItemRead=zOss_NvItemRead;callback.
@@ -184,7 +187,11 @@
 zDrvVp_SetPath_Wrap=zDrvVp_SetPath_Wrap;callback.zDrvVp_GetPath_Wrap=
 zDrvVp_GetPath_Wrap;callback.halVoice_Open3G=halVoice_Open3G;callback.
 halVoice_Close3G=halVoice_Close3G;callback.zDrvVp_GetSlicFlag=zDrvVp_GetSlicFlag
-;callback.zDrvVp_SetEchoDelay_Wrap=zDrvVp_SetEchoDelay_Wrap;callback.
+;callback.zDrvVp_SetVoiceProc_Wrap=zDrvVp_SetVoiceProc_Wrap;callback.
+zDrvVp_GetVoiceProc_Wrap=zDrvVp_GetVoiceProc_Wrap;callback.
+zDrvVp_SetVoiceBuffer_Wrap=zDrvVp_SetVoiceBuffer_Wrap;callback.
+zDrvVp_GetVoiceBuffer_Wrap=zDrvVp_GetVoiceBuffer_Wrap;callback.
+zDrvVp_SetEchoDelay_Wrap=zDrvVp_SetEchoDelay_Wrap;callback.
 zDrvVp_GetEchoDelay_Wrap=zDrvVp_GetEchoDelay_Wrap;callback.
 zDrvVp_SetTxNsMode_Wrap=zDrvVp_SetTxNsMode_Wrap;callback.zDrvVp_GetTxNsMode_Wrap
 =zDrvVp_GetTxNsMode_Wrap;callback.zDrvVp_SetRxNsMode_Wrap=
@@ -205,5 +212,5 @@
 psm_GetModemSleepFlagStatus=psm_GetModemSleepFlagStatus;
 #endif
 cpps_callbacks_register(&callback);cpko_sectioninfo_set();zte_modem_ko_start();
-return(0x562+5820-0x1c1e);}static int cpko_stop(void){return(0x4bc+6970-0x1ff6);
-}module_init(cpko_start);module_exit(cpko_stop);
+return(0xfa8+633-0x1221);}static int cpko_stop(void){return(0xc53+4985-0x1fcc);}
+module_init(cpko_start);module_exit(cpko_stop);
diff --git a/ap/os/linux/linux-3.4.x/drivers/misc/zcat/debug_info.c b/ap/os/linux/linux-3.4.x/drivers/misc/zcat/debug_info.c
index 5ac8819..9a629e1 100755
--- a/ap/os/linux/linux-3.4.x/drivers/misc/zcat/debug_info.c
+++ b/ap/os/linux/linux-3.4.x/drivers/misc/zcat/debug_info.c
@@ -32,55 +32,46 @@
 #include "pub_debug_info.h"
 #include "ringbuf.h"
 #include "ZspTrace.h"
+#include <linux/proc_fs.h>
+#include <asm/barrier.h>
+#include <asm/cache.h>
+#include <asm/cacheflush.h>
+#include <linux/seq_file.h>
+#include <linux/ktime.h>
+#include <linux/time.h>
 
-#if defined(_USE_ZXIC_DEBUG_INFO) && !defined(CONFIG_SYSTEM_RECOVERY)
+
+#if defined(_USE_ZXIC_DEBUG_INFO)
 /*******************************************************************************
  *                                   宏定义                                     *
  *******************************************************************************/
-#define DEBUG_INFO_SHARE_MEM_LEN    (0x2000)
-#define DEBUG_INFO_READABLE_LEN     (0x1400)
+#define DEBUG_INFO_MAX_ID_LEN       (16+3)
 #define DEBUG_INFO_MAX_DATA_LEN     (128)
-#define DEBUG_INFO_MAX_TOTAL_LEN    (140) // 8 + 128 + 4
-#define DEBUG_INFO_MEM_HEAD_LEN     (8)
-#define DEBUG_INFO_FILE_HEAD_LEN    (12)
-
-#define DEBUG_INFO_CHANNEL          (channel_9)
-#define DEBUG_INFO_MSG_CAP_SIZE     (2 * 1024)
-#define DEBUG_INFO_SWITCH_ON        (0)
-
-// #define DEBUG_INFO_MEM_TYPE_KERNEL  (0)
-// #define DEBUG_INFO_MEM_TYPE_USER    (1)
-
-#define DEBUG_INFO_OK               (0)
-#define DEBUG_INFO_ERROR            (-1)
+#define DEBUG_INFO_MAX_TIME_LEN     (0)//(20+3)
+#define DEBUG_INFO_MAX_DATE_LEN     (19+3)
+#define DEBUG_INFO_MAX_TOTAL_LEN    (DEBUG_INFO_MAX_ID_LEN + DEBUG_INFO_MAX_DATA_LEN + DEBUG_INFO_MAX_TIME_LEN)
 
 /*******************************************************************************
  *                                结构体定义                                     *
  *******************************************************************************/
-typedef unsigned int UINT32;
-typedef unsigned short UINT16;
-typedef unsigned char UINT8;
-
-typedef struct
-{
-    UINT16 module_id; // 模块id
-    UINT16 sub_len;   // 用户数据长度
-    UINT32 time;
-    char sub_data[]; // 用户数据
-} T_SHARED_MEM_DATA;
 
 /*******************************************************************************
  *                                  全局变量                                     *
  *******************************************************************************/
 static int g_init_flag = 0;
+volatile UINT32 *g_debug_write_cnt;
+volatile UINT32 *g_debug_full_cnt;
+UINT8 *g_debug_buffer_start;
+UINT8 *g_debug_buffer_write;
+UINT8 *g_debug_buffer_end;
+static DEFINE_SPINLOCK(debug_info_lock);
+extern unsigned long long zx_comptimer_curvalue(void);
 
 /*******************************************************************************
  *                              内部函数定义                                     *
  *******************************************************************************/
 static int sc_debug_info_read_to_user(char *buf, unsigned short count);
 static int sc_debug_info_record_from_user(const char *info, unsigned short count);
-static int sc_debug_info_send_to_cap(T_SHARED_MEM_DATA *debug_msg, unsigned int len);
-
 static ssize_t debug_info_read(struct file *fp, char __user *buf, size_t count, loff_t *pos);
 static ssize_t debug_info_write(struct file *fp, const char __user *buf, size_t count, loff_t *pos);
 static int debug_info_open(struct inode *ip, struct file *fp);
@@ -137,51 +128,133 @@
 static int sc_debug_info_record_from_user(const char *info, unsigned short count)
 {
     unsigned int cnt = 0;
-    char str_buf[DEBUG_INFO_MAX_TOTAL_LEN] __attribute__((aligned(4)));
-    T_SHARED_MEM_DATA *shareMemData;    
-
+    int spacelen;
+    struct tm tm;
+    unsigned long time;
+    char buffer[DEBUG_INFO_MAX_TOTAL_LEN];
+    unsigned long flags;
+    UINT8 *tmp_write_addr = buffer;
+    int msg_len =  0;
+    
     if (g_init_flag == 0)
     {
         printk("debug_info not init.\n");
-        return DEBUG_INFO_ERROR;
+        return -EINVAL;
     }
-    if (info == NULL)
+    time = get_seconds();
+    time_to_tm((time_t)time, 0, &tm);
+    cnt = snprintf((char *)tmp_write_addr, DEBUG_INFO_MAX_DATE_LEN, "[%ld-%02d-%02d %d:%02d:%02d]", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
+    tmp_write_addr += cnt;
+    msg_len = cnt; 
+    spin_lock_irqsave(&debug_info_lock, flags);
+    spacelen = g_debug_buffer_end - g_debug_buffer_write;
+    if (spacelen < msg_len + count)
     {
-        printk("sc_debug_info_record_from_user:: info is NULL.\n");
-        return DEBUG_INFO_ERROR;
+        memset(g_debug_buffer_write,'\0',spacelen);
+        g_debug_buffer_write = g_debug_buffer_start;
+        *g_debug_full_cnt  += 1;
+        *g_debug_write_cnt = 0;
     }
-    copy_from_user(str_buf, info, count);
-    shareMemData = (T_SHARED_MEM_DATA *)str_buf;
 
-    cnt = sc_debug_info_send_to_cap(shareMemData, count);
+    memcpy(g_debug_buffer_write, buffer, msg_len);
+    memcpy(g_debug_buffer_write + msg_len, info, count);
+    msg_len += count;
+    g_debug_buffer_write += msg_len;
+    *g_debug_write_cnt   += msg_len;
+
+    spin_unlock_irqrestore(&debug_info_lock, flags);
 
     return cnt;
 }
 
-static int __init debug_info_init(void)
+int sc_debug_info_vrecord(char *id, const char *format, va_list args)
 {
-    int ret;  
-   
+    unsigned int cnt = 0;
+    int len;
+    int spacelen;
+    int msg_len = 0;
+    struct tm tm;
+    unsigned long time;
+    unsigned long flags;
+    char buffer[DEBUG_INFO_MAX_TOTAL_LEN];
+    UINT8 *tmp_write_addr = buffer;
+
+    time = get_seconds();
+    time_to_tm((time_t)time, 0, &tm);
+    cnt = snprintf((char *)tmp_write_addr, DEBUG_INFO_MAX_DATE_LEN, "[%ld-%02d-%02d %d:%02d:%02d]", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
+    tmp_write_addr += cnt;
+    msg_len = cnt; 
+    len = snprintf(tmp_write_addr, DEBUG_INFO_MAX_ID_LEN, "[%s]",id);
+    tmp_write_addr += len;
+    msg_len += len;
+    msg_len += vsnprintf(tmp_write_addr, DEBUG_INFO_MAX_DATA_LEN, format, args);
+
+    spin_lock_irqsave(&debug_info_lock, flags);
+    spacelen = g_debug_buffer_end - g_debug_buffer_write;
+    if (spacelen < msg_len)
+    {
+        memset(g_debug_buffer_write,'\0',spacelen);
+        g_debug_buffer_write = g_debug_buffer_start;
+        *g_debug_full_cnt  += 1;
+        *g_debug_write_cnt = 0;
+    }
+
+    memcpy(g_debug_buffer_write, buffer, msg_len);
+    g_debug_buffer_write += msg_len;
+    *g_debug_write_cnt   += msg_len;
+
+    spin_unlock_irqrestore(&debug_info_lock, flags);
+    
+    return msg_len;
+}
+
+int sc_debug_info_record(char *id, const char *format, ...)
+{
+    va_list args;
+    int r;
+    
+    if (g_init_flag == 0)
+    {
+        printk("debug_info not init.\n");
+        return -EINVAL;
+    }
+    
+    va_start(args, format);
+    r = sc_debug_info_vrecord(id, format, args);
+    va_end(args);
+
+    return r;
+}
+EXPORT_SYMBOL(sc_debug_info_record);
+
+void  early_debug_info_init(void)
+{
+    g_debug_write_cnt    = ( UINT32 *)ioremap(PS_DEBUG_INFO_LEN_ADDR_PA, PS_DEBUG_INFO_LEN_SIZE);  //early_ioremap
+    *g_debug_write_cnt   = 0;
+    g_debug_full_cnt     = (volatile UINT32 *)((char *)g_debug_write_cnt + 4);
+    *g_debug_full_cnt    = 0;
+ 
+    g_debug_buffer_start = (unsigned long)ioremap(PS_DEBUG_INFO_ADDR_PA, PS_DEBUG_INFO_SIZE);
+    g_debug_buffer_end   = (UINT8 *)g_debug_buffer_start + PS_DEBUG_INFO_SIZE;
+    g_debug_buffer_write = g_debug_buffer_start;
+
+    g_init_flag = 1;
+    //printk("ap early_debug_info_init  success \n");
+}
+
+UINT32 debug_info_init(VOID)  
+{
+    int ret = 0;  
+
     ret = misc_register(&debug_info_device);
     if (ret)
     {
         printk("debug_info_device init.\n");
-        return DEBUG_INFO_ERROR;
+        return -EINVAL;
     }
 
-    ret = zDrvRpMsg_CreateChannel_Cap(
-        CAP_ID, 
-        DEBUG_INFO_CHANNEL,
-        DEBUG_INFO_MSG_CAP_SIZE);
-    if (ret != DEBUG_INFO_OK) 
-    {
-        printk("zDrvRpMsg_CreateChannel_Cap failed, ret = %d\n", ret);
-        return DEBUG_INFO_ERROR;
-    }   
- 
-    g_init_flag = 1;
-
-    return DEBUG_INFO_OK;
+    printk("ap debug_info_device init success \n");
+    return ret;
 }
 
 static void __exit debug_info_exit(void)
@@ -192,84 +265,6 @@
 module_init(debug_info_init);
 module_exit(debug_info_exit);
 
-MODULE_AUTHOR("jcw");
-MODULE_DESCRIPTION("debug_info driver");
-MODULE_LICENSE("GPL");
-
-static int sc_debug_info_send_to_cap(T_SHARED_MEM_DATA *debug_msg, unsigned int len)
-{
-    int    ret = -1;
-    UINT32 wake_flag = 0;
-    T_ZDrvRpMsg_Msg rpmsg = {0};
-	
-    wake_flag = *(volatile UINT32 *)ZCAT_DEBUG_INFO_DISABLE;
-    if (wake_flag != DEBUG_INFO_SWITCH_ON)
-    {
-        return ret;
-    }
-    rpmsg.actorID = CAP_ID;
-    rpmsg.chID = DEBUG_INFO_CHANNEL;
-    rpmsg.flag = RPMSG_WRITE_INT;
-    rpmsg.buf = debug_msg;
-    rpmsg.len = len;
-
-    ret = zDrvRpMsg_Write_Cap(&rpmsg);
-    if (ret != rpmsg.len)
-    {
-        printk("sc_debug_info_send_to_cap:: debug_msg send fail, ret = %d\n", ret);
-        return DEBUG_INFO_ERROR;
-    }
-
-    return ret;
-}
-
-int sc_debug_info_vrecord(unsigned int id, const char *format, va_list args)
-{
-    int len;
-    int sendlen;
-    // va_list args;
-    char str_buf[DEBUG_INFO_MAX_TOTAL_LEN] __attribute__((aligned(4)));
-    T_SHARED_MEM_DATA *shareMemData = (T_SHARED_MEM_DATA *)str_buf;
-
-    if (g_init_flag == 0)
-    {
-        printk("debug_info not init.\n");
-        return DEBUG_INFO_ERROR;
-    }
-
-    /* args是一个char*类型指针,指向format之后的第一个参数*/
-    // va_start(args, format);
-    len = vsnprintf(shareMemData->sub_data, DEBUG_INFO_MAX_DATA_LEN, format, args);
-    // va_end(args);
-    if (len < 0)
-    {
-        printk("vsnprintf format error.\n");
-        return DEBUG_INFO_ERROR;
-    }
-
-    shareMemData->module_id = (UINT16)(id & 0xFFFF);
-    shareMemData->sub_len = len;
-    shareMemData->time = jiffies;    
-
-    sendlen = sc_debug_info_send_to_cap(shareMemData, (len+DEBUG_INFO_MEM_HEAD_LEN));
-    
-    return sendlen;
-}
-EXPORT_SYMBOL(sc_debug_info_vrecord);
-
-int sc_debug_info_record(unsigned int id, const char *format, ...)
-{
-    va_list args;
-	int r;
-
-	va_start(args, format);
-	r = sc_debug_info_vrecord(id, format, args);
-	va_end(args);
-
-
-    return r;
-}
-EXPORT_SYMBOL(sc_debug_info_record);
 
 #endif   /*  _USE_ZXIC_DEBUG_INFO */
 
diff --git a/ap/os/linux/linux-3.4.x/drivers/mmc/host/zx29_mmc-pltfm.c b/ap/os/linux/linux-3.4.x/drivers/mmc/host/zx29_mmc-pltfm.c
index 76b9bfb..1dc8079 100755
--- a/ap/os/linux/linux-3.4.x/drivers/mmc/host/zx29_mmc-pltfm.c
+++ b/ap/os/linux/linux-3.4.x/drivers/mmc/host/zx29_mmc-pltfm.c
@@ -44,10 +44,9 @@
 #include <lynq/lynq_ap_nv_cfg.h>
 //youchen@2024-06-20 add for lynq nv config end
 
-//zw.wang The sdio0 pin is configured in gpio mode before and after wifi uninstallation on 20240521 on start
 struct dw_mci *dw_mci_host_ptr[2];
-volatile u8 mmc0_data1_flag = 0xff;
-//zw.wang The sdio0 pin is configured in gpio mode before and after wifi uninstallation on 20240521 on end
+volatile u8   mmc0_data1_flag = 0xff;
+/* Started by AICoder, pid:u6c95fe12ad564314e1a081cb0286316caa77330 */
 #define CONFIG_GPIO_FUNC(pin, config, pd_pu) \
 do { \
     rc = zx29_gpio_config(pin, config); \
@@ -57,7 +56,6 @@
     zx29_gpio_pd_pu_set(pin, pd_pu); \
 } while (0)
 
-
 #define CONFIG_GPIO_GPIO(pin, config, pd_pu) \
 	do { \
 		rc = zx29_gpio_config(pin, config); \
@@ -156,8 +154,6 @@
 }
 
 DEVICE_ATTR(dw_regvalue, S_IRUGO | S_IWUSR, dw_regvalue_show, dw_regvalue_store);
-
-//zw.wang The sdio0 pin is configured in gpio mode before and after wifi uninstallation on 20240521 on start
 void sd_io_config(u32 sd_index,bool active_flag)
 {
 	int rc = 0;
@@ -224,7 +220,8 @@
 	}
 
 }
-//zw.wang The sdio0 pin is configured in gpio mode before and after wifi uninstallation on 20240521 on end
+
+
 
 int dw_mci_pltfm_register(struct platform_device *pdev,
 			  const struct dw_mci_drv_data *drv_data)
@@ -330,11 +327,11 @@
 		dw_mci_set_host(host, true);
 	}
 #endif
-//zw.wang The sdio0 pin is configured in gpio mode before and after wifi uninstallation on 20240521 on start
 	if(host->pdata->quirks & DW_MCI_QUIRK_AUTO_GATE) {
 		int rv = clk_set_auto_gate(sdmmc_wclk, true);
 		if (rv)
 			pr_err("%s: Failed to enable auto gate of sdmmc_wclk\n", __func__);
+
 		rv = clk_set_auto_gate(sdmmc_aclk, true);
 		if (rv)
 			pr_err("%s: Failed to enable auto gate of sdmmc_aclk\n", __func__);
@@ -342,20 +339,23 @@
 		int rv = clk_set_auto_gate(sdmmc_wclk, false);
 		if (rv)
 			pr_err("%s: Failed to disable auto gate of sdmmc_wclk\n", __func__);
+
 		rv = clk_set_auto_gate(sdmmc_aclk, false);
 		if (rv)
 			pr_err("%s: Failed to disable auto gate of sdmmc_aclk\n", __func__);
 	}
+
+
 	platform_set_drvdata(pdev, host);
+
 	pr_info("%s: host%u step 1 finish, reg addr %p\n", __func__, host->host_id, host->regs);
-//zw.wang The sdio0 pin is configured in gpio mode before and after wifi uninstallation on 20240521 on end
+	
 #if defined CONFIG_ARCH_ZX297520V3
 	if(host->host_id == 0) {
 			
 #if ((defined CONFIG_AIC8800)||(defined CONFIG_AIC8800D80L))
 		 sd_io_config(host->host_id,0);
 #else
-//zw.wang The sdio0 pin is configured in gpio mode before and after wifi uninstallation on 20240521 on end
 		rc=gpio_request(ZX29_GPIO_66,"sd0_clk");
 		if(rc)
 			BUG();
diff --git a/ap/os/linux/linux-3.4.x/drivers/mmc/host/zx29_mmc.c b/ap/os/linux/linux-3.4.x/drivers/mmc/host/zx29_mmc.c
index bd9e9e7..e678908 100755
--- a/ap/os/linux/linux-3.4.x/drivers/mmc/host/zx29_mmc.c
+++ b/ap/os/linux/linux-3.4.x/drivers/mmc/host/zx29_mmc.c
@@ -51,6 +51,7 @@
 //#include "dw_mmc.h"
 #include "zx29_mmc.h"
 #include "pub_debug_info.h"
+#include <linux/mmc/sdio_func.h>
 
 #if (defined CONFIG_ARCH_ZX297520V2)||(defined CONFIG_ARCH_ZX297520V3)
 #include <mach/gpio_cfg.h>
@@ -3975,6 +3976,45 @@
 	return;
 }
 EXPORT_SYMBOL_GPL(dw_mci_rescan_card);
+/* Started by AICoder, pid:x4ec9tda59644d014f920a808038ef3af5296358 */
+int zx29_sdio_get_device(u8 id)
+{
+    struct mmc_host *host;
+    struct mmc_card *card;
+    struct sdio_func *func;
+
+
+    if (!dw_mmc_host[id] || !dw_mmc_host[id]->slot[0]) {
+        printk(KERN_ERR "Invalid host or slot for id %d\n", id);
+        return -4;
+    }
+
+    host = dw_mmc_host[id]->slot[0]->mmc;
+    if (!host) {
+        printk(KERN_ERR "Host is NULL for id %d\n", id);
+        return -5;
+    }
+
+    card = host->card;
+    if (!card) {
+        return -6;
+    }
+
+    if (card->type != MMC_TYPE_SDIO) {
+        return -7;
+    }
+
+    func = card->sdio_func[0];
+    if (!func) {
+        printk(KERN_ERR "No SDIO function found in card of host %s\n", mmc_hostname(host));
+        return -8;
+    }
+
+    printk("Found SDIO function %d: vendor=0x%x, device=0x%x\n", func->num, func->vendor, func->device);
+    return 0;
+}
+EXPORT_SYMBOL_GPL(zx29_sdio_get_device);
+/* Ended by AICoder, pid:x4ec9tda59644d014f920a808038ef3af5296358 */
 
 void zx29_mci_enable_sdio_irq(u32 host_id, int enable)
 {
@@ -4159,13 +4199,13 @@
 #endif
 
 	//ret = irq_set_irq_wake(host->irq, 1);
-//zw.wang The sdio0 pin is configured in gpio mode before and after wifi uninstallation on 20240521 on start
+
 #if !((defined CONFIG_AIC8800)||(defined CONFIG_AIC8800D80L))
 	if (host->quirks & DW_MCI_QUIRK_SDIO) {
 			irq_set_irq_wake(brd->data1_irq, 1);
 	}
 #endif
-//zw.wang The sdio0 pin is configured in gpio mode before and after wifi uninstallation on 20240521 on end
+
 #if (defined CONFIG_ARCH_ZX297520V2)||(defined CONFIG_ARCH_ZX297520V3)
 	if (!(host->quirks & DW_MCI_QUIRK_SDIO) && !(host->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION))
 	{
diff --git a/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/wifi_dev_aic88.c b/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/wifi_dev_aic88.c
index 2cf4065..96515ff 100755
--- a/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/wifi_dev_aic88.c
+++ b/ap/os/linux/linux-3.4.x/drivers/net/wireless/aic8800d80l/wifi_dev_aic88.c
@@ -19,6 +19,8 @@
 extern void aic8800_wifi_disable(int bval);
 extern void aic8800_wifi_re_enable(int bval);
 void dw_mci_rescan_card(unsigned id, unsigned insert);
+int zx29_sdio_get_device(u8 id);
+
 struct wifi_dev {
 	uint32_t dev_state;
 };
@@ -70,6 +72,13 @@
 	      printk(KERN_INFO "@@@initWlan@@@\n");
 		aic8800_wifi_re_enable(1);
                 dw_mci_rescan_card(0, 1);
+				msleep(300);
+				ret = zx29_sdio_get_device(0);
+				if(ret){
+					printk("zx29_sdio_get_device in start %d.\n", ret);
+					return -ENXIO;
+				}
+					
              	ret = rwnx_mod_init();
 		if(!ret)
 			aic_runmode = WIFI_IOCTL_START;
@@ -93,6 +102,13 @@
 		  	 testmode = 1;
 			  aic8800_wifi_re_enable(1);
 			  dw_mci_rescan_card(0, 1);
+			  msleep(300);
+		  	ret = zx29_sdio_get_device(0);
+			
+			if(ret){
+				printk("zx29_sdio_get_device in test %d.\n", ret);
+				return -ENXIO;
+			}
              ret = rwnx_mod_init();
 			  if(!ret)
 			  aic_runmode = WIFI_IOCTL_START_TESTMODE;
diff --git a/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.c b/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.c
index d2286ca..426b9ed 100755
--- a/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.c
+++ b/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.c
@@ -331,11 +331,10 @@
 #endif

 #if IS_ENABLED(CONFIG_NF_CONNTRACK)

 		if(pbuf_temp->flag == 2){

-			skb->nfct_bak = skb->nfct;

 			skb->capNfct = pbuf_temp->head;

-			skb->zvnet_id = zvnet_get_index_by_netdev(skb->dev)+1;

-		}else

-			nf_conntrack_put(skb->nfct);

+		}

+		skb->zvnet_id = zvnet_get_index_by_netdev(skb->dev)+1;

+		nf_conntrack_put(skb->nfct);

 		skb->nfct = NULL;

 #endif

 #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED

@@ -354,7 +353,7 @@
 #endif

 #endif

 		if(skb->len != pbuf_temp->len || skb->data - skb->head != pbuf_temp->data_off){

-			zv_err("err skb=0x%x %d=%d %d=%d", skb, skb->len, pbuf_temp->len, skb->data - skb->head, pbuf_temp->data_off);

+			zv_info("err skb=0x%x %d=%d %d=%d", skb, skb->len, pbuf_temp->len, skb->data - skb->head, pbuf_temp->data_off);

 			if(pbuf_temp->len == 0 || pbuf_temp->len > 2000)

 				panic("len	  ERR!!!!!!!!!!\n");

 			skb->data = skb->head + pbuf_temp->data_off;

@@ -494,7 +493,7 @@
 	int i,j,k,ret,num;

 	unsigned long flags;

 	unsigned long flags1;

-	struct sk_buff *skb;

+	struct sk_buff *skb, *tmp;

 	T_ZDrvRpMsg_Msg msg = { .actorID = CAP_ID,

 							.chID = channel_20,

 							.flag = RPMSG_WRITE_INT};

@@ -506,7 +505,7 @@
 		return;

 	}

 	i = 0;

-	skb_queue_walk(&g_zvnet_skb_xmit_queue, skb) {

+	skb_queue_walk_safe(&g_zvnet_skb_xmit_queue, skb, tmp) {

 		buff[i].buff = skb;

 		buff[i].data_off = skb->data - skb->head;

 		buff[i].head = virt_to_phys(skb->head);

@@ -601,7 +600,7 @@
 #endif

 		}

 	}

-	if(unlikely(skb->capHead || skb->next || skb->fclone || skb->cloned 

+	if(unlikely(skb->capHead || skb->next || skb->fclone || skb->cloned || skb->sk || (skb->indev == NULL)

 		|| (skb_shinfo(skb)->nr_frags) || (skb_shinfo(skb)->tx_flags & SKBTX_DEV_ZEROCOPY) 

 		|| (skb_has_frag_list(skb)))){

 		int ret_len = skb->len;

@@ -763,6 +762,7 @@
     .ndo_get_stats  = zvnet_get_stats,

     .ndo_change_mtu = eth_change_mtu,

     .ndo_validate_addr = eth_validate_addr,

+    .ndo_set_mac_address = eth_mac_addr,

 };

 

 static void v2xnet_init_netdev(struct net_device *net)

@@ -1261,11 +1261,11 @@
             return err;

         }

 

-        net->needed_headroom += ZVNET_SKB_PAD;//NET_SKB_PAD;

+        //net->needed_headroom += ZVNET_SKB_PAD;//NET_SKB_PAD;

         sprintf(net->name, "%s%d", ZVNET_IFNAME_PREFIX, i);

         dev = v2xnet_dev_init(net, zvnetdev);

         v2xnet_init_netdev(net);

-		if(0 == i){

+		if(0 == i || i > 8){

 			net->flags = (net->flags & (~IFF_NOARP));

 		}

         err = register_netdev(net);

diff --git a/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.h b/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.h
index ab3cda3..c039993 100755
--- a/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.h
+++ b/ap/os/linux/linux-3.4.x/drivers/net/zvnet/zvnet_dev.h
@@ -27,7 +27,7 @@
 	__func__ , ## arg)

 

 //zvnetÉ豸×î´óÊý

-#define DDR_ZVNET_DEV_MAX 10

+#define DDR_ZVNET_DEV_MAX 16

 #define ZVNET_IFNAME_PREFIX "zvnet"

 

 #define ICP_CHN_ZVNET1 channel_20

diff --git a/ap/os/linux/linux-3.4.x/drivers/rtc/hctosys.c b/ap/os/linux/linux-3.4.x/drivers/rtc/hctosys.c
old mode 100644
new mode 100755
index bc90b09..583d503
--- a/ap/os/linux/linux-3.4.x/drivers/rtc/hctosys.c
+++ b/ap/os/linux/linux-3.4.x/drivers/rtc/hctosys.c
@@ -10,6 +10,7 @@
 */
 
 #include <linux/rtc.h>
+#include "pub_debug_info.h"
 
 /* IMPORTANT: the RTC only stores whole seconds. It is arbitrary
  * whether it stores the most close value or the value with partial
@@ -57,7 +58,7 @@
 	rtc_tm_to_time(&tm, &tv.tv_sec);
 
 	do_settimeofday(&tv);
-
+	sc_debug_info_record("hctosys", "time synchronization successful!\r\n");
 	dev_info(rtc->dev.parent,
 		"setting system clock to "
 		"%d-%02d-%02d %02d:%02d:%02d UTC (%u)\n",
diff --git a/ap/os/linux/linux-3.4.x/drivers/soc/zte/power/zx-pm.c b/ap/os/linux/linux-3.4.x/drivers/soc/zte/power/zx-pm.c
index 93e7d4f..173e81e 100755
--- a/ap/os/linux/linux-3.4.x/drivers/soc/zte/power/zx-pm.c
+++ b/ap/os/linux/linux-3.4.x/drivers/soc/zte/power/zx-pm.c
@@ -420,6 +420,31 @@
 zte_pm_attr(cpufreq);
 
 
+static ssize_t cap_state_show(struct kobject *kobj, struct kobj_attribute *attr,
+			  char *buf)
+{
+	char *s = buf;
+	int sta=0;
+	sta= pcu_CoreIsActive(CPU_AP);
+	s += sprintf(s, "%d\n",  sta);	
+
+	return (s - buf);
+}
+
+/**
+ *  the buf store the input string , n is the string length 
+ *  return the status
+ */
+static ssize_t cap_state_store(struct kobject *kobj, struct kobj_attribute *attr,
+			   const char *buf, size_t n)
+{
+	int error = 0;
+		
+	return error ;
+}
+
+zte_pm_attr(cap_state);
+
 /*=============================================================================
  *========  /sys/zte_pm/debug_work  ===========================================
  *=============================================================================
@@ -562,6 +587,8 @@
 	&app_done_attr.attr,	
 #endif	
 	&cpufreq_attr.attr,
+	&cap_state_attr.attr,
+	
 	NULL,
 };
 
diff --git a/ap/os/linux/linux-3.4.x/drivers/staging/Makefile b/ap/os/linux/linux-3.4.x/drivers/staging/Makefile
index a935c69..a02bedb 100755
--- a/ap/os/linux/linux-3.4.x/drivers/staging/Makefile
+++ b/ap/os/linux/linux-3.4.x/drivers/staging/Makefile
@@ -62,6 +62,6 @@
 obj-$(CONFIG_CAMERA_DRV)	    += camera/
 obj-$(CONFIG_AMR_DRV)		+= amrdrv/
 obj-$(CONFIG_VOICE_DRV)		+= voicedrv/
-obj-$(CONFIG_VOICE_BUFFER_DRV)		+= voicebufferdrv/
+obj-y		+= voicebufferdrv/
 obj-$(CONFIG_AUDIOMIX_DRV)		    += audiomixdrv/
 obj-$(CONFIG_PLAT_TEST)         += plat_test/
diff --git a/ap/os/linux/linux-3.4.x/drivers/staging/voicebufferdrv/Makefile b/ap/os/linux/linux-3.4.x/drivers/staging/voicebufferdrv/Makefile
index 7c8c2fd..597480a 100755
--- a/ap/os/linux/linux-3.4.x/drivers/staging/voicebufferdrv/Makefile
+++ b/ap/os/linux/linux-3.4.x/drivers/staging/voicebufferdrv/Makefile
@@ -1,5 +1,5 @@
 #
 # voice buffer driver. 
 #
-obj-$(CONFIG_VOICE_BUFFER_DRV)	+= voice_buffer_drv.o
-voice_buffer_drv-$(CONFIG_VOICE_BUFFER_DRV) := voice_buffer_dev.o
+obj-y	+= voice_buffer_drv.o
+voice_buffer_drv-y := voice_buffer_dev.o
diff --git a/ap/os/linux/linux-3.4.x/drivers/staging/voicedrv/voice.c b/ap/os/linux/linux-3.4.x/drivers/staging/voicedrv/voice.c
index a47acf0..ef8d187 100755
--- a/ap/os/linux/linux-3.4.x/drivers/staging/voicedrv/voice.c
+++ b/ap/os/linux/linux-3.4.x/drivers/staging/voicedrv/voice.c
@@ -30,6 +30,7 @@
 extern int halVoice_SetVolOut(T_HalVoice_Block* pVoiceBlock);
 extern int halVoice_Enable(void);
 extern int halVoice_Disable(void);
+extern int zDrvVp_Loop(int);
 
 #ifdef _USE_VEHICLE_DC
 extern int zDrvVp_GetVol_Wrap(void);
@@ -39,6 +40,9 @@
 extern int zDrvVp_SetMute_Wrap(bool enable);
 extern bool zDrvVp_GetMute_Wrap(void);
 #endif
+extern void zDrvVp_UpdateVoiceNv(unsigned char *voice_nv_update);
+extern unsigned int zOss_NvItemWrite(unsigned int NvItemID, unsigned char *NvItemData, unsigned int NvItemLen);
+
 static int voice_open(struct inode *ip, struct file *fp);
 static int voice_release(struct inode *ip, struct file *fp);
 static long voice_ioctl(struct file *fp, unsigned int cmd, unsigned long arg);
@@ -163,6 +167,29 @@
 
 #endif
 
+
+
+static int voice_SetVp(int vp)
+{
+	int ret = 0;
+	ret = CPPS_FUNC(cpps_callbacks, zDrvVp_SetVoiceProc_Wrap)(vp);
+	if(ret < 0)
+	{
+		  printk(KERN_ERR "vp_SetVp fail = %d\n",vp);
+		  return ret;
+	}
+	return 0;
+}
+
+static int voice_GetVp(void)
+{      
+   	int vp; 
+    vp = CPPS_FUNC(cpps_callbacks, zDrvVp_GetVoiceProc_Wrap)();
+    return vp;
+}
+
+
+
 /* file operations for volte device /dev/volte_device */
 static const struct file_operations voice_fops = {
 	.owner = THIS_MODULE,
@@ -406,7 +433,7 @@
 		bool para;
 
 		if (copy_from_user(&para, argp, sizeof(para))) {
-			print_audio("voice_ioctl  set vol copy_to_user err!\n");
+			print_audio("voice_ioctl  set mute copy_to_user err!\n");
 			return -EFAULT;
 		}
 		ret = voice_SetMute(para);
@@ -501,6 +528,69 @@
 
 		break;
 	}
+	case VOICE_IOCTL_SET_VP: {
+		pr_info("voice set voice process! \n");
+		int para;
+
+		if (copy_from_user(&para, argp, sizeof(para))) {
+			print_audio("voice_ioctl  set vp copy_to_user err!\n");
+			return -EFAULT;
+		}
+		ret = voice_SetVp(para);
+		break;
+	}
+
+	case VOICE_IOCTL_GET_VP: {
+		pr_info("voice get voice process! \n");
+		int vp;
+
+		vp = voice_GetVp();
+
+		if (copy_to_user(argp, &vp, sizeof(vp))) {
+			pr_err("voice_ioctl  get vp copy_to_user err!\n");
+			return -EFAULT;
+		}
+		break;
+	}
+
+	case VOICE_IOCTL_GET_VBUF: {
+		int fs = 0;
+		int en = 0;
+	    int type = 0;
+		T_VoiceBuf_Para vb;
+		CPPS_FUNC(cpps_callbacks, zDrvVp_Status)(&fs, NULL);
+		pr_info("voice_ioctl  zDrvVp_Status fs=%d!\n", fs);
+		CPPS_FUNC(cpps_callbacks, zDrvVp_GetVoiceBuffer_Wrap)(&en,&type);	
+		vb.fs = fs;
+		vb.enable = en;
+		vb.type = type;
+		pr_info("voice_ioctl GET_VBUF,enable=%d type=%d!\n",vb.enable,vb.type);
+		
+		if (copy_to_user(argp, &vb, sizeof(vb))) {
+			pr_err("voice_ioctl	GET_VBUF copy_to_user err!\n");
+			return -EFAULT;
+		}
+	
+		break;
+	}
+
+	case VOICE_IOCTL_SET_VBUF: {
+		T_VoiceBuf_Para vb;
+
+		if (copy_from_user(&vb, argp, sizeof(vb))) {
+			print_audio("voice_ioctl  SET_VBUF copy_to_user err!\n");
+			return -EFAULT;
+		}
+
+		CPPS_FUNC(cpps_callbacks, zDrvVp_SetVoiceBuffer_Wrap)(vb.enable,vb.type);	
+		pr_info("voice_ioctl  SET_VBUF,enable=%d type=%d!\n",vb.enable,vb.type);
+	
+
+	
+		break;
+	}
+
+	
 	default: {
 		pr_info("voice_ioctl  invalid cmd!\n");
 		break;
diff --git a/ap/os/linux/linux-3.4.x/drivers/staging/voltedrv/volte.c b/ap/os/linux/linux-3.4.x/drivers/staging/voltedrv/volte.c
old mode 100644
new mode 100755
index 2341465..262868f
--- a/ap/os/linux/linux-3.4.x/drivers/staging/voltedrv/volte.c
+++ b/ap/os/linux/linux-3.4.x/drivers/staging/voltedrv/volte.c
@@ -39,6 +39,7 @@
  extern int32_t zDrvVoice_WriteStop(void);
  extern int32_t zDrvVoice_ReadOneFrame(uint8_t *pBuf);
  extern int32_t zDrvVoice_WriteOneFrame(uint8_t *pBuf);
+ extern int  zDrvVp_GetSlicFlag(void);
 
 
 
diff --git a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.c b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.c
index ea72d9e..38dbbb5 100755
--- a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.c
+++ b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/multi_packet.c
@@ -1516,8 +1516,10 @@
 	{

 		//req->dma = virt_to_phys(req->buf);

 		//retval = usb_gadget_map_request(multiPacket.gadget, req, 1);

-		//dma_sync_single_for_device();	

-		if(strcmp(multiPkt->geth->func.name,RNDIS_NAME_STR) == 0)

+		//dma_sync_single_for_device();

+		if(multiPkt->geth == NULL)

+			ep->protocol_type = 2;

+		else if(strcmp(multiPkt->geth->func.name,RNDIS_NAME_STR) == 0)

             ep->protocol_type = 1;

 		else

 			ep->protocol_type = 2;

@@ -1602,7 +1604,9 @@
 	{

 		///retval = usb_gadget_map_request(multiPacket.gadget, req, 0);

 		//ep->protocol_type = 2;

-		if(strcmp(multiPkt->geth->func.name,RNDIS_NAME_STR) == 0)

+		if(multiPkt->geth == NULL)

+			ep->protocol_type = 2;

+		else if(strcmp(multiPkt->geth->func.name,RNDIS_NAME_STR) == 0)

             ep->protocol_type = 1;

 		else

 			ep->protocol_type = 2;

@@ -1914,6 +1918,7 @@
             geth->unwrap = NULL;

         }

 #endif

+

         //ÅжÏÍø¿¨ÀàÐÍ

         printk("$$$$$$$geth->func.name = %s \n",geth->func.name) ;

         if(strcmp(geth->func.name,RNDIS_NAME_STR) == 0)

diff --git a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/u_serial.c b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/u_serial.c
old mode 100644
new mode 100755
index 09507a5..1ee7d4f
--- a/ap/os/linux/linux-3.4.x/drivers/usb/gadget/u_serial.c
+++ b/ap/os/linux/linux-3.4.x/drivers/usb/gadget/u_serial.c
@@ -152,9 +152,10 @@
 } ports[N_PORTS];
 static unsigned	n_ports;
 static int inform_state = 0;
-//xf.li@20240719 modify for youwei get_sim_status slowly start
-#define GS_CLOSE_TIMEOUT		1		/* seconds */
-//xf.li@20240719 modify for youwei get_sim_status slowly end
+
+//#define GS_CLOSE_TIMEOUT		15		/* seconds */
+#define GS_CLOSE_TIMEOUT		1
+
 
 #ifdef VERBOSE_DEBUG
 #define pr_vdebug(fmt, arg...) \