mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
mmc: queue: Share mmc request array between partitions
eMMC can have multiple internal partitions that are represented as separate disks / queues. However switching between partitions is only done when the queue is empty. Consequently the array of mmc requests that are queued can be shared between partitions saving memory. Keep a pointer to the mmc request queue on the card, and use that instead of allocating a new one for each partition. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
cdf8a6fb48
commit
7b410d074b
4 changed files with 159 additions and 99 deletions
|
@ -208,6 +208,7 @@ struct sdio_cis {
|
|||
struct mmc_host;
|
||||
struct sdio_func;
|
||||
struct sdio_func_tuple;
|
||||
struct mmc_queue_req;
|
||||
|
||||
#define SDIO_MAX_FUNCS 7
|
||||
|
||||
|
@ -300,6 +301,10 @@ struct mmc_card {
|
|||
struct dentry *debugfs_root;
|
||||
struct mmc_part part[MMC_NUM_PHY_PARTITION]; /* physical partitions */
|
||||
unsigned int nr_parts;
|
||||
|
||||
struct mmc_queue_req *mqrq; /* Shared queue structure */
|
||||
unsigned int bouncesz; /* Bounce buffer size */
|
||||
int qdepth; /* Shared queue depth */
|
||||
};
|
||||
|
||||
static inline bool mmc_large_sector(struct mmc_card *card)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue