devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
To: Kumar Gala <galak@codeaurora.org>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Grant Likely <grant.likely@linaro.org>,
	Suman Anna <s-anna@ti.com>,
	"open list:OPEN FIRMWARE AND..." <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Jeffrey Hugo <jhugo@codeaurora.org>,
	Eric Holmberg <eholmber@codeaurora.org>,
	"Cavin, Courtney" <Courtney.Cavin@sonymobile.com>
Subject: Re: [PATCH v3] hwspinlock: qcom: Add support for Qualcomm HW Mutex block
Date: Wed, 3 Sep 2014 07:55:10 -0700	[thread overview]
Message-ID: <20140903145508.GA16352@sonymobile.com> (raw)
In-Reply-To: <2B6A9AA9-E69F-47DF-A1E7-5C95B4E6FA94@codeaurora.org>

On Wed 03 Sep 05:49 PDT 2014, Kumar Gala wrote:

> 
> On Sep 2, 2014, at 3:04 PM, Bjorn Andersson <Bjorn.Andersson@sonymobile.com> wrote:
> 
> > Changes since v2:
> > - MODULE_DEVICE_TABLE
> > - Changed prefix to qcom
> > - Cleaned up includes
> > - Rely on reg and num-locks to figure out stride, instead of of_match data
> 
> I know Jeff prefers this method of computing stride, but I’m not a fan as
> there isn’t a reason one could adjust qcom,num-locks in the dt for some
> reason and leave regs alone.
> 

All the current platform it's 32 consecutive mutexes with either 4 or 128 byte
stride, so encoding it as data either way works fine. The hardware you're
trying to describe with your dt is the addresses that spans your mutex
registers and how many there are. So from the HW/dts pov I don't see why you
would like to do this.

Then looking in the caf code, there is a limit of max 8 mutexes. So apparently
there is some sort of usecase, I just don't know what or if it's valid from a
dt pov.


Going to that future awesome SoCs where it's still called tcsr-mutex, but with
a stride of 4096 bytes makes me wonder; is that really a consecutive 128kb with
nothing else in-between that we can ioremap?
I.e. can we really reuse this driver straight off for that SoC?

> > diff --git a/Documentation/devicetree/bindings/hwlock/qcom-hwspinlock.txt b/Documentation/devicetree/bindings/hwlock/qcom-hwspinlock.txt
> > +- compatible:
> > +	Usage: required
> > +	Value type: <string>
> > +	Definition: must be one of:
> > +		    "qcom,sfpb-mutex",
> > +		    "qcom,tcsr-mutex”
> 
> I dont get the purpose of having different compatible strings if there is no
> difference in the code between them.
> 

The semantics are the same, but there are no mutex registers in the tcsr block
in e.g 8960, so the name is just missleading. I assume that's why you didn't
follow caf and used the compatible "sfpb" in the first place?

Regards,
Bjorn

  reply	other threads:[~2014-09-03 14:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 20:04 [PATCH v3] hwspinlock: qcom: Add support for Qualcomm HW Mutex block Bjorn Andersson
2014-09-02 23:24 ` Jeffrey Hugo
2014-09-03 12:49 ` Kumar Gala
2014-09-03 14:55   ` Bjorn Andersson [this message]
2014-09-03 15:22     ` Kumar Gala
2014-09-03 16:34       ` Bjorn Andersson
2014-09-08 17:57         ` Jeffrey Hugo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140903145508.GA16352@sonymobile.com \
    --to=bjorn.andersson@sonymobile.com \
    --cc=Courtney.Cavin@sonymobile.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eholmber@codeaurora.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jhugo@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=ohad@wizery.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=s-anna@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).