static void wb_smsc_wdt_initialize(void) { unsigned char old; spin_lock(&io_lock); open_io_config(); select_io_device(IODEV_NO); gpio_bit13(0x08); gpio_bit12(0x0A); wdt_timeout_value(0); wdt_timer_ctrl(0x00); wdt_timer_conf(0x00); old = read_io_cr(0xF1) & 0x7F; if (unit == UNIT_SECOND) old |= 0x80; wdt_timer_units(old); close_io_config(); spin_unlock(&io_lock); }
static void wb_smsc_wdt_initialize(void) { unsigned char old; spin_lock(&io_lock); open_io_config(); select_io_device(IODEV_NO); /* enable the watchdog */ gpio_bit13(0x08); /* Select pin 80 = LED not GPIO */ gpio_bit12(0x0A); /* Set pin 79 = WDT not GPIO/Output/Polarity=Invert */ /* disable the timeout */ wdt_timeout_value(0); /* reset control register */ wdt_timer_ctrl(0x00); /* reset configuration register */ wdt_timer_conf(0x00); /* read old (timer units) register */ old = read_io_cr(0xF1) & 0x7F; if (unit == UNIT_SECOND) old |= 0x80; /* set to seconds */ /* set the watchdog timer units */ wdt_timer_units(old); close_io_config(); spin_unlock(&io_lock); }
static void wb_smsc_wdt_set_timeout(unsigned char new_timeout) { spin_lock(&io_lock); open_io_config(); select_io_device(IODEV_NO); wdt_timer_ctrl((new_timeout == 0) ? 0x00 : 0x02); wdt_timeout_value(new_timeout); close_io_config(); spin_unlock(&io_lock); }
static void wb_smsc_wdt_set_timeout(unsigned char new_timeout) { spin_lock(&io_lock); open_io_config(); select_io_device(IODEV_NO); /* set Power LED to blink, if we enable the timeout */ wdt_timer_ctrl((new_timeout == 0) ? 0x00 : 0x02); /* set timeout value */ wdt_timeout_value(new_timeout); close_io_config(); spin_unlock(&io_lock); }
static void wb_smsc_wdt_shutdown(void) { spin_lock(&io_lock); open_io_config(); select_io_device(IODEV_NO); gpio_bit13(0x09); gpio_bit12(0x09); wdt_timer_conf(0x00); wdt_timer_ctrl(0x00); wdt_timeout_value(0x00); close_io_config(); spin_unlock(&io_lock); }
static void wb_smsc_wdt_shutdown(void) { spin_lock(&io_lock); open_io_config(); select_io_device(IODEV_NO); /* disable the watchdog */ gpio_bit13(0x09); gpio_bit12(0x09); /* reset watchdog config register */ wdt_timer_conf(0x00); /* reset watchdog control register */ wdt_timer_ctrl(0x00); /* disable timeout */ wdt_timeout_value(0x00); close_io_config(); spin_unlock(&io_lock); }