summaryrefslogtreecommitdiff
path: root/drivers/mfd/qcom_rpm.c
AgeCommit message (Collapse)Author
2016-06-29mfd: qcom_rpm: Parametrize also ack selector sizeLinus Walleij
The RPM has two sets of selectors (IPC bit fields): request and acknowledge. Apparently, some models use 4*32 bit words for select and some use 7*32 bit words for request, but all use 7*32 words for acknowledge bits. So apparently you can on the models with requests of 4*32 select bits send 4*32 messages and get 7*32 different replies, so on ACK interrupt, 7*32 bit words need to be read. This is how the vendor code apparently works. Cc: stable@vger.kernel.org Reported-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-06-29mfd: qcom_rpm: Remove unused defineLinus Walleij
This define RPM_SIGNAL probably pertains to the IPC signal which we ended up fetching from the device tree instead. the define is unused, remove it. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2016-06-29mfd: qcom_rpm: Fix offset error for msm8660Linus Walleij
The RPM in MSM8660/APQ8060 has different offsets to the selector ACK and request context ACK registers. Make all these register offsets part of the per-SoC data and assign the right values. The bug was found by verifying backwards to the vendor tree in the out-of-tree files <mach/rpm-[8660|8064|8960]>: all were using offsets 3,11,15,23 and a select size of 4, except the MSM8660/APQ8060 which was using offsets 3,11,19,27 and a select size of 7. All other platforms apart from msm8660 were affected by reading excess registers, since 7 was hardcoded as the number of select words, this patch makes also this part dynamic so we only write/read as many select words as the platform actually use. Symptoms of this bug when using msm8660: the first RPM transaction would work, but the next would stall or raise an error since the previous transaction was not properly ACKed as the ACK words were read at the wrong offset. Cc: stable@vger.kernel.org Fixes: 58e214382bdd ("mfd: qcom-rpm: Driver for the Qualcomm RPM") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Björn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-12-04mfd: qcom_rpm: Fix a possible NULL dereferenceLABBE Corentin
of_match_device could return NULL, and so cause a NULL pointer dereference later. Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: qcom_rpm: Drop use of IRQF_NO_SUSPEND flagSudeep Holla
The driver handles wakeup irq correctly using irq_set_irq_wake. There's no need to use IRQF_NO_SUSPEND while registering the interrupt. This patch removes the use of IRQF_NO_SUSPEND flag. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-08-11mfd: qcom-rpm: Add apq8064 QDSS clock resourceIvan T. Ivanov
Qualcomm Debug Subsystem clock is used by CoreSight components. Add required definitions for it. qcom_rpm_resource::status_id is not used by driver, so just mark it as ~0. Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-03-30mfd: qcom_rpm: Add support for IPQ8064Josh Cartwright
The IPQ8064 also includes an RPM following the same message structure as other chips. In addition, it supports a few new resource types to support the NSS fabric clocks and the SMB208/SMB209 regulators found on the reference boards. Signed-off-by: Josh Cartwright <joshc@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-01-22mfd: qcom-rpm: Driver for the Qualcomm RPMBjorn Andersson
Driver for the Resource Power Manager (RPM) found in Qualcomm 8660, 8960 and 8064 based devices. The driver exposes resources that child drivers can operate on; to implementing regulator, clock and bus frequency drivers. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>