linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* OF properties access ?
@ 2004-01-13 11:46 Sven Luther
  2004-01-15  1:49 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 18+ messages in thread
From: Sven Luther @ 2004-01-13 11:46 UTC (permalink / raw)
  To: linuxppc-dev


Hello,

I am a bit in doubt about how to go around of accessing the OF
properties.

There seem to be various get_properties functions available, but is
there any documentation on how they work ?

In particular, i have in OF, a /cpus/PowerPC,74x7. when doing
.properties there, i have a l2cr property (which 0x0 (0)).

In the same vein, i have a /pci@C0000000, which contains a
pci-bridge-number i would like to read (which contains 0x1 (1)).

For the l2cr thingy, i have based myself on some pmac_setup.c code which
does :

        /* Checks "l2cr-value" property in the registry */
        np = find_devices("cpus");
        if (np == 0)
                np = find_type_devices("cpu");
        if (np != 0) {
                unsigned int *l2cr = (unsigned int *)
                        get_property(np, "l2cr-value", NULL);
                if (l2cr != 0) {
                        seq_printf(m, "l2cr override\t: 0x%x\n", *l2cr);
                }
        }

But, the pmac OF (at least on the powerbook i got someone to check for
me), does have a l2cr property, not a l2cr-value one. The same goes on
for voltaire.debian.org, which is a dual G4 500MHz.

Does this mean that the -value appended is for looking at the content of
l2cr, or something such ?

Friendly,

Sven Luther


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2004-01-19 21:36 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-13 11:46 OF properties access ? Sven Luther
2004-01-15  1:49 ` Benjamin Herrenschmidt
2004-01-15  7:44   ` Sven Luther
2004-01-17  3:48     ` Benjamin Herrenschmidt
2004-01-18 12:07       ` Sven Luther
2004-01-18 23:21         ` Benjamin Herrenschmidt
2004-01-18 14:32           ` Sven Luther
2004-01-18 14:51             ` Sven Luther
2004-01-18 15:05               ` Sven Luther
2004-01-19  9:05                 ` Benjamin Herrenschmidt
2004-01-18 22:22                   ` Sven Luther
2004-01-19  9:04               ` Benjamin Herrenschmidt
2004-01-19  1:35             ` Dan Malek
2004-01-19  9:01             ` Benjamin Herrenschmidt
2004-01-19 10:17               ` Sven Luther
2004-01-19 11:42                 ` Benjamin Herrenschmidt
2004-01-19 12:06                   ` Sven Luther
2004-01-19 21:36                     ` Benjamin Herrenschmidt

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