From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757810AbcHWLrR (ORCPT ); Tue, 23 Aug 2016 07:47:17 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35013 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757203AbcHWLrE (ORCPT ); Tue, 23 Aug 2016 07:47:04 -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 v2 3/7] scpi: Add support for Legacy match table for Amlogic GXBB SoC Date: Tue, 23 Aug 2016 13:46:52 +0200 Message-Id: <1471952816-30877-4-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1471952816-30877-1-git-send-email-narmstrong@baylibre.com> References: <1471952816-30877-1-git-send-email-narmstrong@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 d24d1de..badef70 100644 --- a/drivers/firmware/arm_scpi.c +++ b/drivers/firmware/arm_scpi.c @@ -888,6 +888,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; @@ -900,6 +905,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); @@ -996,6 +1004,7 @@ err: static const struct of_device_id scpi_of_match[] = { {.compatible = "arm,scpi"}, + {.compatible = "amlogic,meson-gxbb-scpi"}, {}, }; -- 1.9.1