From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751784AbbBEXBK (ORCPT ); Thu, 5 Feb 2015 18:01:10 -0500 Received: from mail-lb0-f180.google.com ([209.85.217.180]:41131 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750823AbbBEXBH (ORCPT ); Thu, 5 Feb 2015 18:01:07 -0500 MIME-Version: 1.0 In-Reply-To: <54CFE71E.20905@ti.com> References: <1421269101-51105-1-git-send-email-s-anna@ti.com> <1421269101-51105-2-git-send-email-s-anna@ti.com> <20150115135201.GG16217@leverpostej> <20150115135556.GH16217@leverpostej> <20150116101746.GA21809@leverpostej> <54CFE71E.20905@ti.com> Date: Thu, 5 Feb 2015 15:01:06 -0800 Message-ID: Subject: Re: [PATCH v7 1/4] Documentation: dt: add common bindings for hwspinlock From: Bjorn Andersson To: Suman Anna Cc: Ohad Ben-Cohen , Mark Rutland , Rob Herring , Kumar Gala , Josh Cartwright , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Rob Herring Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 2, 2015 at 1:07 PM, Suman Anna wrote: > On 02/01/2015 11:55 AM, Bjorn Andersson wrote: >> On Fri, Jan 30, 2015 at 9:41 PM, Ohad Ben-Cohen wrote: >>> On Sat, Jan 31, 2015 at 1:29 AM, Bjorn Andersson wrote: >>>> In a system where you have two hwlock blocks lckA and lckB, each >>>> consisting of 8 locks and you have dspB that can only access lckB >>> >>> This is a good example - thanks. To be able to cope with such cases we >>> will have to pass a hwlock block reference and its relative lock id. >>> >> >> Correct, so the #hwlock-cells and hwlock part from the proposal are >> the important one. Having an optional hwlock-names will make things >> easier to read as well, but is not necessary. > > Right, if anything, it would be useful only for the clients, but the > hwspinlock core itself would not need it. So, I would forgo adding the > hwlock-names for now. > >> >>> The DT binding should definitely be prepared for such cases (just kill >>> the base-id field?), but let's see what it means about the Linux >>> implementation. >>> >> >> From the dt binding PoV, we should be able to skip num-locks as well. >> It seems most hwlock blocks have a fixed amount of locks provided and >> the drivers are reporting this to the core when registering. > > I added this originally based on the initial MSM HW Mutex block bindings. > It's not entirely correct to have this in DT for the MSM HW, as the hardware has a fixed number of mutexes. As soon as we have the binding sorted out I will follow up with a new revision of the tcsr/sfpb-mutex driver. >> >> So I think we can reduce the binding to: >> >> Providers: >> #hwlock-cells >> >> Consumers: >> hwlocks >> hwlock-names >> >> For the hardware where number of locks is actually variable (e.g. >> different variants of same block) there can be driver specific entries >> for this. > > Right, we should be able to drop this and use the driver match data. As > it is, the field is used during registration of the block with the > hwspinlock core. > If we have certain systems where it actually is a property to be configured then they can have individual properties, extending the standard set. Either way, it's not a dynamic property shared by all hwlock drivers, so it should not be in the common binding. Will you send out a new revision of the binding? I would love to get this integrated so I can move on with the dependents. Regards, Bjorn From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Andersson Subject: Re: [PATCH v7 1/4] Documentation: dt: add common bindings for hwspinlock Date: Thu, 5 Feb 2015 15:01:06 -0800 Message-ID: References: <1421269101-51105-1-git-send-email-s-anna@ti.com> <1421269101-51105-2-git-send-email-s-anna@ti.com> <20150115135201.GG16217@leverpostej> <20150115135556.GH16217@leverpostej> <20150116101746.GA21809@leverpostej> <54CFE71E.20905@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <54CFE71E.20905@ti.com> Sender: linux-kernel-owner@vger.kernel.org To: Suman Anna Cc: Ohad Ben-Cohen , Mark Rutland , Rob Herring , Kumar Gala , Josh Cartwright , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Rob Herring List-Id: devicetree@vger.kernel.org On Mon, Feb 2, 2015 at 1:07 PM, Suman Anna wrote: > On 02/01/2015 11:55 AM, Bjorn Andersson wrote: >> On Fri, Jan 30, 2015 at 9:41 PM, Ohad Ben-Cohen wrote: >>> On Sat, Jan 31, 2015 at 1:29 AM, Bjorn Andersson wrote: >>>> In a system where you have two hwlock blocks lckA and lckB, each >>>> consisting of 8 locks and you have dspB that can only access lckB >>> >>> This is a good example - thanks. To be able to cope with such cases we >>> will have to pass a hwlock block reference and its relative lock id. >>> >> >> Correct, so the #hwlock-cells and hwlock part from the proposal are >> the important one. Having an optional hwlock-names will make things >> easier to read as well, but is not necessary. > > Right, if anything, it would be useful only for the clients, but the > hwspinlock core itself would not need it. So, I would forgo adding the > hwlock-names for now. > >> >>> The DT binding should definitely be prepared for such cases (just kill >>> the base-id field?), but let's see what it means about the Linux >>> implementation. >>> >> >> From the dt binding PoV, we should be able to skip num-locks as well. >> It seems most hwlock blocks have a fixed amount of locks provided and >> the drivers are reporting this to the core when registering. > > I added this originally based on the initial MSM HW Mutex block bindings. > It's not entirely correct to have this in DT for the MSM HW, as the hardware has a fixed number of mutexes. As soon as we have the binding sorted out I will follow up with a new revision of the tcsr/sfpb-mutex driver. >> >> So I think we can reduce the binding to: >> >> Providers: >> #hwlock-cells >> >> Consumers: >> hwlocks >> hwlock-names >> >> For the hardware where number of locks is actually variable (e.g. >> different variants of same block) there can be driver specific entries >> for this. > > Right, we should be able to drop this and use the driver match data. As > it is, the field is used during registration of the block with the > hwspinlock core. > If we have certain systems where it actually is a property to be configured then they can have individual properties, extending the standard set. Either way, it's not a dynamic property shared by all hwlock drivers, so it should not be in the common binding. Will you send out a new revision of the binding? I would love to get this integrated so I can move on with the dependents. Regards, Bjorn From mboxrd@z Thu Jan 1 00:00:00 1970 From: bjorn@kryo.se (Bjorn Andersson) Date: Thu, 5 Feb 2015 15:01:06 -0800 Subject: [PATCH v7 1/4] Documentation: dt: add common bindings for hwspinlock In-Reply-To: <54CFE71E.20905@ti.com> References: <1421269101-51105-1-git-send-email-s-anna@ti.com> <1421269101-51105-2-git-send-email-s-anna@ti.com> <20150115135201.GG16217@leverpostej> <20150115135556.GH16217@leverpostej> <20150116101746.GA21809@leverpostej> <54CFE71E.20905@ti.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Feb 2, 2015 at 1:07 PM, Suman Anna wrote: > On 02/01/2015 11:55 AM, Bjorn Andersson wrote: >> On Fri, Jan 30, 2015 at 9:41 PM, Ohad Ben-Cohen wrote: >>> On Sat, Jan 31, 2015 at 1:29 AM, Bjorn Andersson wrote: >>>> In a system where you have two hwlock blocks lckA and lckB, each >>>> consisting of 8 locks and you have dspB that can only access lckB >>> >>> This is a good example - thanks. To be able to cope with such cases we >>> will have to pass a hwlock block reference and its relative lock id. >>> >> >> Correct, so the #hwlock-cells and hwlock part from the proposal are >> the important one. Having an optional hwlock-names will make things >> easier to read as well, but is not necessary. > > Right, if anything, it would be useful only for the clients, but the > hwspinlock core itself would not need it. So, I would forgo adding the > hwlock-names for now. > >> >>> The DT binding should definitely be prepared for such cases (just kill >>> the base-id field?), but let's see what it means about the Linux >>> implementation. >>> >> >> From the dt binding PoV, we should be able to skip num-locks as well. >> It seems most hwlock blocks have a fixed amount of locks provided and >> the drivers are reporting this to the core when registering. > > I added this originally based on the initial MSM HW Mutex block bindings. > It's not entirely correct to have this in DT for the MSM HW, as the hardware has a fixed number of mutexes. As soon as we have the binding sorted out I will follow up with a new revision of the tcsr/sfpb-mutex driver. >> >> So I think we can reduce the binding to: >> >> Providers: >> #hwlock-cells >> >> Consumers: >> hwlocks >> hwlock-names >> >> For the hardware where number of locks is actually variable (e.g. >> different variants of same block) there can be driver specific entries >> for this. > > Right, we should be able to drop this and use the driver match data. As > it is, the field is used during registration of the block with the > hwspinlock core. > If we have certain systems where it actually is a property to be configured then they can have individual properties, extending the standard set. Either way, it's not a dynamic property shared by all hwlock drivers, so it should not be in the common binding. Will you send out a new revision of the binding? I would love to get this integrated so I can move on with the dependents. Regards, Bjorn