xref: /freebsd/sys/dev/mmc/mmc_private.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
172dec079SMarius Strobl /*-
272dec079SMarius Strobl  * Copyright (c) 2006 Bernd Walter.  All rights reserved.
3*f86e6000SWarner Losh  * Copyright (c) 2006 M. Warner Losh <imp@FreeBSD.org>
472dec079SMarius Strobl  *
572dec079SMarius Strobl  * Redistribution and use in source and binary forms, with or without
672dec079SMarius Strobl  * modification, are permitted provided that the following conditions
772dec079SMarius Strobl  * are met:
872dec079SMarius Strobl  * 1. Redistributions of source code must retain the above copyright
972dec079SMarius Strobl  *    notice, this list of conditions and the following disclaimer.
1072dec079SMarius Strobl  * 2. Redistributions in binary form must reproduce the above copyright
1172dec079SMarius Strobl  *    notice, this list of conditions and the following disclaimer in the
1272dec079SMarius Strobl  *    documentation and/or other materials provided with the distribution.
1372dec079SMarius Strobl  *
1472dec079SMarius Strobl  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1572dec079SMarius Strobl  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1672dec079SMarius Strobl  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1772dec079SMarius Strobl  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1872dec079SMarius Strobl  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1972dec079SMarius Strobl  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2072dec079SMarius Strobl  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2172dec079SMarius Strobl  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2272dec079SMarius Strobl  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2372dec079SMarius Strobl  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2472dec079SMarius Strobl  *
2572dec079SMarius Strobl  * Portions of this software may have been developed with reference to
2672dec079SMarius Strobl  * the SD Simplified Specification.  The following disclaimer may apply:
2772dec079SMarius Strobl  *
2872dec079SMarius Strobl  * The following conditions apply to the release of the simplified
2972dec079SMarius Strobl  * specification ("Simplified Specification") by the SD Card Association and
3072dec079SMarius Strobl  * the SD Group. The Simplified Specification is a subset of the complete SD
3172dec079SMarius Strobl  * Specification which is owned by the SD Card Association and the SD
3272dec079SMarius Strobl  * Group. This Simplified Specification is provided on a non-confidential
3372dec079SMarius Strobl  * basis subject to the disclaimers below. Any implementation of the
3472dec079SMarius Strobl  * Simplified Specification may require a license from the SD Card
3572dec079SMarius Strobl  * Association, SD Group, SD-3C LLC or other third parties.
3672dec079SMarius Strobl  *
3772dec079SMarius Strobl  * Disclaimers:
3872dec079SMarius Strobl  *
3972dec079SMarius Strobl  * The information contained in the Simplified Specification is presented only
4072dec079SMarius Strobl  * as a standard specification for SD Cards and SD Host/Ancillary products and
4172dec079SMarius Strobl  * is provided "AS-IS" without any representations or warranties of any
4272dec079SMarius Strobl  * kind. No responsibility is assumed by the SD Group, SD-3C LLC or the SD
4372dec079SMarius Strobl  * Card Association for any damages, any infringements of patents or other
4472dec079SMarius Strobl  * right of the SD Group, SD-3C LLC, the SD Card Association or any third
4572dec079SMarius Strobl  * parties, which may result from its use. No license is granted by
4672dec079SMarius Strobl  * implication, estoppel or otherwise under any patent or other rights of the
4772dec079SMarius Strobl  * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing
4872dec079SMarius Strobl  * herein shall be construed as an obligation by the SD Group, the SD-3C LLC
4972dec079SMarius Strobl  * or the SD Card Association to disclose or distribute any technical
5072dec079SMarius Strobl  * information, know-how or other confidential information to any third party.
5172dec079SMarius Strobl  */
5272dec079SMarius Strobl 
5372dec079SMarius Strobl #ifndef DEV_MMC_PRIVATE_H
5472dec079SMarius Strobl #define	DEV_MMC_PRIVATE_H
5572dec079SMarius Strobl 
5672dec079SMarius Strobl struct mmc_softc {
5772dec079SMarius Strobl 	device_t dev;
5872dec079SMarius Strobl 	struct mtx sc_mtx;
5972dec079SMarius Strobl 	struct intr_config_hook config_intrhook;
6072dec079SMarius Strobl 	device_t owner;
61aca38eabSMarius Strobl 	device_t *child_list;
62aca38eabSMarius Strobl 	int child_count;
63aca38eabSMarius Strobl 	uint16_t last_rca;
64aca38eabSMarius Strobl 	uint16_t retune_paused;
65aca38eabSMarius Strobl 	uint8_t retune_needed;
66aca38eabSMarius Strobl 	uint8_t retune_ongoing;
67aca38eabSMarius Strobl 	uint16_t squelched;	/* suppress reporting of (expected) errors */
6872dec079SMarius Strobl 	int log_count;
6972dec079SMarius Strobl 	struct timeval log_time;
7072dec079SMarius Strobl };
7172dec079SMarius Strobl 
7272dec079SMarius Strobl #endif /* DEV_MMC_PRIVATE_H */
73