drivers: synopsys: Fix synopsys MMC driver
authorTien Hock, Loh <tien.hock.loh@intel.com>
Tue, 12 Mar 2019 06:36:19 +0000 (14:36 +0800)
committerTien Hock, Loh <tien.hock.loh@intel.com>
Tue, 12 Mar 2019 06:39:50 +0000 (14:39 +0800)
commit3d0f30bb544a6b4a0c4766a6c31169419db4090e
treedc62fbf0501f360f115e4894b8e3247222080afc
parent1cf55aba4902d43c95e5a24acf6d85de96923dc0
drivers: synopsys: Fix synopsys MMC driver

There are some issues with synopsys MMC driver:
- CMD8 should not expect data (for SD)
- ACMD51 should expect data (Send SCR for SD)
- dw_prepare should not dictate size to be MMC_BLOCK_SIZE, block size is
now handled in the dw_prepare function
- after the CMD completes, when doing dw_read, we need to invalidate cache
and wait for the data transfer to complete
- Need to set FIFO threshold, otherwise DMA might never get the interrupt
to read or write

Signed-off-by: Tien Hock, Loh <tien.hock.loh@intel.com>
drivers/synopsys/emmc/dw_mmc.c
include/drivers/synopsys/dw_mmc.h