# SDHCI not assigning device node

## achtzehn

Hi everyone,

I'm using a IBM/Lenovo ThinkPad Z61m with an integrated MMC/SD card reader. Unfortunately I wasn't able to get it running.

I'm using a 2.6.16 kernel with Gentoo patchsets and manually backported the SDHCI driver from the 2.6.17 kernel. That wasn't to difficult since it required only copying two mmc directories and modifying pci_ids and pci_regs.

I'm now having trouble to get a device node assigned for the MMC device. 

```
asgard treiber-tools-etc # rmmod sdhci

asgard treiber-tools-etc # rmmod mmc_block

asgard treiber-tools-etc # lspci -v

[...]

15:00.2 Mass storage controller: Texas Instruments Unknown device 803b

        Subsystem: Lenovo Unknown device 207c

        Flags: bus master, medium devsel, latency 0, IRQ 11

        Memory at e4301000 (32-bit, non-prefetchable) [size=4K]

        Capabilities: [44] Power Management version 2

15:00.3 Class 0805: Texas Instruments Unknown device 803c (prog-if 01)

        Subsystem: Lenovo Unknown device 207d

        Flags: medium devsel, IRQ 169

        Memory at e4302800 (32-bit, non-prefetchable) [size=256]

        Capabilities: [80] Power Management version 2

asgard treiber-tools-etc # modprobe mmc_block

asgard treiber-tools-etc # modprobe sdhci

asgard treiber-tools-etc # dmesg

sdhci: Secure Digital Host Controller Interface driver, 0.11

sdhci: Copyright(c) Pierre Ossman

sdhci [sdhci_probe()]: found at 0000:15:00.3

sdhci [sdhci_probe()]: found 1 slot(s)

ACPI: PCI Interrupt 0000:15:00.3[A] -> GSI 16 (level, low) -> IRQ 169

sdhci [sdhci_probe_slot()]: slot 0 at 0xe4302800, irq 169

sdhci: ============== REGISTER DUMP ==============

sdhci: Sys addr: 0x00000000 | Version:  0x00008900

sdhci: Blk size: 0x00000000 | Blk cnt:  0x00000000

sdhci: Argument: 0x00000000 | Trn mode: 0x00000000

sdhci: Present:  0x000a0000 | Host ctl: 0x00000000

sdhci: Power:    0x00000000 | Blk gap:  0x00000000

sdhci: Wake-up:  0x00000000 | Clock:    0x00000000

sdhci: Timeout:  0x0000000e | Int stat: 0x00000000

sdhci: Int enab: 0x11ff00cf | Sig enab: 0x11ff00cf

sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000

sdhci: Caps:     0x01e030b0 | Max curr: 0x0000007d

sdhci: ===========================================

mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0

mmc0: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0

mmc0: SDHCI at 0xe4302800 irq 169 DMA

mmc0: clock 187500Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0

mmc0: clock 187500Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0

mmc0: starting CMD0 arg 00000000 flags 00000040

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (0)

mmc0: req done (CMD0): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: clock 187500Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0

mmc0: starting CMD55 arg 00000000 flags 00000015

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (37)

mmc0: req done (CMD55): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: starting CMD55 arg 00000000 flags 00000015

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (37)

mmc0: req done (CMD55): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: starting CMD55 arg 00000000 flags 00000015

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (37)

mmc0: req done (CMD55): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: starting CMD55 arg 00000000 flags 00000015

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (37)

mmc0: req done (CMD55): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: starting CMD1 arg 00000000 flags 00000061

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (1)

mmc0: req done (CMD1): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0

usbcore: registered new driver hsfusbcd2

sdhci [sdhci_drv_exit()]: Exiting

mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0

ACPI: PCI interrupt for device 0000:15:00.3 disabled

sdhci: Secure Digital Host Controller Interface driver, 0.11

sdhci: Copyright(c) Pierre Ossman

sdhci [sdhci_probe()]: found at 0000:15:00.3

sdhci [sdhci_probe()]: found 1 slot(s)

ACPI: PCI Interrupt 0000:15:00.3[A] -> GSI 16 (level, low) -> IRQ 169

sdhci [sdhci_probe_slot()]: slot 0 at 0xe4302800, irq 169

sdhci: ============== REGISTER DUMP ==============

sdhci: Sys addr: 0x00000000 | Version:  0x00008900

sdhci: Blk size: 0x00000000 | Blk cnt:  0x00000000

sdhci: Argument: 0x00000000 | Trn mode: 0x00000000

sdhci: Present:  0x000a0000 | Host ctl: 0x00000000

sdhci: Power:    0x00000000 | Blk gap:  0x00000000

sdhci: Wake-up:  0x00000000 | Clock:    0x00000000

sdhci: Timeout:  0x0000000e | Int stat: 0x00000000

sdhci: Int enab: 0x11ff00cf | Sig enab: 0x11ff00cf

sdhci: AC12 err: 0x00000000 | Slot int: 0x00000000

sdhci: Caps:     0x01e030b0 | Max curr: 0x0000007d

sdhci: ===========================================

mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0

mmc0: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0

mmc0: SDHCI at 0xe4302800 irq 169 DMA

mmc0: clock 187500Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0

mmc0: clock 187500Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0

mmc0: starting CMD0 arg 00000000 flags 00000040

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (0)

mmc0: req done (CMD0): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: clock 187500Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0

mmc0: starting CMD55 arg 00000000 flags 00000015

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (37)

mmc0: req done (CMD55): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: starting CMD55 arg 00000000 flags 00000015

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (37)

mmc0: req done (CMD55): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: starting CMD55 arg 00000000 flags 00000015

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (37)

mmc0: req done (CMD55): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: starting CMD55 arg 00000000 flags 00000015

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (37)

mmc0: req done (CMD55): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: starting CMD1 arg 00000000 flags 00000061

sdhci [sdhci_tasklet_finish()]: Ending request, cmd (1)

mmc0: req done (CMD1): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0
```

So far it looks ok to me, but

```

asgard treiber-tools-etc # ls /dev/mm*

ls: /dev/mm*: No such file or directory
```

is my problem. Where can I find the newly created MMC device?

BTW: I'm using a SATA drive. Might that cause a problem? Read some about assignment problems in this case.

Regards, Andreas

----------

## Simplimus

I'm having the same issues. The sdhci driver appears to work just fine, but the device node is not created.

----------

## m1ngsheng

i'm running 2.6.17-r8 on Latitude X300.

----------

## achtzehn

Hi!

Still couldn't get it running. I switched to kernel 2.6.18 in the meantime. Vanilla sources with suspend2 patchset. 

I tried using drivers provided at http://developer.berlios.de/projects/tifmxx.

The card is detected, but no device node is created.

```
asgard tifm # dmesg -c

tifm_7xx1: sd card detected in socket 1

mmc0: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0

mmc0: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 21 width 0

mmc0: clock 333333Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0

mmc0: clock 333333Hz busmode 1 powermode 2 cs 1 Vdd 21 width 0

mmc0: starting CMD0 arg 00000000 flags 00000040

mmc0: req done (CMD0): 0/0/0: 00000000 00000000 00000000 00000000

mmc0: clock 333333Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0

mmc0: starting CMD55 arg 00000000 flags 00000015

mmc0: req done (CMD55): 0/0/0: 00000120 00000000 00000000 00000000

mmc0: starting CMD41 arg 00000000 flags 00000061

mmc0: req done (CMD41): 0/0/0: 00ff8000 00000000 00000000 00000000

mmc0: clock 333333Hz busmode 1 powermode 2 cs 0 Vdd 20 width 0

mmc0: clock 333333Hz busmode 1 powermode 2 cs 1 Vdd 20 width 0

mmc0: starting CMD0 arg 00000000 flags 00000040

mmc0: req done (CMD0): 0/0/0: 00ff8000 00000000 00000000 00000000

mmc0: clock 333333Hz busmode 1 powermode 2 cs 0 Vdd 20 width 0

mmc0: starting CMD55 arg 00000000 flags 00000015

mmc0: req done (CMD55): 0/0/0: 00000120 00000000 00000000 00000000

mmc0: starting CMD41 arg 00300000 flags 00000061

mmc0: req done (CMD41): 0/0/0: 00ff8000 00000000 00000000 00000000

mmc0: starting CMD55 arg 00000000 flags 00000015

mmc0: req done (CMD55): 0/0/0: 00000120 00000000 00000000 00000000

mmc0: starting CMD41 arg 00300000 flags 00000061

mmc0: req done (CMD41): 0/0/0: 80ff8000 00000000 00000000 00000000

mmc0: starting CMD2 arg 00000000 flags 00000067

mmc0: req done (CMD2): 0/0/0: 06524b53 44000000 010002ea 9100566b

mmc0: starting CMD3 arg 00000000 flags 00000065

mmc0: req done (CMD3): 0/0/0: 00010520 00000000 00000000 00000000

mmc0: starting CMD2 arg 00000000 flags 00000067

mmc0: req done (CMD2): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: req done (CMD2): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: req done (CMD2): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: req done (CMD2): 1/0/0: 00000000 00000000 00000000 00000000

mmc0: clock 333333Hz busmode 2 powermode 2 cs 0 Vdd 20 width 0

mmc0: starting CMD9 arg 00010000 flags 00000007

mmc0: req done (CMD9): 0/0/0: 007f0032 1b5981e5 eebb7fff 164000d5

mmc0: starting CMD7 arg 00010000 flags 00000015

mmc0: req done (CMD7): 0/0/0: 00000700 00000000 00000000 00000000

mmc0: clock 333333Hz busmode 2 powermode 2 cs 0 Vdd 20 width 0

mmc0: starting CMD55 arg 00010000 flags 00000015

mmc0: req done (CMD55): 0/0/0: 00000920 00000000 00000000 00000000

mmc0: starting CMD51 arg 00000000 flags 00000035

mmc0: req done (CMD51): 0/0/0: 00000920 00000000 00000000 00000000

mmc0: starting CMD7 arg 00000000 flags 00000000

mmc0: req done (CMD7): 0/0/0: 00000920 00000000 00000000 00000000

mmc0: selected 24.000MHz transfer rate

mmc0: clock 24000000Hz busmode 2 powermode 2 cs 0 Vdd 20 width 0

```

----------

## m1ngsheng

I found this wiki page useful. The 5C476 firmware revision does not seem to be supported yet - even with latest 2.6.18. At this point if kernel is properly configured for MMC/SD and modules load w/o error - then I suspect the controller is not supported ("yet", he says hopefully).

----------

## Simplimus

The trouble is, it used to work....I had mine working for exactly one day. That was months ago and I can't remember what I changed to make it stop working. I believe this might just be a udev thing/issue.

----------

