Merge tag 'gpio-v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
[linux-2.6-microblaze.git] / drivers / mmc / host / mmci.h
index 833236e..158e123 100644 (file)
 #define MCI_ST_CARDBUSY                (1 << 24)
 /* Extended status bits for the STM32 variants */
 #define MCI_STM32_BUSYD0       BIT(20)
+#define MCI_STM32_BUSYD0END    BIT(21)
 
 #define MMCICLEAR              0x038
 #define MCI_CMDCRCFAILCLR      (1 << 0)
@@ -287,6 +288,8 @@ struct mmci_host;
  * @signal_direction: input/out direction of bus signals can be indicated
  * @pwrreg_clkgate: MMCIPOWER register must be used to gate the clock
  * @busy_detect: true if the variant supports busy detection on DAT0.
+ * @busy_timeout: true if the variant starts data timer when the DPSM
+ *               enter in Wait_R or Busy state.
  * @busy_dpsm_flag: bitmask enabling busy detection in the DPSM
  * @busy_detect_flag: bitmask identifying the bit in the MMCISTATUS register
  *                   indicating that the card is busy
@@ -333,6 +336,7 @@ struct variant_data {
        u8                      signal_direction:1;
        u8                      pwrreg_clkgate:1;
        u8                      busy_detect:1;
+       u8                      busy_timeout:1;
        u32                     busy_dpsm_flag;
        u32                     busy_detect_flag;
        u32                     busy_detect_mask;
@@ -366,6 +370,7 @@ struct mmci_host_ops {
        void (*dma_error)(struct mmci_host *host);
        void (*set_clkreg)(struct mmci_host *host, unsigned int desired);
        void (*set_pwrreg)(struct mmci_host *host, unsigned int pwr);
+       bool (*busy_complete)(struct mmci_host *host, u32 status, u32 err_msk);
 };
 
 struct mmci_host {