Add modules to support realtek PCIE card reader
Subsystems (2)
v4 cover Add modules to support realtek PCIE card reader
From: Wei WANG <[email protected]>
Support for Realtek PCI-Express driver-based card readers including rts5209 and rts5229.
v2:
1. Using platform device to replace realtek slot bus
v3:
1. Fix a bug that DMA out of SW-IOMMU space in Lenovo Thinkpad x121e
2. Tested by Borislav Petkov <[email protected]>
v4:
1. Fulfill power management callbacks
Wei WANG (2):
drivers/mfd: Add realtek pcie card reader driver drivers/mmc: Add realtek pcie sdmmc host driver
drivers/mfd/Kconfig | 9 + drivers/mfd/Makefile | 4 + drivers/mfd/rts5209.c | 104 +++ drivers/mfd/rts5229.c | 119 ++++ drivers/mfd/rtsx_pcr.c | 1321 +++++++++++++++++++++++++++++++++++ drivers/mfd/rtsx_pcr.h | 31 + drivers/mmc/host/Kconfig | 7 + drivers/mmc/host/Makefile | 2 + drivers/mmc/host/rtsx_pci_sdmmc.c | 1378 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/rtsx_common.h | 47 ++ include/linux/mfd/rtsx_pci.h | 690 +++++++++++++++++++ 11 files changed, 3712 insertions(+) create mode 100644 drivers/mfd/rts5209.c create mode 100644 drivers/mfd/rts5229.c create mode 100644 drivers/mfd/rtsx_pcr.c create mode 100644 drivers/mfd/rtsx_pcr.h create mode 100644 drivers/mmc/host/rtsx_pci_sdmmc.c create mode 100644 include/linux/mfd/rtsx_common.h create mode 100644 include/linux/mfd/rtsx_pci.h
Signature · 1 line
1.7.9.5
PATCH v4 1/2 drivers/mfd: Add realtek pcie card reader driver
From: Wei WANG <[email protected]>
Realtek PCI-E card reader driver adapts requests from upper-level sdmmc/memstick layer to the real physical card reader.
--- drivers/mfd/Kconfig | 9 + drivers/mfd/Makefile | 4 + drivers/mfd/rts5209.c | 104 +++ drivers/mfd/rts5229.c | 119 ++++ drivers/mfd/rtsx_pcr.c | 1321 +++++++++++++++++++++++++++++++++++++++ drivers/mfd/rtsx_pcr.h | 31 + include/linux/mfd/rtsx_common.h | 47 ++ include/linux/mfd/rtsx_pci.h | 690 ++++++++++++++++++++ 8 files changed, 2325 insertions(+) create mode 100644 drivers/mfd/rts5209.c create mode 100644 drivers/mfd/rts5229.c create mode 100644 drivers/mfd/rtsx_pcr.c create mode 100644 drivers/mfd/rtsx_pcr.h create mode 100644 include/linux/mfd/rtsx_common.h create mode 100644 include/linux/mfd/rtsx_pci.h
drivers/mfd/Kconfig +9 -0
@@ -63,6 +63,15 @@ config MFD_SM501_GPIO lines on the SM501. The platform data is used to supply the base number for the first GPIO line to register. +config MFD_RTSX_PCI + tristate "Support for Realtek PCI-E driver-based card reader" + depends on PCI + help + This supports for Realtek PCI-Express driver-based card reader including + rts5209, rts5229, etc. Realtek driver-based card reader supports access + to many types of memory cards, such as Memory Stick, Memory Stick Pro, + Secure Digital and MultiMediaCard. + config MFD_ASIC3 bool "Support for Compaq ASIC3" depends on GENERIC_HARDIRQS && GPIOLIB && ARM
drivers/mfd/Makefile +4 -0
@@ -9,6 +9,9 @@ obj-$(CONFIG_MFD_88PM805) += 88pm805.o 88pm80x.o obj-$(CONFIG_MFD_SM501) += sm501.o obj-$(CONFIG_MFD_ASIC3) += asic3.o tmio_core.o +rtsx_pci-objs := rtsx_pcr.o rts5209.o rts5229.o +obj-$(CONFIG_MFD_RTSX_PCI) += rtsx_pci.o + obj-$(CONFIG_HTC_EGPIO) += htc-egpio.o obj-$(CONFIG_HTC_PASIC3) += htc-pasic3.o obj-$(CONFIG_HTC_I2CPLD) += htc-i2cpld.o
@@ -132,3 +135,4 @@ obj-$(CONFIG_MFD_RC5T583) += rc5t583.o rc5t583-irq.o obj-$(CONFIG_MFD_SEC_CORE) += sec-core.o sec-irq.o obj-$(CONFIG_MFD_ANATOP) += anatop-mfd.o obj-$(CONFIG_MFD_LM3533) += lm3533-core.o lm3533-ctrlbank.o +obj-$(CONFIG_MFD_RTSX_PCI) += rtsx_pci.o
drivers/mfd/rts5209.c new file +104 -0
104 lines not on this page · raw message
drivers/mfd/rts5229.c new file +119 -0
119 lines not on this page · raw message
drivers/mfd/rtsx_pcr.c new file +1321 -0
1,321 lines not on this page · raw message
drivers/mfd/rtsx_pcr.h new file +31 -0
@@ -0,0 +1,31 @@ +/* Driver for Realtek PCI-Express card reader +* +* Copyright(c) 2009 Realtek Semiconductor Corp. All rights reserved. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2, or (at your option) any +* later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License along +* with this program; if not, see <http://www.gnu.org/licenses/>. +* +* Author: +* Wei WANG <[email protected]> +* No. 450, Shenhu Road, Suzhou Industry Park, Suzhou, China +*/ + +#ifndef __RTSX_PCR_H +#define __RTSX_PCR_H + +#include <linux/mfd/rtsx_pci.h> + +extern const struct pcr_ops rts5209_pcr_ops; +extern const struct pcr_ops rts5229_pcr_ops; + +#endif
include/linux/mfd/rtsx_common.h new file +47 -0
47 lines not on this page · raw message
include/linux/mfd/rtsx_pci.h new file +690 -0
690 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v4 2/2 drivers/mmc: Add realtek pcie sdmmc host driver
In reply to [email protected]From: Wei WANG <[email protected]>
Realtek PCI-E SD/MMC card host driver is used to access SD/MMC card, with the help of Realtek PCI-E card reader MFD driver.
--- drivers/mmc/host/Kconfig | 7 + drivers/mmc/host/Makefile | 2 + drivers/mmc/host/rtsx_pci_sdmmc.c | 1378 +++++++++++++++++++++++++++++++++++++ 3 files changed, 1387 insertions(+) create mode 100644 drivers/mmc/host/rtsx_pci_sdmmc.c
drivers/mmc/host/Kconfig +7 -0
@@ -612,3 +612,10 @@ config MMC_USHC Note: These controllers only support SDIO cards and do not support MMC or SD memory cards. + +config MMC_REALTEK_PCI + tristate "Realtek PCI-E SD/MMC Card Interface Driver" + depends on MFD_RTSX_PCI + help + Say Y here to include driver code to support SD/MMC card interface + of Realtek PCI-E driver-based card reader
drivers/mmc/host/Makefile +2 -0
@@ -45,6 +45,8 @@ obj-$(CONFIG_MMC_JZ4740) += jz4740_mmc.o obj-$(CONFIG_MMC_VUB300) += vub300.o obj-$(CONFIG_MMC_USHC) += ushc.o +obj-$(CONFIG_MMC_REALTEK_PCI) += rtsx_pci_sdmmc.o + obj-$(CONFIG_MMC_SDHCI_PLTFM) += sdhci-pltfm.o obj-$(CONFIG_MMC_SDHCI_CNS3XXX) += sdhci-cns3xxx.o obj-$(CONFIG_MMC_SDHCI_ESDHC_IMX) += sdhci-esdhc-imx.o
drivers/mmc/host/rtsx_pci_sdmmc.c new file +1378 -0
1,378 lines not on this page · raw message
Signature · 1 line
1.7.9.5