diff --git a/82802ab.c b/82802ab.c
index b6bd689..aa7e45e 100644
--- a/82802ab.c
+++ b/82802ab.c
@@ -34,13 +34,13 @@
 // I need that Berkeley bit-map printer
 void print_status_82802ab(uint8_t status)
 {
-	printf_debug("%s", status & 0x80 ? "Ready:" : "Busy:");
-	printf_debug("%s", status & 0x40 ? "BE SUSPEND:" : "BE RUN/FINISH:");
-	printf_debug("%s", status & 0x20 ? "BE ERROR:" : "BE OK:");
-	printf_debug("%s", status & 0x10 ? "PROG ERR:" : "PROG OK:");
-	printf_debug("%s", status & 0x8 ? "VP ERR:" : "VPP OK:");
-	printf_debug("%s", status & 0x4 ? "PROG SUSPEND:" : "PROG RUN/FINISH:");
-	printf_debug("%s", status & 0x2 ? "WP|TBL#|WP#,ABORT:" : "UNLOCK:");
+	msg_cdbg("%s", status & 0x80 ? "Ready:" : "Busy:");
+	msg_cdbg("%s", status & 0x40 ? "BE SUSPEND:" : "BE RUN/FINISH:");
+	msg_cdbg("%s", status & 0x20 ? "BE ERROR:" : "BE OK:");
+	msg_cdbg("%s", status & 0x10 ? "PROG ERR:" : "PROG OK:");
+	msg_cdbg("%s", status & 0x8 ? "VP ERR:" : "VPP OK:");
+	msg_cdbg("%s", status & 0x4 ? "PROG SUSPEND:" : "PROG RUN/FINISH:");
+	msg_cdbg("%s", status & 0x2 ? "WP|TBL#|WP#,ABORT:" : "UNLOCK:");
 }
 
 int probe_82802ab(struct flashchip *flash)
@@ -65,21 +65,21 @@
 
 	programmer_delay(10);
 
-	printf_debug("%s: id1 0x%02x, id2 0x%02x", __func__, id1, id2);
+	msg_cdbg("%s: id1 0x%02x, id2 0x%02x", __func__, id1, id2);
 
 	if (!oddparity(id1))
-		printf_debug(", id1 parity violation");
+		msg_cdbg(", id1 parity violation");
 
 	/* Read the product ID location again. We should now see normal flash contents. */
 	flashcontent1 = chip_readb(bios);
 	flashcontent2 = chip_readb(bios + 0x01);
 
 	if (id1 == flashcontent1)
-		printf_debug(", id1 is normal flash content");
+		msg_cdbg(", id1 is normal flash content");
 	if (id2 == flashcontent2)
-		printf_debug(", id2 is normal flash content");
+		msg_cdbg(", id2 is normal flash content");
 
-	printf_debug("\n");
+	msg_cdbg("\n");
 	if (id1 != flash->manufacture_id || id2 != flash->model_id)
 		return 0;
 
@@ -137,10 +137,10 @@
 	print_status_82802ab(status);
 
 	if (check_erased_range(flash, page, pagesize)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
-	printf("DONE BLOCK 0x%x\n", page);
+	msg_cinfo("DONE BLOCK 0x%x\n", page);
 
 	return 0;
 }
@@ -150,14 +150,14 @@
 	int i;
 	unsigned int total_size = flash->total_size * 1024;
 
-	printf("total_size is %d; flash->page_size is %d\n",
+	msg_cspew("total_size is %d; flash->page_size is %d\n",
 	       total_size, flash->page_size);
 	for (i = 0; i < total_size; i += flash->page_size)
 		if (erase_block_82802ab(flash, i, flash->page_size)) {
-			fprintf(stderr, "ERASE FAILED!\n");
+			msg_cerr("ERASE FAILED!\n");
 			return -1;
 		}
-	printf("DONE ERASE\n");
+	msg_cinfo("DONE ERASE\n");
 
 	return 0;
 }
@@ -184,14 +184,13 @@
 	uint8_t *tmpbuf = malloc(page_size);
 
 	if (!tmpbuf) {
-		printf("Could not allocate memory!\n");
+		msg_cerr("Could not allocate memory!\n");
 		exit(1);
 	}
-	printf("Programming page: \n");
+	msg_cinfo("Programming page: \n");
 	for (i = 0; i < total_size / page_size; i++) {
-		printf
-		    ("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
-		printf("%04d at address: 0x%08x", i, i * page_size);
+		msg_cinfo("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+		msg_cinfo("%04d at address: 0x%08x", i, i * page_size);
 
 		/* Auto Skip Blocks, which already contain the desired data
 		 * Faster, because we only write, what has changed
@@ -202,19 +201,19 @@
 		 */
 		chip_readn(tmpbuf, bios + i * page_size, page_size);
 		if (!memcmp((void *)(buf + i * page_size), tmpbuf, page_size)) {
-			printf("SKIPPED\n");
+			msg_cdbg("SKIPPED\n");
 			continue;
 		}
 
 		/* erase block by block and write block by block; this is the most secure way */
 		if (erase_block_82802ab(flash, i * page_size, page_size)) {
-			fprintf(stderr, "ERASE FAILED!\n");
+			msg_cerr("ERASE FAILED!\n");
 			return -1;
 		}
 		write_page_82802ab(bios, buf + i * page_size,
 				   bios + i * page_size, page_size);
 	}
-	printf("\n");
+	msg_cinfo("DONE!\n");
 	free(tmpbuf);
 
 	return 0;
@@ -234,7 +233,7 @@
 
 	/* Read master lock-bit */
 	mcfg = chip_readb(bios + 0x3);
-	msg_cinfo("master lock is ");
+	msg_cdbg("master lock is ");
 	if (mcfg) {
 		msg_cdbg("locked!\n");
 	} else {
@@ -256,9 +255,11 @@
 
 	/* Unlock: clear block lock-bits, if needed */
 	if (can_unlock && need_unlock) {
+		msg_cdbg("Unlock: ");
 		chip_writeb(0x60, bios);
 		chip_writeb(0xD0, bios);
 		chip_writeb(0xFF, bios);
+		msg_cdbg("Done!\n");
 	}
 
 	/* Error: master locked or a block is locked */
diff --git a/jedec.c b/jedec.c
index fee7302..fcaea96 100644
--- a/jedec.c
+++ b/jedec.c
@@ -55,7 +55,7 @@
 		tmp1 = tmp2;
 	}
 	if (i > 0x100000)
-		printf_debug("%s: excessive loops, i=0x%x\n", __func__, i);
+		msg_cdbg("%s: excessive loops, i=0x%x\n", __func__, i);
 }
 
 void toggle_ready_jedec(chipaddr dst)
@@ -89,7 +89,7 @@
 		}
 	}
 	if (i > 0x100000)
-		printf_debug("%s: excessive loops, i=0x%x\n", __func__, i);
+		msg_cdbg("%s: excessive loops, i=0x%x\n", __func__, i);
 }
 
 void start_program_jedec_common(struct flashchip *flash, unsigned int mask)
@@ -113,12 +113,12 @@
 	else if (flash->probe_timing == TIMING_ZERO) { /* No delay. */
 		probe_timing_enter = probe_timing_exit = 0;
 	} else if (flash->probe_timing == TIMING_FIXME) { /* == _IGNORED */
-		printf_debug("Chip lacks correct probe timing information, "
+		msg_cdbg("Chip lacks correct probe timing information, "
 			     "using default 10mS/40uS. ");
 		probe_timing_enter = 10000;
 		probe_timing_exit = 40;
 	} else {
-		printf("Chip has negative value in probe_timing, failing "
+		msg_cerr("Chip has negative value in probe_timing, failing "
 		       "without chip access\n");
 		return 0;
 	}
@@ -166,9 +166,9 @@
 	if (probe_timing_exit)
 		programmer_delay(probe_timing_exit);
 
-	printf_debug("%s: id1 0x%02x, id2 0x%02x", __func__, largeid1, largeid2);
+	msg_cdbg("%s: id1 0x%02x, id2 0x%02x", __func__, largeid1, largeid2);
 	if (!oddparity(id1))
-		printf_debug(", id1 parity violation");
+		msg_cdbg(", id1 parity violation");
 
 	/* Read the product ID location again. We should now see normal flash contents. */
 	flashcontent1 = chip_readb(bios);
@@ -185,11 +185,11 @@
 	}
 
 	if (largeid1 == flashcontent1)
-		printf_debug(", id1 is normal flash content");
+		msg_cdbg(", id1 is normal flash content");
 	if (largeid2 == flashcontent2)
-		printf_debug(", id2 is normal flash content");
+		msg_cdbg(", id2 is normal flash content");
 
-	printf_debug("\n");
+	msg_cdbg("\n");
 	if (largeid1 != flash->manufacture_id || largeid2 != flash->model_id)
 		return 0;
 
@@ -223,7 +223,7 @@
 	toggle_ready_jedec_slow(bios);
 
 	if (check_erased_range(flash, page, pagesize)) {
-		fprintf(stderr,"ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -253,7 +253,7 @@
 	toggle_ready_jedec_slow(bios);
 
 	if (check_erased_range(flash, block, blocksize)) {
-		fprintf(stderr,"ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -282,7 +282,7 @@
 	toggle_ready_jedec_slow(bios);
 
 	if (check_erased_range(flash, 0, total_size)) {
-		fprintf(stderr,"ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -330,7 +330,7 @@
 		dst++, src++;
 	}
 	if (failed)
-		fprintf(stderr, " writing sector at 0x%lx failed!\n", olddst);
+		msg_cerr(" writing sector at 0x%lx failed!\n", olddst);
 
 	return failed;
 }
@@ -364,11 +364,11 @@
 	failed = verify_range(flash, src, start, page_size, NULL);
 
 	if (failed && tried++ < MAX_REFLASH_TRIES) {
-		fprintf(stderr, "retrying.\n");
+		msg_cerr("retrying.\n");
 		goto retry;
 	}
 	if (failed) {
-		fprintf(stderr, " page 0x%lx failed!\n",
+		msg_cerr(" page 0x%lx failed!\n",
 			(d - bios) / page_size);
 	}
 	return failed;
@@ -387,7 +387,7 @@
 		return MASK_AAA;
 		break;
 	default:
-		fprintf(stderr, "%s called with unknown mask\n", __func__);
+		msg_cerr("%s called with unknown mask\n", __func__);
 		return 0;
 		break;
 	}
@@ -403,19 +403,19 @@
 	mask = getaddrmask(flash);
 
 	if (erase_chip_jedec(flash)) {
-		fprintf(stderr,"ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	
-	printf("Programming page: ");
+	msg_cinfo("Programming page: ");
 	for (i = 0; i < total_size / page_size; i++) {
-		printf("%04d at address: 0x%08x", i, i * page_size);
+		msg_cinfo("%04d at address: 0x%08x", i, i * page_size);
 		if (write_page_write_jedec_common(flash, buf + i * page_size,
 					   i * page_size, page_size, mask))
 			failed = 1;
-		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+		msg_cinfo("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 	}
-	printf("\n");
+	msg_cinfo("DONE!\n");
 
 	return failed;
 }
@@ -431,22 +431,22 @@
 
 	programmer_delay(10);
 	if (erase_flash(flash)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 
-	printf("Programming page: ");
+	msg_cinfo("Programming page: ");
 	for (i = 0; i < flash->total_size; i++) {
 		if ((i & 0x3) == 0)
-			printf("address: 0x%08lx", (unsigned long)i * 1024);
+			msg_cinfo("address: 0x%08lx", (unsigned long)i * 1024);
 
                 write_sector_jedec_common(flash, buf + i * 1024, dst + i * 1024, 1024, mask);
 
 		if ((i & 0x3) == 0)
-			printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+			msg_cinfo("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 	}
 
-	printf("\n");
+	msg_cinfo("DONE!\n");
 	return 0;
 }
 
@@ -458,7 +458,7 @@
 
 	mask = getaddrmask(flash);
 	if ((addr != 0) || (blocksize != flash->total_size * 1024)) {
-		fprintf(stderr, "%s called with incorrect arguments\n",
+		msg_cerr("%s called with incorrect arguments\n",
 			__func__);
 		return -1;
 	}
diff --git a/m29f400bt.c b/m29f400bt.c
index c394074..c8ed5d8 100644
--- a/m29f400bt.c
+++ b/m29f400bt.c
@@ -42,8 +42,7 @@
 		//chip_writeb(0xF0, bios);
 		//programmer_delay(5);
 		toggle_ready_jedec(dst);
-		printf
-		    ("Value in the flash at address 0x%lx = %#x, want %#x\n",
+		msg_cerr("Value in the flash at address 0x%lx = %#x, want %#x\n",
 		     (dst - bios), chip_readb(dst), *src);
 		dst++;
 		src++;
@@ -73,7 +72,7 @@
 
 	programmer_delay(10);
 
-	printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
+	msg_cdbg("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
 
 	if (id1 == flash->manufacture_id && id2 == flash->model_id)
 		return 1;
@@ -97,7 +96,7 @@
 	toggle_ready_jedec(bios);
 
 	if (check_erased_range(flash, 0, flash->total_size * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -121,7 +120,7 @@
 	toggle_ready_jedec(bios);
 
 	if (check_erased_range(flash, start, len)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -130,7 +129,7 @@
 int block_erase_chip_m29f400bt(struct flashchip *flash, unsigned int address, unsigned int blocklen)
 {
 	if ((address != 0) || (blocklen != flash->total_size * 1024)) {
-		fprintf(stderr, "%s called with incorrect arguments\n",
+		msg_cerr("%s called with incorrect arguments\n",
 			__func__);
 		return -1;
 	}
@@ -145,7 +144,7 @@
 	chipaddr bios = flash->virtual_memory;
 
 	//erase_m29f400bt (flash);
-	printf("Programming page:\n ");
+	msg_cinfo("Programming page:\n ");
 	/*********************************
 	*Pages for M29F400BT:
 	* 16	0x7c000		0x7ffff		TOP
@@ -161,47 +160,47 @@
 	* 64	0x10000		0x1ffff
 	* 64	0x00000		0x0ffff		BOTTOM
 	*********************************/
-	printf("total_size/page_size = %d\n", total_size / page_size);
+	msg_cinfo("total_size/page_size = %d\n", total_size / page_size);
 	for (i = 0; i < (total_size / page_size) - 1; i++) {
-		printf("%04d at address: 0x%08x\n", i, i * page_size);
+		msg_cinfo("%04d at address: 0x%08x\n", i, i * page_size);
 		if (block_erase_m29f400bt(flash, i * page_size, page_size)) {
-			fprintf(stderr, "ERASE FAILED!\n");
+			msg_cerr("ERASE FAILED!\n");
 			return -1;
 		}
 		write_page_m29f400bt(bios, buf + i * page_size,
 				     bios + i * page_size, page_size);
-		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+		msg_cinfo("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 	}
 
-	printf("%04d at address: 0x%08x\n", 7, 0x70000);
+	msg_cinfo("%04d at address: 0x%08x\n", 7, 0x70000);
 	if (block_erase_m29f400bt(flash, 0x70000, 32 * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	write_page_m29f400bt(bios, buf + 0x70000, bios + 0x70000, 32 * 1024);
 
-	printf("%04d at address: 0x%08x\n", 8, 0x78000);
+	msg_cinfo("%04d at address: 0x%08x\n", 8, 0x78000);
 	if (block_erase_m29f400bt(flash, 0x78000, 8 * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	write_page_m29f400bt(bios, buf + 0x78000, bios + 0x78000, 8 * 1024);
 
-	printf("%04d at address: 0x%08x\n", 9, 0x7a000);
+	msg_cinfo("%04d at address: 0x%08x\n", 9, 0x7a000);
 	if (block_erase_m29f400bt(flash, 0x7a000, 8 * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	write_page_m29f400bt(bios, buf + 0x7a000, bios + 0x7a000, 8 * 1024);
 
-	printf("%04d at address: 0x%08x\n", 10, 0x7c000);
+	msg_cinfo("%04d at address: 0x%08x\n", 10, 0x7c000);
 	if (block_erase_m29f400bt(flash, 0x7c000, 16 * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	write_page_m29f400bt(bios, buf + 0x7c000, bios + 0x7c000, 16 * 1024);
 
-	printf("\n");
+	msg_cinfo("\n");
 
 	return 0;
 }
@@ -210,7 +209,7 @@
 {
 	chipaddr bios = flash->virtual_memory;
 
-	printf("Programming page:\n ");
+	msg_cinfo("Programming page:\n ");
 	/*********************************
 	*Pages for M29F400BT:
 	* 16	0x7c000		0x7ffff		TOP
@@ -226,35 +225,35 @@
 	* 64	0x10000		0x1ffff
 	* 64	0x00000		0x0ffff		BOTTOM
 	*********************************/
-	printf("%04d at address: 0x%08x\n", 7, 0x00000);
+	msg_cinfo("%04d at address: 0x%08x\n", 7, 0x00000);
 	if (block_erase_m29f400bt(flash, 0x00000, 64 * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	write_page_m29f400bt(bios, buf + 0x00000, bios + 0x00000, 64 * 1024);
 
-	printf("%04d at address: 0x%08x\n", 7, 0x10000);
+	msg_cinfo("%04d at address: 0x%08x\n", 7, 0x10000);
 	if (block_erase_m29f400bt(flash, 0x10000, 64 * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	write_page_m29f400bt(bios, buf + 0x10000, bios + 0x10000, 64 * 1024);
 
-	printf("%04d at address: 0x%08x\n", 7, 0x20000);
+	msg_cinfo("%04d at address: 0x%08x\n", 7, 0x20000);
 	if (block_erase_m29f400bt(flash, 0x20000, 64 * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	write_page_m29f400bt(bios, buf + 0x20000, bios + 0x20000, 64 * 1024);
 
-	printf("%04d at address: 0x%08x\n", 7, 0x30000);
+	msg_cinfo("%04d at address: 0x%08x\n", 7, 0x30000);
 	if (block_erase_m29f400bt(flash, 0x30000, 64 * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	write_page_m29f400bt(bios, buf + 0x30000, bios + 0x30000, 64 * 1024);
 
-	printf("\n");
+	msg_cinfo("\n");
 
 	return 0;
 }
diff --git a/sharplhf00l04.c b/sharplhf00l04.c
index 3f5cf3d..70b8135 100644
--- a/sharplhf00l04.c
+++ b/sharplhf00l04.c
@@ -34,14 +34,14 @@
 
 	// clear status register
 	chip_writeb(0x50, bios);
-	printf("Erase at 0x%lx\n", bios);
+	msg_cdbg("Erase at 0x%lx\n", bios);
 	status = wait_82802ab(flash->virtual_memory);
 	print_status_82802ab(status);
 	// clear write protect
-	printf("write protect is at 0x%lx\n", (wrprotect));
-	printf("write protect is 0x%x\n", chip_readb(wrprotect));
+	msg_cspew("write protect is at 0x%lx\n", (wrprotect));
+	msg_cspew("write protect is 0x%x\n", chip_readb(wrprotect));
 	chip_writeb(0, wrprotect);
-	printf("write protect is 0x%x\n", chip_readb(wrprotect));
+	msg_cspew("write protect is 0x%x\n", chip_readb(wrprotect));
 
 	// now start it
 	chip_writeb(0x20, bios);
@@ -50,10 +50,10 @@
 	// now let's see what the register is
 	status = wait_82802ab(flash->virtual_memory);
 	print_status_82802ab(status);
-	printf("DONE BLOCK 0x%x\n", blockaddr);
+	msg_cinfo("DONE BLOCK 0x%x\n", blockaddr);
 
 	if (check_erased_range(flash, blockaddr, blocklen)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -67,17 +67,17 @@
 	chipaddr bios = flash->virtual_memory;
 
 	if (erase_flash(flash)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
-	printf("Programming page: ");
+	msg_cinfo("Programming page: ");
 	for (i = 0; i < total_size / page_size; i++) {
-		printf("%04d at address: 0x%08x", i, i * page_size);
+		msg_cinfo("%04d at address: 0x%08x", i, i * page_size);
 		write_page_82802ab(bios, buf + i * page_size,
 				    bios + i * page_size, page_size);
-		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+		msg_cinfo("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 	}
-	printf("\n");
+	msg_cinfo("\n");
 
 	return 0;
 }
diff --git a/spi25.c b/spi25.c
index 54121b0..c6d1b65 100644
--- a/spi25.c
+++ b/spi25.c
@@ -39,10 +39,10 @@
 	ret = spi_send_command(sizeof(cmd), bytes, cmd, readarr);
 	if (ret)
 		return ret;
-	printf_debug("RDID returned");
+	msg_cspew("RDID returned");
 	for (i = 0; i < bytes; i++)
-		printf_debug(" 0x%02x", readarr[i]);
-	printf_debug(". ");
+		msg_cspew(" 0x%02x", readarr[i]);
+	msg_cspew(". ");
 	return 0;
 }
 
@@ -63,7 +63,7 @@
 	}
 	if (ret)
 		return ret;
-	printf_debug("REMS returned %02x %02x. ", readarr[0], readarr[1]);
+	msg_cspew("REMS returned %02x %02x. ", readarr[0], readarr[1]);
 	return 0;
 }
 
@@ -84,7 +84,7 @@
 	}
 	if (ret)
 		return ret;
-	printf_debug("RES returned %02x. ", readarr[0]);
+	msg_cspew("RES returned %02x. ", readarr[0]);
 	return 0;
 }
 
@@ -97,7 +97,7 @@
 	result = spi_send_command(sizeof(cmd), 0, cmd, NULL);
 
 	if (result)
-		fprintf(stderr, "%s failed\n", __func__);
+		msg_cerr("%s failed\n", __func__);
 
 	return result;
 }
@@ -120,12 +120,12 @@
 		return 0;
 
 	if (!oddparity(readarr[0]))
-		printf_debug("RDID byte 0 parity violation. ");
+		msg_cdbg("RDID byte 0 parity violation. ");
 
 	/* Check if this is a continuation vendor ID */
 	if (readarr[0] == 0x7f) {
 		if (!oddparity(readarr[1]))
-			printf_debug("RDID byte 1 parity violation. ");
+			msg_cdbg("RDID byte 1 parity violation. ");
 		id1 = (readarr[0] << 8) | readarr[1];
 		id2 = readarr[2];
 		if (bytes > 3) {
@@ -137,7 +137,7 @@
 		id2 = (readarr[1] << 8) | readarr[2];
 	}
 
-	printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
+	msg_cdbg("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
 
 	if (id1 == flash->manufacture_id && id2 == flash->model_id) {
 		/* Print the status register to tell the
@@ -192,7 +192,7 @@
 #endif
 		return probe_spi_rdid_generic(flash, 4);
 	default:
-		printf_debug("4b ID not supported on this SPI controller\n");
+		msg_cinfo("4b ID not supported on this SPI controller\n");
 	}
 
 	return 0;
@@ -209,7 +209,7 @@
 	id1 = readarr[0];
 	id2 = readarr[1];
 
-	printf_debug("%s: id1 0x%x, id2 0x%x\n", __func__, id1, id2);
+	msg_cdbg("%s: id1 0x%x, id2 0x%x\n", __func__, id1, id2);
 
 	if (id1 == flash->manufacture_id && id2 == flash->model_id) {
 		/* Print the status register to tell the
@@ -262,7 +262,7 @@
 
 	/* FIXME: Handle the case where RES gives a 2-byte response. */
 	id2 = readarr[0];
-	printf_debug("%s: id 0x%x\n", __func__, id2);
+	msg_cdbg("%s: id 0x%x\n", __func__, id2);
 	if (id2 != flash->model_id)
 		return 0;
 
@@ -283,7 +283,7 @@
 	/* Read Status Register */
 	ret = spi_send_command(sizeof(cmd), sizeof(readarr), cmd, readarr);
 	if (ret)
-		fprintf(stderr, "RDSR failed!\n");
+		msg_cerr("RDSR failed!\n");
 
 	return readarr[0];
 }
@@ -291,17 +291,17 @@
 /* Prettyprint the status register. Common definitions. */
 void spi_prettyprint_status_register_common(uint8_t status)
 {
-	printf_debug("Chip status register: Bit 5 / Block Protect 3 (BP3) is "
+	msg_cdbg("Chip status register: Bit 5 / Block Protect 3 (BP3) is "
 		     "%sset\n", (status & (1 << 5)) ? "" : "not ");
-	printf_debug("Chip status register: Bit 4 / Block Protect 2 (BP2) is "
+	msg_cdbg("Chip status register: Bit 4 / Block Protect 2 (BP2) is "
 		     "%sset\n", (status & (1 << 4)) ? "" : "not ");
-	printf_debug("Chip status register: Bit 3 / Block Protect 1 (BP1) is "
+	msg_cdbg("Chip status register: Bit 3 / Block Protect 1 (BP1) is "
 		     "%sset\n", (status & (1 << 3)) ? "" : "not ");
-	printf_debug("Chip status register: Bit 2 / Block Protect 0 (BP0) is "
+	msg_cdbg("Chip status register: Bit 2 / Block Protect 0 (BP0) is "
 		     "%sset\n", (status & (1 << 2)) ? "" : "not ");
-	printf_debug("Chip status register: Write Enable Latch (WEL) is "
+	msg_cdbg("Chip status register: Write Enable Latch (WEL) is "
 		     "%sset\n", (status & (1 << 1)) ? "" : "not ");
-	printf_debug("Chip status register: Write In Progress (WIP/BUSY) is "
+	msg_cdbg("Chip status register: Write In Progress (WIP/BUSY) is "
 		     "%sset\n", (status & (1 << 0)) ? "" : "not ");
 }
 
@@ -311,18 +311,18 @@
  */
 void spi_prettyprint_status_register_st_m25p(uint8_t status)
 {
-	printf_debug("Chip status register: Status Register Write Disable "
+	msg_cdbg("Chip status register: Status Register Write Disable "
 		     "(SRWD) is %sset\n", (status & (1 << 7)) ? "" : "not ");
-	printf_debug("Chip status register: Bit 6 is "
+	msg_cdbg("Chip status register: Bit 6 is "
 		     "%sset\n", (status & (1 << 6)) ? "" : "not ");
 	spi_prettyprint_status_register_common(status);
 }
 
 void spi_prettyprint_status_register_sst25(uint8_t status)
 {
-	printf_debug("Chip status register: Block Protect Write Disable "
+	msg_cdbg("Chip status register: Block Protect Write Disable "
 		     "(BPL) is %sset\n", (status & (1 << 7)) ? "" : "not ");
-	printf_debug("Chip status register: Auto Address Increment Programming "
+	msg_cdbg("Chip status register: Auto Address Increment Programming "
 		     "(AAI) is %sset\n", (status & (1 << 6)) ? "" : "not ");
 	spi_prettyprint_status_register_common(status);
 }
@@ -342,7 +342,7 @@
 		"all", "all"
 	};
 	spi_prettyprint_status_register_sst25(status);
-	printf_debug("Resulting block protection : %s\n",
+	msg_cdbg("Resulting block protection : %s\n",
 		     bpt[(status & 0x1c) >> 2]);
 }
 
@@ -356,7 +356,7 @@
 		"all blocks", "all blocks", "all blocks", "all blocks"
 	};
 	spi_prettyprint_status_register_sst25(status);
-	printf_debug("Resulting block protection : %s\n",
+	msg_cdbg("Resulting block protection : %s\n",
 		bpt[(status & 0x1c) >> 2]);
 }
 
@@ -365,7 +365,7 @@
 	uint8_t status;
 
 	status = spi_read_status_register();
-	printf_debug("Chip status register is %02x\n", status);
+	msg_cdbg("Chip status register is %02x\n", status);
 	switch (flash->manufacture_id) {
 	case ST_ID:
 		if (((flash->model_id & 0xff00) == 0x2000) ||
@@ -416,13 +416,13 @@
 	
 	result = spi_disable_blockprotect();
 	if (result) {
-		fprintf(stderr, "spi_disable_blockprotect failed\n");
+		msg_cerr("spi_disable_blockprotect failed\n");
 		return result;
 	}
 	
 	result = spi_send_multicommand(cmds);
 	if (result) {
-		fprintf(stderr, "%s failed during command execution\n",
+		msg_cerr("%s failed during command execution\n",
 			__func__);
 		return result;
 	}
@@ -433,7 +433,7 @@
 	while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP)
 		programmer_delay(1000 * 1000);
 	if (check_erased_range(flash, 0, flash->total_size * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -462,13 +462,13 @@
 
 	result = spi_disable_blockprotect();
 	if (result) {
-		fprintf(stderr, "spi_disable_blockprotect failed\n");
+		msg_cerr("spi_disable_blockprotect failed\n");
 		return result;
 	}
 
 	result = spi_send_multicommand(cmds);
 	if (result) {
-		fprintf(stderr, "%s failed during command execution\n", __func__);
+		msg_cerr("%s failed during command execution\n", __func__);
 		return result;
 	}
 	/* Wait until the Write-In-Progress bit is cleared.
@@ -478,23 +478,12 @@
 	while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP)
 		programmer_delay(1000 * 1000);
 	if (check_erased_range(flash, 0, flash->total_size * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
 }
 
-int spi_chip_erase_60_c7(struct flashchip *flash)
-{
-	int result;
-	result = spi_chip_erase_60(flash);
-	if (result) {
-		printf_debug("spi_chip_erase_60 failed, trying c7\n");
-		result = spi_chip_erase_c7(flash);
-	}
-	return result;
-}
-
 int spi_block_erase_52(struct flashchip *flash, unsigned int addr, unsigned int blocklen)
 {
 	int result;
@@ -523,7 +512,7 @@
 
 	result = spi_send_multicommand(cmds);
 	if (result) {
-		fprintf(stderr, "%s failed during command execution at address 0x%x\n",
+		msg_cerr("%s failed during command execution at address 0x%x\n",
 			__func__, addr);
 		return result;
 	}
@@ -533,7 +522,7 @@
 	while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP)
 		programmer_delay(100 * 1000);
 	if (check_erased_range(flash, addr, blocklen)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -572,7 +561,7 @@
 
 	result = spi_send_multicommand(cmds);
 	if (result) {
-		fprintf(stderr, "%s failed during command execution at address 0x%x\n",
+		msg_cerr("%s failed during command execution at address 0x%x\n",
 			__func__, addr);
 		return result;
 	}
@@ -582,7 +571,7 @@
 	while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP)
 		programmer_delay(100 * 1000);
 	if (check_erased_range(flash, addr, blocklen)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -619,7 +608,7 @@
 
 	result = spi_send_multicommand(cmds);
 	if (result) {
-		fprintf(stderr, "%s failed during command execution at address 0x%x\n",
+		msg_cerr("%s failed during command execution at address 0x%x\n",
 			__func__, addr);
 		return result;
 	}
@@ -629,7 +618,7 @@
 	while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP)
 		programmer_delay(100 * 1000);
 	if (check_erased_range(flash, addr, blocklen)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -643,17 +632,17 @@
 
 	spi_disable_blockprotect();
 
-	printf("Erasing chip: \n");
+	msg_cinfo("Erasing chip: \n");
 
 	for (i = 0; i < total_size / erase_size; i++) {
 		rc = spi_block_erase_d8(flash, i * erase_size, erase_size);
 		if (rc) {
-			fprintf(stderr, "Error erasing block at 0x%x\n", i);
+			msg_cerr("Error erasing block at 0x%x\n", i);
 			break;
 		}
 	}
 
-	printf("\n");
+	msg_cinfo("\n");
 
 	return rc;
 }
@@ -687,7 +676,7 @@
 
 	result = spi_send_multicommand(cmds);
 	if (result) {
-		fprintf(stderr, "%s failed during command execution at address 0x%x\n",
+		msg_cerr("%s failed during command execution at address 0x%x\n",
 			__func__, addr);
 		return result;
 	}
@@ -697,7 +686,7 @@
 	while (spi_read_status_register() & JEDEC_RDSR_BIT_WIP)
 		programmer_delay(10 * 1000);
 	if (check_erased_range(flash, addr, blocklen)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -706,7 +695,7 @@
 int spi_block_erase_60(struct flashchip *flash, unsigned int addr, unsigned int blocklen)
 {
 	if ((addr != 0) || (blocklen != flash->total_size * 1024)) {
-		fprintf(stderr, "%s called with incorrect arguments\n",
+		msg_cerr("%s called with incorrect arguments\n",
 			__func__);
 		return -1;
 	}
@@ -716,7 +705,7 @@
 int spi_block_erase_c7(struct flashchip *flash, unsigned int addr, unsigned int blocklen)
 {
 	if ((addr != 0) || (blocklen != flash->total_size * 1024)) {
-		fprintf(stderr, "%s called with incorrect arguments\n",
+		msg_cerr("%s called with incorrect arguments\n",
 			__func__);
 		return -1;
 	}
@@ -732,7 +721,7 @@
 	result = spi_send_command(sizeof(cmd), JEDEC_EWSR_INSIZE, cmd, NULL);
 
 	if (result)
-		fprintf(stderr, "%s failed\n", __func__);
+		msg_cerr("%s failed\n", __func__);
 
 	return result;
 }
@@ -765,7 +754,7 @@
 
 	result = spi_send_multicommand(cmds);
 	if (result) {
-		fprintf(stderr, "%s failed during command execution\n",
+		msg_cerr("%s failed during command execution\n",
 			__func__);
 	}
 	return result;
@@ -800,7 +789,7 @@
 
 	result = spi_send_multicommand(cmds);
 	if (result) {
-		fprintf(stderr, "%s failed during command execution at address 0x%x\n",
+		msg_cerr("%s failed during command execution at address 0x%x\n",
 			__func__, addr);
 	}
 	return result;
@@ -835,11 +824,11 @@
 	}};
 
 	if (!len) {
-		fprintf(stderr, "%s called for zero-length write\n", __func__);
+		msg_cerr("%s called for zero-length write\n", __func__);
 		return 1;
 	}
 	if (len > 256) {
-		fprintf(stderr, "%s called for too long a write\n", __func__);
+		msg_cerr("%s called for too long a write\n", __func__);
 		return 1;
 	}
 
@@ -847,7 +836,7 @@
 
 	result = spi_send_multicommand(cmds);
 	if (result) {
-		fprintf(stderr, "%s failed during command execution at address 0x%x\n",
+		msg_cerr("%s failed during command execution at address 0x%x\n",
 			__func__, addr);
 	}
 	return result;
@@ -861,10 +850,10 @@
 	status = spi_read_status_register();
 	/* If there is block protection in effect, unprotect it first. */
 	if ((status & 0x3c) != 0) {
-		printf_debug("Some block protection in effect, disabling\n");
+		msg_cdbg("Some block protection in effect, disabling\n");
 		result = spi_write_status_register(status & ~0x3c);
 		if (result) {
-			fprintf(stderr, "spi_write_status_register failed\n");
+			msg_cerr("spi_write_status_register failed\n");
 			return result;
 		}
 	}
@@ -936,12 +925,12 @@
 
 	spi_disable_blockprotect();
 	/* Erase first */
-	printf("Erasing flash before programming... ");
+	msg_cinfo("Erasing flash before programming... ");
 	if (erase_flash(flash)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
-	printf("done.\n");
+	msg_cinfo("done.\n");
 	for (i = 0; i < total_size; i++) {
 		result = spi_byte_program(i, buf[i]);
 		if (result)
@@ -962,7 +951,7 @@
 	switch (spi_controller) {
 #if INTERNAL_SUPPORT == 1
 	case SPI_CONTROLLER_WBSIO:
-		fprintf(stderr, "%s: impossible with Winbond SPI masters,"
+		msg_cerr("%s: impossible with Winbond SPI masters,"
 				" degrading to byte program\n", __func__);
 		return spi_chip_write_1(flash, buf);
 #endif
@@ -970,7 +959,7 @@
 		break;
 	}
 	if (erase_flash(flash)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	/* FIXME: This will fail on ICH/VIA SPI. */
diff --git a/sst28sf040.c b/sst28sf040.c
index 0c90526..b9e33ab 100644
--- a/sst28sf040.c
+++ b/sst28sf040.c
@@ -63,7 +63,7 @@
 	toggle_ready_jedec(bios);
 
 	if (check_erased_range(flash, address, sector_size)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -105,7 +105,7 @@
 	toggle_ready_jedec(bios);
 
 	if (check_erased_range(flash, 0, flash->total_size * 1024)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -120,21 +120,21 @@
 
 	unprotect_28sf040(bios);
 
-	printf("Programming page: ");
+	msg_cinfo("Programming page: ");
 	for (i = 0; i < total_size / page_size; i++) {
 		/* erase the page before programming */
 		if (erase_sector_28sf040(flash, i * page_size, page_size)) {
-			fprintf(stderr, "ERASE FAILED!\n");
+			msg_cerr("ERASE FAILED!\n");
 			return -1;
 		}
 
 		/* write to the sector */
-		printf("%04d at address: 0x%08x", i, i * page_size);
+		msg_cinfo("%04d at address: 0x%08x", i, i * page_size);
 		write_sector_28sf040(bios, buf + i * page_size,
 				     bios + i * page_size, page_size);
-		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+		msg_cinfo("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 	}
-	printf("\n");
+	msg_cinfo("\n");
 
 	protect_28sf040(bios);
 
@@ -144,7 +144,7 @@
 int erase_chip_28sf040(struct flashchip *flash, unsigned int addr, unsigned int blocklen)
 {
 	if ((addr != 0) || (blocklen != flash->total_size * 1024)) {
-		fprintf(stderr, "%s called with incorrect arguments\n",
+		msg_cerr("%s called with incorrect arguments\n",
 			__func__);
 		return -1;
 	}
diff --git a/sst49lfxxxc.c b/sst49lfxxxc.c
index e7e5b61..1331cda 100644
--- a/sst49lfxxxc.c
+++ b/sst49lfxxxc.c
@@ -27,7 +27,7 @@
 int unlock_block_49lfxxxc(struct flashchip *flash, unsigned long address, unsigned char bits)
 {
 	unsigned long lock = flash->virtual_registers + address + 2;
-	printf_debug("lockbits at address=0x%08lx is 0x%01x\n", lock, chip_readb(lock));
+	msg_cdbg("lockbits at address=0x%08lx is 0x%01x\n", lock, chip_readb(lock));
 	chip_writeb(bits, lock);
 
 	return 0;
@@ -39,30 +39,30 @@
 	int i, left = flash->total_size * 1024;
 	unsigned long address;
 
-	printf_debug("\nbios=0x%08lx\n", registers);
+	msg_cdbg("\nbios=0x%08lx\n", registers);
 	for (i = 0; left > 65536; i++, left -= 65536) {
-		printf_debug("lockbits at address=0x%08lx is 0x%01x\n",
+		msg_cdbg("lockbits at address=0x%08lx is 0x%01x\n",
 			     registers + (i * 65536) + 2,
 			     chip_readb(registers + (i * 65536) + 2));
 		chip_writeb(bits, registers + (i * 65536) + 2);
 	}
 	address = i * 65536;
-	printf_debug("lockbits at address=0x%08lx is 0x%01x\n",
+	msg_cdbg("lockbits at address=0x%08lx is 0x%01x\n",
 		     registers + address + 2,
 		     chip_readb(registers + address + 2));
 	chip_writeb(bits, registers + address + 2);
 	address += 32768;
-	printf_debug("lockbits at address=0x%08lx is 0x%01x\n",
+	msg_cdbg("lockbits at address=0x%08lx is 0x%01x\n",
 		     registers + address + 2,
 		     chip_readb(registers + address + 2));
 	chip_writeb(bits, registers + address + 2);
 	address += 8192;
-	printf_debug("lockbits at address=0x%08lx is 0x%01x\n",
+	msg_cdbg("lockbits at address=0x%08lx is 0x%01x\n",
 		     registers + address + 2,
 		     chip_readb(registers + address + 2));
 	chip_writeb(bits, registers + address + 2);
 	address += 8192;
-	printf_debug("lockbits at address=0x%08lx is 0x%01x\n",
+	msg_cdbg("lockbits at address=0x%08lx is 0x%01x\n",
 		     registers + address + 2,
 		     chip_readb(registers + address + 2));
 	chip_writeb(bits, registers + address + 2);
@@ -86,7 +86,7 @@
 	status = wait_82802ab(bios);
 
 	if (check_erased_range(flash, address, sector_size)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
 	return 0;
@@ -100,21 +100,21 @@
 	chipaddr bios = flash->virtual_memory;
 
 	write_lockbits_49lfxxxc(flash, 0);
-	printf("Programming page: ");
+	msg_cinfo("Programming page: ");
 	for (i = 0; i < total_size / page_size; i++) {
 		/* erase the page before programming */
 		if (erase_sector_49lfxxxc(flash, i * page_size, flash->page_size)) {
-			fprintf(stderr, "ERASE FAILED!\n");
+			msg_cerr("ERASE FAILED!\n");
 			return -1;
 		}
 
 		/* write to the sector */
-		printf("%04d at address: 0x%08x", i, i * page_size);
+		msg_cinfo("%04d at address: 0x%08x", i, i * page_size);
 		write_page_82802ab(bios, buf + i * page_size,
 				      bios + i * page_size, page_size);
-		printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+		msg_cinfo("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
 	}
-	printf("\n");
+	msg_cinfo("\n");
 
 	chip_writeb(0xFF, bios);
 
diff --git a/sst_fwhub.c b/sst_fwhub.c
index 328d39a..2b867c8 100644
--- a/sst_fwhub.c
+++ b/sst_fwhub.c
@@ -33,20 +33,20 @@
 	uint8_t blockstatus;
 
 	blockstatus = chip_readb(registers + offset + 2);
-	printf_debug("Lock status for 0x%06x (size 0x%06x) is %02x, ",
+	msg_cdbg("Lock status for 0x%06x (size 0x%06x) is %02x, ",
 		     offset, flash->page_size, blockstatus);
 	switch (blockstatus & 0x3) {
 	case 0x0:
-		printf_debug("full access\n");
+		msg_cdbg("full access\n");
 		break;
 	case 0x1:
-		printf_debug("write locked\n");
+		msg_cdbg("write locked\n");
 		break;
 	case 0x2:
-		printf_debug("locked open\n");
+		msg_cdbg("locked open\n");
 		break;
 	case 0x3:
-		printf_debug("write locked down\n");
+		msg_cdbg("write locked down\n");
 		break;
 	}
 	/* Return content of the write_locked bit */
@@ -61,11 +61,11 @@
 	blockstatus = check_sst_fwhub_block_lock(flash, offset);
 
 	if (blockstatus) {
-		printf_debug("Trying to clear lock for 0x%06x... ", offset)
+		msg_cdbg("Trying to clear lock for 0x%06x... ", offset);
 		chip_writeb(0, registers + offset + 2);
 
 		blockstatus = check_sst_fwhub_block_lock(flash, offset);
-		printf_debug("%s\n", (blockstatus) ? "failed" : "OK");
+		msg_cdbg("%s\n", (blockstatus) ? "failed" : "OK");
 	}
 
 	return blockstatus;
diff --git a/stm50flw0x0x.c b/stm50flw0x0x.c
index 3300969..8a00308 100644
--- a/stm50flw0x0x.c
+++ b/stm50flw0x0x.c
@@ -61,19 +61,19 @@
 
 		// unlock each 4k-sector
 		for (j = 0; j < 0x10000; j += 0x1000) {
-			printf_debug("unlocking at 0x%x\n", offset + j);
+			msg_cdbg("unlocking at 0x%x\n", offset + j);
 			chip_writeb(unlock_sector, wrprotect + offset + j);
 			if (chip_readb(wrprotect + offset + j) != unlock_sector) {
-				printf("Cannot unlock sector @ 0x%x\n",
+				msg_cerr("Cannot unlock sector @ 0x%x\n",
 				       offset + j);
 				return -1;
 			}
 		}
 	} else {
-		printf_debug("unlocking at 0x%x\n", offset);
+		msg_cdbg("unlocking at 0x%x\n", offset);
 		chip_writeb(unlock_sector, wrprotect + offset);
 		if (chip_readb(wrprotect + offset) != unlock_sector) {
-			printf("Cannot unlock sector @ 0x%x\n", offset);
+			msg_cerr("Cannot unlock sector @ 0x%x\n", offset);
 			return -1;
 		}
 	}
@@ -87,7 +87,7 @@
 
 	for (i = 0; i < flash->total_size * 1024; i+= flash->page_size) {
 		if(unlock_block_stm50flw0x0x(flash, i)) {
-			fprintf(stderr, "UNLOCK FAILED!\n");
+			msg_cerr("UNLOCK FAILED!\n");
 			return -1;
 		}
 	}
@@ -101,7 +101,7 @@
 
 	// clear status register
 	chip_writeb(0x50, bios);
-	printf_debug("Erase at 0x%lx\n", bios);
+	msg_cdbg("Erase at 0x%lx\n", bios);
 	// now start it
 	chip_writeb(0x32, bios);
 	chip_writeb(0xd0, bios);
@@ -110,10 +110,10 @@
 	wait_82802ab(flash->virtual_memory);
 
 	if (check_erased_range(flash, sector, sectorsize)) {
-		fprintf(stderr, "ERASE FAILED!\n");
+		msg_cerr("ERASE FAILED!\n");
 		return -1;
 	}
-	printf("DONE BLOCK 0x%x\n", sector);
+	msg_cinfo("DONE BLOCK 0x%x\n", sector);
 
 	return 0;
 }
@@ -130,21 +130,20 @@
 		return -1;
 	}
 
-	printf("Erasing page:\n");
+	msg_cinfo("Erasing page:\n");
 	for (i = 0; i < total_size / page_size; i++) {
-		printf
-		    ("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
-		printf("%04d at address: 0x%08x ", i, i * page_size);
+		msg_cinfo("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
+		msg_cinfo("%04d at address: 0x%08x ", i, i * page_size);
 		//if (unlock_block_stm50flw0x0x(flash, i * page_size)) {
-		//	fprintf(stderr, "UNLOCK FAILED!\n");
+		//	msg_cerr("UNLOCK FAILED!\n");
 		//	return -1;
 		//}
 		if (erase_block_82802ab(flash, i * page_size, page_size)) {
-			fprintf(stderr, "ERASE FAILED!\n");
+			msg_cerr("ERASE FAILED!\n");
 			return -1;
 		}
 	}
-	printf("\n");
+	msg_cinfo("\n");
 
 	return 0;
 }
diff --git a/w29ee011.c b/w29ee011.c
index 63cf4fc..6b88a1c 100644
--- a/w29ee011.c
+++ b/w29ee011.c
@@ -29,7 +29,7 @@
 	extern char *chip_to_probe;
 
 	if (!chip_to_probe || strcmp(chip_to_probe, "W29EE011")) {
-		printf_debug("Probing disabled for Winbond W29EE011 because "
+		msg_cdbg("Probing disabled for Winbond W29EE011 because "
 			     "the probing sequence puts the AMIC A49LF040A in "
 			     "a funky state. Use 'flashrom -c W29EE011' if you "
 			     "have a board with this chip.\n");
@@ -62,7 +62,7 @@
 	chip_writeb(0xF0, bios + 0x5555);
 	programmer_delay(10);
 
-	printf_debug("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
+	msg_cdbg("%s: id1 0x%02x, id2 0x%02x\n", __func__, id1, id2);
 
 	if (id1 == flash->manufacture_id && id2 == flash->model_id)
 		return 1;
diff --git a/w39v040c.c b/w39v040c.c
index 74cd1e2..dc4de1c 100644
--- a/w39v040c.c
+++ b/w39v040c.c
@@ -42,7 +42,7 @@
 	chip_writeb(0xF0, bios + 0x5555);
 	programmer_delay(40);
 
-	printf("%s: Boot block #TBL is %slocked, rest of chip #WP is %slocked.\n",
+	msg_cdbg("%s: Boot block #TBL is %slocked, rest of chip #WP is %slocked.\n",
 		__func__, lock & 0x4 ? "" : "un", lock & 0x8 ? "" : "un");
 	return 0;
 }
diff --git a/w39v080fa.c b/w39v080fa.c
index 047f86b..62c55f4 100644
--- a/w39v080fa.c
+++ b/w39v080fa.c
@@ -26,37 +26,37 @@
 	chipaddr wrprotect = flash->virtual_registers + offset + 2;
 	uint8_t locking;
 
-	printf_debug("Trying to unlock block @0x%08x = 0x%02x\n", offset,
+	msg_cdbg("Trying to unlock block @0x%08x = 0x%02x\n", offset,
 		     chip_readb(wrprotect));
 
 	locking = chip_readb(wrprotect);
 	switch (locking & 0x7) {
 	case 0:
-		printf_debug("Full Access.\n");
+		msg_cdbg("Full Access.\n");
 		return 0;
 	case 1:
-		printf_debug("Write Lock (Default State).\n");
+		msg_cdbg("Write Lock (Default State).\n");
 		chip_writeb(0, wrprotect);
 		return 0;
 	case 2:
-		printf_debug("Locked Open (Full Access, Lock Down).\n");
+		msg_cdbg("Locked Open (Full Access, Lock Down).\n");
 		return 0;
 	case 3:
-		fprintf(stderr, "Error: Write Lock, Locked Down.\n");
+		msg_cerr("Error: Write Lock, Locked Down.\n");
 		return -1;
 	case 4:
-		printf_debug("Read Lock.\n");
+		msg_cdbg("Read Lock.\n");
 		chip_writeb(0, wrprotect);
 		return 0;
 	case 5:
-		printf_debug("Read/Write Lock.\n");
+		msg_cdbg("Read/Write Lock.\n");
 		chip_writeb(0, wrprotect);
 		return 0;
 	case 6:
-		fprintf(stderr, "Error: Read Lock, Locked Down.\n");
+		msg_cerr("Error: Read Lock, Locked Down.\n");
 		return -1;
 	case 7:
-		fprintf(stderr, "Error: Read/Write Lock, Locked Down.\n");
+		msg_cerr("Error: Read/Write Lock, Locked Down.\n");
 		return -1;
 	}
 
@@ -89,17 +89,17 @@
 	chip_writeb(0xF0, bios + 0x5555);
 	programmer_delay(10);
 
-	printf_debug("Lockout bits:\n");
+	msg_cdbg("Lockout bits:\n");
 
 	if (locking & (1 << 2))
-		fprintf(stderr, "Error: hardware bootblock locking (#TBL).\n");
+		msg_cerr("Error: hardware bootblock locking (#TBL).\n");
 	else
-		printf_debug("No hardware bootblock locking (good!)\n");
+		msg_cdbg("No hardware bootblock locking (good!)\n");
 
 	if (locking & (1 << 3))
-		fprintf(stderr, "Error: hardware block locking (#WP).\n");
+		msg_cerr("Error: hardware block locking (#WP).\n");
 	else
-		printf_debug("No hardware block locking (good!)\n");
+		msg_cdbg("No hardware block locking (good!)\n");
 
 	if (locking & ((1 << 2) | (1 << 3)))
 		return -1;
