]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
powerpc/mpc85xx: Ignore FDT pointer for non-QEMU in cpu_init_early_f()
authorYork Sun <yorksun@freescale.com>
Wed, 30 Apr 2014 21:43:45 +0000 (14:43 -0700)
committerYork Sun <yorksun@freescale.com>
Tue, 13 May 2014 15:31:22 +0000 (08:31 -0700)
The pointer of device tree comes from r3 for QEMU. This is not the case
for normal SoCs out of reset. Having gd->fdt_blob as 0 is important for
other functions to detect the non-existence of device tree.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Alexander Graf <agraf@suse.de>
arch/powerpc/cpu/mpc85xx/cpu_init_early.c

index 998781b706bc22667313053c3b055e773975f8a3..47b712d56b5595a89d797cb9b868506606ede539 100644 (file)
@@ -102,11 +102,13 @@ void cpu_init_early_f(void *fdt)
        for (i = 0; i < sizeof(gd_t); i++)
                ((char *)gd)[i] = 0;
 
+#ifdef CONFIG_QEMU_E500
        /*
         * CONFIG_SYS_CCSRBAR_PHYS below may use gd->fdt_blob on ePAPR systems,
         * so we need to populate it before it accesses it.
         */
        gd->fdt_blob = fdt;
+#endif
 
        mas0 = MAS0_TLBSEL(1) | MAS0_ESEL(13);
        mas1 = MAS1_VALID | MAS1_TID(0) | MAS1_TS | MAS1_TSIZE(BOOKE_PAGESZ_1M);