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 E3178C47083 for ; Wed, 2 Jun 2021 08:35:22 +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 AD5AE613D3 for ; Wed, 2 Jun 2021 08:35:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD5AE613D3 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=Skv5mb1kDciLfrxbCFQSjX3yqLjS24yH01z4Ugbavsk=; b=Dmc2IZ7LktBBE8 BuQt2x/uzEypvuQbxvulYO+zAHMSxg/yeuBVpgxDX0F0BXVZnfyBqmRFMI0oO9gmRbFQ3L5QyudGf uLcxB4hZvJuPI9uxBwP1gojF0z7qNEGFRAkNRTarhRV8RqYMh4U5Imi/uTQ3HK29GNpUq+5F2mk8I fa6G4ZV6qzTXGGnknmW7L780oLuOO/jQV319D2TdF1F6icMrmIHKvrY2K748EaJrrGbazU9xt7I51 zMXwR5ZOf+dsQ/aNNUrGj6zA6GT7e03jsyvfPtv1SA2vQsWq4thhu7WyQ7zbUGgV7HfjOsjqe3q/J jfL82ej3KjHyZ3lk8k0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loMJd-002gAW-0A; Wed, 02 Jun 2021 08:33:29 +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 1loLh0-002QYT-AC for linux-arm-kernel@lists.infradead.org; Wed, 02 Jun 2021 07:53:35 +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 742A0101E; Wed, 2 Jun 2021 00:53:33 -0700 (PDT) Received: from bogus (unknown [10.57.72.241]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B0F2A3F73D; Wed, 2 Jun 2021 00:53:31 -0700 (PDT) Date: Wed, 2 Jun 2021 08:53:26 +0100 From: Sudeep Holla To: Etienne Carriere Cc: "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Cristian Marussi , Kevin Hilman , Neil Armstrong , Jerome Brunet , Florian Fainelli , Jim Quinlan Subject: Re: [PATCH 2/2] firmware: arm_scmi: Add compatibility checks for shmem node Message-ID: <20210602075326.clypj7qmiv4gebas@bogus> References: <20210601225125.918225-1-sudeep.holla@arm.com> <20210601225125.918225-2-sudeep.holla@arm.com> <20210602073653.x4bon6jbiat2jnqv@bogus> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210602_005334_444380_B483593A X-CRM114-Status: GOOD ( 28.07 ) 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 Wed, Jun 02, 2021 at 09:44:40AM +0200, Etienne Carriere wrote: > On Wed, 2 Jun 2021 at 09:37, Sudeep Holla wrote: > > > > On Wed, Jun 02, 2021 at 09:33:03AM +0200, Etienne Carriere wrote: > > > Hello Sudeep, > > > > > > > > > On Wed, 2 Jun 2021 at 00:51, Sudeep Holla wrote: > > > > > > > > The shared memory node used for communication between the firmware and > > > > the OS should be compatible with "arm,scmi-shmem". Add the check for the > > > > same while parsing the node before fetching the memory regions. > > > > > > > > Cc: Cristian Marussi > > > > Cc: Florian Fainelli > > > > Cc: Jim Quinlan > > > > Cc: Etienne Carriere > > > > Signed-off-by: Sudeep Holla > > > > --- > > > > drivers/firmware/arm_scmi/mailbox.c | 3 +++ > > > > drivers/firmware/arm_scmi/smc.c | 3 +++ > > > > 2 files changed, 6 insertions(+) > > > > > > > > diff --git a/drivers/firmware/arm_scmi/mailbox.c b/drivers/firmware/arm_scmi/mailbox.c > > > > index 4626404be541..e3dcb58314ae 100644 > > > > --- a/drivers/firmware/arm_scmi/mailbox.c > > > > +++ b/drivers/firmware/arm_scmi/mailbox.c > > > > @@ -69,6 +69,9 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, > > > > return -ENOMEM; > > > > > > > > shmem = of_parse_phandle(cdev->of_node, "shmem", idx); > > > > + if (!of_device_is_compatible(shmem, "arm,scmi-shmem")) > > > > + return -ENXIO; > > > > > > Before this change, one could use another type of memory node, like "mmio-sram". > > > Is there a strong reason to enforce use of "arm,scmi-shmem" nodes? > > > > > > > No that is for the entire SRAM which still holds and generic on-chip SRAM > > driver will take care of that, this is only for the subsections that is > > reserved for the scp shmem. The binding has been always there, just the > > missing check. When I move to yaml, I realised that and hence the > > addition of check. > > Ok, I understand. True the binding was there but only in the DTS > examples snipped. > This constraint on the compatible property of the shmem node should be > clearly stated in the yaml I think. > Was this missing in your DTS files ? Just curious. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel