sdhc/mpc8536 - SDCard always detected like read-only

Carlos Roberto Moratelli carlos.moratelli at digitel.com.br
Wed Apr 6 04:39:56 EST 2011


Hello,

I am working in a MPC8536e custom board. Our custom board has a slot to 
SDCards conected to the MPC8536e's eSDHC controller. We are using just
4-serial data pins of eSDHC controller.

My kernel is 2.6.35.7 and I am using buildroot to build the root system
with uClib.

I can mount and read the data from SDCards in the slot. But I am facing
errors when I try write something in the card. 

I am testing two SDcards: Kingston and a LG, both with 2GB capacity. I
tryed ext3 and fat32 filesystems with the same results.

When the card is detected the log is (observe the ro flag in the first
line):

mmcblk0: mmc0:57f7 SD02G 1.83 GiB (ro)
mmcblk0:
mmc0: starting CMD18 arg 00000000 flags 000000b5
mmc0:     blksz 512 blocks 8 flags 00000200 tsac 100 ms nsac 0
mmc0:     CMD12 arg 00000000 flags 0000049d
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x0000000a
sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
mmc0: req done (CMD18): 0: 00000900 00000000 00000000 00000000
mmc0:     4096 bytes transferred: 0
mmc0:     (CMD12): 0: 00000b00 00000000 00000000 00000000
p1

I am sure the write protection mechanism on SDCard is in the unlock
position, but the kernel drivers detects the card like read-only.

Has someone idea why this happen?

Every idea or tip is apreciated.

Regards,

Moratelli.



More information about the Linuxppc-dev mailing list