mmc_card_blockaddr() now private
Hi,
preparing mmc patches against linux-next I noticed that mmc_card_blockaddr is now private to the mmc core.
We've been using that in the (not yet upstream) Cavium mmc driver like this:
static void prepare_ext_dma(struct mmc_host *mmc, ...
... emm_dma->s.sector = mmc_card_blockaddr(mmc->card) ? 1 : 0;
So the hardware controller needs to know if we use 512 byte blocks or not which seems to be dependent on the medium size.
Any ideas on how I can implement this without mmc_card_blockaddr() ?
thanks,
Jan
Quoted 7 lines · Jan Glauber
Hi,
preparing mmc patches against linux-next I noticed that
mmc_card_blockaddris now private to the mmc core.We've been using that in the (not yet upstream) Cavium mmc driver like this:
Quoted 7 lines
static void prepare_ext_dma(struct
mmc_host*mmc, ...... emm_dma->s.sector = mmc_card_blockaddr(mmc->card) ? 1 : 0;So the hardware controller needs to know if we use 512 byte blocks or not which seems to be dependent on the medium size.
mmc_card_blockaddr() is not about the size of the block. Instead it tells how the card translate the address to the data.
For old cards, the address can be in bytes, while newer supports the address being a multiple of sectors.
Quoted 2 lines
Any ideas on how I can implement this without
mmc_card_blockaddr()?
Seems like you probably should use "blksz" from the struct mmc_data, which your driver receives as apart of the request.
Kind regards
Uffe