devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anton Staaf <robotboy-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: [PATCH v4 0/3] Variable sized array element support
Date: Tue, 27 Sep 2011 11:11:35 -0700	[thread overview]
Message-ID: <1317147098-11550-1-git-send-email-robotboy@chromium.org> (raw)

This patch set adds, tests, and documents support for variable sized elements in
arrays (known as cell lists when they could only support 32-bit entries).  The
new syntax is:

    property = /bits/ [8|16|32|64] <0x00 .... 0x12>;

So arrays of 8, 16, 32, or 64-bit elements can now be created.  No padding is
done on the resulting array.  So if three 8-bit elements are specified the
resulting property will contain three bytes.

Changes in v2:
- sized_data renamed to celllist
- celllist definition moved to dtc-parser.y
- celllist non-terminal renamed to celllistprefix
- references always appended as -1 masked to the size of the cell
- smaller test values derived from TEST_VALUE_1
- data_append_literal renamed to data_append_integer
- be_ removed from values in data_append_integer
- len renamed to bits in data_append_integer

Changes in v3:
- Renamed size to bits in docs, parser, commit messages, and celllist struct
- Remove die on overflow from data_append_integer
- Rewrite data_append_cell|addr in terms of data_append_integer
- Minor cosmetic change to property names in test case (added 'b' to last two)

Changes in v4:
- Only add phandle reference marker when element size is 32-bits
- Rename non-terminal celllistprefix to arrayprefix
- Rename semantic variable celllist to array
- Update documentation to use array and element instead of cell list and cell

Anton Staaf (3):
  libfdt: Add fdt16_to_cpu utility function
  dtc: Add data_append_integer function
  dtc: Add support for variable sized elements

 Documentation/dts-format.txt |   34 +++++++++++-----
 data.c                       |   39 ++++++++++++++++---
 dtc-lexer.l                  |    6 +++
 dtc-parser.y                 |   70 ++++++++++++++++++++++++-----------
 dtc.h                        |    1 +
 libfdt/libfdt_env.h          |    6 +++
 tests/.gitignore             |    1 +
 tests/Makefile.tests         |    1 +
 tests/run_tests.sh           |    3 +
 tests/sized_cells.c          |   84 ++++++++++++++++++++++++++++++++++++++++++
 tests/sized_cells.dts        |   11 +++++
 11 files changed, 216 insertions(+), 40 deletions(-)
 create mode 100644 tests/sized_cells.c
 create mode 100644 tests/sized_cells.dts

-- 
1.7.3.1

             reply	other threads:[~2011-09-27 18:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-27 18:11 Anton Staaf [this message]
     [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
     [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 18:01   ` Jon Loeliger
     [not found]     ` <E1RDge1-00015M-D3-CYoMK+44s/E@public.gmane.org>
2011-10-11 18:11       ` 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=1317147098-11550-1-git-send-email-robotboy@chromium.org \
    --to=robotboy-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@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).