From: zhangfei <zhangfei.gao@linaro.org>
To: Hans de Goede <hdegoede@redhat.com>, Mark Rutland <mark.rutland@arm.com>
Cc: "tj@kernel.org" <tj@kernel.org>, "arnd@arndb.de" <arnd@arndb.de>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH RFC 1/2] libahci_platform: add ahci_platform_get_of_property
Date: Fri, 20 Jun 2014 13:56:54 +0800 [thread overview]
Message-ID: <53A3CD26.3070001@linaro.org> (raw)
In-Reply-To: <53A293CB.3040704@redhat.com>
On 06/19/2014 03:39 PM, Hans de Goede wrote:
> Hi,
>
> On 06/19/2014 04:22 AM, zhangfei wrote:
>> Hi Mark,
>>
>> On 06/18/2014 10:03 PM, Mark Rutland wrote:
>>> On Wed, Jun 18, 2014 at 05:54:08AM +0100, Zhangfei Gao wrote:
>>>> Instead of setting hflags in different files,
>>>> ahci_platform_get_of_property set hpriv->flags when ahci_platform_init_host
>>>> according to property in dts.
>>>
>>> The AHCI_HFLAGS are a Linux implementation detail, so it would be nice
>>> to have a good justification for each of these being turned into DT
>>> properties.
>>
>> Do you mean only add required property now?
>
> No you should not add any properties at all using properties to set SoC specific quirks
> is just wrong, if a device is not 100% ahci compatible you should use a SoC specific
> compatible string for it, and set quirks in the kernel driver based on that.
>
> Devicetree is supposed to describe hardware, in this case the quirks are a property
> of the specific model of the hardware, so this should be expressed through the
> compatible string. Extra properties in devicetree are meant to be used for board
> specific things, like having a gpio to enable power to the sata target device.
> Extra properties should not be used in the way you are proposing to use them now.
>
OK, got it.
What I thoutht is using ahci_platform_get_of_property could make
ahci_platform.c more shareable, adding the chance of removing specific
compatible.
Just refer mmc_of_parse and sdhci_get_of_property, they are parsing
property directly from dts.
Anyway, it is fine, here is not so many cases like mmc.
Thanks
next prev parent reply other threads:[~2014-06-20 5:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <xuwei5@hisilicon.com, kefeng.wang@linaro.org,>
2014-06-18 4:54 ` [PATCH 0/2] add ahci_platform_get_of_property Zhangfei Gao
2014-06-18 4:54 ` [PATCH RFC 1/2] libahci_platform: " Zhangfei Gao
2014-06-18 7:37 ` Lothar Waßmann
2014-06-19 2:23 ` zhangfei
2014-06-18 14:03 ` Mark Rutland
2014-06-19 2:22 ` zhangfei
2014-06-19 7:39 ` Hans de Goede
2014-06-20 5:56 ` zhangfei [this message]
2014-06-20 7:38 ` Hans de Goede
2014-06-18 4:54 ` [PATCH RFC 2/2] ahci: remove AHCI_HFLAG_NO_FBS setting Zhangfei Gao
2014-06-18 7:15 ` Zhangfei Gao
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=53A3CD26.3070001@linaro.org \
--to=zhangfei.gao@linaro.org \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=hdegoede@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=tj@kernel.org \
/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).