Skip to contentSkip to conversation

mmc: add Toshiba PCI SD controller driver

PATCH Superseded Ondrej Zary 1 participant 1 message Sep 26, 2014 MMC, SD and SDIO

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mmc: add Toshiba PCI SD controller driver

This patch resurrects an old never-finished driver for Toshiba PCI SD controllers found in some older Toshiba laptops (such as Portege R100):

02:0d.0 System peripheral [0880]: Toshiba America Info Systems SD TypA Controller [1179:0805] (rev 05)

The code is fixed, cleaned up and successfully tested with SD, SDHC, SDXC and MMC cards on Portege R100. (MMC cards don't even work in Windows!) SDIO probably does not work (don't have any SDIO card).

The hardware is slow (around 2 MB/s - same in Windows) because it does not support bus mastering (busmaster enable bit cannot be set in PCI control reg). Also the card clock is limited to 16MHz (33MHz PCI clock divided by 2).

---
 drivers/mmc/host/Kconfig  |    5 +
 drivers/mmc/host/Makefile |    1 +
 drivers/mmc/host/toshsd.c |  751 +++++++++++++++++++++++++++++++++++++++++++++
 drivers/mmc/host/toshsd.h |  178 +++++++++++
 4 files changed, 935 insertions(+)
 create mode 100644 drivers/mmc/host/toshsd.c
 create mode 100644 drivers/mmc/host/toshsd.h
drivers/mmc/host/Kconfig +5 -0
index 4511358..8cf31f5 100644
@@ -727,3 +727,8 @@ config MMC_SUNXI
 	help
 	  This selects support for the SD/MMC Host Controller on
 	  Allwinner sunxi SoCs.
+
+config MMC_TOSHIBA_PCI
+	tristate "Toshiba Type A SD/MMC Card Interface Driver"
+	depends on PCI
+	help
drivers/mmc/host/Makefile +1 -0
index f211eed..39114be 100644
@@ -53,6 +53,7 @@ obj-$(CONFIG_MMC_WMT)		+= wmt-sdmmc.o
 obj-$(CONFIG_MMC_MOXART)	+= moxart-mmc.o
 obj-$(CONFIG_MMC_SUNXI)		+= sunxi-mmc.o
 obj-$(CONFIG_MMC_USDHI6ROL0)	+= usdhi6rol0.o
+obj-$(CONFIG_MMC_TOSHIBA_PCI)	+= toshsd.o
 
 obj-$(CONFIG_MMC_REALTEK_PCI)	+= rtsx_pci_sdmmc.o
 obj-$(CONFIG_MMC_REALTEK_USB)	+= rtsx_usb_sdmmc.o
drivers/mmc/host/toshsd.c new file +751 -0

751 lines not on this page · raw message

drivers/mmc/host/toshsd.h new file +178 -0

178 lines not on this page · raw message

Signature · 1 line
Ondrej Zary