Skip to content

Commit

Permalink
mbox: qcom: add APCS child device for QCS404
Browse files Browse the repository at this point in the history
There is clock controller functionality in the APCS hardware block of
qcs404 devices similar to msm8916.

Co-developed-by: Niklas Cassel <[email protected]>
Signed-off-by: Niklas Cassel <[email protected]>
Signed-off-by: Jorge Ramirez-Ortiz <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Jassi Brar <[email protected]>
  • Loading branch information
ldts authored and JassiBrar committed Sep 17, 2019
1 parent 6058f11 commit 78c8645
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/mailbox/qcom-apcs-ipc-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,18 @@ 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;
unsigned long offset;
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)
Expand Down Expand Up @@ -89,7 +93,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);
Expand Down

0 comments on commit 78c8645

Please sign in to comment.