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 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 AD5F6C47082 for ; Thu, 3 Jun 2021 18:22:14 +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 78AE4613B1 for ; Thu, 3 Jun 2021 18:22:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78AE4613B1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MBgGmEJpCirkq/oP00jSv6I0CquiwetwuMpH219pP18=; b=sjfarF+8ZpdK8k Zyi4d1l9ZapdlGgaK+UbdX+4q8q1VBR28pM4h5GSbPZbODD+NLfrGWwzigbzS89G67wDCNrprecAF Zt2pcZ45vsqHZHQKQ/teUBxdvZ5hdGa40M8GBYjnf7Dji4apnVOoQ5lkzert34looVqLoJ78bPHXG 7bdqPGtI+WuWlRJWiwZQ6ZIZDsi2mfZxJSGTQ9HHEsiWJf8CO0G8t0Kmo0/aymC4265SHtYymehfa /99Lgzr5S7J/6ul5nTZupiu85hWksCm7v4+GCjNZX8yY97n3rFLeGevPN952VCQsbtZY1tnjapo1j xquWWXowCduK7GJIz7DA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lorxX-00A8hW-9W; Thu, 03 Jun 2021 18:20:47 +0000 Received: from mail-ej1-f49.google.com ([209.85.218.49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lorxT-00A8gA-TQ for linux-arm-kernel@lists.infradead.org; Thu, 03 Jun 2021 18:20:45 +0000 Received: by mail-ej1-f49.google.com with SMTP id b9so10569615ejc.13 for ; Thu, 03 Jun 2021 11:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qGd+9IJJ5Weaf7KglzJs2ZUfg6C8Sx2XwcYZFGhuu+c=; b=hvVuuMgUOKJymFmFWw4s3w9uMp/vzO3l/lE0omzgl4Ojx/T9I3VpNGq3T3ldr03YB+ 4qCbTAS+pvZyynOvccnPAx+77r6NQJJnqJyTLxouafIL9Js+XpTmevFtfKA2Kqq8czwX Odgy4/Id1jHdkOCbQsZJQPKHKA3iXYD0njdYPDeJ2mRRzHj3PfiOyl1ba5nZYmaI/J2Q 8AQLhB6iDmboOk48wh0Nwv3iVI/a2N6LTktjkj+dEDMiw8+xyly8pEuMVI+XAxXW6fqW aSynBMafHoKlUt1Lg6nkRBQAJNw/WnfpyAixHNM/sOObd+A7j9mMjXmVxF5U96TcL0u+ TBmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qGd+9IJJ5Weaf7KglzJs2ZUfg6C8Sx2XwcYZFGhuu+c=; b=rwTr+4kt+iG1wQupAyJZrcr8xunnBgDG4xJF6K5mvZN2YHwILsukYdZdxEOXOug921 YfmeRlqaOSnVoNqw3EmPX0m7ENVxxQj+l4lNC2J68OrHXC4dtGMjRgFEBIzW7u4/l7dD L76KCJYzmIdNEumqtqNhAgE5IV7MorXymwUr/0vuoYrLuYWzWeR7Tvxp4kPO8se3X6ds zPBCdR18vhz+Wcd+7WB7AvD3qIMCsmeEmHJRXmWX0/jRe+b1ZNKpbdopOYmAFMdGtewc I1K3+YOFLIjyksZYqsjW+lqVgrWyUpYUyqwTbIG9kJBlUoF5pAluTfrvhmJktXuUzvlH lVcg== X-Gm-Message-State: AOAM532TYg/cukYtZx5vd6F16Nm9FJiYcTp15rhH2ZLx8tbaftM5SPgQ ztLr3/KkyYwpyTiZSF6FHu3Ga+U1kV071A8os1Nn2w== X-Google-Smtp-Source: ABdhPJz++mYOiWQ8V0mguG6iyqBRROcc3MExvzX9qdn8Fr4cUO3ttX47KLpQo8JPWuaCpXJm8onmNe0ip5jZykZjl70= X-Received: by 2002:a17:907:628a:: with SMTP id nd10mr632490ejc.326.1622744382064; Thu, 03 Jun 2021 11:19:42 -0700 (PDT) MIME-Version: 1.0 References: <20210601225125.918225-1-sudeep.holla@arm.com> <20210601225125.918225-2-sudeep.holla@arm.com> <20210602073653.x4bon6jbiat2jnqv@bogus> <20210602075326.clypj7qmiv4gebas@bogus> In-Reply-To: <20210602075326.clypj7qmiv4gebas@bogus> From: Etienne Carriere Date: Thu, 3 Jun 2021 20:19:26 +0200 Message-ID: Subject: Re: [PATCH 2/2] firmware: arm_scmi: Add compatibility checks for shmem node To: Sudeep Holla Cc: "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Cristian Marussi , Kevin Hilman , Neil Armstrong , Jerome Brunet , Florian Fainelli , Jim Quinlan X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210603_112044_011313_BD99F9AB X-CRM114-Status: GOOD ( 30.87 ) 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, 2 Jun 2021 at 09:53, Sudeep Holla wrote: > > 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. Yes it was :( > > -- > Regards, > Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel