msm: msm_sdcc: use AUTO_PROG_DONE bit for CMD53 write
SDCCv4 supports AUTO_PROG_DONE bit for CMD53 write.
Without this bit, driver had to send the dummy CMD52
to know whether card is busy programming or not.
As AUTO_PROG_DONE bit is available, driver no longer
sends dummy CMD52 rather it sets this AUTO_PROG_DONE
bit in MCI_DATA_CTL register and then waits for
PROG_DONE interrupt status bit to be set.
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
diff --git a/drivers/mmc/host/msm_sdcc.h b/drivers/mmc/host/msm_sdcc.h
index f6f76ff..b4d2d58 100644
--- a/drivers/mmc/host/msm_sdcc.h
+++ b/drivers/mmc/host/msm_sdcc.h
@@ -77,6 +77,7 @@
#define MCI_DPSM_DIRECTION (1 << 1)
#define MCI_DPSM_MODE (1 << 2)
#define MCI_DPSM_DMAENABLE (1 << 3)
+#define MCI_AUTO_PROG_DONE (1 << 19)
#define MCI_RX_DATA_PEND (1 << 20)
#define MMCIDATACNT 0x030
@@ -256,6 +257,8 @@
unsigned int xfer_remain; /* Bytes remaining to send */
unsigned int data_xfered; /* Bytes acked by BLKEND irq */
int got_dataend;
+ int wait_for_auto_prog_done;
+ int got_auto_prog_done;
int user_pages;
};