#include <asm/btext.h>
 #include <asm/sections.h>
 #include <asm/machdep.h>
-#include <asm/opal.h>
 #include <asm/asm-prototypes.h>
 
 #include <linux/linux_logo.h>
 #define PLATFORM_LPAR          0x0001
 #define PLATFORM_POWERMAC      0x0400
 #define PLATFORM_GENERIC       0x0500
-#define PLATFORM_OPAL          0x0600
 
 static int __prombss of_platform;
 
                prom_debug("Radix disabled from cmdline\n");
 }
 
-#if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV)
+#ifdef CONFIG_PPC_PSERIES
 /*
  * The architecture vector has an array of PVR mask/value pairs,
  * followed by # option vectors - 1, followed by the option vectors.
        }
 #endif /* __BIG_ENDIAN__ */
 }
-#endif /* #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) */
+#endif /* CONFIG_PPC_PSERIES */
 
 /*
  * Memory allocation strategy... our layout is normally:
        }
 }
 
-#ifdef CONFIG_PPC_POWERNV
-
-#ifdef CONFIG_PPC_EARLY_DEBUG_OPAL
-static u64 __prombss prom_opal_base;
-static u64 __prombss prom_opal_entry;
-#endif
-
-/*
- * Allocate room for and instantiate OPAL
- */
-static void __init prom_instantiate_opal(void)
-{
-       phandle opal_node;
-       ihandle opal_inst;
-       u64 base, entry;
-       u64 size = 0, align = 0x10000;
-       __be64 val64;
-       u32 rets[2];
-
-       prom_debug("prom_instantiate_opal: start...\n");
-
-       opal_node = call_prom("finddevice", 1, 1, ADDR("/ibm,opal"));
-       prom_debug("opal_node: %x\n", opal_node);
-       if (!PHANDLE_VALID(opal_node))
-               return;
-
-       val64 = 0;
-       prom_getprop(opal_node, "opal-runtime-size", &val64, sizeof(val64));
-       size = be64_to_cpu(val64);
-       if (size == 0)
-               return;
-       val64 = 0;
-       prom_getprop(opal_node, "opal-runtime-alignment", &val64,sizeof(val64));
-       align = be64_to_cpu(val64);
-
-       base = alloc_down(size, align, 0);
-       if (base == 0) {
-               prom_printf("OPAL allocation failed !\n");
-               return;
-       }
-
-       opal_inst = call_prom("open", 1, 1, ADDR("/ibm,opal"));
-       if (!IHANDLE_VALID(opal_inst)) {
-               prom_printf("opening opal package failed (%x)\n", opal_inst);
-               return;
-       }
-
-       prom_printf("instantiating opal at 0x%llx...", base);
-
-       if (call_prom_ret("call-method", 4, 3, rets,
-                         ADDR("load-opal-runtime"),
-                         opal_inst,
-                         base >> 32, base & 0xffffffff) != 0
-           || (rets[0] == 0 && rets[1] == 0)) {
-               prom_printf(" failed\n");
-               return;
-       }
-       entry = (((u64)rets[0]) << 32) | rets[1];
-
-       prom_printf(" done\n");
-
-       reserve_mem(base, size);
-
-       prom_debug("opal base     = 0x%llx\n", base);
-       prom_debug("opal align    = 0x%llx\n", align);
-       prom_debug("opal entry    = 0x%llx\n", entry);
-       prom_debug("opal size     = 0x%llx\n", size);
-
-       prom_setprop(opal_node, "/ibm,opal", "opal-base-address",
-                    &base, sizeof(base));
-       prom_setprop(opal_node, "/ibm,opal", "opal-entry-address",
-                    &entry, sizeof(entry));
-
-#ifdef CONFIG_PPC_EARLY_DEBUG_OPAL
-       prom_opal_base = base;
-       prom_opal_entry = entry;
-#endif
-       prom_debug("prom_instantiate_opal: end...\n");
-}
-
-#endif /* CONFIG_PPC_POWERNV */
-
 /*
  * Allocate room for and instantiate RTAS
  */
                }
        }
 #ifdef CONFIG_PPC64
-       /* Try to detect OPAL */
-       if (PHANDLE_VALID(call_prom("finddevice", 1, 1, ADDR("/ibm,opal"))))
-               return PLATFORM_OPAL;
-
        /* Try to figure out if it's an IBM pSeries or any other
         * PAPR compliant platform. We assume it is if :
         *  - /device_type is "chrp" (please, do NOT use that for future
        }
 
        /* Add a "linux,phandle" property if no "phandle" property already
-        * existed (can happen with OPAL)
+        * existed.
         */
        if (!has_phandle) {
                soff = dt_find_string("linux,phandle");
         */
        early_cmdline_parse();
 
-#if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV)
+#ifdef CONFIG_PPC_PSERIES
        /*
         * On pSeries, inform the firmware about our capabilities
         */
         * On non-powermacs, try to instantiate RTAS. PowerMacs don't
         * have a usable RTAS implementation.
         */
-       if (of_platform != PLATFORM_POWERMAC &&
-           of_platform != PLATFORM_OPAL)
+       if (of_platform != PLATFORM_POWERMAC)
                prom_instantiate_rtas();
 
-#ifdef CONFIG_PPC_POWERNV
-       if (of_platform == PLATFORM_OPAL)
-               prom_instantiate_opal();
-#endif /* CONFIG_PPC_POWERNV */
-
 #ifdef CONFIG_PPC64
        /* instantiate sml */
        prom_instantiate_sml();
         *
         * (This must be done after instanciating RTAS)
         */
-       if (of_platform != PLATFORM_POWERMAC &&
-           of_platform != PLATFORM_OPAL)
+       if (of_platform != PLATFORM_POWERMAC)
                prom_hold_cpus();
 
        /*
        /*
         * in case stdin is USB and still active on IBM machines...
         * Unfortunately quiesce crashes on some powermacs if we have
-        * closed stdin already (in particular the powerbook 101). It
-        * appears that the OPAL version of OFW doesn't like it either.
+        * closed stdin already (in particular the powerbook 101).
         */
-       if (of_platform != PLATFORM_POWERMAC &&
-           of_platform != PLATFORM_OPAL)
+       if (of_platform != PLATFORM_POWERMAC)
                prom_close_stdin();
 
        /*
        hdr = dt_header_start;
 
        /* Don't print anything after quiesce under OPAL, it crashes OFW */
-       if (of_platform != PLATFORM_OPAL) {
-               prom_printf("Booting Linux via __start() @ 0x%lx ...\n", kbase);
-               prom_debug("->dt_header_start=0x%lx\n", hdr);
-       }
+       prom_printf("Booting Linux via __start() @ 0x%lx ...\n", kbase);
+       prom_debug("->dt_header_start=0x%lx\n", hdr);
 
 #ifdef CONFIG_PPC32
        reloc_got2(-offset);
        unreloc_toc();
 #endif
 
-#ifdef CONFIG_PPC_EARLY_DEBUG_OPAL
-       /* OPAL early debug gets the OPAL base & entry in r8 and r9 */
-       __start(hdr, kbase, 0, 0, 0,
-               prom_opal_base, prom_opal_entry);
-#else
        __start(hdr, kbase, 0, 0, 0, 0, 0);
-#endif
 
        return 0;
 }