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=-7.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable 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 AA841C48BD6 for ; Thu, 27 Jun 2019 09:09:18 +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 7E0E72083B for ; Thu, 27 Jun 2019 09:09:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tXruyIpw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E0E72083B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=kFTvtsaQz7qjX9BRzNC5TYWaaP+k36pldeD113vQ6QQ=; b=tXruyIpwR8CEeZ RKQK6zZ59rSYpIYKCCwKvNibdhdy2HxexP0n8NYF+c9NuprFbN9yeEoztjWo2bqiWJ/PsyWlOTTeF OI/l5gBnaeeWCIKJYhkK3uP+TT+gNurLO+QQ9+3/KwXh7zbMJjmmN63suj5LaDb1LtbyJlieNyGzX L3eFjZOtnU9eupo0hB+jRGd3YmovFws3JTJRnfUjGYi2BNCYRkD64xHlwFwoknX5OJxCz9nPc6h0i N2pTNw0iTtrdgokQWlZnRPrmNOyGpmGa1lhcebgbJYmS2s8Tp3SW4x7Gkk2bZCnjTNTtGK1hKuIq1 xXEB4orc4DDsDs+LyPDw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hgQP3-0002ra-J5; Thu, 27 Jun 2019 09:09:13 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hgQOy-0002qz-Iy for linux-arm-kernel@lists.infradead.org; Thu, 27 Jun 2019 09:09:10 +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 E0B772B; Thu, 27 Jun 2019 02:09:07 -0700 (PDT) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 06B373F718; Thu, 27 Jun 2019 02:09:05 -0700 (PDT) Date: Thu, 27 Jun 2019 10:09:03 +0100 From: Sudeep Holla To: Jassi Brar Subject: Re: [PATCH V2 2/2] mailbox: introduce ARM SMC based mailbox Message-ID: <20190627090903.GD13572@e107155-lin> References: <20190603083005.4304-1-peng.fan@nxp.com> <20190603083005.4304-3-peng.fan@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190627_020908_720395_60214B70 X-CRM114-Status: GOOD ( 24.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Devicetree List , Peng Fan , Florian Fainelli , "festevam@gmail.com" , Sudeep Holla , Linux Kernel Mailing List , Rob Herring , dl-linux-imx , ", Sascha Hauer" , Andre Przywara , "van.freenix@gmail.com" , Shawn Guo , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 26, 2019 at 01:27:41PM -0500, Jassi Brar wrote: > On Wed, Jun 26, 2019 at 11:44 AM Florian Fainelli wrote: > > > > On 6/26/19 6:31 AM, Peng Fan wrote: > > >>> The firmware driver might not have func-id, such as SCMI/SCPI. > > >>> So add an optional func-id to let smc mailbox driver could > > >>> use smc SiP func id. > > >>> > > >> There is no end to conforming to protocols. Controller drivers should > > >> be written having no particular client in mind. > > > > > > If the func-id needs be passed from user, then the chan_id suggested > > > by Sudeep should also be passed from user, not in mailbox driver. > > > > > > Jassi, so from your point, arm_smc_send_data just send a0 - a6 > > > to firmware, right? > > > > > > Sudeep, Andre, Florian, > > > > > > What's your suggestion? SCMI not support, do you have > > > plan to add smc transport in SCMI? > > > > On the platforms that I work with, we have taken the liberty of > > implementing SCMI in our monitor firmware because the other MCU we use > > for dynamic voltage and frequency scaling did not have enough memory to > > support that and we still had the ability to make that firmware be > > trusted enough we could give it power management responsibilities. I > > would certainly feel more comfortable if the SCMI specification was > > amended to indicate that the Agent could be such a software entity, > > still residing on the same host CPU as the Platform(s), but if not, > > that's fine. > > > > This has lead us to implement a mailbox driver that uses a proprietary > > SMC call for the P2A path ("tx" channel) and the return being done via > > either that same SMC or through SGI. You can take a look at it in our > > downstream tree here actually: > > > > https://github.com/Broadcom/stblinux-4.9/blob/master/linux/drivers/mailbox/brcmstb-mailbox.c > > > > If we can get rid of our own driver and uses a standard SMC based > > mailbox driver that supports our use case that involves interrupts (we > > can always change their kind without our firmware/boot loader since FDT > > is generated from that component), that would be great. > > > static irqreturn_t brcm_isr(void) > { > mbox_chan_received_data(&chans[0], NULL); > return IRQ_HANDLED; > } > > Sorry, I fail to understand why the irq can't be moved inside the > client driver itself? There can't be more cost to it and there > definitely is no functionality lost. What if there are multiple clients ? And I assume you are referring to case like this where IRQ is not tied to the mailbox IP. -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel