Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 2008 14:29:49 +0400
From:      Alex Keda <admin@lissyara.su>
Cc:        freebsd-arm@FreeBSD.org, freebsd-current@freebsd.org, imp@FreeBSD.org, freebsd-mobile@FreeBSD.org
Subject:   Re: RFC: PCI SD host controller driver & mmc/mmcsd modules improvements
Message-ID:  <48DF5C9D.2000702@lissyara.su>
In-Reply-To: <48DEA8E7.2080503@FreeBSD.org>
References:  <48DEA8E7.2080503@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Motin пишет:
> Hi.
> 
> I would like to present initial revision of my generic PCI SD Host 
> Controller driver (sdhci). It support PCI devices with class 8 and 
> subclass 5 according to SD Host Controller Specification. With some 
> limitations it successfully works on my Acer TM6292 notebook with ENE 
> CB714 card reader.
> 
> Things that are working now:
>  - PIO mode single and multiple block read and write,
>  - 1 and 4 bits bus width support.
> 
> In PIO mode with 4GB SD card on 30MHz 4bit bus I have reached about 
> 3.5MB/s (limited by CPU) linear read and 7MB/s (limited by card) linear 
> write. Small blocks read/write performance limited by card.
> 
> Things that are not working yet:
>  - DMA modes (code is written, but as my controller looks like has 
> broken DMA I have no ability to debug it),
>  - card insert/remove detection (need more thinking), you should reload 
> mmc module to rescan cards,
>  - SDHC and MMC cards (have no such cards now to debug that code), only 
> standard capacity SD Memory cards up to 4GB size are supported now,
>  - high speed (double rate) bus mode (need more thinking and DMA support).
> 
> Also to get such results I have improved existing mmc and mmcsd drivers 
> a bit. mmc driver got:
>  - 4 bit bus width support,
>  - write protection switch support,
>  - cards with more then 2GB capacity support.
> mmcsd driver got:
>  - multiple block read and write support,
>  - cards with more then 2GB capacity support,
>  - I/O error reporting,
>  - write protection switch support.
> 
> Latest patches against 8-CURRENT (should also fit 7-STABLE) may be found 
> at:
> http://people.freebsd.org/~mav/sdhci/
> 
> I will be grateful for any feedbacks, comments and support.
> 

Thanks! It work =) I have Acer Aspire 5101
but, when I attempt unload module - system hangs
========= messages ======
Sep 28 14:25:24 acer kernel: sdhci0: <ENE CB712 SD> mem 
0xd0210800-0xd02108ff irq 23 at device 4.2 on pci6
Sep 28 14:25:24 acer kernel: sdhci0: 1 slot(s) allocated
Sep 28 14:25:24 acer kernel: sdhci0: [ITHREAD]
Sep 28 14:25:24 acer kernel: mmc0: <MMC/SD bus> on sdhci0
Sep 28 14:25:24 acer kernel: mmc0: setting transfer rate to 33.000MHz
Sep 28 14:25:24 acer kernel: sdhci1: <ENE CB712 SD 2> at device 4.4 on pci6
Sep 28 14:25:24 acer kernel: sdhci1: 1 slot(s) allocated
Sep 28 14:25:24 acer kernel: sdhci1: [ITHREAD]
Sep 28 14:25:24 acer kernel: mmc1: <MMC/SD bus> on sdhci1
Sep 28 14:25:25 acer kernel: mmc1: SD card: 31129600 bytes
Sep 28 14:25:25 acer kernel: mmcsd0: 29MB <MMC/SD Memory Card> at mmc1
Sep 28 14:25:25 acer kernel: mmc1: setting transfer rate to 30.000MHz
Sep 28 14:25:25 acer kernel: mmc1: setting bus width to 4 bits

========== pciconf -lv =============
cbb0@pci0:6:4:0:        class=0x060700 card=0x009f1025 chip=0x14121524 
rev=0x10 hdr=0x02
     vendor     = 'ENE Technology Inc'
     device     = 'CB-712/714 CardBus Controller'
     class      = bridge
     subclass   = PCI-CardBus
none1@pci0:6:4:1:       class=0x050100 card=0x009f1025 chip=0x05301524 
rev=0x01 hdr=0x00
     vendor     = 'ENE Technology Inc'
     device     = 'CB-712/714/810 Memory Stick Card Reader'
     class      = memory
     subclass   = flash
sdhci0@pci0:6:4:2:      class=0x080501 card=0x009f1025 chip=0x05501524 
rev=0x01 hdr=0x00
     vendor     = 'ENE Technology Inc'
     device     = 'CB-712/714/810 Secure Digital Card Reader'
     class      = base peripheral
none2@pci0:6:4:3:       class=0x050100 card=0x009f1025 chip=0x05201524 
rev=0x01 hdr=0x00
     vendor     = 'ENE Technology Inc'
     device     = 'PCI SmartMedia / xD Card Reader Controller'
     class      = memory
     subclass   = flash
sdhci1@pci0:6:4:4:      class=0x050100 card=0x009f1025 chip=0x05511524 
rev=0x01 hdr=0x00
     vendor     = 'ENE Technology Inc'
     device     = 'PCI SD/MMC Card Reader Controller'
     class      = memory
     subclass   = flash
acer$
============ uname -a ===========
FreeBSD acer.lissyara.int.otradno.ru 8.0-CURRENT FreeBSD 8.0-CURRENT #0: 
Sat Sep 27 16:35:08 MSD 2008 
lissyara@acer.lissyara.int.otradno.ru:/usr/obj/usr/src/sys/color-console 
  amd64
=========== kldstat ==========
acer$ kldstat
Id Refs Address            Size     Name
  1   71 0xffffffff80100000 da1698   kernel (/boot/kernel/kernel)
  2    2 0xffffffff80ea2000 759b8    sound.ko (/boot/kernel/sound.ko)
  3    1 0xffffffff80f18000 21ae0    snd_hda.ko (/boot/kernel/snd_hda.ko)
  4    1 0xffffffff80f3a000 2cf0     umodem.ko (/boot/kernel/umodem.ko)
  5    1 0xffffffff80f3d000 6360     acpi_video.ko 
(/boot/kernel/acpi_video.ko)
  6    1 0xffffffff80f44000 5538     atapicam.ko (/boot/kernel/atapicam.ko)
  7    1 0xffffffff80f4a000 2f58     acpi_aiboost.ko 
(/boot/kernel/acpi_aiboost.ko)
  8    1 0xffffffff80f4d000 3eb8     acpi_dock.ko 
(/boot/kernel/acpi_dock.ko)
  9    1 0xffffffff80f51000 6e20     ng_bt3c.ko (/boot/kernel/ng_bt3c.ko)
10    5 0xffffffff80f58000 15bf8    netgraph.ko (/boot/kernel/netgraph.ko)
11    1 0xffffffff80f6e000 39660    ng_btsocket.ko 
(/boot/kernel/ng_btsocket.ko)
12    3 0xffffffff80fa8000 2da0     ng_bluetooth.ko 
(/boot/kernel/ng_bluetooth.ko)
13    1 0xffffffff80fab000 bec8     ng_ubt.ko (/boot/kernel/ng_ubt.ko)
14    1 0xffffffff80fb7000 2938     ubtbcmfw.ko (/boot/kernel/ubtbcmfw.ko)
15    1 0xffffffff80fba000 17890    ng_l2cap.ko (/boot/kernel/ng_l2cap.ko)
16    1 0xffffffff80fd2000 3fc8     iicbb.ko (/boot/kernel/iicbb.ko)
17    2 0xffffffff80fd6000 3f48     iicbus.ko (/boot/kernel/iicbus.ko)
19    1 0xffffffff80ff1000 14db0    tmpfs.ko (/boot/kernel/tmpfs.ko)
20    1 0xffffffff81222000 a48c     ipfw.ko (/boot/kernel/ipfw.ko)
21    1 0xffffffff8122d000 b8ba     fuse.ko (/usr/local/modules/fuse.ko)
22    1 0xffffffff81239000 3652     vkbd.ko (/boot/kernel/vkbd.ko)
23    1 0xffffffff8123d000 754      rtc.ko (/usr/local/modules/rtc.ko)
24    1 0xffffffff8123e000 1ab19    linux.ko (/boot/kernel/linux.ko)
25    1 0xffffffff81259000 24fd3    radeon.ko (/boot/kernel/radeon.ko)
26    1 0xffffffff8127e000 10341    drm.ko (/boot/kernel/drm.ko)
27    1 0xffffffff8128f000 2a02     mmc.ko (/boot/modules/mmc.ko)
28    1 0xffffffff81292000 b97      mmcsd.ko (/boot/modules/mmcsd.ko)
29    1 0xffffffff81293000 2a28     sdhci.ko (/boot/modules/sdhci.ko)




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