]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/setup_64.c
Merge tag 'powerpc-4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[karo-tx-linux.git] / arch / powerpc / kernel / setup_64.c
index 0d4dcaeaafcb4d0b8396f06ba8cc93e4a30e5d0b..f35ff9dea4fb4607459c10d42a29c47f2984e613 100644 (file)
@@ -49,6 +49,7 @@
 #include <asm/paca.h>
 #include <asm/time.h>
 #include <asm/cputable.h>
+#include <asm/dt_cpu_ftrs.h>
 #include <asm/sections.h>
 #include <asm/btext.h>
 #include <asm/nvram.h>
@@ -274,8 +275,10 @@ void __init early_setup(unsigned long dt_ptr)
 
        /* -------- printk is _NOT_ safe to use here ! ------- */
 
-       /* Identify CPU type */
-       identify_cpu(0, mfspr(SPRN_PVR));
+       /* Try new device tree based feature discovery ... */
+       if (!dt_cpu_ftrs_init(__va(dt_ptr)))
+               /* Otherwise use the old style CPU table */
+               identify_cpu(0, mfspr(SPRN_PVR));
 
        /* Assume we're on cpu 0 for now. Don't write to the paca yet! */
        initialise_paca(&boot_paca, 0);
@@ -541,6 +544,9 @@ void __init initialize_cache_info(void)
        dcache_bsize = ppc64_caches.l1d.block_size;
        icache_bsize = ppc64_caches.l1i.block_size;
 
+       cur_cpu_spec->dcache_bsize = dcache_bsize;
+       cur_cpu_spec->icache_bsize = icache_bsize;
+
        DBG(" <- initialize_cache_info()\n");
 }