Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 2 | /* |
| 3 | * MMC definitions for OMAP2 |
| 4 | * |
| 5 | * Copyright (C) 2006 Nokia Corporation |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 6 | */ |
| 7 | |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 8 | /* |
| 9 | * struct omap_hsmmc_dev_attr.flags possibilities |
| 10 | * |
| 11 | * OMAP_HSMMC_SUPPORTS_DUAL_VOLT: Some HSMMC controller instances can |
| 12 | * operate with either 1.8Vdc or 3.0Vdc card voltages; this flag |
| 13 | * should be set if this is the case. See for example Section 22.5.3 |
| 14 | * "MMC/SD/SDIO1 Bus Voltage Selection" of the OMAP34xx Multimedia |
| 15 | * Device Silicon Revision 3.1.x Revision ZR (July 2011) (SWPU223R). |
| 16 | * |
| 17 | * OMAP_HSMMC_BROKEN_MULTIBLOCK_READ: Multiple-block read transfers |
| 18 | * don't work correctly on some MMC controller instances on some |
| 19 | * OMAP3 SoCs; this flag should be set if this is the case. See |
| 20 | * for example Advisory 2.1.1.128 "MMC: Multiple Block Read |
| 21 | * Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_ |
| 22 | * Revision F (October 2010) (SPRZ278F). |
| 23 | */ |
| 24 | #define OMAP_HSMMC_SUPPORTS_DUAL_VOLT BIT(0) |
| 25 | #define OMAP_HSMMC_BROKEN_MULTIBLOCK_READ BIT(1) |
| 26 | #define OMAP_HSMMC_SWAKEUP_MISSING BIT(2) |
| 27 | |
| 28 | struct omap_hsmmc_dev_attr { |
| 29 | u8 flags; |
| 30 | }; |
| 31 | |
| 32 | struct mmc_card; |
| 33 | |
| 34 | struct omap_hsmmc_platform_data { |
| 35 | /* back-link to device */ |
| 36 | struct device *dev; |
| 37 | |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 38 | /* set if your board has components or wiring that limits the |
| 39 | * maximum frequency on the MMC bus */ |
| 40 | unsigned int max_freq; |
| 41 | |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 42 | /* Integrating attributes from the omap_hwmod layer */ |
| 43 | u8 controller_flags; |
| 44 | |
| 45 | /* Register offset deviation */ |
| 46 | u16 reg_offset; |
| 47 | |
Andreas Fenkart | 326119c | 2014-11-08 15:33:14 +0100 | [diff] [blame] | 48 | /* |
| 49 | * 4/8 wires and any additional host capabilities |
| 50 | * need to OR'd all capabilities (ref. linux/mmc/host.h) |
| 51 | */ |
| 52 | u32 caps; /* Used for the MMC driver on 2430 and later */ |
| 53 | u32 pm_caps; /* PM capabilities of the mmc */ |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 54 | |
Andreas Fenkart | 326119c | 2014-11-08 15:33:14 +0100 | [diff] [blame] | 55 | /* nonremovable e.g. eMMC */ |
| 56 | unsigned nonremovable:1; |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 57 | |
Andreas Fenkart | 326119c | 2014-11-08 15:33:14 +0100 | [diff] [blame] | 58 | /* eMMC does not handle power off when not in sleep state */ |
| 59 | unsigned no_regulator_off_init:1; |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 60 | |
Andreas Fenkart | 326119c | 2014-11-08 15:33:14 +0100 | [diff] [blame] | 61 | /* we can put the features above into this variable */ |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 62 | #define HSMMC_HAS_PBIAS (1 << 0) |
| 63 | #define HSMMC_HAS_UPDATED_RESET (1 << 1) |
| 64 | #define HSMMC_HAS_HSPE_SUPPORT (1 << 2) |
Andreas Fenkart | 326119c | 2014-11-08 15:33:14 +0100 | [diff] [blame] | 65 | unsigned features; |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 66 | |
Sekhar Nori | fc66ce0 | 2017-08-10 09:02:37 -0700 | [diff] [blame] | 67 | /* string specifying a particular variant of hardware */ |
| 68 | char *version; |
| 69 | |
Andreas Fenkart | 326119c | 2014-11-08 15:33:14 +0100 | [diff] [blame] | 70 | /* if we have special card, init it using this callback */ |
| 71 | void (*init_card)(struct mmc_card *card); |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 72 | |
Andreas Fenkart | 326119c | 2014-11-08 15:33:14 +0100 | [diff] [blame] | 73 | const char *name; |
| 74 | u32 ocr_mask; |
Andreas Fenkart | 55143438 | 2014-11-08 15:33:09 +0100 | [diff] [blame] | 75 | }; |