summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorAvaneesh Kumar Dwivedi <akdwived@codeaurora.org>2016-02-01 12:51:35 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:16:22 -0700
commit92bec5f61b9310140840bf6ff2e50ffbf83a6874 (patch)
tree471a1db52e0db23cbf0d8798bda5df30a196c2ad /drivers/soc
parent35012c464e303e89f2fdf72589b2ae4a6b993bfe (diff)
soc: qcom: pil-q6v5: Add support to read acc register value and override it
Update the reset sequence to read and override acc register based on msm specific value provided in device tree. Change-Id: I8ed290f5ab5e48e94ef5c8c91fd1d8f8414e86f7 Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/pil-q6v5.c8
-rw-r--r--drivers/soc/qcom/pil-q6v5.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/soc/qcom/pil-q6v5.c b/drivers/soc/qcom/pil-q6v5.c
index 39b352b6f159..a62091b0854d 100644
--- a/drivers/soc/qcom/pil-q6v5.c
+++ b/drivers/soc/qcom/pil-q6v5.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -361,6 +361,12 @@ static int __pil_q6v55_reset(struct pil_desc *pil)
writel_relaxed(QDSP6SS_ACC_OVERRIDE_VAL,
drv->reg_base + QDSP6SS_STRAP_ACC);
+ /* Override the ACC value with input value */
+ if (!of_property_read_u32(pil->dev->of_node, "qcom,override-acc-1",
+ &drv->override_acc_1))
+ writel_relaxed(drv->override_acc_1,
+ drv->reg_base + QDSP6SS_STRAP_ACC);
+
/* Assert resets, stop core */
val = readl_relaxed(drv->reg_base + QDSP6SS_RESET);
val |= (Q6SS_CORE_ARES | Q6SS_BUS_ARES_ENA | Q6SS_STOP_CORE);
diff --git a/drivers/soc/qcom/pil-q6v5.h b/drivers/soc/qcom/pil-q6v5.h
index f1465e32b9af..6a59b06f7b6c 100644
--- a/drivers/soc/qcom/pil-q6v5.h
+++ b/drivers/soc/qcom/pil-q6v5.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -65,6 +65,7 @@ struct q6v5_data {
bool non_elf_image;
bool restart_reg_sec;
bool override_acc;
+ int override_acc_1;
bool ahb_clk_vote;
bool mx_spike_wa;
};