1114b4164SWarner Losh /*- 2114b4164SWarner Losh * Copyright (c) 2006 Bernd Walter. All rights reserved. 3114b4164SWarner Losh * Copyright (c) 2006 M. Warner Losh. All rights reserved. 4114b4164SWarner Losh * 5114b4164SWarner Losh * Redistribution and use in source and binary forms, with or without 6114b4164SWarner Losh * modification, are permitted provided that the following conditions 7114b4164SWarner Losh * are met: 8114b4164SWarner Losh * 1. Redistributions of source code must retain the above copyright 9114b4164SWarner Losh * notice, this list of conditions and the following disclaimer. 10114b4164SWarner Losh * 2. Redistributions in binary form must reproduce the above copyright 11114b4164SWarner Losh * notice, this list of conditions and the following disclaimer in the 12114b4164SWarner Losh * documentation and/or other materials provided with the distribution. 13114b4164SWarner Losh * 14114b4164SWarner Losh * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15114b4164SWarner Losh * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16114b4164SWarner Losh * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17114b4164SWarner Losh * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18114b4164SWarner Losh * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19114b4164SWarner Losh * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20114b4164SWarner Losh * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21114b4164SWarner Losh * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22114b4164SWarner Losh * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23114b4164SWarner Losh * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24114b4164SWarner Losh * 2514eced72SWarner Losh * Portions of this software may have been developed with reference to 2614eced72SWarner Losh * the SD Simplified Specification. The following disclaimer may apply: 2714eced72SWarner Losh * 2814eced72SWarner Losh * The following conditions apply to the release of the simplified 2914eced72SWarner Losh * specification ("Simplified Specification") by the SD Card Association and 3014eced72SWarner Losh * the SD Group. The Simplified Specification is a subset of the complete SD 3114eced72SWarner Losh * Specification which is owned by the SD Card Association and the SD 3214eced72SWarner Losh * Group. This Simplified Specification is provided on a non-confidential 3314eced72SWarner Losh * basis subject to the disclaimers below. Any implementation of the 3414eced72SWarner Losh * Simplified Specification may require a license from the SD Card 3514eced72SWarner Losh * Association, SD Group, SD-3C LLC or other third parties. 3614eced72SWarner Losh * 3714eced72SWarner Losh * Disclaimers: 3814eced72SWarner Losh * 3914eced72SWarner Losh * The information contained in the Simplified Specification is presented only 4014eced72SWarner Losh * as a standard specification for SD Cards and SD Host/Ancillary products and 4114eced72SWarner Losh * is provided "AS-IS" without any representations or warranties of any 4214eced72SWarner Losh * kind. No responsibility is assumed by the SD Group, SD-3C LLC or the SD 4314eced72SWarner Losh * Card Association for any damages, any infringements of patents or other 4414eced72SWarner Losh * right of the SD Group, SD-3C LLC, the SD Card Association or any third 4514eced72SWarner Losh * parties, which may result from its use. No license is granted by 4614eced72SWarner Losh * implication, estoppel or otherwise under any patent or other rights of the 4714eced72SWarner Losh * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing 4814eced72SWarner Losh * herein shall be construed as an obligation by the SD Group, the SD-3C LLC 4914eced72SWarner Losh * or the SD Card Association to disclose or distribute any technical 5014eced72SWarner Losh * information, know-how or other confidential information to any third party. 5114eced72SWarner Losh * 52114b4164SWarner Losh * "$FreeBSD$" 53114b4164SWarner Losh */ 54114b4164SWarner Losh 55114b4164SWarner Losh #ifndef DEV_MMC_MMCVAR_H 56114b4164SWarner Losh #define DEV_MMC_MMCVAR_H 57114b4164SWarner Losh 5867d752c3SAlexander Motin #include <dev/mmc/bridge.h> 5967d752c3SAlexander Motin 60114b4164SWarner Losh enum mmc_device_ivars { 61114b4164SWarner Losh MMC_IVAR_DSR_IMP, 62114b4164SWarner Losh MMC_IVAR_MEDIA_SIZE, 63114b4164SWarner Losh MMC_IVAR_RCA, 64114b4164SWarner Losh MMC_IVAR_SECTOR_SIZE, 65114b4164SWarner Losh MMC_IVAR_TRAN_SPEED, 6640fab6e7SWarner Losh MMC_IVAR_READ_ONLY, 67c18f1e26SAlexander Motin MMC_IVAR_HIGH_CAP, 6867d752c3SAlexander Motin MMC_IVAR_CARD_TYPE, 6967d752c3SAlexander Motin MMC_IVAR_BUS_WIDTH, 703906d42dSAlexander Motin MMC_IVAR_ERASE_SECTOR, 713a4a2557SAlexander Motin MMC_IVAR_MAX_DATA, 72114b4164SWarner Losh // MMC_IVAR_, 73114b4164SWarner Losh }; 74114b4164SWarner Losh 75114b4164SWarner Losh /* 76114b4164SWarner Losh * Simplified accessors for pci devices 77114b4164SWarner Losh */ 78114b4164SWarner Losh #define MMC_ACCESSOR(var, ivar, type) \ 79114b4164SWarner Losh __BUS_ACCESSOR(mmc, var, MMC, ivar, type) 80114b4164SWarner Losh 81114b4164SWarner Losh MMC_ACCESSOR(dsr_imp, DSR_IMP, int) 8238c51cbeSWarner Losh MMC_ACCESSOR(media_size, MEDIA_SIZE, off_t) 83114b4164SWarner Losh MMC_ACCESSOR(rca, RCA, int) 84114b4164SWarner Losh MMC_ACCESSOR(sector_size, SECTOR_SIZE, int) 85114b4164SWarner Losh MMC_ACCESSOR(tran_speed, TRAN_SPEED, int) 8640fab6e7SWarner Losh MMC_ACCESSOR(read_only, READ_ONLY, int) 87c18f1e26SAlexander Motin MMC_ACCESSOR(high_cap, HIGH_CAP, int) 8867d752c3SAlexander Motin MMC_ACCESSOR(card_type, CARD_TYPE, int) 8967d752c3SAlexander Motin MMC_ACCESSOR(bus_width, BUS_WIDTH, int) 903906d42dSAlexander Motin MMC_ACCESSOR(erase_sector, ERASE_SECTOR, int) 913a4a2557SAlexander Motin MMC_ACCESSOR(max_data, MAX_DATA, int) 92114b4164SWarner Losh 93114b4164SWarner Losh #endif /* DEV_MMC_MMCVAR_H */ 94