From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 265C0C4708F for ; Wed, 2 Jun 2021 08:09:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7822613BD for ; Wed, 2 Jun 2021 08:08:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7822613BD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p+60p6Wz7l6UEoIV5stofoYLB9psnCxDXeI5bN1br28=; b=pFV8eWQMyPEKGP ++JJmyn6Nh4AvE3EJpik1zEA9yceCqXcnL2YXCMMNl7DqtliBjGAuoGf5gNF4np1AUBX8CFgPnJCv VwenbW3BwBGh3aBDhjtQT+GarSYPxLxJr656u6GDcZGUpot8EWGZJBl+BNnq0FJYiI3JFzZSkZvpN QmNVescry5radP+E5awMMnVxbVFalVRv1zJu6yBI+CBXnWKV5ZV0KsTw9oRIQuQjtwc331s6U6STW UKFhUK/J8f/3Z+TX+5A704w9VZpV5l3L5sP4vG9cRCCPz2EXD/zr4mW4fnDP/of3WoFBGcqlsCvlp A50QLE/kmNhux46iKjIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loLu2-002Upa-IP; Wed, 02 Jun 2021 08:07:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loLIP-002IU0-Ml for linux-arm-kernel@lists.infradead.org; Wed, 02 Jun 2021 07:28:11 +0000 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 6F3F66D; Wed, 2 Jun 2021 00:28:05 -0700 (PDT) Received: from bogus (unknown [10.57.72.241]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 189FA3F73D; Wed, 2 Jun 2021 00:28:03 -0700 (PDT) Date: Wed, 2 Jun 2021 08:27:58 +0100 From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org Cc: Cristian Marussi , Kevin Hilman , Neil Armstrong , Jerome Brunet Subject: Re: [PATCH 1/2] firmware: arm_scpi: Add compatibility checks for shmem node Message-ID: <20210602072758.d2uf62kzvf652fjg@bogus> References: <20210601225125.918225-1-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210601225125.918225-1-sudeep.holla@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210602_002809_837970_861B471A X-CRM114-Status: GOOD ( 21.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 01, 2021 at 11:51:24PM +0100, Sudeep Holla wrote: > The shared memory node used for communication between the firmware and > the OS should be compatible with one of the following: > - amlogic,meson-gxbb-scp-shmem > - amlogic,meson-axg-scp-shmem > - arm,juno-scp-shmem > - arm,scp-shmem > Add the check for the same while parsing the node before fetching the memory > regions. > Ignore this patch, sent a wrong version. This breaks build... > Cc: Kevin Hilman > Cc: Neil Armstrong > Cc: Jerome Brunet > Signed-off-by: Sudeep Holla > --- > drivers/firmware/arm_scpi.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c > index d0dee37ad522..0fb4fe53523d 100644 > --- a/drivers/firmware/arm_scpi.c > +++ b/drivers/firmware/arm_scpi.c > @@ -897,6 +897,13 @@ static const struct of_device_id legacy_scpi_of_match[] = { > {}, > }; > > +static const struct of_device_id shmem_of_match[] = { > + { .compatible = "amlogic,meson-gxbb-scp-shmem", }, > + { .compatible = "amlogic,meson-axg-scp-shmem", }, > + { .compatible = "arm,juno-scp-shmem", }, > + { .compatible = "arm,scp-shmem", }, > + { } > +}; > static int scpi_probe(struct platform_device *pdev) > { > int count, idx, ret; > @@ -933,6 +940,9 @@ static int scpi_probe(struct platform_device *pdev) > struct mbox_client *cl = &pchan->cl; > struct device_node *shmem = of_parse_phandle(np, "shmem", idx); > > + if (!of_match_device(shmem_of_match, shmem)) This must be of_match_node > + return -ENXIO; > + > ret = of_address_to_resource(shmem, 0, &res); > of_node_put(shmem); > if (ret) { > -- > 2.25.1 > -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel