From patchwork Mon Sep 28 11:44:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 313640 Delivered-To: patch@linaro.org Received: by 2002:a92:5ad1:0:0:0:0:0 with SMTP id b78csp3208836ilg; Mon, 28 Sep 2020 04:45:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQYR5y0MiPuzFpqKW9vUmDx1USXuxgQz95Ec7bHFkawitqg+7e8RIvcHgAij7FDrBB5Hi0 X-Received: by 2002:a17:907:1042:: with SMTP id oy2mr1183947ejb.64.1601293506576; Mon, 28 Sep 2020 04:45:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601293506; cv=none; d=google.com; s=arc-20160816; b=lXCmRHZSBrTBoh3pWo/tjjHjzwuxIjK+5CZG415Y263F/N2+GTcUf2SlMicsb2Xj8w pk5I9iDGuaal4htCKj+h34gDyYAzz6MBQsDiqnlBoxXCLVbFKlqEoMiY42NgTkdHuSuN utOR7BOvse5PsaovNstN3SPDeh0FNA2VquT8F5Lvi8sQcu3octTyTkGJXzfZQ4IR1h8J bazJIonc66qCkN/Z3VAbN1TqkZa7fgrNgcGlBDWSrymV+oh4x7JuQq9oU5mJRp+SMAPH GcYxjhKuLrhoytsvdKAPNNiBWDU2X48F2jyNs4uQZVFsQaHkQE+jGMXgaFjyLZ09U8DT r7vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=UUwJs4P1DqFLb+/9QcgvuwdxLm4ikSjENMblrccvMV8=; b=rXmmaEJERZuc3cU5x9eNRKUfYtR1VCvNXEo1zwJfDlSu6rw/E7AeJOTi6vuE3k7y9F aLnpYNpGyJDxRy4hSjeNIsTfLoDdidyhU2MwV9fa8fHdIZgo3TlgNORErWIU7ZHA8baZ mqQVho6ZmAmllc2uu3Kz2Am7YbTbbpRAuxYjDq+TJWB1dIjlxsJIYjlZ7VShe3MjtZK2 K5cdQ2lZp7tVcy6cZrg1AY7+Q++4GkjIW1mkWblTUcdKM0EXZ1u8Tb1cW9DmssC1U6RM 0qgvdEway8OayyiP3Mb4C3d1ubBfL8NHTs5wOHP4Pxv6/kq3RqMUCO+m6Q92fOKfKLGE PnuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si426233edv.488.2020.09.28.04.45.06; Mon, 28 Sep 2020 04:45:06 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726693AbgI1Lo7 (ORCPT + 6 others); Mon, 28 Sep 2020 07:44:59 -0400 Received: from foss.arm.com ([217.140.110.172]:50032 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726672AbgI1Lo7 (ORCPT ); Mon, 28 Sep 2020 07:44:59 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 703FE113E; Mon, 28 Sep 2020 04:44:58 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D7BF63F6CF; Mon, 28 Sep 2020 04:44:56 -0700 (PDT) From: Sudeep Holla To: Jassi Brar , Jassi Brar , Viresh Kumar , ALKML , DTML , LKML Cc: Sudeep Holla , Vincent Guittot , Frank Rowand , Bjorn Andersson , Rob Herring , Rob Herring Subject: [PATCH 3/4] mailbox: arm_mhu: Match only if compatible is "arm, mhu" Date: Mon, 28 Sep 2020 12:44:44 +0100 Message-Id: <20200928114445.19689-4-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200928114445.19689-1-sudeep.holla@arm.com> References: <20200928114445.19689-1-sudeep.holla@arm.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Since we will be soon adding a separate driver based on this ARM MHU driver to support doorbell mode, let us add explicit check to match the default compatible for this driver. This is needed as the probe and match reuses the AMBA device ids currently and don't have any explicit compatible check. Signed-off-by: Sudeep Holla --- drivers/mailbox/arm_mhu.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/drivers/mailbox/arm_mhu.c b/drivers/mailbox/arm_mhu.c index 9da236552bd7..b7fbf276eb62 100644 --- a/drivers/mailbox/arm_mhu.c +++ b/drivers/mailbox/arm_mhu.c @@ -113,6 +113,9 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id) struct device *dev = &adev->dev; int mhu_reg[MHU_CHANS] = {MHU_LP_OFFSET, MHU_HP_OFFSET, MHU_SEC_OFFSET}; + if (!of_device_is_compatible(dev->of_node, "arm,mhu")) + return -ENODEV; + /* Allocate memory for device */ mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL); if (!mhu)