Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
wd_timer.c File Reference
#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/err.h>
#include <plat/omap_hwmod.h>
#include "wd_timer.h"
#include "common.h"

Go to the source code of this file.

Macros

#define OMAP_WDT_WPS   0x34
 
#define OMAP_WDT_SPR   0x48
 
#define MAX_MODULE_SOFTRESET_WAIT   10000
 

Functions

int omap2_wd_timer_disable (struct omap_hwmod *oh)
 
int omap2_wd_timer_reset (struct omap_hwmod *oh)
 

Macro Definition Documentation

#define MAX_MODULE_SOFTRESET_WAIT   10000

Definition at line 30 of file wd_timer.c.

#define OMAP_WDT_SPR   0x48

Definition at line 27 of file wd_timer.c.

#define OMAP_WDT_WPS   0x34

Definition at line 26 of file wd_timer.c.

Function Documentation

int omap2_wd_timer_disable ( struct omap_hwmod oh)

Definition at line 32 of file wd_timer.c.

int omap2_wd_timer_reset ( struct omap_hwmod oh)

omap2_wdtimer_reset - reset and disable the WDTIMER IP block : struct omap_hwmod *

After the WDTIMER IP blocks are reset on OMAP2/3, we must also take care to execute the special watchdog disable sequence. This is because the watchdog is re-armed upon OCP softreset. (On OMAP4, this behavior was apparently changed and the watchdog is no longer re-armed after an OCP soft-reset.) Returns -ETIMEDOUT if the reset did not complete, or 0 upon success.

XXX Most of this code should be moved to the omap_hwmod.c layer during a normal merge window. omap_hwmod_softreset() should be renamed to omap_hwmod_set_ocp_softreset(), and omap_hwmod_softreset() should call the hwmod _ocp_softreset() code.

Definition at line 76 of file wd_timer.c.