Home | History | Annotate | Line # | Download | only in sdmmc
sdhcvar.h revision 1.1.8.2
      1  1.1.8.2  sborrill /*	$NetBSD: sdhcvar.h,v 1.1.8.2 2009/10/07 15:41:13 sborrill Exp $	*/
      2  1.1.8.2  sborrill /*	$OpenBSD: sdhcvar.h,v 1.3 2007/09/06 08:01:01 jsg Exp $	*/
      3  1.1.8.2  sborrill 
      4  1.1.8.2  sborrill /*
      5  1.1.8.2  sborrill  * Copyright (c) 2006 Uwe Stuehler <uwe (at) openbsd.org>
      6  1.1.8.2  sborrill  *
      7  1.1.8.2  sborrill  * Permission to use, copy, modify, and distribute this software for any
      8  1.1.8.2  sborrill  * purpose with or without fee is hereby granted, provided that the above
      9  1.1.8.2  sborrill  * copyright notice and this permission notice appear in all copies.
     10  1.1.8.2  sborrill  *
     11  1.1.8.2  sborrill  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     12  1.1.8.2  sborrill  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     13  1.1.8.2  sborrill  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     14  1.1.8.2  sborrill  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     15  1.1.8.2  sborrill  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     16  1.1.8.2  sborrill  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     17  1.1.8.2  sborrill  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     18  1.1.8.2  sborrill  */
     19  1.1.8.2  sborrill 
     20  1.1.8.2  sborrill #ifndef _SDHCVAR_H_
     21  1.1.8.2  sborrill #define _SDHCVAR_H_
     22  1.1.8.2  sborrill 
     23  1.1.8.2  sborrill #include <sys/bus.h>
     24  1.1.8.2  sborrill #include <sys/device.h>
     25  1.1.8.2  sborrill #include <sys/pmf.h>
     26  1.1.8.2  sborrill 
     27  1.1.8.2  sborrill struct sdhc_host;
     28  1.1.8.2  sborrill 
     29  1.1.8.2  sborrill struct sdhc_softc {
     30  1.1.8.2  sborrill 	device_t		sc_dev;
     31  1.1.8.2  sborrill 
     32  1.1.8.2  sborrill 	struct sdhc_host	**sc_host;
     33  1.1.8.2  sborrill 	int			sc_nhosts;
     34  1.1.8.2  sborrill 
     35  1.1.8.2  sborrill 	bus_dma_tag_t		sc_dmat;
     36  1.1.8.2  sborrill 
     37  1.1.8.2  sborrill 	uint32_t		sc_flags;
     38  1.1.8.2  sborrill #define	SDHC_FLAG_USE_DMA	0x0001
     39  1.1.8.2  sborrill #define	SDHC_FLAG_FORCE_DMA	0x0002
     40  1.1.8.2  sborrill #define	SDHC_FLAG_NO_PWR0	0x0004
     41  1.1.8.2  sborrill };
     42  1.1.8.2  sborrill 
     43  1.1.8.2  sborrill /* Host controller functions called by the attachment driver. */
     44  1.1.8.2  sborrill int	sdhc_host_found(struct sdhc_softc *, bus_space_tag_t,
     45  1.1.8.2  sborrill 	    bus_space_handle_t, bus_size_t);
     46  1.1.8.2  sborrill int	sdhc_intr(void *);
     47  1.1.8.2  sborrill bool	sdhc_suspend(device_t dev PMF_FN_ARGS);
     48  1.1.8.2  sborrill bool	sdhc_resume(device_t dev PMF_FN_ARGS);
     49  1.1.8.2  sborrill bool	sdhc_shutdown(device_t dev, int flags);
     50  1.1.8.2  sborrill 
     51  1.1.8.2  sborrill #endif	/* _SDHCVAR_H_ */
     52