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