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>
This commit is contained in:
Jorge Ramirez-Ortiz 2019-08-29 10:27:58 +02:00 committed by Jassi Brar
parent 6058f11870
commit 78c86458a4
1 changed files with 6 additions and 2 deletions

View File

@ -47,7 +47,6 @@ static const struct mbox_chan_ops qcom_apcs_ipc_ops = {
static int qcom_apcs_ipc_probe(struct platform_device *pdev) static int qcom_apcs_ipc_probe(struct platform_device *pdev)
{ {
struct device_node *np = pdev->dev.of_node;
struct qcom_apcs_ipc *apcs; struct qcom_apcs_ipc *apcs;
struct regmap *regmap; struct regmap *regmap;
struct resource *res; struct resource *res;
@ -55,6 +54,11 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
void __iomem *base; void __iomem *base;
unsigned long i; unsigned long i;
int ret; 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); apcs = devm_kzalloc(&pdev->dev, sizeof(*apcs), GFP_KERNEL);
if (!apcs) if (!apcs)
@ -89,7 +93,7 @@ static int qcom_apcs_ipc_probe(struct platform_device *pdev)
return ret; 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, apcs->clk = platform_device_register_data(&pdev->dev,
"qcom-apcs-msm8916-clk", "qcom-apcs-msm8916-clk",
-1, NULL, 0); -1, NULL, 0);