Re: mmc_card_blockaddr() now private

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30 January 2017 at 14:52, Jan Glauber <jglauber@xxxxxxxxxx> wrote:
> 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.

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.

>
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux