]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
mbox: qcom: add APCS child device for QCS404
authorJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Thu, 29 Aug 2019 08:27:58 +0000 (10:27 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 16 Oct 2019 09:55:48 +0000 (11:55 +0200)
BugLink: https://bugs.launchpad.net/bugs/1848274
[ Upstream commit 78c86458a440ff356073c21b568cb58ddb67b82b ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/mailbox/qcom-apcs-ipc-mailbox.c

index 57bde0dfd12fe54b9dae0128dbd395d1cc571437..3d29b66984f7e67c9be14f1dc58cf652d117301d 100644 (file)
@@ -55,7 +55,6 @@ static const struct mbox_chan_ops qcom_apcs_ipc_ops = {
 
 static int qcom_apcs_ipc_probe(struct platform_device *pdev)
 {
-       struct device_node *np = pdev->dev.of_node;
        struct qcom_apcs_ipc *apcs;
        struct regmap *regmap;
        struct resource *res;
@@ -63,6 +62,11 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
        void __iomem *base;
        unsigned long i;
        int ret;
+       const struct of_device_id apcs_clk_match_table[] = {
+               { .compatible = "qcom,msm8916-apcs-kpss-global", },
+               { .compatible = "qcom,qcs404-apcs-apps-global", },
+               {}
+       };
 
        apcs = devm_kzalloc(&pdev->dev, sizeof(*apcs), GFP_KERNEL);
        if (!apcs)
@@ -97,7 +101,7 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
                return ret;
        }
 
-       if (of_device_is_compatible(np, "qcom,msm8916-apcs-kpss-global")) {
+       if (of_match_device(apcs_clk_match_table, &pdev->dev)) {
                apcs->clk = platform_device_register_data(&pdev->dev,
                                                          "qcom-apcs-msm8916-clk",
                                                          -1, NULL, 0);