powerpc: Better split CONFIG_PPC_INDIRECT_PIO and CONFIG_PPC_INDIRECT_MMIO
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / powerpc / kernel / setup_64.c
index 79ba9b7..9d5bae1 100644 (file)
@@ -10,7 +10,7 @@
  *      2 of the License, or (at your option) any later version.
  */
 
-#undef DEBUG
+#define DEBUG
 
 #include <linux/export.h>
 #include <linux/string.h>
@@ -240,6 +240,18 @@ void __init early_setup(unsigned long dt_ptr)
        reserve_hugetlb_gpages();
 
        DBG(" <- early_setup()\n");
+
+#ifdef CONFIG_PPC_EARLY_DEBUG_BOOTX
+       /*
+        * This needs to be done *last* (after the above DBG() even)
+        *
+        * Right after we return from this function, we turn on the MMU
+        * which means the real-mode access trick that btext does will
+        * no longer work, it needs to switch to using a real MMU
+        * mapping. This call will ensure that it does
+        */
+       btext_map();
+#endif /* CONFIG_PPC_EARLY_DEBUG_BOOTX */
 }
 
 #ifdef CONFIG_SMP
@@ -704,8 +716,7 @@ void __init setup_per_cpu_areas(void)
 #endif
 
 
-#ifdef CONFIG_PPC_INDIRECT_IO
+#if defined(CONFIG_PPC_INDIRECT_PIO) || defined(CONFIG_PPC_INDIRECT_MMIO)
 struct ppc_pci_io ppc_pci_io;
 EXPORT_SYMBOL(ppc_pci_io);
-#endif /* CONFIG_PPC_INDIRECT_IO */
-
+#endif