From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754904AbdKASPn (ORCPT ); Wed, 1 Nov 2017 14:15:43 -0400 Received: from foss.arm.com ([217.140.101.70]:50400 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754570AbdKASPm (ORCPT ); Wed, 1 Nov 2017 14:15:42 -0400 Cc: Sudeep Holla , Linux Kernel Mailing List , "linux-arm-kernel@lists.infradead.org" , Arnd Bergmann , Bjorn Andersson Subject: Re: [PATCH] mailbox: add support for doorbell/signal mode controllers To: Jassi Brar References: <1509553964-4451-1-git-send-email-sudeep.holla@arm.com> From: Sudeep Holla Organization: ARM Message-ID: <59a05fcb-ff30-0683-144e-93521a7413f9@arm.com> Date: Wed, 1 Nov 2017 18:15:39 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/11/17 18:03, Jassi Brar wrote: > On Wed, Nov 1, 2017 at 10:02 PM, Sudeep Holla wrote: > >> >> Such controllers don't need to transmit any data, they just transmit >> the signal. In such controllers the data pointer passed to >> mbox_send_message is passed to client via it's tx_prepare callback. >> Controller doesn't need any data to be passed from the client. >> > Some controllers need a non-zero value written to a register in order > to trigger the signal. You are right, just right non-zero or whatever controller value to trigger the interrupt to remote. > That register is visible to the remote. While the data/packet is setup > during tx_prepare() callback. Agreed. > You are overlooking this class of doorbell controllers. > Not sure what do you mean by that ? >> >> This is rough idea I have on extending mailbox interface to support >> the doorbell requirements. >> > What doorbell requirements does the api not support? > QComm's APCS IPC is what you call a "doorbell" controller and is > already supported by the API. It could run SCMI even easier than MHU > (your controller). > Again agreed. But see below for reason to create this API. >> The new API send_signal will eliminate the >> issue Jassi has explained in earlier discussion with respect to generic >> message format using Rockchip example. >> > Sorry I don't see how. > Please explain how can send_signal() api be used by, say, rockchip to > support SCMI? > 80 writel_relaxed(msg->cmd, mb->mbox_base + MAILBOX_A2B_CMD(chans->idx)); 81 writel_relaxed(msg->rx_size, mb->mbox_base + 82 MAILBOX_A2B_DAT(chans->idx)); 83 will be replaced with writel(whatever_value_to trigger_signal, MAILBOX_A2B_CMD(chans->idx)); in its send_signal function. > I am not convinced we should clone an api just so that a client driver > becomes simpler. Esp when it shifts, and not avoid, the additional > code (to support the client) onto the provider side. > It doesn't tie the data format with particular mailbox controller. send_data has void *data and the interpretation is controller specific. send_signal on the other handle can implemented by the controllers which knows how and can trigger the specific signal to the remote. -- Regards, Sudeep