devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Anton Staaf <robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH v4 3/3] dtc: Add support for variable sized elements
Date: Wed, 12 Oct 2011 01:44:13 +1100	[thread overview]
Message-ID: <20111011144413.GJ4849@truffala.fritz.box> (raw)
In-Reply-To: <1317147098-11550-4-git-send-email-robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>

On Tue, Sep 27, 2011 at 11:11:38AM -0700, Anton Staaf wrote:
> Elements of size 8, 16, 32, and 64 bits are supported.  The new
> /bits/ syntax was selected so as to not pollute the reserved
> keyword space with uint8/uint16/... type names.
> 
> With this patch the following property assignment:
> 
>     property = /bits/ 16 <0x1234 0x5678 0x0 0xffff>;
> 
> is equivalent to:
> 
>     property = <0x12345678 0x0000ffff>;
> 
> It is now also possible to directly specify a 64 bit literal in a
> cell list, also known as an array using:
> 
>     property = /bits/ 64 <0xdeadbeef00000000>;
> 
> It is an error to attempt to store a literal into an element that is
> too small to hold the literal, and the compiler will generate an
> error when it detects this.  For instance:
> 
>     property = /bits/ 8 <256>;
> 
> Will fail to compile.  It is also an error to attempt to place a
> reference in a non 32-bit element.
> 
> The documentation has been changed to reflect that the cell list
> is now an array of elements that can be of sizes other than the
> default 32-bit cell size.
> 
> The sized_cells test tests the creation and access of 8, 16, 32,
> and 64-bit sized elements.  It also tests that the creation of two
> properties, one with 16 bit elements and one with 32 bit elements
> result in the same property contents.
> 
> Signed-off-by: Anton Staaf <robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>

What the hell, I think I've convinced myself that /bits/ is good
enough.

Acked-by: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  parent reply	other threads:[~2011-10-11 14:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 18:11 [PATCH v4 0/3] Variable sized array element support Anton Staaf
     [not found] ` <1317147098-11550-1-git-send-email-robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2011-09-27 18:11   ` [PATCH v4 1/3] libfdt: Add fdt16_to_cpu utility function Anton Staaf
     [not found]     ` <1317147098-11550-2-git-send-email-robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2011-10-11 14:43       ` David Gibson
2011-09-27 18:11   ` [PATCH v4 2/3] dtc: Add data_append_integer function Anton Staaf
     [not found]     ` <1317147098-11550-3-git-send-email-robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2011-10-11 14:43       ` David Gibson
2011-09-27 18:11   ` [PATCH v4 3/3] dtc: Add support for variable sized elements Anton Staaf
     [not found]     ` <1317147098-11550-4-git-send-email-robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2011-10-11 14:44       ` David Gibson [this message]
     [not found]         ` <20111011144413.GJ4849-MK4v0fQdeXQXU02nzanrWNbf9cGiqdzd@public.gmane.org>
2011-10-11 15:12           ` Anton Staaf
     [not found]             ` <CAF6FioXceJM=aKdbP=czrKWUG_-rVWgVr=1F5MeqDggF7=nZFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-11 15:22               ` Jon Loeliger
     [not found]                 ` <E1RDeA6-0008Ma-R1-CYoMK+44s/E@public.gmane.org>
2011-10-11 17:19                   ` Anton Staaf
  -- strict thread matches above, loose matches on Subject: below --
2011-10-11 17:22 [PATCH v4 0/3] Variable sized array element support Anton Staaf
     [not found] ` <1318353749-24513-1-git-send-email-robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2011-10-11 17:22   ` [PATCH v4 3/3] dtc: Add support for variable sized elements Anton Staaf

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=20111011144413.GJ4849@truffala.fritz.box \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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).