revert android-tegra-2.6.36-honeycomb-mr1-9001adc to v2.6.36
[firefly-linux-kernel-4.4.55.git] / arch / sparc / prom / misc_64.c
index 2fdcebf9a5df8ee2dc5544737766e7968f97bb8a..6cb1581d6aef507fca9c036708cebe24e5ab053c 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/system.h>
 #include <asm/ldc.h>
 
-static int prom_service_exists(const char *service_name)
+int prom_service_exists(const char *service_name)
 {
        unsigned long args[5];
 
@@ -150,6 +150,20 @@ void prom_halt_power_off(void)
        prom_halt();
 }
 
+/* Set prom sync handler to call function 'funcp'. */
+void prom_setcallback(callback_func_t funcp)
+{
+       unsigned long args[5];
+       if (!funcp)
+               return;
+       args[0] = (unsigned long) "set-callback";
+       args[1] = 1;
+       args[2] = 1;
+       args[3] = (unsigned long) funcp;
+       args[4] = (unsigned long) -1;
+       p1275_cmd_direct(args);
+}
+
 /* Get the idprom and stuff it into buffer 'idbuf'.  Returns the
  * format type.  'num_bytes' is the number of bytes that your idbuf
  * has space for.  Returns 0xff on error.