Subject: Re: [Openipmi-developer] [patch 1/1] ipmi: add autosensing of ipmi device on powerpc using device-tree

From: Arnd Bergmann <[email-masked]>
Date: Mon, 11 Dec 2006 15:25:49 +0100

On Monday 11 December 2006 14:18, Segher Boessenkool wrote:
> > We have to include the IPMI information in a way which can be used
> > for controllers which are accessed via memory mapped or legacy I/O.
>=20
> How to access registers is implicit in the device tree;
> just look at the parent bus, it knows how to do it, given
> the "reg" value in your device.

right, though it's a little different if you need special opcodes,
like DCR on ppc4xx or PIO on i386. Let's not worry about those
for now.

> > (2)
> > name =3D ipmi
> > device_type
>=20
> device_type =3D ipmi-kcs
>=20
> There's no real reason to include the IPMI version number
> in here, if you really need the version it's trivial to
> probe for; it's not a property of the hardware but of the
> software on the controller (unless some day the IPMI spec
> breaks backwards compatibility, of course).

Why not this?

device-type =3D ipmi
compatible =3D ipmi-kcs

I thought the device-type tells you what kind of bindings to
use, and the compatible (and/or model) tells you how to
access it. E.g. all PHBs have device-type=3Dpci and compatible=3Dwhatever,
which tells you how to access the config space registers.

> > regs =3D <addr> <len>
> > reg-spacing =3D <number>
> > reg-size =3D <number>
> > reg-shift =3D <number>
> >
> > The main difference between (1) and (2) is that (2) will represent
> > the whole register region within the reg property.
>=20
> Which is the proper thing to do. =A0The "reg" property should
> describe all of the address space your device listens to.
> Some IPMI-KCS devices listen to just the two registers, some
> listen to an 8-reg block, some to a 16-reg block.

ok

	Arnd <><