Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942571AbcJSOf3 (ORCPT ); Wed, 19 Oct 2016 10:35:29 -0400 Received: from mail-qt0-f176.google.com ([209.85.216.176]:36787 "EHLO mail-qt0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S942549AbcJSOf0 (ORCPT ); Wed, 19 Oct 2016 10:35:26 -0400 From: Neil Armstrong To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sudeep.holla@arm.com Cc: Neil Armstrong , linux-amlogic@lists.infradead.org, khilman@baylibre.com, heiko@sntech.de, wxt@rock-chips.com, frank.wang@rock-chips.com Subject: [PATCH v5 3/5] scpi: Add support for Legacy match table for Amlogic GXBB SoC Date: Wed, 19 Oct 2016 14:51:10 +0200 Message-Id: <1476881472-13055-4-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1476881472-13055-1-git-send-email-narmstrong@baylibre.com> References: <1476881472-13055-1-git-send-email-narmstrong@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1356 Lines: 45 Add new DT match table to setup the is_legacy boolean value across the scpi functions. Add the Amlogic GXBB SoC compatible for platform and as legacy match entry. Signed-off-by: Neil Armstrong --- drivers/firmware/arm_scpi.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c index 9022336..75b60c4 100644 --- a/drivers/firmware/arm_scpi.c +++ b/drivers/firmware/arm_scpi.c @@ -871,6 +871,11 @@ static int scpi_alloc_xfer_list(struct device *dev, struct scpi_chan *ch) return 0; } +static const struct of_device_id legacy_scpi_of_match[] = { + {.compatible = "amlogic,meson-gxbb-scpi"}, + {}, +}; + static int scpi_probe(struct platform_device *pdev) { int count, idx, ret; @@ -883,6 +888,9 @@ static int scpi_probe(struct platform_device *pdev) if (!scpi_info) return -ENOMEM; + if (of_match_device(legacy_scpi_of_match, &pdev->dev)) + scpi_info->is_legacy = true; + count = of_count_phandle_with_args(np, "mboxes", "#mbox-cells"); if (count < 0) { dev_err(dev, "no mboxes property in '%s'\n", np->full_name); @@ -984,6 +992,7 @@ static int scpi_probe(struct platform_device *pdev) static const struct of_device_id scpi_of_match[] = { {.compatible = "arm,scpi"}, + {.compatible = "amlogic,meson-gxbb-scpi"}, {}, }; -- 1.9.1