Index: alp-linux--dev--1.9/arch/arm/mach-omap1/board-osk.c
===================================================================
--- alp-linux--dev--1.9.orig/arch/arm/mach-omap1/board-osk.c	2005-12-07 14:27:20.000000000 +0900
+++ alp-linux--dev--1.9/arch/arm/mach-omap1/board-osk.c	2005-12-07 14:34:19.000000000 +0900
@@ -254,8 +254,16 @@ static void __init osk_mistral_init(void
 static void __init osk_mistral_init(void) { }
 #endif
 
+static void osk_power_off(void)
+{
+	printk("System Halted\n");
+	local_irq_disable();
+	while (1) ;
+}
+
 static void __init osk_init(void)
 {
+	pm_power_off = osk_power_off;
 	osk_flash_resource.end = osk_flash_resource.start = omap_cs3_phys();
 	osk_flash_resource.end += SZ_32M - 1;
 	platform_add_devices(osk5912_devices, ARRAY_SIZE(osk5912_devices));
Index: alp-linux--dev--1.9/drivers/mtd/mtdblock.c
===================================================================
--- alp-linux--dev--1.9.orig/drivers/mtd/mtdblock.c	2005-12-07 14:27:20.000000000 +0900
+++ alp-linux--dev--1.9/drivers/mtd/mtdblock.c	2005-12-07 14:34:19.000000000 +0900
@@ -52,6 +52,9 @@ static int erase_write (struct mtd_info 
 	wait_queue_head_t wait_q;
 	size_t retlen;
 	int ret;
+#if 1 //verify
+	char *rdbuf;
+#endif
 
 	/*
 	 * First, let's erase the flash block.
@@ -83,12 +86,35 @@ static int erase_write (struct mtd_info 
 	/*
 	 * Next, writhe data to flash.
 	 */
+#if 1 //verify
+ retry:
+	rdbuf = kmalloc(len, GFP_KERNEL);
+	if (!rdbuf) {
+		set_current_state(TASK_INTERRUPTIBLE);
+		schedule_timeout(100);
+		goto retry;
+	}
+#endif
 
 	ret = MTD_WRITE (mtd, pos, len, &retlen, buf);
 	if (ret)
 		return ret;
 	if (retlen != len)
 		return -EIO;
+#if 1 //verify
+	ret = MTD_READ (mtd, pos, len, &retlen, rdbuf);
+	if (ret == 0 && retlen == len) {
+		if (memcmp(buf, rdbuf, len))
+			printk("mtdblock: verify region [0x%lx, 0x%x] "
+			       "on %s failed. (comparison fail)\n",
+			       pos, len, mtd->name);
+	} else {
+		printk("mtdblock: verify of region [0x%lx, 0x%x] "
+		       "ON %s failed (read fail)\n",
+		       pos, len, mtd->name);
+	}
+	kfree(rdbuf);
+#endif
 	return 0;
 }
 
@@ -321,6 +347,24 @@ static int mtdblock_release(struct mtd_b
 	return 0;
 }  
 
+/* FIXME: quick hack, need rewrite... */
+#ifdef CONFIG_SUSPEND2
+int suspend2_mtdblock_flush(void)
+{
+#if defined CONFIG_MACH_OMAP_OSK
+	struct mtdblk_dev *mtdblk = mtdblks[3];
+#else
+#error "Suspend2 using mtd is not supported for this board"
+#endif
+	down(&mtdblk->cache_sem);
+	write_cached_data(mtdblk);
+	up(&mtdblk->cache_sem);
+	if (mtdblk->mtd->sync)
+		mtdblk->mtd->sync(mtdblk->mtd);
+	return 0;
+}
+#endif /* CONFIG_SUSPEND2 */
+
 static int mtdblock_flush(struct mtd_blktrans_dev *dev)
 {
 	struct mtdblk_dev *mtdblk = mtdblks[dev->devnum];
Index: alp-linux--dev--1.9/kernel/power/power_off.c
===================================================================
--- alp-linux--dev--1.9.orig/kernel/power/power_off.c	2005-12-07 14:29:09.000000000 +0900
+++ alp-linux--dev--1.9/kernel/power/power_off.c	2005-12-07 14:34:19.000000000 +0900
@@ -79,6 +79,13 @@ int try_pm_state_powerdown(void)
 
 void suspend_power_down(void)
 {
+/* FIXME: quick hack, need rewrite */
+//#if defined CONFIG_SUSPEND2_MTDBLOCK_FLUSH
+	extern int suspend2_mtdblock_flush(void);
+	printk(KERN_CRIT "flush MTD\n");
+	suspend2_mtdblock_flush();
+//#endif
+
 	if (test_action_state(SUSPEND_REBOOT)) {
 		suspend2_prepare_status(DONT_CLEAR_BAR, "Ready to reboot.");
 		kernel_restart(NULL);
Index: alp-linux--dev--1.9/kernel/power/suspend.c
===================================================================
--- alp-linux--dev--1.9.orig/kernel/power/suspend.c	2005-12-07 14:29:09.000000000 +0900
+++ alp-linux--dev--1.9/kernel/power/suspend.c	2005-12-07 14:34:19.000000000 +0900
@@ -526,7 +526,9 @@ static inline int suspend2_init(void)
 		suspend_io_time[1][0] =
 		suspend_io_time[1][1] = 0;
 
-	suspend2_prepare_console();
+	printk("DEBUG *** at %s, comment out suspend2_prepare_console ***\n",
+	       __FUNCTION__);
+/*	suspend2_prepare_console(); */
 
 	free_metadata();	/* We might have kept it */
 
