From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@9fans.net From: Richard Miller <9fans@hamnavoe.com> Date: Thu, 18 Oct 2012 13:42:44 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] sheevaplug SD card driver Topicbox-Message-UUID: bf56c404-ead7-11e9-9d60-3106f5b1d025 As a side effect of the raspberry pi work, I've produced an SD card driver for the sheevaplug (and presumably other kirkwood platforms). It's in two sections: the top layer does the card protocol and is identical between rpi and kw (could go into /sys/src/9/port?), while the lower layer does the host sdio interface. The two layers link via the usual table of functions, so if we encounter a platform with more than one sd host interface [anybody seen one?] it won't be hard to cope with. Would anyone with a sheevaplug or similar, and a collection of SD cards, like to try it out before I submit a patch? Source is in /n/sources/contrib/miller/9/kw, and if you haven't pulled kernel sources recently you'll need to update /sys/src/9/port/sd.h as well. The drive appears as '#S/sdM0', and a FAT-formatted SD card can be mounted simply by doing "diskparts; dosmnt 1 /n/sd". You can of course hot-swap cards without rebooting, but don't forget to unmount first. Although the driver is called sdmmc.c, it handles only SD cards and not the older MMC standard. I think it's only a matter of slightly different initialisation, but I haven't got an actual MMC card to test it with. If anyone cares enough to send me one, I'll see if I can make that work too.