From: <gregkh@linuxfoundation.org>
To: linus.walleij@linaro.org, bjorn.andersson@linaro.org,
gregkh@linuxfoundation.org, lee.jones@linaro.org,
sboyd@codeaurora.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "mfd: qcom_rpm: Parametrize also ack selector size" has been added to the 4.4-stable tree
Date: Thu, 18 Aug 2016 10:30:29 +0200 [thread overview]
Message-ID: <147150902912113@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
mfd: qcom_rpm: Parametrize also ack selector size
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mfd-qcom_rpm-parametrize-also-ack-selector-size.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From f37be01e6dc606f2fcc5e95c9933d948ce19bd35 Mon Sep 17 00:00:00 2001
From: Linus Walleij <linus.walleij@linaro.org>
Date: Wed, 22 Jun 2016 08:27:17 +0200
Subject: mfd: qcom_rpm: Parametrize also ack selector size
From: Linus Walleij <linus.walleij@linaro.org>
commit f37be01e6dc606f2fcc5e95c9933d948ce19bd35 upstream.
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.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/mfd/qcom_rpm.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
--- a/drivers/mfd/qcom_rpm.c
+++ b/drivers/mfd/qcom_rpm.c
@@ -39,7 +39,8 @@ struct qcom_rpm_data {
unsigned int req_sel_off;
unsigned int ack_ctx_off;
unsigned int ack_sel_off;
- unsigned int sel_size;
+ unsigned int req_sel_size;
+ unsigned int ack_sel_size;
};
struct qcom_rpm {
@@ -162,7 +163,8 @@ static const struct qcom_rpm_data apq806
.req_sel_off = 11,
.ack_ctx_off = 15,
.ack_sel_off = 23,
- .sel_size = 4,
+ .req_sel_size = 4,
+ .ack_sel_size = 7,
};
static const struct qcom_rpm_resource msm8660_rpm_resource_table[] = {
@@ -250,7 +252,8 @@ static const struct qcom_rpm_data msm866
.req_sel_off = 11,
.ack_ctx_off = 19,
.ack_sel_off = 27,
- .sel_size = 7,
+ .req_sel_size = 7,
+ .ack_sel_size = 7,
};
static const struct qcom_rpm_resource msm8960_rpm_resource_table[] = {
@@ -337,7 +340,8 @@ static const struct qcom_rpm_data msm896
.req_sel_off = 11,
.ack_ctx_off = 15,
.ack_sel_off = 23,
- .sel_size = 4,
+ .req_sel_size = 4,
+ .ack_sel_size = 7,
};
static const struct qcom_rpm_resource ipq806x_rpm_resource_table[] = {
@@ -382,7 +386,8 @@ static const struct qcom_rpm_data ipq806
.req_sel_off = 11,
.ack_ctx_off = 15,
.ack_sel_off = 23,
- .sel_size = 4,
+ .req_sel_size = 4,
+ .ack_sel_size = 7,
};
static const struct of_device_id qcom_rpm_of_match[] = {
@@ -419,7 +424,7 @@ int qcom_rpm_write(struct qcom_rpm *rpm,
writel_relaxed(buf[i], RPM_REQ_REG(rpm, res->target_id + i));
bitmap_set((unsigned long *)sel_mask, res->select_id, 1);
- for (i = 0; i < rpm->data->sel_size; i++) {
+ for (i = 0; i < rpm->data->req_sel_size; i++) {
writel_relaxed(sel_mask[i],
RPM_CTRL_REG(rpm, rpm->data->req_sel_off + i));
}
@@ -448,7 +453,7 @@ static irqreturn_t qcom_rpm_ack_interrup
int i;
ack = readl_relaxed(RPM_CTRL_REG(rpm, rpm->data->ack_ctx_off));
- for (i = 0; i < rpm->data->sel_size; i++)
+ for (i = 0; i < rpm->data->ack_sel_size; i++)
writel_relaxed(0,
RPM_CTRL_REG(rpm, rpm->data->ack_sel_off + i));
writel(0, RPM_CTRL_REG(rpm, rpm->data->ack_ctx_off));
Patches currently in stable-queue which might be from linus.walleij@linaro.org are
queue-4.4/pinctrl-cherryview-prevent-concurrent-access-to-gpio-controllers.patch
queue-4.4/gpio-pca953x-fix-nbank-calculation-for-pca9536.patch
queue-4.4/mfd-qcom_rpm-parametrize-also-ack-selector-size.patch
queue-4.4/gpio-intel-mid-remove-potentially-harmful-code.patch
queue-4.4/mfd-qcom_rpm-fix-offset-error-for-msm8660.patch
reply other threads:[~2016-08-18 8:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=147150902912113@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bjorn.andersson@linaro.org \
--cc=lee.jones@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=sboyd@codeaurora.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.