Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * MMC definitions for OMAP2
0004  *
0005  * Copyright (C) 2006 Nokia Corporation
0006  */
0007 
0008 /*
0009  * struct omap_hsmmc_dev_attr.flags possibilities
0010  *
0011  * OMAP_HSMMC_SUPPORTS_DUAL_VOLT: Some HSMMC controller instances can
0012  *    operate with either 1.8Vdc or 3.0Vdc card voltages; this flag
0013  *    should be set if this is the case.  See for example Section 22.5.3
0014  *    "MMC/SD/SDIO1 Bus Voltage Selection" of the OMAP34xx Multimedia
0015  *    Device Silicon Revision 3.1.x Revision ZR (July 2011) (SWPU223R).
0016  *
0017  * OMAP_HSMMC_BROKEN_MULTIBLOCK_READ: Multiple-block read transfers
0018  *    don't work correctly on some MMC controller instances on some
0019  *    OMAP3 SoCs; this flag should be set if this is the case.  See
0020  *    for example Advisory 2.1.1.128 "MMC: Multiple Block Read
0021  *    Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_
0022  *    Revision F (October 2010) (SPRZ278F).
0023  */
0024 #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT       BIT(0)
0025 #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ   BIT(1)
0026 #define OMAP_HSMMC_SWAKEUP_MISSING      BIT(2)
0027 
0028 struct omap_hsmmc_dev_attr {
0029     u8 flags;
0030 };
0031 
0032 struct mmc_card;
0033 
0034 struct omap_hsmmc_platform_data {
0035     /* back-link to device */
0036     struct device *dev;
0037 
0038     /* set if your board has components or wiring that limits the
0039      * maximum frequency on the MMC bus */
0040     unsigned int max_freq;
0041 
0042     /* Integrating attributes from the omap_hwmod layer */
0043     u8 controller_flags;
0044 
0045     /* Register offset deviation */
0046     u16 reg_offset;
0047 
0048     /*
0049      * 4/8 wires and any additional host capabilities
0050      * need to OR'd all capabilities (ref. linux/mmc/host.h)
0051      */
0052     u32 caps;   /* Used for the MMC driver on 2430 and later */
0053     u32 pm_caps;    /* PM capabilities of the mmc */
0054 
0055     /* nonremovable e.g. eMMC */
0056     unsigned nonremovable:1;
0057 
0058     /* eMMC does not handle power off when not in sleep state */
0059     unsigned no_regulator_off_init:1;
0060 
0061     /* we can put the features above into this variable */
0062 #define HSMMC_HAS_PBIAS     (1 << 0)
0063 #define HSMMC_HAS_UPDATED_RESET (1 << 1)
0064 #define HSMMC_HAS_HSPE_SUPPORT  (1 << 2)
0065     unsigned features;
0066 
0067     /* string specifying a particular variant of hardware */
0068     char *version;
0069 
0070     const char *name;
0071     u32 ocr_mask;
0072 };