| 84 | } |
| 85 | |
| 86 | static rt_uint32_t i6300esb_timer_stop(struct i6300esb_wdt *esb) |
| 87 | { |
| 88 | rt_uint8_t val; |
| 89 | |
| 90 | /* First, reset timers as suggested by the docs */ |
| 91 | i6300esb_wdt_unlock_registers(esb); |
| 92 | HWREG16(esb->regs + ESB_RELOAD_REG) = ESB_WDT_RELOAD; |
| 93 | |
| 94 | /* Then disable the WDT */ |
| 95 | rt_pci_write_config_u8(esb->pdev, ESB_LOCK_PCI_REG, 0x0); |
| 96 | rt_pci_read_config_u8(esb->pdev, ESB_LOCK_PCI_REG, &val); |
| 97 | |
| 98 | /* Returns 0 if the timer was disabled, non-zero otherwise */ |
| 99 | return val & ESB_WDT_ENABLE; |
| 100 | } |
| 101 | |
| 102 | static rt_err_t esb_timer_keepalive(struct i6300esb_wdt *esb) |
| 103 | { |
no test coverage detected