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

Benjamin Herrenschmidt benh at kernel.crashing.org
Sat Dec 9 09:50:36 EST 2006


> 
> +	info->io.regsize	= resource0.end - resource0.start + 1;
> +	info->io.regspacing	= resource1.start - resource0.start;
> 
> Are you sure this is a reliable way to check the register spacing and
> register size?  Register size means "how big is a register (8, 16, 32
> bits)".  Register spacing means (how many bytes are there between
> registers.  If you had two registers that were 8 bits and 4 bytes
> apart, for instance, I don't believe the above calculations would work.

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.

Ben.





More information about the Linuxppc-dev mailing list