]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/ps3/os-area.c
[POWERPC] PS3: os-area workqueue processing
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / ps3 / os-area.c
index f5112248802bd808b27a5fa6070700c835d5bfc3..db311a147c2815b437475c7a4b1fb8ecc11127f9 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <linux/kernel.h>
 #include <linux/io.h>
+#include <linux/workqueue.h>
 
 #include <asm/lmb.h>
 
@@ -186,6 +187,28 @@ static int __init verify_header(const struct os_area_header *header)
        return 0;
 }
 
+/**
+ * os_area_queue_work_handler - Asynchronous write handler.
+ *
+ * An asynchronous write for flash memory and the device tree.  Do not
+ * call directly, use os_area_queue_work().
+ */
+
+static void os_area_queue_work_handler(struct work_struct *work)
+{
+       pr_debug(" -> %s:%d\n", __func__, __LINE__);
+
+       pr_debug(" <- %s:%d\n", __func__, __LINE__);
+}
+
+static void os_area_queue_work(void)
+{
+       static DECLARE_WORK(q, os_area_queue_work_handler);
+
+       wmb();
+       schedule_work(&q);
+}
+
 /**
  * ps3_os_area_save_params - Copy data from os area mirror to @saved_params.
  *