Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4995362ybl; Mon, 9 Dec 2019 21:36:50 -0800 (PST) X-Google-Smtp-Source: APXvYqyiG8UB3r5yyK8iQfB83XNguvifb2CxuUn+upeYQ7tiZFGYg2EIcO079W1LCdZKJA19Amz/ X-Received: by 2002:a54:4086:: with SMTP id i6mr2573602oii.65.1575956210014; Mon, 09 Dec 2019 21:36:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575956210; cv=none; d=google.com; s=arc-20160816; b=MZc3S68sAY0gDGIl4v1cNqgVcdWfcDXYai54aotabae/zglcVC+e19ccs7N3cAxqXx 3KqPD7z2WgEQhESOOFVx1n/WHit6424B5kzeKXFrEPvIwNs7Q3FCB7lHv+My090zzgiH x6BhikJUvJQ362ecplBSEo01S7GpR1FAkOXT280+oZ1g4V0XItbslEK4gJdtDOsVf2hm rbRkUiCwJ6/oO+6GFh5ucAzeop5AfQRQ5EVbesD/xos0Mwzdr1CA74gOeJ7ME7ef/ci3 ZX9bGjzTJvAINZn/Fts+rfUBclZNEWdWRJ8STo5Zcxdzq4kzdriF7XsP8v4kyN2vWrIp BBoA== 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:dkim-signature; bh=AzsFieC11fwzabgMCPx3URH9lCYXYANqoMZZrtmqKd4=; b=fT9MAhzifG6rl4MrHEC8g3tplKlyjRYqitohZgvLDDYOYrt2WVNmkT8phyq6OddheV eVocNhU2DwdRHmX+aFEYxC19YfhwWMewjwFMQgVshCPQYKAD2O584V2Q3M3Qhp6YWXtt W/NuRX4cab0mnPGsM/ch+QvOSg91q87fkEC2drRhMGg35hpxt7XOUT10XPtca69ub8jX ZC3WZxMjaMnC8XlkNTjySoyqTKp4sXNHWRVSzjdmhZ9yTK8dElQJn6tIcOcD7owEiMJE Xqxeul/mymOdjitHiV3synw2jG6VbQtnrt42IHYqK/UQ1xZBCYWX7oIQ05AY1E44AOMe VpRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L1WO7mxj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f7si1199485oti.167.2019.12.09.21.36.37; Mon, 09 Dec 2019 21:36:49 -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; dkim=pass header.i=@linaro.org header.s=google header.b=L1WO7mxj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726916AbfLJFew (ORCPT + 99 others); Tue, 10 Dec 2019 00:34:52 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39669 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725857AbfLJFew (ORCPT ); Tue, 10 Dec 2019 00:34:52 -0500 Received: by mail-pl1-f193.google.com with SMTP id o9so6813769plk.6 for ; Mon, 09 Dec 2019 21:34:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AzsFieC11fwzabgMCPx3URH9lCYXYANqoMZZrtmqKd4=; b=L1WO7mxjzK/1efDe2pAT51plCIrpplQlmPc9fY3UGwPV0+TH9blV6G33+mD8zglKW3 rkcbOyGgtLxlkk9Akv+WgrJBQEtcDaX1pl2SD/p3kT7wsE3bEDNv39n0aopK1MVX6qSH X8EHOAOa4/nJWGU295R15Fs6gDthazw88muc2WC6EqX0Q9QrGUXJDJY35HPz7YJ9sE4J /4UTcXRkCAaBbXn9JNWbrQqIZrCBF3jXXZt0oVf1fhw0v3ArsxzfLVUiUPpgZLcsjOuK MO6UQ/WDFKGYQZ59h3mRcx72WAbgXhN9hDhki6zlNGy7wZFi0cQDj6Q/c21honCae8gT y0dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AzsFieC11fwzabgMCPx3URH9lCYXYANqoMZZrtmqKd4=; b=nCIVhxUqV7G0+n3vAwQ7eeTpP8yIF3+QgwlH71cpS9idPPwKWfpf7mlvRDxwdRh29u gY6dM3POE+qtgKkvSkaOOIYkn3tNLeFCP+MSdlrvAIYT80mzvVqTotm1uot3Y1QWjIDY v78EMjtxmnvVezY5uq9g6V6r+WdLcjUm4fqTs8AiVeLUtSmuIlH3QL9krL2d6UZ2BdD/ 7U65+FMmyUXSwKndvnSp44NgM7cvB9VJJxWCbEiNKQAabXzBGKpXRQ1Mb5qSdZ45Ilto Nnhp96ZoP6dHf3y5k0God1MmgPsJIfWNZYW8AistCCEg7hAFuQ8NJjJ7g1gTtgsyKeZh zHtw== X-Gm-Message-State: APjAAAU1a4CrFivD479qqYL4gVHwdyiJnKlf7Bq7cagcY273JCAiN1n9 Ci0CI83kDnQ7pFaRufy2tkm5wRUbGRk= X-Received: by 2002:a17:90a:1b6b:: with SMTP id q98mr3499127pjq.106.1575956091524; Mon, 09 Dec 2019 21:34:51 -0800 (PST) Received: from localhost ([122.171.112.123]) by smtp.gmail.com with ESMTPSA id y62sm1428047pfg.45.2019.12.09.21.34.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Dec 2019 21:34:50 -0800 (PST) Date: Tue, 10 Dec 2019 11:04:48 +0530 From: Viresh Kumar To: Cristian Marussi Cc: Sudeep Holla , Vincent Guittot , Arnd Bergmann , Jassi Brar , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] firmware: arm_scmi: Make scmi core independent of transport type Message-ID: <20191210053448.ugjzbp2puzvnm37f@vireshk-i7> References: <5c545c2866ba075ddb44907940a1dae1d823b8a1.1575019719.git.viresh.kumar@linaro.org> <71417ba8-b844-ac96-bcad-4bf48fa8b869@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <71417ba8-b844-ac96-bcad-4bf48fa8b869@arm.com> User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09-12-19, 18:13, Cristian Marussi wrote: > On 29/11/2019 09:31, Viresh Kumar wrote: > > /** > > * struct scmi_info - Structure representing a SCMI instance > > * > > @@ -128,6 +109,7 @@ struct scmi_chan_info { > > struct scmi_info { > > struct device *dev; > > const struct scmi_desc *desc; > > + struct scmi_transport_ops *transport_ops; > > struct scmi_revision_info version; > > struct scmi_handle handle; > > struct scmi_xfers_info tx_minfo; > > @@ -138,7 +120,6 @@ struct scmi_info { > > int users; > > }; > > > > Could we add also the related @transport_ops in the above comment block ? Ah, I missed that. > > desc = of_device_get_match_data(dev); > > if (!desc) > > return -EINVAL; > > This scmi_desc struct descriptor is retrieved from of_match_table .data and points to > the driver-provided scmi_generic_desc > > static const struct scmi_desc scmi_generic_desc = { > .max_rx_timeout_ms = 30, /* We may increase this if required */ > .max_msg = 20, /* Limited by MBOX_TX_QUEUE_LEN */ > .max_msg_size = 128, > }; > > Is not this kind of information possibly (maybe partially) related to the selected > transport, and as such it should be also provided dynamically by the chosen transport > layer at probe time, like the transport_ops, instead of being hard-coded in > this driver ? I had my doubts about this thing and I missed checking it out. @Sudeep: Is this information completely mailbox specific ? Should I move it to mailbox.c here ? -- viresh