Home | History | Annotate | Line # | Download | only in gemini
      1 /*	$NetBSD: gemini_wdtvar.h,v 1.5 2025/12/19 13:03:51 nia 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  *
     18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
     19  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     20  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     21  * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTERS BE LIABLE FOR ANY DIRECT,
     22  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     23  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     24  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     25  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     26  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     27  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     28  * SUCH DAMAGE.
     29  */
     30 #ifndef  _ARM_GEMINI_WDTVAR_H
     31 #define  _ARM_GEMINI_WDTVAR_H
     32 
     33 #include <sys/device.h>
     34 #include <sys/bus.h>
     35 #include <dev/sysmon/sysmonvar.h>
     36 
     37 typedef struct geminiwdt_softc {
     38 	device_t sc_dev;
     39 	bus_addr_t sc_addr;
     40 	bus_size_t sc_size;
     41 	bus_space_tag_t sc_iot;
     42 	bus_space_handle_t sc_ioh;
     43 	struct sysmon_wdog sc_smw;
     44 	int sc_armed;
     45 } geminiwdt_softc_t;
     46 
     47 extern struct geminiwdt_softc *geminiwdt_sc;
     48 extern int omapwdt_sysconfig;
     49 
     50 int	geminiwdt_setmode(struct sysmon_wdog *);
     51 int	geminiwdt_tickle(struct sysmon_wdog *);
     52 
     53 void	geminiwdt_set_timeout(unsigned int period);
     54 int	geminiwdt_enable(int enable);
     55 
     56 #endif  /* _ARM_GEMINI_WDTVAR_H */
     57