sparc: Move core of OF device tree building code into prom_common.c