All of lore.kernel.org
 help / color / mirror / Atom feed
* mmc_card_blockaddr() now private
@ 2017-01-30 13:52 Jan Glauber
  2017-02-02 13:12 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Glauber @ 2017-01-30 13:52 UTC (permalink / raw)
  To: linux-mmc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mmc_card_blockaddr() now private
  2017-01-30 13:52 mmc_card_blockaddr() now private Jan Glauber
@ 2017-02-02 13:12 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2017-02-02 13:12 UTC (permalink / raw)
  To: Jan Glauber; +Cc: linux-mmc

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-02 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30 13:52 mmc_card_blockaddr() now private Jan Glauber
2017-02-02 13:12 ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.