From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754906AbdKBMh0 (ORCPT ); Thu, 2 Nov 2017 08:37:26 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:59464 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750971AbdKBMhY (ORCPT ); Thu, 2 Nov 2017 08:37:24 -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> <59a05fcb-ff30-0683-144e-93521a7413f9@arm.com> <4268c9d9-dc1e-0bd7-3fac-790c2d42b54b@arm.com> <5af1c28f-50db-9f5a-2c60-71cacab4a3ab@arm.com> From: Sudeep Holla Organization: ARM Message-ID: <0a08fa09-864c-00e0-34f3-9c6f6b8fc036@arm.com> Date: Thu, 2 Nov 2017 12:37:22 +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 02/11/17 12:21, Jassi Brar wrote: > On Thu, Nov 2, 2017 at 5:19 PM, Sudeep Holla wrote: >> On 02/11/17 11:26, Jassi Brar wrote: > >>>>> 1) Where does the "whatever_value_to_trigger_signal" come from? >>>> >>>> Controller specific. >>>> >>>>> That has to come from client. >>>> >>>> No. >>>> >>> Again, let me know what does the controller expect 'val' to be >>> >>> writel(val, MAILBOX_A2B_CMD(chans->idx)) >>> >> >> It depends on the controller. Whatever value that can generate a signal >> to remote. >> > As you _know_, the controller expects any non-zero value. Now what > value would you write in there? > I just said its *non-zero value* to give example. What action needs to be done to trigger the doorbell is *entirely* controller specific and typically it's a bit in the register. >> >> 1. pcc_send_data (drivers/mailbox/pcc.c) >> 2. sti_mbox_send_data (drivers/mailbox/mailbox-sti.c) >> 3. qcom_apcs_ipc_send_data (drivers/mailbox/qcom-apcs-ipc-mailbox.c) >> 4. tegra_hsp_doorbell_send_data (drivers/mailbox/tegra-hsp.c) >> >> And SCMI fits the above case. >> > These are only 4 out of 14. Can we overlook that your implementation > rules out 70% controllers. > I am *not* saying we will break other 10 controllers. All I am says there are 4 controllers that can make use of this new feature. 4 is good number IMO to generalize something. > BTW these 4 don't even need any send_signal() api, they would remain > unchanged. What's the new api for? > Sure, it's working fine doesn't mean it can't be used at all. That's not a right argument TBH. -- Regards, Sudeep From mboxrd@z Thu Jan 1 00:00:00 1970 From: sudeep.holla@arm.com (Sudeep Holla) Date: Thu, 2 Nov 2017 12:37:22 +0000 Subject: [PATCH] mailbox: add support for doorbell/signal mode controllers In-Reply-To: References: <1509553964-4451-1-git-send-email-sudeep.holla@arm.com> <59a05fcb-ff30-0683-144e-93521a7413f9@arm.com> <4268c9d9-dc1e-0bd7-3fac-790c2d42b54b@arm.com> <5af1c28f-50db-9f5a-2c60-71cacab4a3ab@arm.com> Message-ID: <0a08fa09-864c-00e0-34f3-9c6f6b8fc036@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 02/11/17 12:21, Jassi Brar wrote: > On Thu, Nov 2, 2017 at 5:19 PM, Sudeep Holla wrote: >> On 02/11/17 11:26, Jassi Brar wrote: > >>>>> 1) Where does the "whatever_value_to_trigger_signal" come from? >>>> >>>> Controller specific. >>>> >>>>> That has to come from client. >>>> >>>> No. >>>> >>> Again, let me know what does the controller expect 'val' to be >>> >>> writel(val, MAILBOX_A2B_CMD(chans->idx)) >>> >> >> It depends on the controller. Whatever value that can generate a signal >> to remote. >> > As you _know_, the controller expects any non-zero value. Now what > value would you write in there? > I just said its *non-zero value* to give example. What action needs to be done to trigger the doorbell is *entirely* controller specific and typically it's a bit in the register. >> >> 1. pcc_send_data (drivers/mailbox/pcc.c) >> 2. sti_mbox_send_data (drivers/mailbox/mailbox-sti.c) >> 3. qcom_apcs_ipc_send_data (drivers/mailbox/qcom-apcs-ipc-mailbox.c) >> 4. tegra_hsp_doorbell_send_data (drivers/mailbox/tegra-hsp.c) >> >> And SCMI fits the above case. >> > These are only 4 out of 14. Can we overlook that your implementation > rules out 70% controllers. > I am *not* saying we will break other 10 controllers. All I am says there are 4 controllers that can make use of this new feature. 4 is good number IMO to generalize something. > BTW these 4 don't even need any send_signal() api, they would remain > unchanged. What's the new api for? > Sure, it's working fine doesn't mean it can't be used at all. That's not a right argument TBH. -- Regards, Sudeep