Pretty-print reg property
Executing .properties for, e.g., the /memory node would print the
"reg" property as a series of bytes.
Visualize the "reg" format as a table, with address and size columns.
v6:
* Drop lower limit for my-#scells, since #size-cells is unsigned.
Pointed out by Segher.
* Drop comment outdated by v5.
v5:
* Drop the upper limit for my-#scells, suggested by Segher.
* Fix indentation.
v4:
* Fix my-#scells to allow 0 return value.
* Pass #address-cells and #size-cells as arguments.
* Add some more comments.
v3:
* Optimization, based on code suggested by Segher.
v2:
* Use my-#acells for address size.
* Introduce my-#scells for size size.
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://openbios.org/openbios/trunk/openbios-devel@957 f158a5a8-5612-0410-a976-696ce0be7e32