Driver SD Card for Raspberry Pi

Norman Feske norman.feske at ...1...
Wed Jun 24 12:17:13 CEST 2015


Hello again,

On 23.06.2015 14:58, Norman Feske wrote:
>> [init -> sd_card_drv] \0x1b[33mcapacity: 1107296256 MiB\0x1b[0m
> 
> This capacity value is obviously wrong. It is certainly a miscalculation
> in the '_sd_card_device_size' function:
> 
> https://github.com/genodelabs/genode/blob/master/repos/os/src/drivers/sd_card/sd_card.h#L411
> 
> I definitely need to investigate the calculation with a larger test set
> of SD cards. That said, the wrong capacity is not the actual reason for
> the failing test.

I found the problem. The issue lies in the strange way the SDHCI
controller returns 136-bit responses (for the CSD and CID registers).
The following patch applies the needed quirk to our driver:


https://github.com/genodelabs/genode/commit/15cd7064fb841536af6b651c24fa24de55c6e2ea

With the patch, the driver correctly detects high-capacity cards and
determines their capacity. Unfortunately, I cannot test the detection of
standard-capacity cards because I don't have one at hand.

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list