M7350v3_en_gpl
This commit is contained in:
@ -25,7 +25,6 @@
|
||||
#include <mach/msm_smsm.h>
|
||||
#include <mach/socinfo.h>
|
||||
#include <mach/ipa.h>
|
||||
#include <mach/msm_iomap.h>
|
||||
#include "ipa_i.h"
|
||||
|
||||
#define A2_NUM_PIPES 6
|
||||
@ -115,38 +114,6 @@ static struct a2_mux_context_type *a2_mux_ctx;
|
||||
|
||||
static void handle_a2_mux_cmd(struct sk_buff *rx_skb);
|
||||
|
||||
/* [chenchao start] Do not excute BUG() in recovery */
|
||||
static bool is_recovery_mode(void)
|
||||
{
|
||||
unsigned int value = 0;
|
||||
static bool is_recovery = 0;
|
||||
static bool checked = 0;
|
||||
void* restart_reason = 0;
|
||||
|
||||
if (checked == 1)
|
||||
{
|
||||
return is_recovery;
|
||||
}
|
||||
|
||||
checked = 1;
|
||||
restart_reason = MSM_IMEM_BASE + 0x65C;
|
||||
value = __raw_readl(restart_reason);
|
||||
/* [chenchao] Fix always go into recovery */
|
||||
__raw_writel(0, restart_reason);
|
||||
pr_info("CCCC restart_reason %x\r\n", value);
|
||||
is_recovery = (value == 0x77665502);
|
||||
return is_recovery;
|
||||
}
|
||||
|
||||
static void bug_not_recovery(void)
|
||||
{
|
||||
if (!is_recovery_mode())
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
}
|
||||
/* [chenchao end] */
|
||||
|
||||
static bool bam_ch_is_open(int index)
|
||||
{
|
||||
return a2_mux_ctx->bam_ch[index].status ==
|
||||
@ -340,7 +307,7 @@ static void ul_wakeup(void)
|
||||
return;
|
||||
bail:
|
||||
mutex_unlock(&a2_mux_ctx->wakeup_lock);
|
||||
bug_not_recovery();
|
||||
BUG();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -374,7 +341,7 @@ static void a2_mux_write_done(bool is_tethered, struct sk_buff *skb)
|
||||
}
|
||||
spin_unlock_irqrestore(&a2_mux_ctx->bam_tx_pool_spinlock,
|
||||
flags);
|
||||
bug_not_recovery();
|
||||
BUG();
|
||||
}
|
||||
list_del(&info->list_node);
|
||||
spin_unlock_irqrestore(&a2_mux_ctx->bam_tx_pool_spinlock, flags);
|
||||
@ -486,7 +453,7 @@ static void kickoff_ul_wakeup_func(struct work_struct *work)
|
||||
if (unlikely(ret == 0)) {
|
||||
IPAERR("%s timeout waiting for A2 PROD granted\n",
|
||||
__func__);
|
||||
bug_not_recovery();
|
||||
BUG();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -512,7 +479,7 @@ static void kickoff_ul_request_resource_func(struct work_struct *work)
|
||||
if (unlikely(ret == 0)) {
|
||||
IPAERR("%s timeout waiting for A2 PROD granted\n",
|
||||
__func__);
|
||||
bug_not_recovery();
|
||||
BUG();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1683,9 +1650,6 @@ int a2_mux_init(void)
|
||||
*/
|
||||
a2_mux_ctx->bam_ch[A2_MUX_TETHERED_0].status |= BAM_CH_REMOTE_OPEN;
|
||||
|
||||
/* [chenchao] init restart reason */
|
||||
is_recovery_mode();
|
||||
|
||||
rc = 0;
|
||||
goto bail;
|
||||
|
||||
|
Reference in New Issue
Block a user