I just recently went through getting the SD card working on my DE2-70 board and was able to finally mount my 4 GB SD card with a standard vfat file system. Here's what I did, let us know if this helps you get yours working...
1) I started my project by using the DE2_70_NET project found on Terasic's DE2-70 CD freely available on their site. I'd start with that if you happen to be using that board. In any case, it might be a good reference.
I had to remove the GPIO pins they used for SD card access as it's not compatible with the uClinux MMC/SD/SDIO over SPI driver. Then I added a new component "SPI (3 wire serial)" to my SOPC builder design called mmc_spi (I think the name matters as uClinux drivers look for it) at base address 0x09606000 (address probably doesn't matter as long as there's no conflict).
2) I had to change the assignment of pins in the top level design (DE2_70_NET.v), removing references to SD_* components which no longer exist, and adding the following lines starting at 549 (seemed like a good place)...
Line 549: // the_mmc_spi (SD Card Slot)
Line 550: .SCLK_from_the_mmc_spi(oSD_CLK),
Line 551: .MOSI_from_the_mmc_spi(SD_CMD),
Line 552: .MISO_to_the_mmc_spi(SD_DAT),
Line 553: .SS_n_from_the_mmc_spi(SD_DAT3),
Then I compiled the design.
3) Changes to the Kernel config: (Anything not explicitly shown as added was kept as is, if it was added by default I left it alone and didn't remove it) -- forgive underscores here, I can't get this forum to properly indent with whitespace
--> Device Drivers
___ * --> SPI Support
_________* Altera SPI Controller
--> Device Drivers
____* --> mmc/SD/SDIO Support
_________* mmc/SD/SDIO over SPI
--> File Systems
___--> Native Language Support
_______* Codepage 437 (US, Canada)
_______* NLS ISO 8859-1 (Latin 1...
4) Recompiled the kernel.
5) Booted the design.
If things went well, you should see something like this as your kernel boots (without a card installed)...
mmc_spi spi2.0: ASSUMING SPI bus stays unshared!
mmc_spi spi2.0: ASSUMING 3.2-3.4 V slot power
mmc_spi spi2.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
<No further mmc_sip messages at bootup>
With my 4 GB SD card inserted it'll look like this...
mmc_spi spi2.0: ASSUMING SPI bus stays unshared!
mmc_spi spi2.0: ASSUMING 3.2-3.4 V slot power
mmc_spi spi2.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
<A few other lines of booting messages>
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SDHC card on SPI
mmcblk0: mmc0:0000 SD04G 3.69 GiB
mmcblk0:Command: mount -t proc proc /proc -o noexec,nosuid,nodev
p1
Then at the command prompt provided mount is in your kernel's app config somewhere (I think it is by default?) just type the following...
/> mount -t vfat /dev/mmcblk0p1 /mnt
/> ls -l /mnt
drwxrwxrwx 3 root root 4096 Oct 17 2009 FPGADev
drwxrwxrwx 2 root root 4096 Nov 29 16:04 NewFolder
-rwxr-xr-x 1 root root 20 Nov 2 2009 newerfile.txt
/>
Hopefully that'll show you what's on your SD card!
I hope this helps you out. Good Luck!