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