summaryrefslogtreecommitdiff
path: root/include/mmc.h
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2023-01-05 15:19:08 +0100
committerJaehoon Chung <jh80.chung@samsung.com>2023-01-31 22:02:27 +0900
commitcf1f7355aea0b4640a244a75b3c18835e7f7b2bb (patch)
treefe0dc4907c173ff510564fbcabce4d867fc04f4c /include/mmc.h
parent30db474704405be823259851cbb76fa05366c8af (diff)
cmd: mmc: Expand bkops handling
Add more capable "bkops" command which allows enabling and disabling both manual and automatic bkops. The existing 'mmc bkops-enable' subcommand is poorly named to cover all the possibilities, hence the new-ish subcommand. Note that both commands are wrappers around the same common code. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'include/mmc.h')
-rw-r--r--include/mmc.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/mmc.h b/include/mmc.h
index 571fa625d0..36dd841d5d 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -892,9 +892,17 @@ int mmc_rpmb_write(struct mmc *mmc, void *addr, unsigned short blk,
int mmc_rpmb_route_frames(struct mmc *mmc, void *req, unsigned long reqlen,
void *rsp, unsigned long rsplen);
-#ifdef CONFIG_CMD_BKOPS_ENABLE
-int mmc_set_bkops_enable(struct mmc *mmc);
-#endif
+/**
+ * mmc_set_bkops_enable() - enable background operations
+ * @param mmc Pointer to a MMC device struct
+ * @param autobkops Enable automatic bkops, not manual bkops
+ * @param enable Enable bkops, not disable
+ *
+ * Enable or disable automatic or manual background operation of the eMMC.
+ *
+ * Return: 0 on success, <0 on error.
+ */
+int mmc_set_bkops_enable(struct mmc *mmc, bool autobkops, bool enable);
/**
* Start device initialization and return immediately; it does not block on