Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6555894ybl; Wed, 15 Jan 2020 06:36:08 -0800 (PST) X-Google-Smtp-Source: APXvYqxlzOmlI+u8gVPHQKg2BNBM29JM2sYeaesI3qXJl1P7UbGkzqTdlrniavWNMfn3pHy11/Dn X-Received: by 2002:aca:220c:: with SMTP id b12mr19312oic.55.1579098968411; Wed, 15 Jan 2020 06:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579098968; cv=none; d=google.com; s=arc-20160816; b=YqYO44qBhaNQMY25iNAMRIsQmoy1pPGz5lz6Br1QQHTGnNXdBG14gzlbP1yZYQl9SR bFuw9oYKzplZJ9tdxCUuxUdTfJr4CmkdR26IrmcyOwWGobSI1A1uGLZlmJ1HgnQtd5Rd Hdt8i6pb7VZvCzTqzOhKd5rUD4j1Xt6uFxQCAUQ26LEXRaYzwaXMryricy+Hzh5s/K2s lk0pYLXSsPflb8xl4OOVIeP62WQiUKaX2+5IQLIsxgSBF2jb1ia2ARsGBCvoEOSRVk/3 YFvQggcHt8cmPvBtYlZ6y2jqs7+SoaDsqjLoNTMLMQ3IuvWtfn/pQJBzlrSY+ydR+DVg Q+Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fm8SF5kIOOT4leji5FzPvAEOJ/muH9WOR+KfuHB90HM=; b=DaBm8StSTHNUBhkxx1wChVyOYZ1T+05g6l53pUj+vql/hZADT5Ef1X+G73OmDJ9eRX OBsFolu5AktfjXgwei5Rg+rSQ4FQxvRHvkqShem7Gjz1A6fhWO1cJJBN4y3XTCIfak6J PLdzyXr7oSRsfRhJ9p+VvkPO/EhExhTrJgGZdZMG0c3o22U0J411MQtwqxO+AxgkOCJV obMhkku9VoGN91NrYbOWUiZx+6NZDPn1685iO7s/tNv8cQCT8S2wJLv9mlqnb1uDPfoS m40+2TXD8AzoEghS5n5HFYUxCitMCItq/L5eqklgJe8shPhQDQDJcqMf7BcCWataZUcN 3eCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 16si3400630otu.77.2020.01.15.06.35.55; Wed, 15 Jan 2020 06:36:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728982AbgAOOdn (ORCPT + 99 others); Wed, 15 Jan 2020 09:33:43 -0500 Received: from foss.arm.com ([217.140.110.172]:38204 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbgAOOdn (ORCPT ); Wed, 15 Jan 2020 09:33:43 -0500 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 BF44A31B; Wed, 15 Jan 2020 06:33:42 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A16FB3F68E; Wed, 15 Jan 2020 06:33:41 -0800 (PST) Date: Wed, 15 Jan 2020 14:33:25 +0000 From: Sudeep Holla To: Peng Fan Cc: Viresh Kumar , "arnd@arndb.de" , "jassisinghbrar@gmail.com" , "cristian.marussi@arm.com" , "linux-kernel@vger.kernel.org" , Sudeep Holla , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH V2] firmware: arm_scmi: Make scmi core independent of transport type Message-ID: <20200115143325.GA12340@bogus> References: <3f5567ec928e20963d729350e6d674c4acb0c7a0.1578648530.git.viresh.kumar@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 15, 2020 at 08:53:51AM +0000, Peng Fan wrote: > > > Subject: [PATCH V2] firmware: arm_scmi: Make scmi core independent of > > transport type > > > > The SCMI specification is fairly independent of the transport protocol, which > > can be a simple mailbox (already implemented) or anything else. > > The current Linux implementation however is very much dependent of the > > mailbox transport layer. > > > > This patch makes the SCMI core code (driver.c) independent of the mailbox > > transport layer and moves all mailbox related code to a new > > file: mailbox.c. > > > > We can now implement more transport protocols to transport SCMI messages, > > some of the transport protocols getting discussed currently are SMC/HVC, > > SPCI (built on top of SMC/HVC), OPTEE based mailbox (similar to SPCI), and > > vitio based transport as alternative to mailbox. > > > > The transport protocols just need to provide struct scmi_desc, which also > > implements the struct scmi_transport_ops. > > I need put shmem for each protocol, is this expected? No, it's optional. If some/all protocols need dedicated channel for whatever reasons(like DVFS/Perf for polling based transfers), they can specify. Absence of dedicated channel infers all protocols share the channel(s). > Sudeep, > I am able to use smc to directly transport data, > with adding a new file, just named smc.c including a scmi_smc_desc, Good. > But I not find a good way to pass smc id to smc transport file. > IMO, we have to deal this in transport specific init. I am thinking of chan_setup in context of this patch. Does that make sense ? [...] > + > + scmi_clk: protocol@14 { > + reg = <0x14>; > + shmem = <&cpu_scp_lpri>; > + #clock-cells = <1>; > + clocks = <&osc_32k>, <&osc_24m>, <&clk_ext1>, <&clk_ext2>, > + <&clk_ext3>, <&clk_ext4>; > + clock-names = "osc_32k", "osc_24m", "clk_ext1", "clk_ext2", > + "clk_ext3", "clk_ext4"; This caught my attention, why do we need these clocks phandle list and clock names above ? Ideally just need scmi_clk phandle and the index to refer and names need to be provided by the firmware. -- Regards, Sudeep