On Fri, July 6, 2012 9:47 am, Chris Ball wrote: > Hi, > > On Fri, Jun 08 2012, Jaehoon Chung wrote: >> Enable eMMC background operations (BKOPS) feature. >> >> If URGENT_BKOPS is set after a response, note that BKOPS >> are required. After all I/O requests are finished, run >> BKOPS if required. Should read/write operations be requested >> during BKOPS, first issue HPI to interrupt the ongoing BKOPS >> and then service the request. >> If BKOPS-STATUS is upper than LEVEL2, need to check until clear >> the BKOPS-STATUS vaule. >> >> If you want to enable this feature, set MMC_CAP2_BKOPS. >> And if you want to set the BKOPS_EN bit in ext_csd register, >> use the MMC_CAP2_INIT_BKOPS. > [..] >> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h >> index 0707d22..d23caf2 100644 >> --- a/include/linux/mmc/host.h >> +++ b/include/linux/mmc/host.h >> @@ -238,6 +238,8 @@ struct mmc_host { >> #define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */ >> #define MMC_CAP2_DETECT_ON_ERR (1 << 8) /* On I/O err check card >> removal */ >> #define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */ >> +#define MMC_CAP2_INIT_BKOPS (1 << 10) /* To enable BKOPS */ >> +#define MMC_CAP2_BKOPS (1 << 11) /* BKOPS supported */ > > Can we have a better explanation of how these capabilities are supposed > to be used, and why it's necessary to have two of them? Why would you > set one but not the other? > > Thanks, > > - Chris. > -- > Chris Ball <cjb@xxxxxxxxxx> <http://printf.net/> > One Laptop Per Child > I think MMC_CAP2_BKOPS should be removed. If the card BKOPs were already enabled, the host must support BKOPs. Therefore, in mmc_start_bkops we should check only if card->ext_csd.bkops_en is set. Thanks, Maya -- Sent by consultant of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html