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

Segher Boessenkool segher at kernel.crashing.org
Sat Dec 9 20:46:46 EST 2006


>> How many registers do we expect here ? Might be better to have one
>> resource represent the whole MMIO area, and have a separate property
>> that indicates the stride between 2 registers.

Yes *please*.  Anything else will cause no end of problems, and
that only for wanting to not create a perfectly reasonable extra
property, with obvious semantics.

> I think the current representation is perfect. AFAICS, there are  
> always
> two registers,

How do you know?  Some later compatible implementation might add
some regs.  Also, there are implementations that simply ignore
the lower address bits, so size=1 in the "reg" property is wrong
for those.

> but depending on the HW implementation, they may be
> between 1 and 4 bytes wide, and can have a different spacing.

Always one byte wide.

> By having two separate areas in the reg property, the driver can
> easily determine both the size and the spacing. It will then do
> a single ioremap that spans both anyway.

It's much better to make it explicit and obvious in the device
tree what's going on.


Segher




More information about the Linuxppc-dev mailing list