diff --git a/cpu/sh4/watchdog.c b/cpu/sh4/watchdog.c
index 346e217..f692429 100644
--- a/cpu/sh4/watchdog.c
+++ b/cpu/sh4/watchdog.c
@@ -17,34 +17,55 @@
 
 #include <common.h>
 #include <asm/processor.h>
+#include <asm/io.h>
 
 #define WDT_BASE	WTCNT
 
-static unsigned char cnt_read (void){
-	return *((volatile unsigned char *)(WDT_BASE + 0x00));
-}
+#define WDT_WD		(1 << 6)
+#define WDT_RST_P	(0)
+#define WDT_RST_M	(1 << 5)
+#define WDT_ENABLE	(1 << 7)
 
-static unsigned char csr_read (void){
-	return *((volatile unsigned char *)(WDT_BASE + 0x04));
-}
-
-static void cnt_write (unsigned char value){
-	while (csr_read() & (1 << 5)) {
-		/* delay */
-	}
-	*((volatile unsigned short *)(WDT_BASE + 0x00))
-		= ((unsigned short) value) | 0x5A00;
-}
-
-static void csr_write (unsigned char value){
-	*((volatile unsigned short *)(WDT_BASE + 0x04))
-		= ((unsigned short) value) | 0xA500;
-}
-
-
-int watchdog_init (void){ return 0; }
-
-void reset_cpu (unsigned long ignored)
+#if defined(CONFIG_WATCHDOG)
+static unsigned char csr_read(void)
 {
-	while(1);
+	return inb(WDT_BASE + 0x04);
+}
+
+static void cnt_write(unsigned char value)
+{
+	outl((unsigned short)value | 0x5A00, WDT_BASE + 0x00);
+}
+
+static void csr_write(unsigned char value)
+{
+	outl((unsigned short)value | 0xA500, WDT_BASE + 0x04);
+}
+
+void watchdog_reset(void)
+{
+	outl(0x55000000, WDT_BASE + 0x08);
+}
+
+int watchdog_init(void)
+{
+	/* Set overflow time*/
+	cnt_write(0);
+	/* Power on reset */
+	csr_write(WDT_WD|WDT_RST_P|WDT_ENABLE);
+
+	return 0;
+}
+
+int watchdog_disable(void)
+{
+	csr_write(csr_read() & ~WDT_ENABLE);
+	return 0;
+}
+#endif
+
+void reset_cpu(unsigned long ignored)
+{
+	while (1)
+		;
 }
diff --git a/lib_sh/board.c b/lib_sh/board.c
index eb81bd9..6dfab4e 100644
--- a/lib_sh/board.c
+++ b/lib_sh/board.c
@@ -23,6 +23,7 @@
 #include <malloc.h>
 #include <devices.h>
 #include <version.h>
+#include <watchdog.h>
 #include <net.h>
 #include <environment.h>
 
@@ -30,7 +31,6 @@
 extern int cpu_init(void);
 extern int board_init(void);
 extern int dram_init(void);
-extern int watchdog_init(void);
 extern int timer_init(void);
 
 const char version_string[] = U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")";
@@ -41,17 +41,17 @@
 static unsigned long mem_malloc_end;
 static unsigned long mem_malloc_brk;
 
-static void mem_malloc_init (void)
+static void mem_malloc_init(void)
 {
 
 	mem_malloc_start = (TEXT_BASE - CFG_GBL_DATA_SIZE - CFG_MALLOC_LEN);
 	mem_malloc_end = (mem_malloc_start + CFG_MALLOC_LEN - 16);
 	mem_malloc_brk = mem_malloc_start;
-	memset ((void *) mem_malloc_start, 0,
+	memset((void *) mem_malloc_start, 0,
 		(mem_malloc_end - mem_malloc_start));
 }
 
-void *sbrk (ptrdiff_t increment)
+void *sbrk(ptrdiff_t increment)
 {
 	unsigned long old = mem_malloc_brk;
 	unsigned long new = old + increment;
@@ -70,37 +70,45 @@
 	DECLARE_GLOBAL_DATA_PTR;
 
 	gd->bd->bi_flashsize = flash_init();
-	printf("FLASH: %dMB\n", gd->bd->bi_flashsize / (1024*1024));
+	printf("FLASH: %ldMB\n", gd->bd->bi_flashsize / (1024*1024));
 
 	return 0;
 }
 
 #if defined(CONFIG_CMD_NAND)
-#include <nand.h>
-static int sh_nand_init(void)
-{
-	printf("NAND: ");
-	nand_init();	/* go init the NAND */
-	return 0;
-}
+# include <nand.h>
+# define INIT_FUNC_NAND_INIT nand_init,
+#else
+# define INIT_FUNC_NAND_INIT
 #endif /* CONFIG_CMD_NAND */
 
+#if defined(CONFIG_WATCHDOG)
+extern int watchdog_init(void);
+extern int watchdog_disable(void);
+# define INIT_FUNC_WATCHDOG_INIT	watchdog_init,
+# define WATCHDOG_DISABLE       	watchdog_disable
+#else
+# define INIT_FUNC_WATCHDOG_INIT
+# define WATCHDOG_DISABLE
+#endif /* CONFIG_WATCHDOG */
+
 #if defined(CONFIG_CMD_IDE)
-#include <ide.h>
-static int sh_marubun_init(void)
-{
-	puts ("IDE:   ");
-	ide_init();
-	return 0;
-}
-#endif /* (CONFIG_CMD_IDE) */
+# include <ide.h>
+# define INIT_FUNC_IDE_INIT	ide_init,
+#else
+# define INIT_FUNC_IDE_INIT
+#endif /* CONFIG_CMD_IDE */
 
 #if defined(CONFIG_PCI)
+#include <pci.h>
 static int sh_pci_init(void)
 {
 	pci_init();
 	return 0;
 }
+# define INIT_FUNC_PCI_INIT sh_pci_init,
+#else
+# define INIT_FUNC_PCI_INIT
 #endif /* CONFIG_PCI */
 
 static int sh_mem_env_init(void)
@@ -123,7 +131,8 @@
 	s = getenv("ethaddr");
 	for (i = 0; i < 6; ++i) {
 		gd->bd->bi_enetaddr[i] = s ? simple_strtoul(s, &e, 16) : 0;
-		if (s) s = (*e) ? e + 1 : e;
+		if (s)
+			s = (*e) ? e + 1 : e;
 	}
 
 	return 0;
@@ -136,24 +145,20 @@
 {
 	cpu_init,		/* basic cpu dependent setup */
 	board_init,		/* basic board dependent setup */
-	interrupt_init,		/* set up exceptions */
+	interrupt_init,	/* set up exceptions */
 	env_init,		/* event init */
-	serial_init,		/* SCIF init */
-	watchdog_init,		/* watchdog init */
+	serial_init,	/* SCIF init */
+	INIT_FUNC_WATCHDOG_INIT	/* watchdog init */
 	console_init_f,
 	display_options,
 	checkcpu,
 	checkboard,		/* Check support board */
 	dram_init,		/* SDRAM init */
 	timer_init,		/* SuperH Timer (TCNT0 only) init */
-	sh_flash_init,		/* Flash memory(NOR) init*/
+	sh_flash_init,	/* Flash memory(NOR) init*/
 	sh_mem_env_init,
-#if defined(CONFIG_CMD_NAND)
-	sh_nand_init,		/* Flash memory (NAND) init */
-#endif
-#if defined(CONFIG_PCI)
-	sh_pci_init,		/* PCI Init */
-#endif
+	INIT_FUNC_NAND_INIT/* Flash memory (NAND) init */
+	INIT_FUNC_PCI_INIT	/* PCI init */
 	devices_init,
 	console_init_r,
 	interrupt_init,
@@ -166,20 +171,18 @@
 	NULL			/* Terminate this list */
 };
 
-void sh_generic_init (void)
+void sh_generic_init(void)
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
 	bd_t *bd;
 	init_fnc_t **init_fnc_ptr;
-	int i;
-	char *s;
 
-	memset (gd, 0, CFG_GBL_DATA_SIZE);
+	memset(gd, 0, CFG_GBL_DATA_SIZE);
 
 	gd->flags |= GD_FLG_RELOC;	/* tell others: relocation done */
 
-	gd->bd = (bd_t *) (gd + 1);	/* At end of global data */
+	gd->bd = (bd_t *)(gd + 1);	/* At end of global data */
 	gd->baudrate = CONFIG_BAUDRATE;
 
 	gd->cpu_clk = CONFIG_SYS_CLK_FREQ;
@@ -189,35 +192,51 @@
 	bd->bi_memsize = CFG_SDRAM_SIZE;
 	bd->bi_flashstart = CFG_FLASH_BASE;
 #if defined(CFG_SRAM_BASE) && defined(CFG_SRAM_SIZE)
-	bd->bi_sramstart= CFG_SRAM_BASE;
+	bd->bi_sramstart = CFG_SRAM_BASE;
 	bd->bi_sramsize	= CFG_SRAM_SIZE;
 #endif
 	bd->bi_baudrate	= CONFIG_BAUDRATE;
 
-	for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr , i++) {
-		if ((*init_fnc_ptr) () != 0) {
+	for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
+		WATCHDOG_RESET();
+		if ((*init_fnc_ptr) () != 0)
 			hang();
-		}
 	}
 
-#if defined(CONFIG_CMD_NET)
-	puts ("Net:   ");
-	eth_initialize(gd->bd);
+#ifdef CONFIG_WATCHDOG
+	/* disable watchdog if environment is set */
+	{
+		char *s = getenv("watchdog");
+		if (s != NULL)
+			if (strncmp(s, "off", 3) == 0)
+				WATCHDOG_DISABLE();
+	}
+#endif /* CONFIG_WATCHDOG*/
 
-	if ((s = getenv ("bootfile")) != NULL) {
-		copy_filename (BootFile, s, sizeof (BootFile));
+
+#if defined(CONFIG_CMD_NET)
+	{
+		char *s;
+		puts("Net:   ");
+		eth_initialize(gd->bd);
+
+		s = getenv("bootfile");
+		if (s != NULL)
+			copy_filename(BootFile, s, sizeof(BootFile));
 	}
 #endif /* CONFIG_CMD_NET */
 
 	while (1) {
+		WATCHDOG_RESET();
 		main_loop();
 	}
 }
 
 /***********************************************************************/
 
-void hang (void)
+void hang(void)
 {
-	puts ("Board ERROR\n");
-	for (;;);
+	puts("Board ERROR\n");
+	for (;;)
+		;
 }
