linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Michael Guntsche <mike@it-loops.com>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: Re: PHY not found after migration of gianfar driver to an of_platform_driver
Date: Thu, 5 Mar 2009 08:08:25 -0700	[thread overview]
Message-ID: <fa686aa40903050708j3fa4f25ey2c5e940c70df094f@mail.gmail.com> (raw)
In-Reply-To: <20e286be3bc61f03018fc94366e6fd01@localhost>

On Thu, Mar 5, 2009 at 12:41 AM, Michael Guntsche <mike@it-loops.com> wrote=
:
> On Wed, 4 Mar 2009 08:57:59 -0700, Grant Likely <grant.likely@secretlab.c=
a>
> wrote:
>> You might be able to use of_attach_node() & prom_add_property() to
>> modify the tree, but I've never done it myself. =A0Give it a try and
>> tell me if it works. =A0:-)
>>
>
> Hello Grant,
>
> I made some progress in this area, but I have now hit a problem I do not
> know how to solve.
> Taking code from the iseries/vio.c files I am able to add properties with
> add_string_property and add_raw_property.
> The problem I have is adding properties like
>
> =A0 =A0reg =3D <0x2520 0x20>
>
> I know how to add a property
>
> =A0 reg =3D <0x2520>
>
> but I do not know what data structure to pass to add_raw_property to add
> two numbers there.

Device tree properties are just "bags of bytes".  'cells' in device
tree nomenclature are big endian u32 values.  So, for specifying a
property with one cell (ie: reg =3D <0x2520>;), the data length is 4
bytes and the data is an array of 4 bytes: 0x00 0x00 0x25 0x20.  To
add a property with two cells (ie: reg =3D <0x2520 0x20>;), the data
length is 8 bytes and the data is and array of 8 bytes: 0x00 0x00 0x25
0x20 0x00 0x00 0x00 0x20.

g.

--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  reply	other threads:[~2009-03-05 15:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-26 19:15 PHY not found after migration of gianfar driver to an of_platform_driver Michael Guntsche
2009-02-26 23:38 ` Michael Guntsche
2009-02-27 18:39   ` Michael Guntsche
2009-02-28 13:41     ` Michael Guntsche
2009-02-28 15:03 ` Grant Likely
     [not found]   ` <3B1D47A2-329E-491E-B3AC-E76C1CE1762D@it-loops.com>
     [not found]     ` <fa686aa40903011353t464b1df3obd553132e5bc2570@mail.gmail.com>
     [not found]       ` <CD026D29-687D-4078-960E-108CC94C30E4@it-loops.com>
2009-03-02  1:15         ` Grant Likely
2009-03-02 11:58           ` Michael Guntsche
2009-03-02 15:08             ` Grant Likely
2009-03-03  7:35               ` Michael Guntsche
2009-03-03  9:49                 ` Michael Guntsche
2009-03-03 15:23                   ` Grant Likely
     [not found]                     ` <7AC161D8-83A8-4330-A2CF-3120F15D9038@it-loops.com>
     [not found]                       ` <fa686aa40903031310o4e0c0b2bnba0544012b0fb8bc@mail.gmail.com>
     [not found]                         ` <68DDAAA9-42AF-4E9C-907C-7D3269816184@it-loops.com>
2009-03-04 15:57                           ` Grant Likely
2009-03-04 16:47                             ` Michael Guntsche
2009-03-05  7:41                             ` Michael Guntsche
2009-03-05 15:08                               ` Grant Likely [this message]
2009-03-08 12:18 ` Wolfgang Ocker

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=fa686aa40903050708j3fa4f25ey2c5e940c70df094f@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mike@it-loops.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 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).