}
+#ifndef CONFIG_S5P_MSHC
static ulong mmc_erase_t(struct mmc *mmc, ulong start, lbaint_t blkcnt, int sec)
{
struct mmc_cmd cmd;
return blk;
}
+#endif
#if defined(CONFIG_S5P_MSHC)
static unsigned long
mmc_erase(int dev_num, unsigned long start, lbaint_t block)
{
int err;
- lbaint_t count, erase_time, dis, blk_hc;
+ lbaint_t count, erase_time, dis, blk_hc = 0;
lbaint_t return_blk = block;
struct mmc_cmd cmd;
struct mmc *mmc = find_mmc_device(dev_num);
- printf("START: %d BLOCK: %d\n", start, block);
- printf("high_capacity: %d\n", mmc->high_capacity);
- printf("Capacity: %d\n", mmc->capacity);
-
/* Byte addressing */
if (mmc->high_capacity == 0) {
start = start * 512;
printf("*** High Capacity(higher than 2GB) MMC's erase "
"minimum size is 512KB ***\n");
if (block < 2) {
- printf("\n %d KB erase Done\n", block*512);
+ printf("\n %lu KB erase Done\n", block*512);
} else if ((block >= 2)&&(block < 2048)){
- printf("\n %d.%d MB erase Done\n", (block/2),
+ printf("\n %lu.%lu MB erase Done\n", (block/2),
(block%2)*5);
} else {
- printf("\n %d.%d GB erase Done\n",
+ printf("\n %lu.%lu GB erase Done\n",
(block/2048),
((block*1000)/2048) -
((block/2048)*1000));
}
} else {
if (block < 2) {
- printf("\n %d B erase Done\n", block*512);
+ printf("\n %lu B erase Done\n", block*512);
} else if ((block >= 2)&&(block < 2048)){
- printf("\n %d KB erase Done\n", (block/2));
+ printf("\n %lu KB erase Done\n", (block/2));
} else if ((block >= 2048)&&(block < (2048 * 1024))){
- printf("\n %d.%d MB erase Done\n",
+ printf("\n %lu.%lu MB erase Done\n",
(block/2048),
((block*1000)/2048) -
((block/2048)*1000));
} else {
- printf("\n %d.%d GB erase Done\n",
+ printf("\n %lu.%lu GB erase Done\n",
(block/(2048*1024)),
((block*10)/(2048*1024)) -
((block/(2048*1024))*10));
u64 cmult, csize, capacity;
struct mmc_cmd cmd;
ALLOC_CACHE_ALIGN_BUFFER(char, ext_csd, 512);
- ALLOC_CACHE_ALIGN_BUFFER(char, test_csd, 512);
int timeout = 1000;
#ifdef CONFIG_MMC_SPI_CRC_ON