mmc: block: claim host in mmc_blk_set_blksize() only if required

Following is the sequence during system resume (dpm_resume()):
1. SDCC driver resume gets called which does nothing as it will
   find the device as runtime suspended.
2. As part of dpm_resume() itself, mmc_bus_resume() is called which
   results in this call flow:
	mmc_bus_resume -> mmc_blk_resume -> mmc_blk_set_blksize ->
	mmc_claim_host -> mmc_host_enable -> host_ops->enable ->
	SDCC driver runtime resume.

We really don't want to do runtime resume of SDCC as part of
dpm_resume() othewise it will increase the latency of overall
system resume path.

For sector addressed cards (card size > 2GB), default blocksize is
512 bytes which means setting block length by sending
CMD16 (SET_BLOCKLEN) is not required for such cards. But
mmc_blk_set_blksize() first claims host and then check if card requires
CMD16 or not. mmc_claim_host() will cause runtime resume of SDCC device.
So it's better to first check if card requires CMD16 or not for setting
block length to 512 and then claim the host only if it's required.

CRs-fixed: 344459
Change-Id: I428cedeeee08cdc82ef9805f4d72179dfe0b3ce8
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 93aacef..5dbf839 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1540,6 +1540,9 @@
 {
 	int err;
 
+	if (mmc_card_blockaddr(card) || mmc_card_ddr_mode(card))
+		return 0;
+
 	mmc_claim_host(card->host);
 	err = mmc_set_blocklen(card, 512);
 	mmc_release_host(card->host);