Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d59a8350 authored by Yuanfang Zhang's avatar Yuanfang Zhang
Browse files

dcc_v2: fix 1 write 1 read register configuration fail issue



Re-use base address from last entry only when the decs_type of
last entry equal to "DCC_ADDR_TYPE" in dcc_config_add().

Change-Id: I6c678ddaac6c689d73b14c63d03abdbd6289dc0c
Signed-off-by: default avatarYuanfang Zhang <zhangyuanfang@codeaurora.org>
parent 38b1718d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1053,7 +1053,8 @@ static int dcc_config_add(struct dcc_drvdata *drvdata, unsigned int addr,
		pentry = list_last_entry(&drvdata->cfg_head[drvdata->curr_list],
					 struct dcc_config_entry, list);

		if (addr >= (pentry->base + pentry->offset) &&
		if (pentry->desc_type == DCC_ADDR_TYPE &&
		    addr >= (pentry->base + pentry->offset) &&
		    addr <= (pentry->base + pentry->offset + MAX_DCC_OFFSET)) {

			/* Re-use base address from last entry */