All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brown <davidb@codeaurora.org>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Shawn Guo <shawn.guo@freescale.com>,
	Tony Lindgren <tony@atomide.com>,
	John Bonesio <bones@secretlab.ca>,
	devicetree-discuss@lists.ozlabs.org,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] Support multiple MEM tags with atags->fdt conversion
Date: Wed, 15 Jun 2011 13:15:01 -0700	[thread overview]
Message-ID: <8ya8vt2am2i.fsf@huya.qualcomm.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1106151540230.2142@xanadu.home> (Nicolas Pitre's message of "Wed, 15 Jun 2011 15:50:37 -0400 (EDT)")

On Wed, Jun 15 2011, Nicolas Pitre wrote:

> On Tue, 14 Jun 2011, David Brown wrote:
>
>> Some targets have multiple memory regions.  Parse up to 8 of these
>> when converting the atags to fdt.
>> 
>> Signed-off-by: David Brown <davidb@codeaurora.org>
>
> I've added your patch to my zImage patch queue.
>
>> With this change, I am able to boot MSM8x60 combining ATAGS and my DT.
>> It seems to work as long as my device tree has placeholders for all of
>> the properties I need.
>
> I think those missing nodes should simply be created if missing.  I 
> however don't see any function in the libfdt API to do that -- there is 
> fdt_add_subnode() but no fdt_add_node().  Any DT expert please?

It does seem to only work if I already have nodes that are large enough
to hold the properties coming from the ATAG.  For example, I have to
have an array of memory reg values large enough, as well as a command
line large enough to hold the one passed from the bootloader.

If the DTB's command line is smaller than the one from ATAG, it just
silently leaves the DTB one in place.

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

WARNING: multiple messages have this Message-ID (diff)
From: davidb@codeaurora.org (David Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Support multiple MEM tags with atags->fdt conversion
Date: Wed, 15 Jun 2011 13:15:01 -0700	[thread overview]
Message-ID: <8ya8vt2am2i.fsf@huya.qualcomm.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1106151540230.2142@xanadu.home> (Nicolas Pitre's message of "Wed, 15 Jun 2011 15:50:37 -0400 (EDT)")

On Wed, Jun 15 2011, Nicolas Pitre wrote:

> On Tue, 14 Jun 2011, David Brown wrote:
>
>> Some targets have multiple memory regions.  Parse up to 8 of these
>> when converting the atags to fdt.
>> 
>> Signed-off-by: David Brown <davidb@codeaurora.org>
>
> I've added your patch to my zImage patch queue.
>
>> With this change, I am able to boot MSM8x60 combining ATAGS and my DT.
>> It seems to work as long as my device tree has placeholders for all of
>> the properties I need.
>
> I think those missing nodes should simply be created if missing.  I 
> however don't see any function in the libfdt API to do that -- there is 
> fdt_add_subnode() but no fdt_add_node().  Any DT expert please?

It does seem to only work if I already have nodes that are large enough
to hold the properties coming from the ATAG.  For example, I have to
have an array of memory reg values large enough, as well as a command
line large enough to hold the one passed from the bootloader.

If the DTB's command line is smaller than the one from ATAG, it just
silently leaves the DTB one in place.

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  reply	other threads:[~2011-06-15 20:15 UTC|newest]

Thread overview: 146+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-12  6:06 [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage Nicolas Pitre
2011-06-12  6:06 ` Nicolas Pitre
2011-06-12  6:06 ` [PATCH 1/3] ARM: zImage: ensure it is always a multiple of 64 bits in size Nicolas Pitre
2011-06-12  6:06   ` Nicolas Pitre
2011-06-13 10:43   ` Tony Lindgren
2011-06-13 10:43     ` Tony Lindgren
2011-06-13 11:24   ` Russell King - ARM Linux
2011-06-13 11:24     ` Russell King - ARM Linux
2011-06-13 14:06     ` Nicolas Pitre
2011-06-13 14:06       ` Nicolas Pitre
2011-06-12  6:06 ` [PATCH 2/3] ARM: zImage: Allow the appending of a device tree binary Nicolas Pitre
2011-06-12  6:06   ` Nicolas Pitre
2011-06-12 15:01   ` Grant Likely
2011-06-12 15:01     ` Grant Likely
2011-06-13 10:46   ` Tony Lindgren
2011-06-13 10:46     ` Tony Lindgren
2011-06-13 11:26     ` Russell King - ARM Linux
2011-06-13 11:26       ` Russell King - ARM Linux
2011-06-13 14:08       ` Nicolas Pitre
2011-06-13 14:08         ` Nicolas Pitre
2011-06-12  6:06 ` [PATCH 3/3] ARM: zImage: make sure appended DTB doesn't get overwritten by kernel .bss Nicolas Pitre
2011-06-12  6:06   ` Nicolas Pitre
2011-06-13 10:47   ` Tony Lindgren
2011-06-13 10:47     ` Tony Lindgren
2011-06-12  8:15 ` [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage Russell King - ARM Linux
2011-06-12  8:15   ` Russell King - ARM Linux
2011-06-12  8:34   ` Shawn Guo
2011-06-12  8:34     ` Shawn Guo
2011-06-12  9:21     ` Russell King - ARM Linux
2011-06-12  9:21       ` Russell King - ARM Linux
2011-06-12  9:38       ` Shawn Guo
2011-06-12  9:38         ` Shawn Guo
2011-06-12  9:52         ` Russell King - ARM Linux
2011-06-12  9:52           ` Russell King - ARM Linux
2011-06-12 10:42           ` Shawn Guo
2011-06-12 10:42             ` Shawn Guo
2011-06-12 10:40             ` Russell King - ARM Linux
2011-06-12 10:40               ` Russell King - ARM Linux
2011-06-13 20:19               ` Dmitry Eremin-Solenikov
2011-06-13 23:04               ` David Brown
2011-06-13 23:04                 ` David Brown
2011-06-13 23:13                 ` Nicolas Pitre
2011-06-13 23:13                   ` Nicolas Pitre
2011-06-14  7:09                   ` Nicolas Pitre
2011-06-14  7:09                     ` Nicolas Pitre
2011-06-14 11:25                     ` Shawn Guo
2011-06-14 11:25                       ` Shawn Guo
2011-06-14 14:53                     ` Tony Lindgren
2011-06-14 14:53                       ` Tony Lindgren
2011-06-14 17:28                       ` Nicolas Pitre
2011-06-14 17:28                         ` Nicolas Pitre
2011-06-14 20:32                         ` Arnd Bergmann
2011-06-14 20:32                           ` Arnd Bergmann
2011-06-14 21:21                           ` Nicolas Pitre
2011-06-14 21:21                             ` Nicolas Pitre
2011-06-14 21:42                             ` Arnd Bergmann
2011-06-14 21:42                               ` Arnd Bergmann
2011-06-14 22:06                               ` Grant Likely
2011-06-14 22:06                                 ` Grant Likely
2011-06-15  8:08                                 ` Tony Lindgren
2011-06-15  8:08                                   ` Tony Lindgren
2011-06-14 22:32                           ` Rob Herring
2011-06-14 22:32                             ` Rob Herring
2011-06-14 23:50                             ` Nicolas Pitre
2011-06-14 23:50                               ` Nicolas Pitre
2011-06-15  2:09                               ` Rob Herring
2011-06-15  2:09                                 ` Rob Herring
2011-06-15  2:21                                 ` Nicolas Pitre
2011-06-15  2:21                                   ` Nicolas Pitre
2011-06-14 21:38                     ` David Brown
2011-06-14 21:38                       ` David Brown
2011-06-14 23:27                     ` [PATCH] Support multiple MEM tags with atags->fdt conversion David Brown
2011-06-14 23:27                       ` David Brown
2011-06-15 19:50                       ` Nicolas Pitre
2011-06-15 19:50                         ` Nicolas Pitre
2011-06-15 20:15                         ` David Brown [this message]
2011-06-15 20:15                           ` David Brown
2011-06-15 20:20                           ` Nicolas Pitre
2011-06-15 20:20                             ` Nicolas Pitre
2011-06-16  1:43                         ` David Gibson
2011-06-16  1:43                           ` David Gibson
2011-06-20  4:03                           ` Nicolas Pitre
2011-06-20  4:03                             ` Nicolas Pitre
2011-06-20  4:53                             ` David Gibson
2011-06-20  4:53                               ` David Gibson
2011-06-17 20:23                         ` David Brown
2011-06-17 20:23                           ` David Brown
2011-06-12 11:22     ` [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage Petr Štetiar
2011-06-12 11:22       ` Petr Štetiar
2011-06-12 11:58       ` Russell King - ARM Linux
2011-06-12 11:58         ` Russell King - ARM Linux
2011-06-12 14:15         ` Arnd Bergmann
2011-06-12 14:15           ` Arnd Bergmann
2011-06-12 14:34           ` Russell King - ARM Linux
2011-06-12 14:34             ` Russell King - ARM Linux
2011-06-12 15:01             ` Arnd Bergmann
2011-06-12 15:01               ` Arnd Bergmann
2011-06-12 15:35               ` Russell King - ARM Linux
2011-06-12 15:35                 ` Russell King - ARM Linux
2011-06-12 15:45                 ` Nicolas Pitre
2011-06-12 15:45                   ` Nicolas Pitre
2011-06-13 20:24                 ` Dmitry Eremin-Solenikov
2011-06-13 22:05                   ` Russell King - ARM Linux
2011-06-13 23:33                     ` Grant Likely
2011-06-12 14:57           ` Grant Likely
2011-06-12 14:57             ` Grant Likely
2011-06-12 15:19             ` Russell King - ARM Linux
2011-06-12 15:19               ` Russell King - ARM Linux
2011-06-12 15:47               ` Nicolas Pitre
2011-06-12 15:47                 ` Nicolas Pitre
2011-06-12 15:59                 ` Russell King - ARM Linux
2011-06-12 15:59                   ` Russell King - ARM Linux
2011-06-12 18:59                   ` Nicolas Pitre
2011-06-12 18:59                     ` Nicolas Pitre
2011-06-13  9:51                     ` Tony Lindgren
2011-06-13  9:51                       ` Tony Lindgren
2011-06-13 14:14                       ` Nicolas Pitre
2011-06-13 14:14                         ` Nicolas Pitre
2011-06-13 14:20                         ` Russell King - ARM Linux
2011-06-13 14:20                           ` Russell King - ARM Linux
2011-06-13 15:02                           ` Tony Lindgren
2011-06-13 15:02                             ` Tony Lindgren
2011-06-13 15:14                           ` Nicolas Pitre
2011-06-13 15:14                             ` Nicolas Pitre
2011-06-13 15:17                             ` Grant Likely
2011-06-13 15:17                               ` Grant Likely
2011-06-12 19:26                   ` Warner Losh
2011-06-12 19:26                     ` Warner Losh
2011-06-13  9:59                   ` Tony Lindgren
2011-06-13  9:59                     ` Tony Lindgren
2011-06-12 15:41         ` Nicolas Pitre
2011-06-12 15:41           ` Nicolas Pitre
2011-06-14  0:13           ` David Brown
2011-06-14  0:13             ` David Brown
2011-09-06 11:23             ` Linus Walleij
2011-09-06 11:23               ` Linus Walleij
2011-06-21  1:40       ` David Gibson
2011-06-21  1:40         ` David Gibson
2011-06-13  4:31 ` Grant Likely
2011-06-13  4:31   ` Grant Likely
2011-06-13 20:44   ` Nicolas Pitre
2011-06-13 20:44     ` Nicolas Pitre
2011-09-05 15:43     ` Tony Lindgren
2011-09-05 15:43       ` Tony Lindgren
2011-09-05 19:32       ` Nicolas Pitre
2011-09-05 19:32         ` Nicolas Pitre

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=8ya8vt2am2i.fsf@huya.qualcomm.com \
    --to=davidb@codeaurora.org \
    --cc=bones@secretlab.ca \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nicolas.pitre@linaro.org \
    --cc=shawn.guo@freescale.com \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.