linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: vkale@apm.com (Vinayak Kale)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] arm64: Add initial DTS for APM X-Gene Storm SOC and APM Mustang board
Date: Mon, 22 Apr 2013 18:57:57 +0530	[thread overview]
Message-ID: <CAPrCYkfpU06JOTagNiLgnikNyR61ku+9x5CUgHjkeGFCSS209A@mail.gmail.com> (raw)
In-Reply-To: <20130422125916.GB3791@e106331-lin.cambridge.arm.com>

On Mon, Apr 22, 2013 at 6:29 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> On Mon, Apr 22, 2013 at 01:23:51PM +0100, Vinayak Kale wrote:
>> On Mon, Apr 22, 2013 at 4:44 PM, Mark Rutland <mark.rutland@arm.com> wrote:
>> > Hi,
>> >
>> > I have a couple of minor comments on the dts:
>> >
>> >> diff --git a/arch/arm64/boot/dts/storm.dtsi b/arch/arm64/boot/dts/storm.dtsi
>> >> new file mode 100644
>> >> index 0000000..8cab5d1
>> >> --- /dev/null
>> >> +++ b/arch/arm64/boot/dts/storm.dtsi
>> >> @@ -0,0 +1,116 @@
>> >> +/*
>> >> + * dts file for AppliedMicro (APM) X-Gene Storm SOC
>> >> + *
>> >> + * Copyright (C) 2013, Applied Micro Circuits Corporation
>> >> + *
>> >> + * This program is free software; you can redistribute it and/or
>> >> + * modify it under the terms of the GNU General Public License as
>> >> + * published by the Free Software Foundation; either version 2 of
>> >> + * the License, or (at your option) any later version.
>> >> + */
>> >> +
>> >> +/ {
>> >> +     compatible = "apm,xgene,storm", "apm,xgene";
>> >> +     interrupt-parent = <&gic>;
>> >> +     #address-cells = <2>;
>> >> +     #size-cells = <2>;
>> >> +
>> >> +     cpus {
>> >> +             #address-cells = <1>;
>> >
>> > The reg is 64-bit, so address-cells should be 2.
>> >
>> Please see my comment below regarding 'reg' property & cpu node naming.
>> >> +             #size-cells = <0>;
>> >> +
>> >> +             cpu at 0 {
>> >> +                     device_type = "cpu";
>> >> +                     compatible = "arm,armv8";
>> >
>> > It might be good to also have a compatible string for the X-Gene's CPU
>> > implementation, e.g.
>> >
>> > compatible = "apm,xgene-cpu", "arm,armv8";
>> >
>> Okay, will add a compatible string for APM-Xgene.
>> >> +                     reg = <0x0 0x0000>;
>> >> +                     enable-method = "spin-table";
>> >> +                     cpu-release-addr = <0x1 0x0000fff8>;
>> >> +             };
>> >> +             cpu at 1 {
>> >> +                     device_type = "cpu";
>> >> +                     compatible = "arm,armv8";
>> >> +                     reg = <0x0 0x0001>;
>> >> +                     enable-method = "spin-table";
>> >> +                     cpu-release-addr = <0x1 0x0000fff8>;
>> >> +             };
>> >> +             cpu at 2 {
>> >> +                     device_type = "cpu";
>> >> +                     compatible = "arm,armv8";
>> >> +                     reg = <0x0 0x0100>;
>> >> +                     enable-method = "spin-table";
>> >> +                     cpu-release-addr = <0x1 0x0000fff8>;
>> >> +             };
>> >
>> > This should be cpu at 101 to match the reg property (and the following nodes
>> > should be fixed up similarly).
>> >
>> I would like to keep the cpu numbering as is (0 to 7). It helps the
>> boot-loader to iterate over cpu nodes based on logical numbers to do
>> fix-ups. Also here 'reg' property is not holding an address instead it
>> contains value to be compared with mpidr_el1.
>
> We use the address bits in a cpu node's reg property to hold the mpidr_el1
> value. Regardless of the semantics of an address vs CPU id, the address bits in
> the reg property take 2 cells, and hence #address-cells should be 2, as ePAPR
> states:
>
> "The #address-cells property defines the number of <u32> cells used to encode
> the address field in a child node?s reg property."
>
> Regarding the unit-address, ePAPR states:
>
> "The unit-address must match the first address specified in the reg property of
> the node."
>
> We've tried to stick to this so far.
>
Okay, will modify accordingly.
> Thanks,
> Mark.

Thanks
-Vinayak

  reply	other threads:[~2013-04-22 13:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-20  7:15 [PATCH 0/4] arm64: Initial patch-set for APM X-Gene SOC family Vinayak Kale
2013-04-20  7:15 ` [PATCH 1/4] arm64: Add Kconfig option " Vinayak Kale
2013-04-20  7:15 ` [PATCH 2/4] arm64: Initial defconfig " Vinayak Kale
2013-04-20  7:35   ` Arnd Bergmann
2013-04-20  9:31     ` Vinayak Kale
2013-04-20 10:27       ` Arnd Bergmann
2013-04-22 17:31     ` Catalin Marinas
2013-04-22 19:25       ` Arnd Bergmann
2013-04-20  7:15 ` [PATCH 3/4] arm64: Add defines for APM ARMv8 implementation Vinayak Kale
2013-04-20  7:15 ` [PATCH 4/4] arm64: Add initial DTS for APM X-Gene Storm SOC and APM Mustang board Vinayak Kale
2013-04-20  7:39   ` Arnd Bergmann
2013-04-20  9:19     ` Vinayak Kale
2013-04-22 11:14   ` Mark Rutland
2013-04-22 12:23     ` Vinayak Kale
2013-04-22 12:59       ` Mark Rutland
2013-04-22 13:27         ` Vinayak Kale [this message]
2013-04-22 20:59   ` Rob Herring
2013-04-23  5:27     ` Vinayak Kale
2013-04-23 18:11   ` Olof Johansson
2013-04-24  6:21     ` Vinayak Kale

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=CAPrCYkfpU06JOTagNiLgnikNyR61ku+9x5CUgHjkeGFCSS209A@mail.gmail.com \
    --to=vkale@apm.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).