1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * MMC definitions for OMAP2
4 *
5 * Copyright (C) 2006 Nokia Corporation
6 */
7
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
28struct omap_hsmmc_dev_attr {
29	u8 flags;
30};
31
32struct mmc_card;
33
34struct omap_hsmmc_platform_data {
35	/* back-link to device */
36	struct device *dev;
37
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
42	/* Integrating attributes from the omap_hwmod layer */
43	u8 controller_flags;
44
45	/* Register offset deviation */
46	u16 reg_offset;
47
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 */
54
55	/* nonremovable e.g. eMMC */
56	unsigned nonremovable:1;
57
58	/* eMMC does not handle power off when not in sleep state */
59	unsigned no_regulator_off_init:1;
60
61	/* we can put the features above into this variable */
62#define HSMMC_HAS_PBIAS		(1 << 0)
63#define HSMMC_HAS_UPDATED_RESET	(1 << 1)
64#define HSMMC_HAS_HSPE_SUPPORT	(1 << 2)
65	unsigned features;
66
67	/* string specifying a particular variant of hardware */
68	char *version;
69
70	const char *name;
71	u32 ocr_mask;
72};
73