MIPS: Loongson: Split the implementation of prom and setup parts