예제 #1
0
static void wdt_ping(void)
{
	spin_lock(&io_lock);
	w83697hf_select_wdt();

	w83697hf_write_timeout(timeout);

	w83697hf_deselect_wdt();
	spin_unlock(&io_lock);
}
예제 #2
0
static void wdt_disable(void)
{
	spin_lock(&io_lock);
	w83697hf_select_wdt();

	w83697hf_set_reg(0x30, 0);	/* Disable timer */
	w83697hf_write_timeout(0);

	w83697hf_deselect_wdt();
	spin_unlock(&io_lock);
}
예제 #3
0
static void wdt_enable(void)
{
	spin_lock(&io_lock);
	w83697hf_select_wdt();

	w83697hf_write_timeout(timeout);
	w83697hf_set_reg(0x30, 1);	/* Enable timer */

	w83697hf_deselect_wdt();
	spin_unlock(&io_lock);
}
예제 #4
0
static unsigned char wdt_running(void)
{
	unsigned char t;

	spin_lock(&io_lock);
	w83697hf_select_wdt();

	t = w83697hf_get_reg(0xF4);	/* Read timer */

	w83697hf_deselect_wdt();
	spin_unlock(&io_lock);

	return t;
}
예제 #5
0
static void
w83697hf_init(void)
{
	unsigned char bbuf;

	w83697hf_select_wdt();

	bbuf = w83697hf_get_reg(0x29);
	bbuf &= ~0x60;
	bbuf |= 0x20;
	w83697hf_set_reg(0x29, bbuf);	/* Set pin 119 to WDTO# mode (= CR29, WDT0) */

	bbuf = w83697hf_get_reg(0xF3);
	bbuf &= ~0x04;
	w83697hf_set_reg(0xF3, bbuf);	/* Count mode is seconds */

	w83697hf_deselect_wdt();
}
예제 #6
0
static void w83697hf_init(void)
{
    unsigned char bbuf;

    w83697hf_select_wdt();

    bbuf = w83697hf_get_reg(0x29);
    bbuf &= ~0x60;
    bbuf |= 0x20;


    w83697hf_set_reg(0x29, bbuf);

    bbuf = w83697hf_get_reg(0xF3);
    bbuf &= ~0x04;
    w83697hf_set_reg(0xF3, bbuf);

    w83697hf_deselect_wdt();
}