mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
dcc_v2: Don't set the default value to sram when dcc is enabled
If set the default value to sram when dcc is enabled, there will be stuck issue for dcc dump. Change-Id: I784993d6db41e1afed92ccc05bec0cf1987a3e04 Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
This commit is contained in:
parent
899c49c736
commit
2bc8103c2b
1 changed files with 22 additions and 3 deletions
|
|
@ -589,13 +589,15 @@ static int dcc_valid_list(struct dcc_drvdata *drvdata, int curr_list)
|
|||
return -EINVAL;
|
||||
|
||||
if (drvdata->enable[curr_list]) {
|
||||
dev_err(drvdata->dev, "DCC is already enabled\n");
|
||||
dev_err(drvdata->dev, "List %d is already enabled\n",
|
||||
curr_list);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
lock_reg = dcc_readl(drvdata, DCC_LL_LOCK(curr_list));
|
||||
if (lock_reg & 0x1) {
|
||||
dev_err(drvdata->dev, "DCC is already enabled\n");
|
||||
dev_err(drvdata->dev, "List %d is already locked\n",
|
||||
curr_list);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -603,6 +605,21 @@ static int dcc_valid_list(struct dcc_drvdata *drvdata, int curr_list)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool is_dcc_enabled(struct dcc_drvdata *drvdata)
|
||||
{
|
||||
bool dcc_enable = false;
|
||||
int list;
|
||||
|
||||
for (list = 0; list < DCC_MAX_LINK_LIST; list++) {
|
||||
if (drvdata->enable[list]) {
|
||||
dcc_enable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return dcc_enable;
|
||||
}
|
||||
|
||||
static int dcc_enable(struct dcc_drvdata *drvdata)
|
||||
{
|
||||
int ret = 0;
|
||||
|
|
@ -611,7 +628,9 @@ static int dcc_enable(struct dcc_drvdata *drvdata)
|
|||
|
||||
mutex_lock(&drvdata->mutex);
|
||||
|
||||
memset_io(drvdata->ram_base, 0xDE, drvdata->ram_size);
|
||||
if (!is_dcc_enabled(drvdata)) {
|
||||
memset_io(drvdata->ram_base, 0xDE, drvdata->ram_size);
|
||||
}
|
||||
|
||||
for (list = 0; list < drvdata->nr_link_list; list++) {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue