mmc: core: make the mmc queue depth configurable

This patch make driver able to set the queue depth and keep the default
vaule to be '64'.

Change-Id: I54cd065d6536c170d1615a6f9d7071d479bfeb84
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This commit is contained in:
Jianqun Xu
2022-02-23 13:13:16 +08:00
committed by Tao Huang
parent b9aa3ac670
commit 88412bf3be
2 changed files with 15 additions and 0 deletions
+11
View File
@@ -89,3 +89,14 @@ config MMC_CRYPTO
Enabling this makes it possible for the kernel to use the crypto
capabilities of the MMC device (if present) to perform crypto
operations on data being transferred to/from the device.
config MMC_QUEUE_DEPTH
int "MMC Queue Depth number"
range 1 64
depends on ROCKCHIP_MINI_KERNEL
default 64
help
Set a depth num for mmc queue, user can set it lower to decrease
queue number to save memory, suggest set to NR_CPUS.
If unsure, say 64 here.
+4
View File
@@ -419,7 +419,11 @@ static inline bool mmc_merge_capable(struct mmc_host *host)
}
/* Set queue depth to get a reasonable value for q->nr_requests */
#ifdef CONFIG_MMC_QUEUE_DEPTH
#define MMC_QUEUE_DEPTH CONFIG_MMC_QUEUE_DEPTH
#else
#define MMC_QUEUE_DEPTH 64
#endif
/**
* mmc_init_queue - initialise a queue structure.