Problems detecting SD card by kernel

I seem to be unable to boot my mini2440 using my own compiled kernel.
U-boot has no problems detecting the SD card containing the kernel but the
kernel has problems detecting the SD card and hence fails mounting the

s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: mmc0 - using pio, hw SDIO IRQ
Waiting 3sec before mounting root device...
VFS: Cannot open root device "mmcblk0p3" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available
1f00             256 mtdblock0 (driver?)
1f01             128 mtdblock1 (driver?)
1f02            5120 mtdblock2 (driver?)
1f03         1043072 mtdblock3 (driver?)
1f04         1048576 mtdblock4 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on
[<c0045140>] (dump_backtrace+0x0/0x114) from [<c05af5d8>]
 r7:00008000 r6:c399c000 r5:c002f808 r4:c07c2910

Those two are the only lines related to the SD driver that shows up. I've
tried other kernels supplied by friendlyarm but it seems like none of them
has SD support compiled in or they aren't compiled for my A70 LCD. I've
also tried different options under the SD configuration section in

I've tried multiple cards ranging from 512MB to 8GB, microSD (with
converter), miniSD (with converter) and SD. There were a few (2?)occasions
when the card was detected but I couldn't replicate it after a reboot.

The kernel source is the one provided on the friendlyarm
downloads. The .config file can be found here:

(Yes I know, a lot of bloat in the kernel)

This is not a board problem , but related to the kernel.......

you have asked that it boot from  the flashcard partition 3:


1. Have you compiled IN the correct FS code (it CANNOT BE A MODULE)
2. Have you correctly configured your "boot"
3. is the drivers loaded
4. is the card correctly formatted?

the system seems to think you only have the onboard nand flash mounted.

Thanks for the reply bob.

1. Yes, I've compiled in the FS code for the S3C2440 SD reader and not as a
2. Yes, the boot parameters should be correct as I've successfully booted
it before.
3. Yes, it is loaded since the boot log shows the sdi initialising.
4. Yes, it because I've successfully booted it before.

Hi xieliwei

Could you confirm your 8Gb SD card was detected by U-boot?
Could you indicate the version of U-boot you use?
What kind of SD card do you use? Was it a SDHC? What is the brand of the

I have a 4Gb SDHC card and it is not detected by U-boot. The same card is
correctly detected by qtopia or WinCE. I'm looking for help.

Thank you for your information

Hello Screwface

Yes, the cards are detected by U-boot, here is an example:

U-Boot 1.3.2-mini2440 (May 16 2010 - 10:01:57)

I2C:   ready
DRAM:  64 MB
NOR Flash not found. Use hardware switch and 'flinit'
Flash:  0 kB
NAND:  1024 MiB
Found Environment offset in OOB..
USB:   S3C2410 USB Deviced
In:    serial
Out:   serial
Err:   serial
MAC: 08:08:11:18:00:01
Hit any key to stop autoboot:  0
mmc: Probing for SDHC ...
mmc: SD 2.0 or later card found
trying to detect SD Card...
Manufacturer:       0x02, OEM "TM"
Product name:       "SA08G", revision 0.3
Serial number:      2622702341
Manufacturing date: 1/2010
CRC:                0x23, b0 = 1
size = 0
SD Card detected RCA: 0x1234 type: SDHC

3894936 bytes read
## Booting kernel from Legacy Image at 31000000 ...
   Image Name:
   Created:      2010-05-22   2:46:46 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3894872 Bytes =  3.7 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

done, booting the kernel.
Linux version (root@ultima) (gcc version 4.3.2 (Sourcery
G++ Lite 2008q3-72) ) #10 Sat May 22 10:46:29 SGT 2010

I have numerous cards, two are SD (2Gb) (Kingston and Sandisk), the third
is SDHC (8Gb) (Kingston). 

That's the weird part, U-boot has no problems detecting the card most of
the time, but linux just refuses to find it. I'm starting to think its
either some kind of software timing issue or my board isn't meeting the
specifications for SD.

Hi xieliwei,

Thank you for the information. I use the same version of u-boot and my SD
card is not detected. It is a IT Works 4Gb SDHC. I do not know where my
problem comes from :

- First I suspected this old version of U-boot was not able to deal with
SDHC cards
- My card is correctly detected by WinCE or Linux/Qtopia

So the card is not in fault, it works, the socket on the mini is also OK,
and U-boot works for you. So... I don't know what's the problem...


I also get the following error: 
Please append a correct "root=" boot option; here are the available
1f00             256 mtdblock0 (driver?)
1f01             128 mtdblock1 (driver?)
1f02            5120 mtdblock2 (driver?)
1f03         1043072 mtdblock3 (driver?)
1f04         1048576 mtdblock4 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on

And it just hangs there, and if I reset the board from the reset-button, it
works just normally. So it hangs at the first start but if I reset it, it
works fine after that. Why is it like that?

The answer is here:

see the bootargs
I still have problem with the kingston but the takeMS card works fine.

In my case I can boot doing :

setenv bootargs console=ttySAC0,115200 root=/dev/mmcblk0p1 rootfstype=ext3
mini2440=3tb ro rootwait

Now, when I need to change the filesystem I need to do :

mount -o remount,rw /

using "rw" instead "ro" caused the kernel panic
But I don't know why using "rw" cause the kernel panic.

I'm still having some problems detecting my SD card on my mini2440, it
stops after it has loaded the kernel from its own partition, then it won't
continue loading the rootfs from its partition.

It stops like this:

Waiting for root device /dev/mmcblk0p3...
s3c-sdi s3c2440-sdi: running at 398kHz (requested: 400kHz).
s3c-sdi s3c2440-sdi: powered down.
mmc0: error -110 whilst initialising SD card
s3c-sdi s3c2440-sdi: powered down.

I looked in mini2440_defconfig and found something about SD cards, is there
something worth trying to change? Probably that is not the problem, but
does someone have any ideas?

It looks like:

# MMC/SD/SDIO Card Drivers
# CONFIG_MMC_TEST is not set

# MMC/SD/SDIO Host Controller Drivers
# CONFIG_MMC_AT91 is not set
# CONFIG_MMC_S3C_DMA is not set
# CONFIG_MMC_S3C_PIODMA is not set
# CONFIG_MEMSTICK is not set

I forgot to add that it doesn't hang every time - it happens just
sometimes. 95% of the times I try to boot the mini2440 it boots just fine,
but then sometimes it hangs with:
s3c-sdi s3c2440-sdi: powered down.
mmc0: error -110 whilst initialising SD card
s3c-sdi s3c2440-sdi: powered down.

I have tried with rootwait and bootdelay=4 but none of them actually seem
to help. Would it be possible to do so that the mini2440 would reboot
itself if the kernel hangs like that?

Doesn't anyone else have experienced this problem with "mmc0: error -110
whilst initialising SD card"? Or does someone have any ideas?

We had this problem on our S3C2440 board every time we removed the SD card
and inserted it back in.  It would never come back up unless we shut down
power and rebooted.  And then it would only come up sometimes.  
We modified the Kernel and placed the following in
/drivers/mmc/core/sd.c in the  mmc_sd_init_card(...) function to delay the
initialization of the card which solved our SD card problems on our S3c2440
board :


Placed right before:

err = mmc_read_switch(card);

It cleaned up all of our error -110.

not boot ( v3 ???? ) new boot ??