Skip to content

High Capacity SD and MMC support

In our last episode, I talked about how I was planning to add support for SDHC cards to Linux, and I’m happy to report that Pierre has accepted my changes into his tree and pushed them out to -mm; hopefully they’ll be in mainline for 2.6.21.

Now, if you have any SD/MMC reader supported by the kernel, it will be able to grok SDHC cards. In theory, this also includes the shiny new Nokia N800 – although no one has recompiled a new kernel for it yet to verify this – I hope to get a hold of one in the near future to test for myself. :-)

My next target is High Capacity MMC cards. These don’t have any fancy new branding like the SD ones do – and frankly, I think that to be a mistake as the compatibility story is equally convoluted – the only way to know for sure is if they are described as conforming to the MMC 4.2 spec. The changes to handle these cards are exactly equivalent to those for SDHC, and I have Samsung to thank for documenting that – given that there’s no 4.2 Application Note available from the MMCA. A small piece of reverse-engineering is required to work out where exactly the card capacity is stored under the new scheme, but that was always the easiest part to work out. Now I just have to get my hands on one of these cards!

Pierre is currently undertaking a major restructuring of the MMC subsystem so that we’re better placed to add support for SDIO and CE-ATA and I hope to help out with those efforts as I can.

{ 9 } Comments

  1. Rodeo | 15th January 2007 at 09:46 | Permalink

    Any chance of this been put into the GP2X handheld console that runs Linux??

  2. Mark Lee | 18th January 2007 at 08:13 | Permalink

    Your ‘changes’ link appears to have a ” at the end which is stopping it from working.

  3. Philip Langdale | 18th January 2007 at 08:49 | Permalink

    Thanks, Mark. I’ve fixed the link.

    Rodeo, it’s unclear but probably not. From what I’ve read, the SD support in the GP2X is provided by a proprietary driver and not the standard MMC/SD subsystem. As such, it would not be able to take advantage of this work.

  4. Mark Lee | 18th January 2007 at 10:52 | Permalink

    I just recompiled the N800 kernel with only your patch applied (didn’t try to bring the whole mmc tree up to date) and whilst it’s not working completely (rebooted after writing 60Mb), it does now at least recognise my SDHC cards whereas before it didn’t. Thanks very much for this patch.

  5. Mark Lee | 18th January 2007 at 17:05 | Permalink

    Sorry to reply to myself here. The problem with the device rebooting turned out to be nothing to do with your patch. I’ve just managed to fill the 4GB SDHC card with no apparent problems. Great stuff and thanks again.

  6. Philip Langdale | 18th January 2007 at 17:21 | Permalink

    Mark, that’s great to hear! I look forward to trying this out myself (along with mmc4 support) in the near future :-)

  7. Deckard | 22nd January 2007 at 20:09 | Permalink

    Hi Philip – there’s some testing of your patch taking place on the N800 using 8GB SDHC cards here:

    There’s mixed results – I hope you qualified for the 99 USD/99 EUR N800s on the Nokia Developer Programme and can help out!! :)

  8. Philip Langdale | 23rd January 2007 at 20:14 | Permalink

    That discussion is unclear – certainly mark doesn’t think the rebooting problem is related specifically to SDHC. Hopefully I’ll be in a position to see for myself soon.

  9. chad sawyer | 24th January 2007 at 20:06 | Permalink

    The file manager app seems to be the problem. All 8gb of my a-data card is usable using xterm. As I try to exceed 4gb in file manager I get ¨insufficient space¨, but I can exceed 4gb in xterm. Then I can continue using file manager like normal. If I format the card in file manager then it only shows 2gb. Strange.
    But, I now have a one card solution with 8gb on it. wow…

    Thank you

Post a Comment

Your email is never published nor shared. Required fields are marked *