1*67ca7330SBjoern A. Zeeb /*- 2*67ca7330SBjoern A. Zeeb * Copyright (c) 2019 The FreeBSD Foundation 3*67ca7330SBjoern A. Zeeb * 4*67ca7330SBjoern A. Zeeb * Portions of this software were developed by Björn Zeeb 5*67ca7330SBjoern A. Zeeb * under sponsorship from the FreeBSD Foundation. 6*67ca7330SBjoern A. Zeeb * 7*67ca7330SBjoern A. Zeeb * Redistribution and use in source and binary forms, with or without 8*67ca7330SBjoern A. Zeeb * modification, are permitted provided that the following conditions 9*67ca7330SBjoern A. Zeeb * are met: 10*67ca7330SBjoern A. Zeeb * 1. Redistributions of source code must retain the above copyright 11*67ca7330SBjoern A. Zeeb * notice, this list of conditions and the following disclaimer. 12*67ca7330SBjoern A. Zeeb * 2. Redistributions in binary form must reproduce the above copyright 13*67ca7330SBjoern A. Zeeb * notice, this list of conditions and the following disclaimer in the 14*67ca7330SBjoern A. Zeeb * documentation and/or other materials provided with the distribution. 15*67ca7330SBjoern A. Zeeb * 16*67ca7330SBjoern A. Zeeb * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17*67ca7330SBjoern A. Zeeb * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18*67ca7330SBjoern A. Zeeb * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19*67ca7330SBjoern A. Zeeb * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20*67ca7330SBjoern A. Zeeb * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21*67ca7330SBjoern A. Zeeb * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22*67ca7330SBjoern A. Zeeb * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23*67ca7330SBjoern A. Zeeb * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24*67ca7330SBjoern A. Zeeb * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25*67ca7330SBjoern A. Zeeb * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26*67ca7330SBjoern A. Zeeb * 27*67ca7330SBjoern A. Zeeb * 28*67ca7330SBjoern A. Zeeb * Portions of this software may have been developed with reference to 29*67ca7330SBjoern A. Zeeb * the SD Simplified Specification. The following disclaimer may apply: 30*67ca7330SBjoern A. Zeeb * 31*67ca7330SBjoern A. Zeeb * The following conditions apply to the release of the simplified 32*67ca7330SBjoern A. Zeeb * specification ("Simplified Specification") by the SD Card Association and 33*67ca7330SBjoern A. Zeeb * the SD Group. The Simplified Specification is a subset of the complete SD 34*67ca7330SBjoern A. Zeeb * Specification which is owned by the SD Card Association and the SD 35*67ca7330SBjoern A. Zeeb * Group. This Simplified Specification is provided on a non-confidential 36*67ca7330SBjoern A. Zeeb * basis subject to the disclaimers below. Any implementation of the 37*67ca7330SBjoern A. Zeeb * Simplified Specification may require a license from the SD Card 38*67ca7330SBjoern A. Zeeb * Association, SD Group, SD-3C LLC or other third parties. 39*67ca7330SBjoern A. Zeeb * 40*67ca7330SBjoern A. Zeeb * Disclaimers: 41*67ca7330SBjoern A. Zeeb * 42*67ca7330SBjoern A. Zeeb * The information contained in the Simplified Specification is presented only 43*67ca7330SBjoern A. Zeeb * as a standard specification for SD Cards and SD Host/Ancillary products and 44*67ca7330SBjoern A. Zeeb * is provided "AS-IS" without any representations or warranties of any 45*67ca7330SBjoern A. Zeeb * kind. No responsibility is assumed by the SD Group, SD-3C LLC or the SD 46*67ca7330SBjoern A. Zeeb * Card Association for any damages, any infringements of patents or other 47*67ca7330SBjoern A. Zeeb * right of the SD Group, SD-3C LLC, the SD Card Association or any third 48*67ca7330SBjoern A. Zeeb * parties, which may result from its use. No license is granted by 49*67ca7330SBjoern A. Zeeb * implication, estoppel or otherwise under any patent or other rights of the 50*67ca7330SBjoern A. Zeeb * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing 51*67ca7330SBjoern A. Zeeb * herein shall be construed as an obligation by the SD Group, the SD-3C LLC 52*67ca7330SBjoern A. Zeeb * or the SD Card Association to disclose or distribute any technical 53*67ca7330SBjoern A. Zeeb * information, know-how or other confidential information to any third party. 54*67ca7330SBjoern A. Zeeb * 55*67ca7330SBjoern A. Zeeb */ 56*67ca7330SBjoern A. Zeeb 57*67ca7330SBjoern A. Zeeb #ifndef _SDIOB_H 58*67ca7330SBjoern A. Zeeb #define _SDIOB_H 59*67ca7330SBjoern A. Zeeb 60*67ca7330SBjoern A. Zeeb #define SDIOB_NAME sdiob 61*67ca7330SBjoern A. Zeeb #define _SDIOB_NAME_S(x) __STRING(x) 62*67ca7330SBjoern A. Zeeb #define SDIOB_NAME_S _SDIOB_NAME_S(SDIOB_NAME) 63*67ca7330SBjoern A. Zeeb 64*67ca7330SBjoern A. Zeeb #ifdef _SYS_BUS_H_ 65*67ca7330SBjoern A. Zeeb /* Ivars for sdiob. */ 66*67ca7330SBjoern A. Zeeb enum sdiob_dev_enum { 67*67ca7330SBjoern A. Zeeb SDIOB_IVAR_SUPPORT_MULTIBLK, 68*67ca7330SBjoern A. Zeeb SDIOB_IVAR_FUNCTION, 69*67ca7330SBjoern A. Zeeb SDIOB_IVAR_FUNCNUM, 70*67ca7330SBjoern A. Zeeb SDIOB_IVAR_CLASS, 71*67ca7330SBjoern A. Zeeb SDIOB_IVAR_VENDOR, 72*67ca7330SBjoern A. Zeeb SDIOB_IVAR_DEVICE, 73*67ca7330SBjoern A. Zeeb SDIOB_IVAR_DRVDATA, 74*67ca7330SBjoern A. Zeeb }; 75*67ca7330SBjoern A. Zeeb 76*67ca7330SBjoern A. Zeeb #define SDIOB_ACCESSOR(var, ivar, type) \ 77*67ca7330SBjoern A. Zeeb __BUS_ACCESSOR(sdio, var, SDIOB, ivar, type) 78*67ca7330SBjoern A. Zeeb 79*67ca7330SBjoern A. Zeeb SDIOB_ACCESSOR(support_multiblk,SUPPORT_MULTIBLK, bool) 80*67ca7330SBjoern A. Zeeb SDIOB_ACCESSOR(function, FUNCTION, struct sdio_func *) 81*67ca7330SBjoern A. Zeeb SDIOB_ACCESSOR(funcnum, FUNCNUM, uint8_t) 82*67ca7330SBjoern A. Zeeb SDIOB_ACCESSOR(class, CLASS, uint8_t) 83*67ca7330SBjoern A. Zeeb SDIOB_ACCESSOR(vendor, VENDOR, uint16_t) 84*67ca7330SBjoern A. Zeeb SDIOB_ACCESSOR(device, DEVICE, uint16_t) 85*67ca7330SBjoern A. Zeeb SDIOB_ACCESSOR(drvdata, DRVDATA, void *) 86*67ca7330SBjoern A. Zeeb 87*67ca7330SBjoern A. Zeeb #undef SDIOB_ACCESSOR 88*67ca7330SBjoern A. Zeeb #endif /* _SYS_BUS_H_ */ 89*67ca7330SBjoern A. Zeeb 90*67ca7330SBjoern A. Zeeb #endif /* _SDIOB_H */ 91