.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/drivers/mmc/host/sdhci.h - Secure Digital Host Controller Interface driver |
---|
3 | 4 | * |
---|
4 | 5 | * Header file for Host Controller registers and I/O accessors. |
---|
5 | 6 | * |
---|
6 | 7 | * Copyright (C) 2005-2008 Pierre Ossman, All Rights Reserved. |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License as published by |
---|
10 | | - * the Free Software Foundation; either version 2 of the License, or (at |
---|
11 | | - * your option) any later version. |
---|
12 | 8 | */ |
---|
13 | 9 | #ifndef __SDHCI_HW_H |
---|
14 | 10 | #define __SDHCI_HW_H |
---|
15 | 11 | |
---|
| 12 | +#include <linux/bits.h> |
---|
16 | 13 | #include <linux/scatterlist.h> |
---|
17 | 14 | #include <linux/compiler.h> |
---|
18 | 15 | #include <linux/types.h> |
---|
19 | 16 | #include <linux/io.h> |
---|
20 | 17 | #include <linux/leds.h> |
---|
21 | 18 | #include <linux/interrupt.h> |
---|
| 19 | +#include <linux/android_kabi.h> |
---|
22 | 20 | |
---|
23 | 21 | #include <linux/mmc/host.h> |
---|
24 | 22 | |
---|
.. | .. |
---|
28 | 26 | |
---|
29 | 27 | #define SDHCI_DMA_ADDRESS 0x00 |
---|
30 | 28 | #define SDHCI_ARGUMENT2 SDHCI_DMA_ADDRESS |
---|
| 29 | +#define SDHCI_32BIT_BLK_CNT SDHCI_DMA_ADDRESS |
---|
31 | 30 | |
---|
32 | 31 | #define SDHCI_BLOCK_SIZE 0x04 |
---|
33 | 32 | #define SDHCI_MAKE_BLKSZ(dma, blksz) (((dma & 0x7) << 12) | (blksz & 0xFFF)) |
---|
.. | .. |
---|
41 | 40 | #define SDHCI_TRNS_BLK_CNT_EN 0x02 |
---|
42 | 41 | #define SDHCI_TRNS_AUTO_CMD12 0x04 |
---|
43 | 42 | #define SDHCI_TRNS_AUTO_CMD23 0x08 |
---|
| 43 | +#define SDHCI_TRNS_AUTO_SEL 0x0C |
---|
44 | 44 | #define SDHCI_TRNS_READ 0x10 |
---|
45 | 45 | #define SDHCI_TRNS_MULTI 0x20 |
---|
46 | 46 | |
---|
.. | .. |
---|
71 | 71 | #define SDHCI_SPACE_AVAILABLE 0x00000400 |
---|
72 | 72 | #define SDHCI_DATA_AVAILABLE 0x00000800 |
---|
73 | 73 | #define SDHCI_CARD_PRESENT 0x00010000 |
---|
| 74 | +#define SDHCI_CARD_PRES_SHIFT 16 |
---|
| 75 | +#define SDHCI_CD_STABLE 0x00020000 |
---|
| 76 | +#define SDHCI_CD_LVL 0x00040000 |
---|
| 77 | +#define SDHCI_CD_LVL_SHIFT 18 |
---|
74 | 78 | #define SDHCI_WRITE_PROTECT 0x00080000 |
---|
75 | 79 | #define SDHCI_DATA_LVL_MASK 0x00F00000 |
---|
76 | 80 | #define SDHCI_DATA_LVL_SHIFT 20 |
---|
.. | .. |
---|
86 | 90 | #define SDHCI_CTRL_ADMA1 0x08 |
---|
87 | 91 | #define SDHCI_CTRL_ADMA32 0x10 |
---|
88 | 92 | #define SDHCI_CTRL_ADMA64 0x18 |
---|
89 | | -#define SDHCI_CTRL_8BITBUS 0x20 |
---|
| 93 | +#define SDHCI_CTRL_ADMA3 0x18 |
---|
| 94 | +#define SDHCI_CTRL_8BITBUS 0x20 |
---|
90 | 95 | #define SDHCI_CTRL_CDTEST_INS 0x40 |
---|
91 | 96 | #define SDHCI_CTRL_CDTEST_EN 0x80 |
---|
92 | 97 | |
---|
.. | .. |
---|
111 | 116 | #define SDHCI_DIV_HI_MASK 0x300 |
---|
112 | 117 | #define SDHCI_PROG_CLOCK_MODE 0x0020 |
---|
113 | 118 | #define SDHCI_CLOCK_CARD_EN 0x0004 |
---|
| 119 | +#define SDHCI_CLOCK_PLL_EN 0x0008 |
---|
114 | 120 | #define SDHCI_CLOCK_INT_STABLE 0x0002 |
---|
115 | 121 | #define SDHCI_CLOCK_INT_EN 0x0001 |
---|
116 | 122 | |
---|
.. | .. |
---|
189 | 195 | #define SDHCI_CTRL_DRV_TYPE_D 0x0030 |
---|
190 | 196 | #define SDHCI_CTRL_EXEC_TUNING 0x0040 |
---|
191 | 197 | #define SDHCI_CTRL_TUNED_CLK 0x0080 |
---|
| 198 | +#define SDHCI_CMD23_ENABLE 0x0800 |
---|
| 199 | +#define SDHCI_CTRL_V4_MODE 0x1000 |
---|
| 200 | +#define SDHCI_CTRL_64BIT_ADDR 0x2000 |
---|
192 | 201 | #define SDHCI_CTRL_PRESET_VAL_ENABLE 0x8000 |
---|
193 | 202 | |
---|
194 | 203 | #define SDHCI_CAPABILITIES 0x40 |
---|
195 | | -#define SDHCI_TIMEOUT_CLK_MASK 0x0000003F |
---|
196 | | -#define SDHCI_TIMEOUT_CLK_SHIFT 0 |
---|
| 204 | +#define SDHCI_TIMEOUT_CLK_MASK GENMASK(5, 0) |
---|
197 | 205 | #define SDHCI_TIMEOUT_CLK_UNIT 0x00000080 |
---|
198 | | -#define SDHCI_CLOCK_BASE_MASK 0x00003F00 |
---|
199 | | -#define SDHCI_CLOCK_V3_BASE_MASK 0x0000FF00 |
---|
200 | | -#define SDHCI_CLOCK_BASE_SHIFT 8 |
---|
| 206 | +#define SDHCI_CLOCK_BASE_MASK GENMASK(13, 8) |
---|
| 207 | +#define SDHCI_CLOCK_V3_BASE_MASK GENMASK(15, 8) |
---|
201 | 208 | #define SDHCI_MAX_BLOCK_MASK 0x00030000 |
---|
202 | 209 | #define SDHCI_MAX_BLOCK_SHIFT 16 |
---|
203 | 210 | #define SDHCI_CAN_DO_8BIT 0x00040000 |
---|
.. | .. |
---|
209 | 216 | #define SDHCI_CAN_VDD_330 0x01000000 |
---|
210 | 217 | #define SDHCI_CAN_VDD_300 0x02000000 |
---|
211 | 218 | #define SDHCI_CAN_VDD_180 0x04000000 |
---|
| 219 | +#define SDHCI_CAN_64BIT_V4 0x08000000 |
---|
212 | 220 | #define SDHCI_CAN_64BIT 0x10000000 |
---|
213 | 221 | |
---|
| 222 | +#define SDHCI_CAPABILITIES_1 0x44 |
---|
214 | 223 | #define SDHCI_SUPPORT_SDR50 0x00000001 |
---|
215 | 224 | #define SDHCI_SUPPORT_SDR104 0x00000002 |
---|
216 | 225 | #define SDHCI_SUPPORT_DDR50 0x00000004 |
---|
217 | 226 | #define SDHCI_DRIVER_TYPE_A 0x00000010 |
---|
218 | 227 | #define SDHCI_DRIVER_TYPE_C 0x00000020 |
---|
219 | 228 | #define SDHCI_DRIVER_TYPE_D 0x00000040 |
---|
220 | | -#define SDHCI_RETUNING_TIMER_COUNT_MASK 0x00000F00 |
---|
221 | | -#define SDHCI_RETUNING_TIMER_COUNT_SHIFT 8 |
---|
| 229 | +#define SDHCI_RETUNING_TIMER_COUNT_MASK GENMASK(11, 8) |
---|
222 | 230 | #define SDHCI_USE_SDR50_TUNING 0x00002000 |
---|
223 | | -#define SDHCI_RETUNING_MODE_MASK 0x0000C000 |
---|
224 | | -#define SDHCI_RETUNING_MODE_SHIFT 14 |
---|
225 | | -#define SDHCI_CLOCK_MUL_MASK 0x00FF0000 |
---|
226 | | -#define SDHCI_CLOCK_MUL_SHIFT 16 |
---|
| 231 | +#define SDHCI_RETUNING_MODE_MASK GENMASK(15, 14) |
---|
| 232 | +#define SDHCI_CLOCK_MUL_MASK GENMASK(23, 16) |
---|
| 233 | +#define SDHCI_CAN_DO_ADMA3 0x08000000 |
---|
227 | 234 | #define SDHCI_SUPPORT_HS400 0x80000000 /* Non-standard */ |
---|
228 | 235 | |
---|
229 | | -#define SDHCI_CAPABILITIES_1 0x44 |
---|
230 | | - |
---|
231 | 236 | #define SDHCI_MAX_CURRENT 0x48 |
---|
232 | | -#define SDHCI_MAX_CURRENT_LIMIT 0xFF |
---|
233 | | -#define SDHCI_MAX_CURRENT_330_MASK 0x0000FF |
---|
234 | | -#define SDHCI_MAX_CURRENT_330_SHIFT 0 |
---|
235 | | -#define SDHCI_MAX_CURRENT_300_MASK 0x00FF00 |
---|
236 | | -#define SDHCI_MAX_CURRENT_300_SHIFT 8 |
---|
237 | | -#define SDHCI_MAX_CURRENT_180_MASK 0xFF0000 |
---|
238 | | -#define SDHCI_MAX_CURRENT_180_SHIFT 16 |
---|
| 237 | +#define SDHCI_MAX_CURRENT_LIMIT GENMASK(7, 0) |
---|
| 238 | +#define SDHCI_MAX_CURRENT_330_MASK GENMASK(7, 0) |
---|
| 239 | +#define SDHCI_MAX_CURRENT_300_MASK GENMASK(15, 8) |
---|
| 240 | +#define SDHCI_MAX_CURRENT_180_MASK GENMASK(23, 16) |
---|
239 | 241 | #define SDHCI_MAX_CURRENT_MULTIPLIER 4 |
---|
240 | 242 | |
---|
241 | 243 | /* 4C-4F reserved for more max current */ |
---|
.. | .. |
---|
259 | 261 | #define SDHCI_PRESET_FOR_SDR104 0x6C |
---|
260 | 262 | #define SDHCI_PRESET_FOR_DDR50 0x6E |
---|
261 | 263 | #define SDHCI_PRESET_FOR_HS400 0x74 /* Non-standard */ |
---|
262 | | -#define SDHCI_PRESET_DRV_MASK 0xC000 |
---|
263 | | -#define SDHCI_PRESET_DRV_SHIFT 14 |
---|
264 | | -#define SDHCI_PRESET_CLKGEN_SEL_MASK 0x400 |
---|
265 | | -#define SDHCI_PRESET_CLKGEN_SEL_SHIFT 10 |
---|
266 | | -#define SDHCI_PRESET_SDCLK_FREQ_MASK 0x3FF |
---|
267 | | -#define SDHCI_PRESET_SDCLK_FREQ_SHIFT 0 |
---|
| 264 | +#define SDHCI_PRESET_DRV_MASK GENMASK(15, 14) |
---|
| 265 | +#define SDHCI_PRESET_CLKGEN_SEL BIT(10) |
---|
| 266 | +#define SDHCI_PRESET_SDCLK_FREQ_MASK GENMASK(9, 0) |
---|
268 | 267 | |
---|
269 | 268 | #define SDHCI_SLOT_INT_STATUS 0xFC |
---|
270 | 269 | |
---|
.. | .. |
---|
276 | 275 | #define SDHCI_SPEC_100 0 |
---|
277 | 276 | #define SDHCI_SPEC_200 1 |
---|
278 | 277 | #define SDHCI_SPEC_300 2 |
---|
| 278 | +#define SDHCI_SPEC_400 3 |
---|
| 279 | +#define SDHCI_SPEC_410 4 |
---|
| 280 | +#define SDHCI_SPEC_420 5 |
---|
279 | 281 | |
---|
280 | 282 | /* |
---|
281 | 283 | * End of controller registers. |
---|
.. | .. |
---|
311 | 313 | */ |
---|
312 | 314 | #define SDHCI_ADMA2_DESC_ALIGN 8 |
---|
313 | 315 | |
---|
314 | | -/* ADMA2 64-bit DMA descriptor size */ |
---|
315 | | -#define SDHCI_ADMA2_64_DESC_SZ 12 |
---|
| 316 | +/* |
---|
| 317 | + * ADMA2 64-bit DMA descriptor size |
---|
| 318 | + * According to SD Host Controller spec v4.10, there are two kinds of |
---|
| 319 | + * descriptors for 64-bit addressing mode: 96-bit Descriptor and 128-bit |
---|
| 320 | + * Descriptor, if Host Version 4 Enable is set in the Host Control 2 |
---|
| 321 | + * register, 128-bit Descriptor will be selected. |
---|
| 322 | + */ |
---|
| 323 | +#define SDHCI_ADMA2_64_DESC_SZ(host) ((host)->v4_mode ? 16 : 12) |
---|
316 | 324 | |
---|
317 | 325 | /* |
---|
318 | 326 | * ADMA2 64-bit descriptor. Note 12-byte descriptor can't always be 8-byte |
---|
.. | .. |
---|
396 | 404 | #define SDHCI_QUIRK_BROKEN_CQE (1<<17) |
---|
397 | 405 | /* Controller does not like fast PIO transfers */ |
---|
398 | 406 | #define SDHCI_QUIRK_PIO_NEEDS_DELAY (1<<18) |
---|
| 407 | +/* Controller does not have a LED */ |
---|
| 408 | +#define SDHCI_QUIRK_NO_LED (1<<19) |
---|
399 | 409 | /* Controller has to be forced to use block size of 2048 bytes */ |
---|
400 | 410 | #define SDHCI_QUIRK_FORCE_BLK_SZ_2048 (1<<20) |
---|
401 | 411 | /* Controller cannot do multi-block transfers */ |
---|
.. | .. |
---|
458 | 468 | * obtainable timeout. |
---|
459 | 469 | */ |
---|
460 | 470 | #define SDHCI_QUIRK2_DISABLE_HW_TIMEOUT (1<<17) |
---|
| 471 | +/* |
---|
| 472 | + * 32-bit block count may not support eMMC where upper bits of CMD23 are used |
---|
| 473 | + * for other purposes. Consequently we support 16-bit block count by default. |
---|
| 474 | + * Otherwise, SDHCI_QUIRK2_USE_32BIT_BLK_CNT can be selected to use 32-bit |
---|
| 475 | + * block count. |
---|
| 476 | + */ |
---|
| 477 | +#define SDHCI_QUIRK2_USE_32BIT_BLK_CNT (1<<18) |
---|
461 | 478 | |
---|
462 | 479 | int irq; /* Device IRQ */ |
---|
463 | 480 | void __iomem *ioaddr; /* Mapped address */ |
---|
| 481 | + phys_addr_t mapbase; /* physical address base */ |
---|
464 | 482 | char *bounce_buffer; /* For packing SDMA reads/writes */ |
---|
465 | 483 | dma_addr_t bounce_addr; |
---|
466 | 484 | unsigned int bounce_buffer_size; |
---|
.. | .. |
---|
488 | 506 | #define SDHCI_AUTO_CMD12 (1<<6) /* Auto CMD12 support */ |
---|
489 | 507 | #define SDHCI_AUTO_CMD23 (1<<7) /* Auto CMD23 support */ |
---|
490 | 508 | #define SDHCI_PV_ENABLED (1<<8) /* Preset value enabled */ |
---|
491 | | -#define SDHCI_SDIO_IRQ_ENABLED (1<<9) /* SDIO irq enabled */ |
---|
492 | 509 | #define SDHCI_USE_64_BIT_DMA (1<<12) /* Use 64-bit DMA */ |
---|
493 | 510 | #define SDHCI_HS400_TUNING (1<<13) /* Tuning for HS400 */ |
---|
494 | 511 | #define SDHCI_SIGNALING_330 (1<<14) /* Host is capable of 3.3V signaling */ |
---|
.. | .. |
---|
509 | 526 | bool preset_enabled; /* Preset is enabled */ |
---|
510 | 527 | bool pending_reset; /* Cmd/data reset is pending */ |
---|
511 | 528 | bool irq_wake_enabled; /* IRQ wakeup is enabled */ |
---|
| 529 | + bool v4_mode; /* Host Version 4 Enable */ |
---|
| 530 | + bool use_external_dma; /* Host selects to use external DMA */ |
---|
512 | 531 | bool always_defer_done; /* Always defer to complete requests */ |
---|
513 | 532 | |
---|
514 | 533 | struct mmc_request *mrqs_done[SDHCI_MAX_MRQS]; /* Requests done */ |
---|
515 | 534 | struct mmc_command *cmd; /* Current command */ |
---|
516 | 535 | struct mmc_command *data_cmd; /* Current data command */ |
---|
| 536 | + struct mmc_command *deferred_cmd; /* Deferred command */ |
---|
517 | 537 | struct mmc_data *data; /* Current data request */ |
---|
518 | 538 | unsigned int data_early:1; /* Data finished before cmd */ |
---|
519 | 539 | |
---|
.. | .. |
---|
531 | 551 | dma_addr_t adma_addr; /* Mapped ADMA descr. table */ |
---|
532 | 552 | dma_addr_t align_addr; /* Mapped bounce buffer */ |
---|
533 | 553 | |
---|
534 | | - unsigned int desc_sz; /* ADMA descriptor size */ |
---|
| 554 | + unsigned int desc_sz; /* ADMA current descriptor size */ |
---|
| 555 | + unsigned int alloc_desc_sz; /* ADMA descr. max size host supports */ |
---|
535 | 556 | |
---|
536 | | - struct tasklet_struct finish_tasklet; /* Tasklet structures */ |
---|
| 557 | + struct workqueue_struct *complete_wq; /* Request completion wq */ |
---|
| 558 | + struct work_struct complete_work; /* Request completion work */ |
---|
537 | 559 | |
---|
538 | 560 | struct timer_list timer; /* Timer for timeouts */ |
---|
539 | 561 | struct timer_list data_timer; /* Timer for data timeouts */ |
---|
| 562 | + |
---|
| 563 | +#if IS_ENABLED(CONFIG_MMC_SDHCI_EXTERNAL_DMA) |
---|
| 564 | + struct dma_chan *rx_chan; |
---|
| 565 | + struct dma_chan *tx_chan; |
---|
| 566 | +#endif |
---|
540 | 567 | |
---|
541 | 568 | u32 caps; /* CAPABILITY_0 */ |
---|
542 | 569 | u32 caps1; /* CAPABILITY_1 */ |
---|
543 | 570 | bool read_caps; /* Capability flags have been read */ |
---|
544 | 571 | |
---|
| 572 | + bool sdhci_core_to_disable_vqmmc; /* sdhci core can disable vqmmc */ |
---|
545 | 573 | unsigned int ocr_avail_sdio; /* OCR bit masks */ |
---|
546 | 574 | unsigned int ocr_avail_sd; |
---|
547 | 575 | unsigned int ocr_avail_mmc; |
---|
.. | .. |
---|
563 | 591 | |
---|
564 | 592 | unsigned int tuning_count; /* Timer count for re-tuning */ |
---|
565 | 593 | unsigned int tuning_mode; /* Re-tuning mode supported by host */ |
---|
| 594 | + unsigned int tuning_err; /* Error code for re-tuning */ |
---|
566 | 595 | #define SDHCI_TUNING_MODE_1 0 |
---|
567 | 596 | #define SDHCI_TUNING_MODE_2 1 |
---|
568 | 597 | #define SDHCI_TUNING_MODE_3 2 |
---|
569 | 598 | /* Delay (ms) between tuning commands */ |
---|
570 | 599 | int tuning_delay; |
---|
| 600 | + int tuning_loop_count; |
---|
571 | 601 | |
---|
572 | 602 | /* Host SDMA buffer boundary. */ |
---|
573 | 603 | u32 sdma_boundary; |
---|
.. | .. |
---|
577 | 607 | |
---|
578 | 608 | u64 data_timeout; |
---|
579 | 609 | |
---|
580 | | - unsigned long private[0] ____cacheline_aligned; |
---|
| 610 | + ANDROID_KABI_RESERVE(1); |
---|
| 611 | + |
---|
| 612 | + unsigned long private[] ____cacheline_aligned; |
---|
581 | 613 | }; |
---|
582 | 614 | |
---|
583 | 615 | struct sdhci_ops { |
---|
.. | .. |
---|
596 | 628 | |
---|
597 | 629 | u32 (*irq)(struct sdhci_host *host, u32 intmask); |
---|
598 | 630 | |
---|
| 631 | + int (*set_dma_mask)(struct sdhci_host *host); |
---|
599 | 632 | int (*enable_dma)(struct sdhci_host *host); |
---|
600 | 633 | unsigned int (*get_max_clock)(struct sdhci_host *host); |
---|
601 | 634 | unsigned int (*get_min_clock)(struct sdhci_host *host); |
---|
.. | .. |
---|
617 | 650 | void (*voltage_switch)(struct sdhci_host *host); |
---|
618 | 651 | void (*adma_write_desc)(struct sdhci_host *host, void **desc, |
---|
619 | 652 | dma_addr_t addr, int len, unsigned int cmd); |
---|
| 653 | + void (*copy_to_bounce_buffer)(struct sdhci_host *host, |
---|
| 654 | + struct mmc_data *data, |
---|
| 655 | + unsigned int length); |
---|
620 | 656 | void (*request_done)(struct sdhci_host *host, |
---|
621 | 657 | struct mmc_request *mrq); |
---|
| 658 | + void (*dump_vendor_regs)(struct sdhci_host *host); |
---|
| 659 | + |
---|
| 660 | + ANDROID_KABI_RESERVE(1); |
---|
622 | 661 | }; |
---|
623 | 662 | |
---|
624 | 663 | #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS |
---|
.. | .. |
---|
714 | 753 | } |
---|
715 | 754 | |
---|
716 | 755 | void sdhci_card_detect(struct sdhci_host *host); |
---|
717 | | -void __sdhci_read_caps(struct sdhci_host *host, u16 *ver, u32 *caps, |
---|
718 | | - u32 *caps1); |
---|
| 756 | +void __sdhci_read_caps(struct sdhci_host *host, const u16 *ver, |
---|
| 757 | + const u32 *caps, const u32 *caps1); |
---|
719 | 758 | int sdhci_setup_host(struct sdhci_host *host); |
---|
720 | 759 | void sdhci_cleanup_host(struct sdhci_host *host); |
---|
721 | 760 | int __sdhci_add_host(struct sdhci_host *host); |
---|
722 | 761 | int sdhci_add_host(struct sdhci_host *host); |
---|
723 | 762 | void sdhci_remove_host(struct sdhci_host *host, int dead); |
---|
724 | | -void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd); |
---|
725 | 763 | |
---|
726 | 764 | static inline void sdhci_read_caps(struct sdhci_host *host) |
---|
727 | 765 | { |
---|
728 | 766 | __sdhci_read_caps(host, NULL, NULL, NULL); |
---|
729 | | -} |
---|
730 | | - |
---|
731 | | -static inline bool sdhci_sdio_irq_enabled(struct sdhci_host *host) |
---|
732 | | -{ |
---|
733 | | - return !!(host->flags & SDHCI_SDIO_IRQ_ENABLED); |
---|
734 | 767 | } |
---|
735 | 768 | |
---|
736 | 769 | u16 sdhci_calc_clk(struct sdhci_host *host, unsigned int clock, |
---|
.. | .. |
---|
739 | 772 | void sdhci_enable_clk(struct sdhci_host *host, u16 clk); |
---|
740 | 773 | void sdhci_set_power(struct sdhci_host *host, unsigned char mode, |
---|
741 | 774 | unsigned short vdd); |
---|
| 775 | +void sdhci_set_power_and_bus_voltage(struct sdhci_host *host, |
---|
| 776 | + unsigned char mode, |
---|
| 777 | + unsigned short vdd); |
---|
742 | 778 | void sdhci_set_power_noreg(struct sdhci_host *host, unsigned char mode, |
---|
743 | 779 | unsigned short vdd); |
---|
744 | 780 | void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq); |
---|
| 781 | +int sdhci_request_atomic(struct mmc_host *mmc, struct mmc_request *mrq); |
---|
745 | 782 | void sdhci_set_bus_width(struct sdhci_host *host, int width); |
---|
746 | 783 | void sdhci_reset(struct sdhci_host *host, u8 mask); |
---|
747 | 784 | void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing); |
---|
.. | .. |
---|
757 | 794 | int sdhci_suspend_host(struct sdhci_host *host); |
---|
758 | 795 | int sdhci_resume_host(struct sdhci_host *host); |
---|
759 | 796 | int sdhci_runtime_suspend_host(struct sdhci_host *host); |
---|
760 | | -int sdhci_runtime_resume_host(struct sdhci_host *host); |
---|
| 797 | +int sdhci_runtime_resume_host(struct sdhci_host *host, int soft_reset); |
---|
761 | 798 | #endif |
---|
762 | 799 | |
---|
763 | 800 | void sdhci_cqe_enable(struct mmc_host *mmc); |
---|
.. | .. |
---|
766 | 803 | int *data_error); |
---|
767 | 804 | |
---|
768 | 805 | void sdhci_dumpregs(struct sdhci_host *host); |
---|
| 806 | +void sdhci_enable_v4_mode(struct sdhci_host *host); |
---|
769 | 807 | |
---|
770 | 808 | void sdhci_start_tuning(struct sdhci_host *host); |
---|
771 | 809 | void sdhci_end_tuning(struct sdhci_host *host); |
---|
772 | 810 | void sdhci_reset_tuning(struct sdhci_host *host); |
---|
773 | 811 | void sdhci_send_tuning(struct sdhci_host *host, u32 opcode); |
---|
| 812 | +void sdhci_abort_tuning(struct sdhci_host *host, u32 opcode); |
---|
| 813 | +void sdhci_switch_external_dma(struct sdhci_host *host, bool en); |
---|
| 814 | +void sdhci_set_data_timeout_irq(struct sdhci_host *host, bool enable); |
---|
| 815 | +void __sdhci_set_timeout(struct sdhci_host *host, struct mmc_command *cmd); |
---|
774 | 816 | |
---|
775 | 817 | #endif /* __SDHCI_HW_H */ |
---|