diff options
author | Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> | 2019-08-29 04:27:58 -0400 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2019-09-17 01:46:00 -0400 |
commit | 78c86458a440ff356073c21b568cb58ddb67b82b (patch) | |
tree | 330eb4b0f5def2e8f64da228aea869e5e7595b7e | |
parent | 6058f11870b8e6d4f5cc7b591097c00bf69a000d (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>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
-rw-r--r-- | drivers/mailbox/qcom-apcs-ipc-mailbox.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c index 705e17a5479c..d3676fd3cf94 100644 --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c | |||
@@ -47,7 +47,6 @@ static const struct mbox_chan_ops qcom_apcs_ipc_ops = { | |||
47 | 47 | ||
48 | static int qcom_apcs_ipc_probe(struct platform_device *pdev) | 48 | static int qcom_apcs_ipc_probe(struct platform_device *pdev) |
49 | { | 49 | { |
50 | struct device_node *np = pdev->dev.of_node; | ||
51 | struct qcom_apcs_ipc *apcs; | 50 | struct qcom_apcs_ipc *apcs; |
52 | struct regmap *regmap; | 51 | struct regmap *regmap; |
53 | struct resource *res; | 52 | struct resource *res; |
@@ -55,6 +54,11 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) | |||
55 | void __iomem *base; | 54 | void __iomem *base; |
56 | unsigned long i; | 55 | unsigned long i; |
57 | int ret; | 56 | int ret; |
57 | const struct of_device_id apcs_clk_match_table[] = { | ||
58 | { .compatible = "qcom,msm8916-apcs-kpss-global", }, | ||
59 | { .compatible = "qcom,qcs404-apcs-apps-global", }, | ||
60 | {} | ||
61 | }; | ||
58 | 62 | ||
59 | apcs = devm_kzalloc(&pdev->dev, sizeof(*apcs), GFP_KERNEL); | 63 | apcs = devm_kzalloc(&pdev->dev, sizeof(*apcs), GFP_KERNEL); |
60 | if (!apcs) | 64 | if (!apcs) |
@@ -89,7 +93,7 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev) | |||
89 | return ret; | 93 | return ret; |
90 | } | 94 | } |
91 | 95 | ||
92 | if (of_device_is_compatible(np, "qcom,msm8916-apcs-kpss-global")) { | 96 | if (of_match_device(apcs_clk_match_table, &pdev->dev)) { |
93 | apcs->clk = platform_device_register_data(&pdev->dev, | 97 | apcs->clk = platform_device_register_data(&pdev->dev, |
94 | "qcom-apcs-msm8916-clk", | 98 | "qcom-apcs-msm8916-clk", |
95 | -1, NULL, 0); | 99 | -1, NULL, 0); |