Re: MMC block addressing mode.

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

 



On 04/20/2017 09:17 AM, Steven J. Hill wrote:
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.


... In other words:

The Cavium MMC controller doesn't directly send the commands supplied by the MMC core to the target device. The driver analyzes the intent of the commands, and then programs the MMC bus interface unit to synthesize an equivalent, but perhaps different, set of commands to the target device. As part of this synthesis, hardware needs to be told if sector or byte addressing is used by the target device.

Steven and Jan:  Can we get around this requirement by:

- Always set MIO_EMM_DMA[MULTI] = 1; This way by SECTOR mode may be unimportant.

  - Always set MIO_EMM_DMA[SECTOR] = SUITABLE_CONSTANT.

--
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