From cf1f7355aea0b4640a244a75b3c18835e7f7b2bb Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 5 Jan 2023 15:19:08 +0100 Subject: 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 Reviewed-by: Simon Glass Reviewed-by: Jaehoon Chung --- include/mmc.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include/mmc.h') diff --git a/include/mmc.h b/include/mmc.h index 571fa625d02..36dd841d5d1 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 -- cgit v1.2.3