Age | Commit message (Collapse) | Author |
|
We expose the boot partitions as separate units,
such as sdM0 is the user data partition and sdM1
is the first boot partition and sdM2 is the
second boot partition.
On access, we automatically switch the
BOOT_PARTITOIN_ACCESS bits in the EXT_CSD.
Also, the units ctl file contains "boot enabled"
or "boot disabled" if that unit is the active
or inactive boot partition.
|
|
|
|
- pass the correct ocr value for SEND_OP_COND (advertise Hcs and 3.3v)
- disambiguate SEND_RELATIVE_ADDRESS/SET_RELATIVE_ADDRESS
- detect the MMC version from CSD structure
- detect the capacity according to spec for MMC
- implement SWITCH command to set highspeed frequency and bus width
- rename Ctlr to Card (thats really what we keep track of here)
|
|
We want to support the internal emmc device on the reform,
which has a different initialization sequence from SDcard.
The problem is, all mmc controller drivers where using
the command index to derive the command properties.
The command index's interpretation depends on the
command set. And MMC has different commands then SD.
Also, there are the APP_CMD escaped commands which
drivers then tried to recover the state...
All of this is total nonsense... The controller drivers
should not care and the command properties should
be maintained by port/sdmmc.c.
So we pass the command as a struct SDiocmd, which
has all the properties (command index, response type,
data transfer mode... and even a string for debugging).
The controller just converts this into register values
and just executes the commands.
Next, the controller drivers shouldnt snoop on the
commands and then try to apply bus and frequency
switching on their own. This is now made explicit by
having SDio.bus(io, width, speed) function.
|
|
remove the global sdio struct and add a addmmcio() function
for drivers to register their controllers.
there is a SDio.aux pointer now where controller drivers
can stash a pointer to their private data.
SDio.init() also can signal that it wants to be called
again for more controllers by returning > 0 (see pc/pmmc.c).
this is in preparation for supporting the internal mmc
device in the mnt-reform which is hooked up to usdhc1.
|
|
for unknown reasons, multiwrite is busted in usdhc:
sdhc: write error intr 10 stat ff88858e
usdhccmd: need to reset Datinhibit intr 10 stat ff88858e
usdhc: cmd 193a0027 arg 1e5b6b error intr 18010 stat ff88858f
i'm disabling it for now, adding a flag to the SDio struct.
|
|
Some mmc controllers have no card detect pin, so the only
way to detect card presence is to issue the ACMD41 which will
fail after a pretty long timeout.
To avoid mmconline() blocking, we only try to initialize the
card synchronous once, and then retry in a background process,
while returning immediately from mmconline() while the retry
is in progress.
This speeds up network boot times significantly on a raspi
without a sdcard inserted.
|
|
|
|
the new driver supports 50MHz highspeed bus mode
and uses ADMA instead of SDMA.
|
|
|
|
the driver should work for standard sdhc
(see http://www.sdcard.org/) controllers,
but matches for the ricoh controller only
as it was the only one i have for testing.
|
|
|