Skip to contentSkip to conversation

SD power-control necessary?

DISCUSSION Hein_Tibosch 4 participants 5 messages Jan 7, 2011 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

Hello,

Maybe a stupid question, but when designing new hardware with a slot for an sd-card, how essential is it that the driver is able to power off/on the card?

I would say essential, because I've seen sd-cards in a state in which they didn't respond to MMC_GO_IDLE_STATE anymore, until they were re-inserted.

Can anyone shed a light on this? How could an sd-card get into such a state?

Will the mmc driver fall back to mmc_rescan() after an initialized card becomes non-responsive?

Thanks, Hein

#1 lore raw

2011/1/7 Hein_Tibosch <[email protected]>:

Quoted 3 lines

Maybe a stupid question, but when designing new hardware with a slot for an sd-card, how essential is it that the driver is able to power off/on the card?

For one, this is needed for power-management. In powered suspend case, when card's slot does not provide card change detection, power-cycle is the only way sure way to get a card to known state in case it can be removed in that time.

Quoted 4 lines

I would say essential, because I've seen sd-cards in a state in which they didn't respond to MMC_GO_IDLE_STATE anymore, until they were re-inserted.

Can anyone shed a light on this? How could an sd-card get into such a state?

After CMD15 (GO_INACTIVE_STATE) or because of a card bug.

Quoted 3 lines

Will the mmc driver fall back to mmc_rescan() after an initialized card becomes non-responsive?

When the card goes off-protocol it's in undefined state, so a reset is the only way to get it back to known state. Since in SD/MMC there's no reset signal - only power cycle can reset the card.

Best Regards,
Michał Mirosław

#2 lore raw
In reply to Hein_Tibosch
Quoted 5 lines · Hein_Tibosch

Hello,

Maybe a stupid question, but when designing new hardware with a slot for an sd-card, how essential is it that the driver is able to power off/on the card?

Just a random thought: allowing the driver to power off the SD card will defeat the "power-on memory protect" feature. This is how the supposedly secure G2 was jailbroken.

-ed falk

#3 lore raw
Quoted 7 lines · Edward A. Falk
Quoted 3 lines

Maybe a stupid question, but when designing new hardware with a slot for an sd-card, how essential is it that the driver is able to power off/on the card?

Just a random thought: allowing the driver to power off the SD card will defeat the "power-on memory protect" feature. This is how the supposedly secure G2 was jailbroken.

It wasn't powered off by the SD (it's actually soldered-down eMMC) driver, though -- the eMMC controller itself was reset by a sideband GPIO, and then the MMC stack was modified to be able to bring the controller back up without disrupting userspace.

So, not entirely relevant to the case of controlling card power from inside the MMC driver.

Signature · 2 lines
Chris Ball   <[email protected]>   <http://printf.net/>
One Laptop Per Child
#4 lore raw
In reply to Edward A. Falk
Quoted 3 lines · Edward A. Falk

Just a random thought: allowing the driver to power off the SD card will defeat the "power-on memory protect" feature. This is how the supposedly secure G2 was jailbroken.

Ahh, I see we're talking about a removable SD card. In that case, jailbreaking is not an issue, so yes, the driver should be able to remove power from the device.