1/*	$NetBSD: gemini_wdtvar.h,v 1.3 2008/11/20 20:23:05 cliff Exp $	*/
2
3/*
4 * adapted/extracted from omap_wdt.c
5 *
6 * Copyright (c) 2007 Microsoft
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 *    notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 *    notice, this list of conditions and the following disclaimer in the
16 *    documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software
18 *    must display the following acknowledgement:
19 *	This product includes software developed by Microsoft
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
22 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT,
25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33#ifndef  _ARM_GEMINI_WDTVAR_H
34#define  _ARM_GEMINI_WDTVAR_H
35
36#include <sys/device.h>
37#include <sys/bus.h>
38#include <dev/sysmon/sysmonvar.h>
39
40typedef struct geminiwdt_softc {
41	device_t sc_dev;
42	bus_addr_t sc_addr;
43	bus_size_t sc_size;
44	bus_space_tag_t sc_iot;
45	bus_space_handle_t sc_ioh;
46	struct sysmon_wdog sc_smw;
47	int sc_armed;
48} geminiwdt_softc_t;
49
50extern struct geminiwdt_softc *geminiwdt_sc;
51extern int omapwdt_sysconfig;
52
53int	geminiwdt_setmode(struct sysmon_wdog *);
54int	geminiwdt_tickle(struct sysmon_wdog *);
55
56void	geminiwdt_set_timeout(unsigned int period);
57int	geminiwdt_enable(int enable);
58
59#endif  /* _ARM_GEMINI_WDTVAR_H */
60