.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/include/linux/mmc/card.h |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License version 2 as |
---|
6 | | - * published by the Free Software Foundation. |
---|
7 | 4 | * |
---|
8 | 5 | * Card driver specific definitions. |
---|
9 | 6 | */ |
---|
.. | .. |
---|
12 | 9 | |
---|
13 | 10 | #include <linux/device.h> |
---|
14 | 11 | #include <linux/mod_devicetable.h> |
---|
| 12 | +#include <linux/android_kabi.h> |
---|
15 | 13 | |
---|
16 | 14 | struct mmc_cid { |
---|
17 | 15 | unsigned int manfid; |
---|
.. | .. |
---|
51 | 49 | u8 sec_feature_support; |
---|
52 | 50 | u8 rel_sectors; |
---|
53 | 51 | u8 rel_param; |
---|
| 52 | + bool enhanced_rpmb_supported; |
---|
54 | 53 | u8 part_config; |
---|
55 | 54 | u8 cache_ctrl; |
---|
56 | 55 | u8 rst_n_function; |
---|
.. | .. |
---|
133 | 132 | struct sd_scr { |
---|
134 | 133 | unsigned char sda_vsn; |
---|
135 | 134 | unsigned char sda_spec3; |
---|
| 135 | + unsigned char sda_spec4; |
---|
| 136 | + unsigned char sda_specx; |
---|
136 | 137 | unsigned char bus_widths; |
---|
137 | 138 | #define SD_SCR_BUS_WIDTH_1 (1<<0) |
---|
138 | 139 | #define SD_SCR_BUS_WIDTH_4 (1<<2) |
---|
.. | .. |
---|
236 | 237 | #define MMC_BLK_DATA_AREA_BOOT (1<<1) |
---|
237 | 238 | #define MMC_BLK_DATA_AREA_GP (1<<2) |
---|
238 | 239 | #define MMC_BLK_DATA_AREA_RPMB (1<<3) |
---|
| 240 | + |
---|
| 241 | + ANDROID_KABI_RESERVE(1); |
---|
239 | 242 | }; |
---|
240 | 243 | |
---|
241 | 244 | /* |
---|
.. | .. |
---|
270 | 273 | #define MMC_QUIRK_BROKEN_IRQ_POLLING (1<<11) /* Polling SDIO_CCCR_INTx could create a fake interrupt */ |
---|
271 | 274 | #define MMC_QUIRK_TRIM_BROKEN (1<<12) /* Skip trim */ |
---|
272 | 275 | #define MMC_QUIRK_BROKEN_HPI (1<<13) /* Disable broken HPI support */ |
---|
| 276 | +#define MMC_QUIRK_BROKEN_SD_DISCARD (1<<14) /* Disable broken SD discard support */ |
---|
273 | 277 | |
---|
274 | 278 | bool reenable_cmdq; /* Re-enable Command Queue */ |
---|
275 | 279 | |
---|
.. | .. |
---|
277 | 281 | unsigned int erase_shift; /* if erase unit is power 2 */ |
---|
278 | 282 | unsigned int pref_erase; /* in sectors */ |
---|
279 | 283 | unsigned int eg_boundary; /* don't cross erase-group boundaries */ |
---|
| 284 | + unsigned int erase_arg; /* erase / trim / discard */ |
---|
280 | 285 | u8 erased_byte; /* value of erased bytes */ |
---|
281 | 286 | |
---|
282 | 287 | u32 raw_cid[4]; /* raw card CID */ |
---|
.. | .. |
---|
291 | 296 | struct sd_switch_caps sw_caps; /* switch (CMD6) caps */ |
---|
292 | 297 | |
---|
293 | 298 | unsigned int sdio_funcs; /* number of SDIO functions */ |
---|
| 299 | + atomic_t sdio_funcs_probed; /* number of probed SDIO funcs */ |
---|
294 | 300 | struct sdio_cccr cccr; /* common card info */ |
---|
295 | 301 | struct sdio_cis cis; /* common tuple info */ |
---|
296 | 302 | struct sdio_func *sdio_func[SDIO_MAX_FUNCS]; /* SDIO functions (devices) */ |
---|
297 | 303 | struct sdio_func *sdio_single_irq; /* SDIO function when only one IRQ active */ |
---|
| 304 | + u8 major_rev; /* major revision number */ |
---|
| 305 | + u8 minor_rev; /* minor revision number */ |
---|
298 | 306 | unsigned num_info; /* number of info strings */ |
---|
299 | 307 | const char **info; /* info strings */ |
---|
300 | 308 | struct sdio_func_tuple *tuples; /* unknown common tuples */ |
---|
.. | .. |
---|
309 | 317 | |
---|
310 | 318 | unsigned int bouncesz; /* Bounce buffer size */ |
---|
311 | 319 | struct workqueue_struct *complete_wq; /* Private workqueue */ |
---|
| 320 | + |
---|
| 321 | + ANDROID_KABI_RESERVE(1); |
---|
| 322 | + ANDROID_KABI_RESERVE(2); |
---|
| 323 | + ANDROID_VENDOR_DATA(1); |
---|
312 | 324 | }; |
---|
313 | 325 | |
---|
314 | 326 | static inline bool mmc_large_sector(struct mmc_card *card) |
---|