xref: /netbsd-src/sys/dev/ic/rng200var.h (revision 8c13a1c7ef4620e09ff6a8140f557e096d0ce089)
1*8c13a1c7Sriastradh /*	$NetBSD: rng200var.h,v 1.2 2022/03/19 11:55:03 riastradh Exp $	*/
2e81cb3cfSmlelstv 
3e81cb3cfSmlelstv /*
4e81cb3cfSmlelstv  * Copyright (c) 2019 The NetBSD Foundation, Inc.
5e81cb3cfSmlelstv  * All rights reserved.
6e81cb3cfSmlelstv  *
7e81cb3cfSmlelstv  * This code is derived from software contributed to The NetBSD Foundation
8e81cb3cfSmlelstv  * by Michael van Elst
9e81cb3cfSmlelstv  *
10e81cb3cfSmlelstv  * Redistribution and use in source and binary forms, with or without
11e81cb3cfSmlelstv  * modification, are permitted provided that the following conditions
12e81cb3cfSmlelstv  * are met:
13e81cb3cfSmlelstv  * 1. Redistributions of source code must retain the above copyright
14e81cb3cfSmlelstv  *    notice, this list of conditions and the following disclaimer.
15e81cb3cfSmlelstv  * 2. Redistributions in binary form must reproduce the above copyright
16e81cb3cfSmlelstv  *    notice, this list of conditions and the following disclaimer in the
17e81cb3cfSmlelstv  *    documentation and/or other materials provided with the distribution.
18e81cb3cfSmlelstv  *
19e81cb3cfSmlelstv  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20e81cb3cfSmlelstv  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21e81cb3cfSmlelstv  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22e81cb3cfSmlelstv  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23e81cb3cfSmlelstv  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24e81cb3cfSmlelstv  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25e81cb3cfSmlelstv  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26e81cb3cfSmlelstv  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27e81cb3cfSmlelstv  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28e81cb3cfSmlelstv  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29e81cb3cfSmlelstv  * POSSIBILITY OF SUCH DAMAGE.
30e81cb3cfSmlelstv  */
31e81cb3cfSmlelstv 
32e81cb3cfSmlelstv #ifndef _IC_RNG200VAR_H_
33e81cb3cfSmlelstv #define _IC_RNG200VAR_H_
34e81cb3cfSmlelstv 
35e81cb3cfSmlelstv #include <sys/bus.h>
36e81cb3cfSmlelstv #include <sys/device.h>
37e81cb3cfSmlelstv #include <sys/mutex.h>
38e81cb3cfSmlelstv #include <sys/rndsource.h>
39e81cb3cfSmlelstv 
40e81cb3cfSmlelstv struct rng200_softc	{
41e81cb3cfSmlelstv 	bus_space_tag_t		sc_bst;
42e81cb3cfSmlelstv 	bus_space_handle_t	sc_bsh;
43e81cb3cfSmlelstv 
44e81cb3cfSmlelstv 	krndsource_t		sc_rndsource;
45e81cb3cfSmlelstv 	const char		*sc_name;
46e81cb3cfSmlelstv };
47e81cb3cfSmlelstv 
48e81cb3cfSmlelstv void rng200_attach(struct rng200_softc *);
49e81cb3cfSmlelstv void rng200_detach(struct rng200_softc *);
50e81cb3cfSmlelstv 
51e81cb3cfSmlelstv #endif /* !_IC_RNG200VAR_H_ */
52