mfd: qcom_rpm: Handle message RAM clock
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 18 Aug 2016 18:40:45 +0000 (20:40 +0200)
committerLee Jones <lee.jones@linaro.org>
Mon, 12 Sep 2016 08:56:10 +0000 (09:56 +0100)
commit40ff5731d9c0e4115db31a54e1922deda8745277
treee19000b09317e09edfdd7e64f7716f1124050b23
parent899c4e9114d1f06ccd4da28eccfd8639ef8ca0d1
mfd: qcom_rpm: Handle message RAM clock

The MSM8660, APQ8060, IPQ806x and MSM8960 have a GCC clock
to the message RAM used by the RPM. This needs to be enabled
for messages to pass through. This is a crude solution that
simply prepare/enable at probe() and disable/unprepare
at remove(). More elaborate PM is probably possible to
add later.

The construction uses IS_ERR() to gracefully handle the
platforms that do not provide a message RAM clock. It will
bail out of probe only if the clock is hitting a probe
deferral situation.

Of course this requires the proper device tree set-up:

rpm: rpm@104000 {
    compatible = "qcom,rpm-msm8660";
    clocks = <&gcc RPM_MSG_RAM_H_CLK>;
    clock-names = "ram";
    ...
};

I have provided this in the MSM8660 device tree, and will
provide patches for the other targets.

Cc: Björn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/qcom_rpm.c
This page took 0.026994 seconds and 5 git commands to generate.