mmc: tmio: introduce macro for max block size
We will need it later for other calculations. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
f49bdcde0a
commit
609e5fba56
|
@ -105,6 +105,8 @@
|
||||||
TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
|
TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
|
||||||
#define TMIO_MASK_IRQ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD)
|
#define TMIO_MASK_IRQ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD)
|
||||||
|
|
||||||
|
#define TMIO_MAX_BLK_SIZE 512
|
||||||
|
|
||||||
struct tmio_mmc_data;
|
struct tmio_mmc_data;
|
||||||
struct tmio_mmc_host;
|
struct tmio_mmc_host;
|
||||||
|
|
||||||
|
|
|
@ -1186,7 +1186,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
|
||||||
mmc->caps |= MMC_CAP_4_BIT_DATA | pdata->capabilities;
|
mmc->caps |= MMC_CAP_4_BIT_DATA | pdata->capabilities;
|
||||||
mmc->caps2 |= pdata->capabilities2;
|
mmc->caps2 |= pdata->capabilities2;
|
||||||
mmc->max_segs = pdata->max_segs ? : 32;
|
mmc->max_segs = pdata->max_segs ? : 32;
|
||||||
mmc->max_blk_size = 512;
|
mmc->max_blk_size = TMIO_MAX_BLK_SIZE;
|
||||||
mmc->max_blk_count = pdata->max_blk_count ? :
|
mmc->max_blk_count = pdata->max_blk_count ? :
|
||||||
(PAGE_SIZE / mmc->max_blk_size) * mmc->max_segs;
|
(PAGE_SIZE / mmc->max_blk_size) * mmc->max_segs;
|
||||||
mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
|
mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
|
||||||
|
|
Loading…
Reference in New Issue