aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>2018-12-13 12:35:07 +0100
committerJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>2018-12-19 13:41:35 +0100
commitff85570ae7fb22997d9381d0a382d92821f217fd (patch)
tree5b67d1b0fefd91a57b149105773facc2a919a35f
parent92f1b08f63d4c5ad7e89b353be8cafbb04af79d1 (diff)
mbox: qcom: add APCS child device for QCS404
There is clock controller functionality in the APCS hardware block of qcs404 devices similar to msm8916. Co-developed-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
-rw-r--r--drivers/mailbox/qcom-apcs-ipc-mailbox.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
index aed23ac9550d..dc8fdab1fa82 100644
--- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c
+++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c
@@ -97,16 +97,21 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
return ret;
}
- if (of_device_is_compatible(np, "qcom,msm8916-apcs-kpss-global")) {
- apcs->clk = platform_device_register_data(&pdev->dev,
- "qcom-apcs-msm8916-clk",
- -1, NULL, 0);
- if (IS_ERR(apcs->clk))
- dev_err(&pdev->dev, "failed to register APCS clk\n");
- }
-
platform_set_drvdata(pdev, apcs);
+ if (of_device_is_compatible(np, "qcom,msm8916-apcs-kpss-global") ||
+ of_device_is_compatible(np, "qcom,qcs404-apcs-apps-global"))
+ goto register_clk;
+
+ return 0;
+
+register_clk:
+ apcs->clk = platform_device_register_data(&pdev->dev,
+ "qcom-apcs-msm8916-clk",
+ -1, NULL, 0);
+ if (IS_ERR(apcs->clk))
+ dev_err(&pdev->dev, "failed to register APCS clk\n");
+
return 0;
}