[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160208153005.GB12536@leverpostej>
Date: Mon, 8 Feb 2016 15:30:06 +0000
From: Mark Rutland <mark.rutland@....com>
To: Joao Pinto <Joao.Pinto@...opsys.com>
Cc: Arnd Bergmann <arnd@...db.de>, santosh.sy@...sung.com,
h.vinayak@...sung.com, julian.calaby@...il.com,
akinobu.mita@...il.com, hch@...radead.org, gbroner@...eaurora.org,
subhashj@...eaurora.org, CARLOS.PALMINHA@...opsys.com,
ijc+devicetree@...lion.org.uk, linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH 3/3] add support for DWC UFS Host Controller
On Mon, Feb 08, 2016 at 03:17:11PM +0000, Joao Pinto wrote:
> Hi Mark and Arnd,
>
> I am planning the v2 of this patch set. I have a doubt in the version
> compatibility strings... The core driver must support the UFS 2.0 controller and
> this patch set includes a patch that adds 2.0 capabilities to it.
Ok. It wasn't clear to me that this series added support for features
specific to 2.0.
> The core driver can get from the controller's version and with that
> use or not a specific 2.0 feature.
It can be detected from the hardware?
> What would be the real added-value of having a compatibility string like
> "snps,ufshcd-1.1" and "snps,ufshcd-2.0" if the driver can perform as 2.0 if it
> detects a 2.0 controller?
Generally having specify strings ensure that it's possible to handle
things in future (e.g. errata workarounds), or if we realise something
isn't as clear-cut as we thought it was (i.e. 2.0 not being a strict
superset of 1.1).
It's difficult to predict when you need that, so we err on the side of
requiring it. At worst it means you have a small redundant few
characters in a DT, but that's a much better proposition than having too
little information.
> Are you saying that a user that puts "snps,ufshcd-1.1"
> in the DT compatibility string disables the UFS 2.0 in the core driver despite
> the controller is 2.0? Please clarify.
If you can consistently and safely detect that the HW is 2.0, using 2.0
functionality is fine.
Regardless, you should have a -1.1 compatible string for the 1.1 HW, and
a -2.0 string for the 2.0 HW, so that DTs are explicit about what the
hardware is. If 2.0 is intended to be a superset of 1.1, you can have a
1.1 fallback entry for the 2.0 hardware.
Thanks,
Mark.
Powered by blists - more mailing lists