From patchwork Wed Oct 5 07:33:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 9362561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AFE446077E for ; Wed, 5 Oct 2016 07:36:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A435D27FA6 for ; Wed, 5 Oct 2016 07:36:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98C9728413; Wed, 5 Oct 2016 07:36:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4FDDE27FA6 for ; Wed, 5 Oct 2016 07:36:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1brgiR-0000bM-WA; Wed, 05 Oct 2016 07:34:12 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1brgiL-0000XN-8t for linux-arm-kernel@lists.infradead.org; Wed, 05 Oct 2016 07:34:07 +0000 Received: by mail-wm0-x22b.google.com with SMTP id b201so190870282wmb.0 for ; Wed, 05 Oct 2016 00:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1+UrdZ2XBysZ1WFoaxYjo+NYnu/dr7Yq4A+5h1f6Zro=; b=Msui+r3T5WX+k7DZrEfXfYwbMIr/vrQafVLW9HUxjxuh4qrPLTBCd46C6Vpv8iuiGK PLlkQc6TkED7pbBCbGSTKaT4/EPmiUh+ZMs2DSE5jqogVwOgOwIHeN2hnWrgM7ZCPMQw uEnc+asRUHCO27ntxarH0MvsWT4HjBwpnMDldsHwdKR/iJKZIsczoldf+xgj3mBorqTS GuE+6PHPPb1dpNoquMNQKL9YSfidgdVR2JveAkY8k8uIB/L15WTIgVsvHG2hUm2eK3Xs sxExLDpvIzGCQvtWtobVRi3+uQK8Q0GP98AjAjRH4/yhutyOnXCD8PTEklQRV62hfk84 Lnhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1+UrdZ2XBysZ1WFoaxYjo+NYnu/dr7Yq4A+5h1f6Zro=; b=iQBBDJDOujRzzLEPeXWPAqRYxVvB1BBco1XxVoiHBtIqU2wiNa9mysrYjd+B1mLvXd KbubvdQdK7TCfaZvOnpWov0VUPUakc6ut+sVHuSLBY96TtA0gLegXeCA14vLOrmtTcfw 6f+TOeAfMgvkVgRVd3mn4dZnaUDmNImW+cUhIbPJqiKn9kIjnlnlstQ95IW+bGSyYQM2 yJDyhBhQdRctqdkMf5NYc9PRKYg9DGWRkpH0H+Aii+0/QuSxr0VEB2jSPDKyHR4C3bt7 rV5kIXQjxVrtc2EWtmC4/khDmmFiq4pfTAEoivK418NN1xnLOynKvFiKif5VaK4qqN+V HY0g== X-Gm-Message-State: AA6/9RmWHgCzX+GjlN4xJo49+XP3V11APqva1nWIkWcW021bdvkabBeV4s/mFzzVc2YYtw4A X-Received: by 10.194.78.227 with SMTP id e3mr6189635wjx.195.1475652826300; Wed, 05 Oct 2016 00:33:46 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id 142sm7923866wmh.12.2016.10.05.00.33.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Oct 2016 00:33:45 -0700 (PDT) From: Neil Armstrong To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, sudeep.holla@arm.com Subject: [PATCH v4 4/8] scpi: Add support for Legacy match table for Amlogic GXBB SoC Date: Wed, 5 Oct 2016 09:33:30 +0200 Message-Id: <1475652814-30619-5-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1475652814-30619-1-git-send-email-narmstrong@baylibre.com> References: <1475652814-30619-1-git-send-email-narmstrong@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161005_003405_608049_EFB6D00F X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heiko@sntech.de, Neil Armstrong , frank.wang@rock-chips.com, khilman@baylibre.com, linux-amlogic@lists.infradead.org, wxt@rock-chips.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 1fb3bbf..21fafbe 100644 --- a/drivers/firmware/arm_scpi.c +++ b/drivers/firmware/arm_scpi.c @@ -895,6 +895,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; @@ -907,6 +912,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); @@ -1009,6 +1017,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"}, {}, };