Opened on 01/19/09 at 22:40:18
Closed on 04/30/09 at 12:52:10
#1356 closed enhancement (fixed)
Add support for High Capacity SD and MMC cards to RTEMS
Reported by: | Gene Smith | Owned by: | Sebastian Huber |
---|---|---|---|
Priority: | normal | Milestone: | 4.10 |
Component: | fs | Version: | 4.9 |
Severity: | minor | Keywords: | |
Cc: | chrisj@…, sebastian.huber@… | Blocked By: | |
Blocking: |
Description
I could be wrong on this, but looking at the spi-sd-card.c code it appears that it currently supports only cards with a capacity of <=2GByte. To use the higher capacity cards I think you have to read/write the cards by block number and not by byte offset address as it currently does.
To know that an SD supports "block access" (which implies capacity >2GB) you have to do add CMD8 and CMD58 to see the OCR contents which contains the HCS (High Capacity Supported) flag.
For MMC you have to do add CMD58 to see the HCS flag.
You also have to tell MMC from SD. (MMC always fails ACMD41 unlike SD which supports it, see Bug 1355)
The cards with >2GB also only work with FAT32 and not FAT16 or 12. I think RTEMS supports FAT32 so no changes should be needed there (other than LFN enhancement which is another topic).
Attachments (7)
Change History (12)
comment:1 Changed on 01/21/09 at 17:11:39 by Joel Sherrill
Cc: | Chris Johns added |
---|---|
Owner: | changed from Joel Sherrill to Chris Johns |
Changed on 01/22/09 at 15:01:17 by Gene Smith
Attachment: | spi-sd-card.c added |
---|
Changed on 01/22/09 at 15:02:23 by Gene Smith
Attachment: | spi-sd-card.h added |
---|
Adds block_addr to driver structure
comment:2 Changed on 01/22/09 at 15:56:17 by Sebastian Huber
Cc: | Sebastian Huber added |
---|---|
Owner: | changed from Chris Johns to Sebastian Huber |
Changed on 01/22/09 at 17:01:26 by Gene Smith
Attachment: | spi-sd-card-1.9-HEAD.c.diff added |
---|
spi-sd-card.c patch against HEAD
Changed on 01/22/09 at 17:03:03 by Gene Smith
Attachment: | spi-sd-card-1.4-HEAD.h.diff added |
---|
Diff to HEAD version of spi-sd-card.h
Changed on 01/27/09 at 10:38:04 by Sebastian Huber
Attachment: | spi-sd-card.patch added |
---|
Patch for CVS HEAD
comment:3 Changed on 01/27/09 at 10:38:04 by Sebastian Huber
attachments.isobsolete: | 0 → 1, 1, 1, 1 |
---|
Changed on 01/28/09 at 23:23:34 by Gene Smith
Attachment: | spi-sd-card_v1.patch added |
---|
Slight mod for MMC's csd_structure value
Changed on 02/02/09 at 08:03:38 by Sebastian Huber
Attachment: | sd-card-HEAD.patch added |
---|
Patch for CVS HEAD
comment:4 Changed on 02/02/09 at 08:03:38 by Sebastian Huber
attachments.isobsolete: | 0 → 1, 1 |
---|
comment:5 Changed on 04/30/09 at 12:52:10 by Sebastian Huber
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in 4.10.
My complete spi-sd-card.c