Re: MMC block addressing mode.

From: Steven J. Hill
Date: Thu Apr 20 2017 - 12:19:43 EST


On 04/20/2017 09:18 AM, Ulf Hansson wrote:
>>
>> The Cavium hardware requires knowledge of the card addressing mode.
>> We need to either restore mmc_card_blockaddr(), or create another
>> way to generate the same information. You previously suggested use
>> of the 'blksz' value, however, it has the same value regardless of
>> the card capacity. What would you suggest? Cheers.
>
> Right. Can you explain what the Cavium hardware need it for?
>
Uffe,

In Cavium's MMC controller, the DMA engine requires software to
specify the addressing mode of the card. For DMA write operations,
the CARD_ADDR field in the MIO_EMM_DMA register is programmed with
a byte address if the media card <= 2GB. If the card is > 2GB, the
address is interpreted as a 512 byte sector address. The SECTOR bit
tells the controller how to interpret the address in CARD_ADDR. If
set to 1, use 512 byte sector addressing, otherwise it is set to 0
and byte addressing is used.

Steve