Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Feb 2009 12:08:02 +0200
From:      Alexander Motin <mav@FreeBSD.org>
To:        hu.henry9@gmail.com
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: Problem about the new sdhci driver
Message-ID:  <49857482.5080508@FreeBSD.org>
In-Reply-To: <53a1e0710901311949x3b853404oe89cf2ae9a0903f7@mail.gmail.com>
References:  <53a1e0710901311949x3b853404oe89cf2ae9a0903f7@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Henry Hu wrote:
> I'm using FreeBSD 7-STABLE, with sdhci driver
> sdhci.20081029.tgz
> mmc.20081029.tgz
> 
> I've found that if I load sdhci driver with card inserted, everything
> works fine.
> But if I load sdhci driver first, and then insert card, the card is
> not detected.Additionally, there is no interrupt.
> After I've load sdhci driver without card, the controller seems to be
> in a problematic state. The register dump outputed when the driver
> loaded showed that Present is 0x01f20000 which is correct since the
> card is not inserted then. But cards is not detected.
> Even if I unload the driver and reload with card inserted, the card
> still cannot be detected, and there's no interrupt. But the Present
> register changed to 0x01fa0000 which is strange.
> 
> So I guess there's something wrong with the driver when the card is not present.
> 
> sdhci0: <RICOH R5C822 SD> mem 0xf0401000-0xf04010ff irq 18 at device 9.1 on pci5
> sdhci0-slot0: 33MHz 4bits 3.3V DMA
> sdhci0-slot0: ============== REGISTER DUMP ==============
> sdhci0-slot0: Sys addr: 0x00000000 | Version:  0x00000200
> sdhci0-slot0: Blk size: 0x00000000 | Blk cnt:  0x00000000
> sdhci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000
> sdhci0-slot0: Present:  0x01f20000 | Host ctl: 0x00000000
> sdhci0-slot0: Power:    0x00000000 | Blk gap:  0x00000000
> sdhci0-slot0: Wake-up:  0x00000000 | Clock:    0x00000000
> sdhci0-slot0: Timeout:  0x0000000c | Int stat: 0x00000000
> sdhci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb
> sdhci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000
> sdhci0-slot0: Caps:     0x01c021a1 | Max curr: 0x00000040
> sdhci0-slot0: ===========================================

Try this patch please:
--- sdhci.c.prev        2009-01-29 00:53:41.000000000 +0200
+++ sdhci.c     2009-02-01 11:58:42.000000000 +0200
@@ -82,7 +82,8 @@ static const struct sdhci_device {
         u_int           quirks;
  } sdhci_devices[] = {
         { 0x08221180,   0xffff, "RICOH R5C822 SD",
-           SDHCI_QUIRK_FORCE_DMA },
+           SDHCI_QUIRK_FORCE_DMA |
+           SDHCI_QUIRK_NO_CARD_NO_RESET },
         { 0x8034104c,   0xffff, "TI XX21/XX11 SD",
             SDHCI_QUIRK_FORCE_DMA },
         { 0x05501524,   0xffff, "ENE CB712 SD",


Could everybody having this controller send me pciconf and Version 
register from their controller and report me is this bug present on 
their system? I would like to collect some statistics.

-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49857482.5080508>