hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/linux/mmc/card.h
....@@ -1,9 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * 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.
74 *
85 * Card driver specific definitions.
96 */
....@@ -12,6 +9,7 @@
129
1310 #include <linux/device.h>
1411 #include <linux/mod_devicetable.h>
12
+#include <linux/android_kabi.h>
1513
1614 struct mmc_cid {
1715 unsigned int manfid;
....@@ -51,6 +49,7 @@
5149 u8 sec_feature_support;
5250 u8 rel_sectors;
5351 u8 rel_param;
52
+ bool enhanced_rpmb_supported;
5453 u8 part_config;
5554 u8 cache_ctrl;
5655 u8 rst_n_function;
....@@ -133,6 +132,8 @@
133132 struct sd_scr {
134133 unsigned char sda_vsn;
135134 unsigned char sda_spec3;
135
+ unsigned char sda_spec4;
136
+ unsigned char sda_specx;
136137 unsigned char bus_widths;
137138 #define SD_SCR_BUS_WIDTH_1 (1<<0)
138139 #define SD_SCR_BUS_WIDTH_4 (1<<2)
....@@ -236,6 +237,8 @@
236237 #define MMC_BLK_DATA_AREA_BOOT (1<<1)
237238 #define MMC_BLK_DATA_AREA_GP (1<<2)
238239 #define MMC_BLK_DATA_AREA_RPMB (1<<3)
240
+
241
+ ANDROID_KABI_RESERVE(1);
239242 };
240243
241244 /*
....@@ -270,6 +273,7 @@
270273 #define MMC_QUIRK_BROKEN_IRQ_POLLING (1<<11) /* Polling SDIO_CCCR_INTx could create a fake interrupt */
271274 #define MMC_QUIRK_TRIM_BROKEN (1<<12) /* Skip trim */
272275 #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 */
273277
274278 bool reenable_cmdq; /* Re-enable Command Queue */
275279
....@@ -277,6 +281,7 @@
277281 unsigned int erase_shift; /* if erase unit is power 2 */
278282 unsigned int pref_erase; /* in sectors */
279283 unsigned int eg_boundary; /* don't cross erase-group boundaries */
284
+ unsigned int erase_arg; /* erase / trim / discard */
280285 u8 erased_byte; /* value of erased bytes */
281286
282287 u32 raw_cid[4]; /* raw card CID */
....@@ -291,10 +296,13 @@
291296 struct sd_switch_caps sw_caps; /* switch (CMD6) caps */
292297
293298 unsigned int sdio_funcs; /* number of SDIO functions */
299
+ atomic_t sdio_funcs_probed; /* number of probed SDIO funcs */
294300 struct sdio_cccr cccr; /* common card info */
295301 struct sdio_cis cis; /* common tuple info */
296302 struct sdio_func *sdio_func[SDIO_MAX_FUNCS]; /* SDIO functions (devices) */
297303 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 */
298306 unsigned num_info; /* number of info strings */
299307 const char **info; /* info strings */
300308 struct sdio_func_tuple *tuples; /* unknown common tuples */
....@@ -309,6 +317,10 @@
309317
310318 unsigned int bouncesz; /* Bounce buffer size */
311319 struct workqueue_struct *complete_wq; /* Private workqueue */
320
+
321
+ ANDROID_KABI_RESERVE(1);
322
+ ANDROID_KABI_RESERVE(2);
323
+ ANDROID_VENDOR_DATA(1);
312324 };
313325
314326 static inline bool mmc_large_sector(struct mmc_card *card)