Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / arch / powerpc / platforms / powermac / nvram.c
index 692945c..262f967 100644 (file)
@@ -8,6 +8,7 @@
  *
  *  Todo: - add support for the OF persistent properties
  */
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/stddef.h>
@@ -29,8 +30,6 @@
 #include <asm/machdep.h>
 #include <asm/nvram.h>
 
-#include "pmac.h"
-
 #define DEBUG
 
 #ifdef DEBUG
@@ -82,6 +81,9 @@ static int nvram_partitions[3];
 // XXX Turn that into a sem
 static DEFINE_SPINLOCK(nv_lock);
 
+extern int pmac_newworld;
+extern int system_running;
+
 static int (*core99_write_bank)(int bank, u8* datas);
 static int (*core99_erase_bank)(int bank);
 
@@ -195,7 +197,7 @@ static void pmu_nvram_complete(struct adb_request *req)
 static unsigned char pmu_nvram_read_byte(int addr)
 {
        struct adb_request req;
-       DECLARE_COMPLETION_ONSTACK(req_complete);
+       DECLARE_COMPLETION(req_complete); 
        
        req.arg = system_state == SYSTEM_RUNNING ? &req_complete : NULL;
        if (pmu_request(&req, pmu_nvram_complete, 3, PMU_READ_NVRAM,
@@ -211,7 +213,7 @@ static unsigned char pmu_nvram_read_byte(int addr)
 static void pmu_nvram_write_byte(int addr, unsigned char val)
 {
        struct adb_request req;
-       DECLARE_COMPLETION_ONSTACK(req_complete);
+       DECLARE_COMPLETION(req_complete); 
        
        req.arg = system_state == SYSTEM_RUNNING ? &req_complete : NULL;
        if (pmu_request(&req, pmu_nvram_complete, 4, PMU_WRITE_NVRAM,