linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: scott.branden@broadcom.com (Scott Branden)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: dts: stingray: use NUM_SATA to configure number of sata ports
Date: Wed, 13 Jun 2018 13:18:35 -0700	[thread overview]
Message-ID: <0bf3c57c-dac8-8ece-6b8a-3b4d024140fc@broadcom.com> (raw)
In-Reply-To: <f20222ea-47ac-ca05-a8d3-69f28932de94@gmail.com>

Hi Rob,

Thanks for comment - reply inline.


On 18-06-13 12:31 PM, Florian Fainelli wrote:
> On 06/12/2018 03:54 PM, Rob Herring wrote:
>> On Thu, Jun 7, 2018 at 12:53 PM, Scott Branden
>> <scott.branden@broadcom.com> wrote:
>>> Hi Rob,
>>>
>>> Could you please kindly comment on change below.
>>>
>>> It allows board variants to be added easily via a simple define for
>>> different number of SATA ports.
>>>
>>>
>>>
>>> On 18-06-04 09:22 AM, Florian Fainelli wrote:
>>>> On 05/18/2018 11:34 AM, Scott Branden wrote:
>>>>> Move remaining sata configuration to stingray-sata.dtsi and enable
>>>>> ports based on NUM_SATA defined.
>>>>> Now, all that needs to be done is define NUM_SATA per board.
>>>> Rob could you review this and let us know if this approach is okay or
>>>> not? Thank you!
>>>>
>>>>> Signed-off-by: Scott Branden <scott.branden@broadcom.com>
>>>>> ---
>>>>> diff --git a/arch/arm64/boot/dts/broadcom/stingray/stingray-sata.dtsi
>>>>> b/arch/arm64/boot/dts/broadcom/stingray/stingray-sata.dtsi
>>>>> index 8c68e0c..7f6d176 100644
>>>>> --- a/arch/arm64/boot/dts/broadcom/stingray/stingray-sata.dtsi
>>>>> +++ b/arch/arm64/boot/dts/broadcom/stingray/stingray-sata.dtsi
>>>>> @@ -43,7 +43,11 @@
>>>>>                          interrupts = <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>;
>>>>>                          #address-cells = <1>;
>>>>>                          #size-cells = <0>;
>>>>> +#if (NUM_SATA > 0)
>>>>> +                       status = "okay";
>>>>> +#else
>>>>>                          status = "disabled";
>>>>> +#endif
>> This only works if ports are contiguously enabled (0-N). You might not
>> care, but it is not a pattern that works in general.
Correct - all board designs that include this dtsi file follow such 
commonality (ie. design with SATA0 first, etc).? By having common board 
designs it allows for commonality in dts files rather than duplicating 
information everywhere.? If somebody designs a bizarro board they are 
free to create their own dts file of course.
>>   And I'm not a fan
>> of C preprocessing in DT files in general beyond just defines for
>> single numbers.
The use of a define to specify the number of SATA ports in the board 
design meets our requirements of being able to maintain many boards.? We 
need a method to specify the number of ports in the board design rather 
than copying and pasting the information in many dts files.? If you have 
an alternative upstreamable mechanism to manage the configuration of 
many boards without copy and paste that would be ideal?
> Should we interpret this as a formal NAK?

  reply	other threads:[~2018-06-13 20:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 18:34 [PATCH] arm64: dts: stingray: use NUM_SATA to configure number of sata ports Scott Branden
2018-06-04 16:22 ` Florian Fainelli
2018-06-07 18:53   ` Scott Branden
2018-06-12 22:54     ` Rob Herring
2018-06-13 19:31       ` Florian Fainelli
2018-06-13 20:18         ` Scott Branden [this message]
2018-06-13 22:06           ` Rob Herring
2018-06-14 18:53             ` Scott Branden
2018-06-14  0:46           ` Florian Fainelli

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=0bf3c57c-dac8-8ece-6b8a-3b4d024140fc@broadcom.com \
    --to=scott.branden@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.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).