linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Arnd Bergmann <arnd@arndb.de>, Michal Simek <michal.simek@xilinx.com>
Cc: "Anurag Kumar Vulisha" <anuragku@xilinx.com>,
	"Rob Herring" <robh@kernel.org>,
	"Sören Brinkmann" <soren.brinkmann@xilinx.com>,
	"pawel.moll@arm.com" <pawel.moll@arm.com>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"ijc+devicetree@hellion.org.uk" <ijc+devicetree@hellion.org.uk>,
	"galak@codeaurora.org" <galak@codeaurora.org>,
	"tj@kernel.org" <tj@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	"Anirudha Sarangi" <anirudh@xilinx.com>,
	"Srikanth Vemula" <svemula@xilinx.com>,
	"Punnaiah Choudary Kalluri" <punnaia@xilinx.com>
Subject: Re: [RFC PATCH] drivers: ata: Read Rx water mark value from device-tree
Date: Wed, 2 Mar 2016 10:27:51 +0100	[thread overview]
Message-ID: <56D6B217.2000701@xilinx.com> (raw)
In-Reply-To: <3012728.7zDNPtQ7kR@wuerfel>

On 2.3.2016 10:11, Arnd Bergmann wrote:
> On Wednesday 02 March 2016 09:05:49 Michal Simek wrote:
>> On 2.3.2016 06:53, Anurag Kumar Vulisha wrote:
>>>>>>>
>>>>>>> I would probably make this dependent on the compatible string
>>>>>>> instead, and have a table in the device driver that uses a
>>>>>>> specific value for each variant of the device, but either way should be
>>>> fine.
>>>>>>>
>>>>>>> Having a separate property is most appropriate if for each
>>>>>>> hardware revision there is exactly one ideal value, while a table
>>>>>>> in the driver makes more sense if this takes a bit of tuning and
>>>>>>> the driver might choose to optimize it differently based on other
>>>>>>> constraints, such as its own interrupt handler implementation.
>>
>> that 0x40 is value choose based on testing that it is not causing any
>> visible problem and this is used as default value in the driver
>> (PTC_RX_WM_VAL - ahci_ceva.c)
>>
>> Values which you can setup are in range 0x0 - 0x7f (7bits). It means
>> hardware fifo size is probably 0x80.
>>
>> And this dt/module parameter is IMHO just sw setting setup by user.
>> It means I am not quite sure that this is DT parameter because it is
>> just SW setting.
>> I expect this range will be valid for all silicon revisions.
>> If happen that any silicon revision can't setup certain level because of
>> HW bug we can handle it via DT parameter or specific compatible string.
>> But setting up watermark SW level via DT doesn't look correct to me.
>>
>> Please let me know what you think.
> 
> Ok, thanks for the background. I think we should just leave it to be
> set by the driver then. Please make sure that each SoC specific .dtsi
> file has a unique "compatible" string for the device though, so that
> the driver can later override it based on the specific variant if
> that ends up being necessary for performance or bug-avoidance.

No problem with default value in driver. Something has to be setup.
Reset value based on reg spec I was checking is 0x20. Based on our
testing we saw some issues that's why 0x40 was setup as default value.
There is a need to be able to configure this value for example for
testing different values that's why I think module parameter should be
the right way to go.

If this should be DT parameters there should be different ceva IP which
allows different fifo size and different watermark level to be setup by
user.

What do you think? Does it sound reasonable.

Thanks,
Michal

  reply	other threads:[~2016-03-02  9:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-20 13:18 [RFC PATCH] drivers: ata: Read Rx water mark value from device-tree Anurag Kumar Vulisha
2016-02-20 22:34 ` Arnd Bergmann
2016-02-22 10:53   ` Anurag Kumar Vulisha
2016-02-22 15:19     ` Arnd Bergmann
2016-02-23  5:58       ` Anurag Kumar Vulisha
2016-02-23 10:20         ` Arnd Bergmann
2016-02-23 15:29           ` Anurag Kumar Vulisha
2016-02-23 19:29             ` Rob Herring
2016-02-26 13:48               ` Anurag Kumar Vulisha
2016-03-02  5:53               ` Anurag Kumar Vulisha
2016-03-02  8:05                 ` Michal Simek
2016-03-02  9:11                   ` Arnd Bergmann
2016-03-02  9:27                     ` Michal Simek [this message]
2016-03-02 11:42                       ` Arnd Bergmann
2016-03-02 11:51                         ` Michal Simek

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=56D6B217.2000701@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=anirudh@xilinx.com \
    --cc=anuragku@xilinx.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=punnaia@xilinx.com \
    --cc=robh@kernel.org \
    --cc=soren.brinkmann@xilinx.com \
    --cc=svemula@xilinx.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).