Devicetree
 help / color / mirror / Atom feed
From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Jon Loeliger <jdl-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: devicetree-discuss
	<devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 0/8] Implement a new DTS Source Language
Date: Thu, 25 Sep 2008 14:31:11 +1000	[thread overview]
Message-ID: <20080925043111.GK15169@yookeroo.seuss> (raw)
In-Reply-To: <1222282135.12705.4.camel@ld0161-tx32>

On Wed, Sep 24, 2008 at 01:48:55PM -0500, Jon Loeliger wrote:
> On Wed, 2008-09-24 at 11:51 -0500, Jon Loeliger wrote:
> > On Tue, 2008-09-23 at 21:34 -0500, Kumar Gala wrote:
> > 
> > > Any examples/tests of all the cool new features?
> > > 
> > > - k
> > 
> > Here is a QAD example based on the MPC8641 DTS file
> > as found in the arch/powerpc/boot/dts directory today.
> > It is maybe not the best example, but it shows the
> > flavor of what can be done.
> > 
> > Enjoy,
> > jdl
> 
> 
> Also, here is the same refactoring done on the
> mpc8572ds.dts file too.
> 
> And, perhaps more important than doing this work
> on this one file, it shows that the first section
> of both this 8572 DTS file and the 8641 DTS file
> are almost identical throughout the /define/ section.
> Minor refactoring needed in the 8641 variant.
> The only "real" difference is 8641 says "TSEC" and
> the 8572 says "eTSEC", and one weird interrupt thing
> in the serial node.  Dunno.

[snip]
> /define/ make_i2c(\id)
> {
> 	\addr := 0x3000 + \id * 0x100;

Hrm.  Again, not very C-like.  Plus it bothers me that there are 3
somewhat different definition constructs: /define/, /const/ and :=.
At least /define/ and /const/ should be mergeable, with /const/
becoming a zero-parameter /define/.  Maybe local defines need
something different, but the distinction seems dangerously ad-hoc to
me at the moment.

[snip]
> /define/ make_dma_channel(\part, \id, \intr_base)
> {
> 	"dma-channel@" % hexstr(\id * 0x80) {
> 		compatible = < ("fsl,mpc" % \part % "-dma-channel")
> 				("fsl,eloplus-dma-channel") >;

WTF!?  What is a < > construct doing containing strings rather than
cells.

-- 
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

  reply	other threads:[~2008-09-25  4:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23 19:04 [PATCH 0/8] Implement a new DTS Source Language Jon Loeliger
     [not found] ` <1222196652-13811-1-git-send-email-jdl-CYoMK+44s/E@public.gmane.org>
2008-09-23 19:04   ` [PATCH 1/8] Remove support for the legacy DTS source file format Jon Loeliger
     [not found]     ` <1222196652-13811-2-git-send-email-jdl-CYoMK+44s/E@public.gmane.org>
2008-09-23 19:04       ` [PATCH 2/8] Add conditionalized debug() print macro Jon Loeliger
     [not found]         ` <1222196652-13811-3-git-send-email-jdl-CYoMK+44s/E@public.gmane.org>
2008-09-23 19:04           ` [PATCH 3/8] Enhance source position implementation Jon Loeliger
     [not found]             ` <1222196652-13811-4-git-send-email-jdl-CYoMK+44s/E@public.gmane.org>
2008-09-23 19:04               ` [PATCH 4/8] Add header files for new Internal Representation form Jon Loeliger
     [not found]                 ` <1222196652-13811-5-git-send-email-jdl-CYoMK+44s/E@public.gmane.org>
2008-09-23 19:04                   ` [PATCH 5/8] Add most of the new IR implementation files Jon Loeliger
     [not found]                     ` <1222196652-13811-6-git-send-email-jdl-CYoMK+44s/E@public.gmane.org>
2008-09-23 19:04                       ` [PATCH 6/8] Add the main IR evaluation implementation Jon Loeliger
     [not found]                         ` <1222196652-13811-7-git-send-email-jdl-CYoMK+44s/E@public.gmane.org>
2008-09-23 19:04                           ` [PATCH 7/8] Introduce new DTS language Jon Loeliger
     [not found]                             ` <1222196652-13811-8-git-send-email-jdl-CYoMK+44s/E@public.gmane.org>
2008-09-23 19:04                               ` [PATCH 8/8] Add documentation for the " Jon Loeliger
     [not found]                                 ` <1222196652-13811-9-git-send-email-jdl-CYoMK+44s/E@public.gmane.org>
2008-09-25 13:00                                   ` Josh Boyer
2008-09-24 22:25                       ` [PATCH 5/8] Add most of the new IR implementation files Scott Wood
2008-09-24 19:17                   ` [PATCH 4/8] Add header files for new Internal Representation form Scott Wood
2008-09-24 17:07               ` [PATCH 3/8] Enhance source position implementation Scott Wood
     [not found]                 ` <48DA73DA.5000603-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2008-09-24 17:17                   ` Jon Loeliger
2008-09-24 17:21                     ` Scott Wood
2008-09-24 17:23                   ` Warner Losh
2008-09-24 17:23               ` Scott Wood
2008-09-25 12:42           ` [PATCH 2/8] Add conditionalized debug() print macro Josh Boyer
2008-09-24  2:34   ` [PATCH 0/8] Implement a new DTS Source Language Kumar Gala
     [not found]     ` <097BFF8D-317F-4E85-AC2A-4C0A8D6C608B-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2008-09-24 16:51       ` Jon Loeliger
2008-09-24 18:48         ` Jon Loeliger
2008-09-25  4:31           ` David Gibson [this message]
2008-09-25  4:26         ` David Gibson
     [not found]           ` <20080925042613.GJ15169-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2008-09-25 15:25             ` Scott Wood
2008-09-25  3:50       ` David Gibson

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=20080925043111.GK15169@yookeroo.seuss \
    --to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
    --cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=jdl-KZfg59tc24xl57MIdRCFDg@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