platform: msm_shared: use mmc groups erase to perform "fastboot erase"

Erasing one block of MMC partition will leave garbage information.
The mmc groups erase will erase the partition clean. MMC blocks not aligned
with the mmc erase unit should be handled as special case.

CRs-Fixed: 500724
Change-Id: Ic735612e9d22b199a8c494079fc626814ac8fcc7
diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c
index 0115289..71c6128 100755
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -1543,17 +1543,24 @@
 {
 	BUF_DMA_ALIGN(out, DEFAULT_ERASE_SIZE);
 	unsigned long long ptn = 0;
-	unsigned long long size;
+	unsigned long long size = 0;
 	int index = INVALID_PTN;
 
 	index = partition_get_index(arg);
 	ptn = partition_get_offset(index);
+	size = partition_get_size(index);
 
 	if(ptn == 0) {
 		fastboot_fail("Partition table doesn't exist\n");
 		return;
 	}
 
+#if MMC_SDHCI_SUPPORT
+	if (mmc_erase_card(ptn, size)) {
+		fastboot_fail("failed to erase partition\n");
+		return;
+	}
+#else
 	size = partition_get_size(index);
 	if (size > DEFAULT_ERASE_SIZE)
 		size = DEFAULT_ERASE_SIZE;
@@ -1564,6 +1571,7 @@
 		fastboot_fail("failed to erase partition");
 		return;
 	}
+#endif
 	fastboot_okay("");
 }