summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorAbhijeet Dharmapurikar <adharmap@codeaurora.org>2016-01-18 22:00:33 -0800
committerRohit Vaswani <rvaswani@codeaurora.org>2016-03-01 12:22:45 -0800
commita0d789a17369e8514d2ab8cb695636c922359515 (patch)
tree8a15938b45d047d8e48c4f9618f7e6d7547f18a1 /Documentation
parente194a2a2250fa8120d7c74fb1e367c99d681b041 (diff)
spmi: pmic_arb: block access of invalid read and writes
The system crashes due to bad access when reading from an non configured peripheral and when writing to peripheral which is not owned by current ee. This patch verifies ownership to avoid crashing on write. For reads, since the forward mapping table, data_channel->ppid, is towards the end of the block, we use the core size to figure the max number of ppids supported. The table starts at an offset of 0x800 within the block, so size - 0x800 will give us the area used by the table. Since each table is 4 bytes long (core_size - 0x800) / 4 will gives us the number of data_channel supported. This new protection is functional on hw v2. Change-Id: I74e3452963a7dda9a8c8aaef76de3117cabc454b Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt25
1 files changed, 24 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt b/Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt
index e16b9b5afc70..bef919334574 100644
--- a/Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt
+++ b/Documentation/devicetree/bindings/spmi/qcom,spmi-pmic-arb.txt
@@ -42,7 +42,7 @@ Required properties:
cell 4: interrupt flags indicating level-sense information, as defined in
dt-bindings/interrupt-controller/irq.h
-Example:
+Example V1 PMIC-Arbiter:
spmi {
compatible = "qcom,spmi-pmic-arb";
@@ -63,3 +63,26 @@ Example:
interrupt-controller;
#interrupt-cells = <4>;
};
+
+Example V2 PMIC-Arbiter:
+
+ spmi_bus: qcom,spmi@200f000 {
+ compatible = "qcom,spmi-pmic-arb";
+ reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
+ reg = <0x200f000 0xc00>,
+ <0x2400000 0x400000>,
+ <0x2c00000 0x400000>,
+ <0x3800000 0x200000>,
+ <0x200a000 0x2100>;
+
+ interrupt-names = "periph_irq";
+ interrupts = <0 190 0>;
+
+ qcom,ee = <0>;
+
+ #address-cells = <2>;
+ #size-cells = <0>;
+
+ interrupt-controller;
+ #interrupt-cells = <4>;
+ };