Add modules to support realtek PCIE card reader
Subsystems (3)
v7 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, rts5229 and rtl8411.
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
v5:
1. Support Memstick card
v6:
1. Fix some coding style
v7:
1. Acked-by: Alex Dubov <[email protected]>
2. Support RTL8411
3. Use mfd_cell in rtsx_pcr.c
4. Use default workqueue in rtsx_pcr.c
5. Use delayed_work to handle idle event, instead of timer
Wei WANG (3):
drivers/mfd: Add realtek pcie card reader driver drivers/mmc: Add realtek pcie sdmmc host driver drivers/memstick: Add realtek pcie memstick host driver
drivers/memstick/host/Kconfig | 10 + drivers/memstick/host/Makefile | 1 + drivers/memstick/host/rtsx_pci_ms.c | 641 +++++++++++++++++ drivers/mfd/Kconfig | 9 + drivers/mfd/Makefile | 3 + drivers/mfd/rtl8411.c | 251 +++++++ drivers/mfd/rts5209.c | 223 ++++++ drivers/mfd/rts5229.c | 205 ++++++ drivers/mfd/rtsx_pcr.c | 1251 ++++++++++++++++++++++++++++++++ drivers/mfd/rtsx_pcr.h | 32 + drivers/mmc/host/Kconfig | 7 + drivers/mmc/host/Makefile | 2 + drivers/mmc/host/rtsx_pci_sdmmc.c | 1348 +++++++++++++++++++++++++++++++++++ include/linux/mfd/rtsx_common.h | 48 ++ include/linux/mfd/rtsx_pci.h | 794 +++++++++++++++++++++ 15 files changed, 4825 insertions(+) create mode 100644 drivers/memstick/host/rtsx_pci_ms.c create mode 100644 drivers/mfd/rtl8411.c 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 v7 1/3 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 | 3 + drivers/mfd/rtl8411.c | 251 ++++++++ drivers/mfd/rts5209.c | 223 +++++++ drivers/mfd/rts5229.c | 205 +++++++ drivers/mfd/rtsx_pcr.c | 1251 +++++++++++++++++++++++++++++++++++++++ drivers/mfd/rtsx_pcr.h | 32 + include/linux/mfd/rtsx_common.h | 48 ++ include/linux/mfd/rtsx_pci.h | 794 +++++++++++++++++++++++++ 9 files changed, 2816 insertions(+) create mode 100644 drivers/mfd/rtl8411.c 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 card reader" + depends on PCI + help + This supports for Realtek PCI-Express card reader including rts5209, + rts5229, rtl8411, etc. Realtek 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 +3 -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 rtl8411.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
drivers/mfd/rtl8411.c new file +251 -0
251 lines not on this page · raw message
drivers/mfd/rts5209.c new file +223 -0
223 lines not on this page · raw message
drivers/mfd/rts5229.c new file +205 -0
205 lines not on this page · raw message
drivers/mfd/rtsx_pcr.c new file +1251 -0
1,251 lines not on this page · raw message
drivers/mfd/rtsx_pcr.h new file +32 -0
@@ -0,0 +1,32 @@ +/* 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> + +void rts5209_init_params (struct rtsx_pcr *pcr); +void rts5229_init_params (struct rtsx_pcr *pcr); +void rtl8411_init_params (struct rtsx_pcr *pcr); + +#endif
include/linux/mfd/rtsx_common.h new file +48 -0
48 lines not on this page · raw message
include/linux/mfd/rtsx_pci.h new file +794 -0
794 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v7 2/3 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 | 1348 +++++++++++++++++++++++++++++++++++++ 3 files changed, 1357 insertions(+) create mode 100644 drivers/mmc/host/rtsx_pci_sdmmc.c
drivers/mmc/host/Kconfig +7 -0
@@ -621,3 +621,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 card reader
drivers/mmc/host/Makefile +2 -0
@@ -46,6 +46,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 +1348 -0
1,348 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH v7 3/3 drivers/memstick: Add realtek pcie memstick host driver
In reply to [email protected]From: Wei WANG <[email protected]>
Realtek PCI-E Memstick card host driver is used to access Memstick card, with the help of Realtek PCI-E card reader MFD driver.
--- drivers/memstick/host/Kconfig | 10 + drivers/memstick/host/Makefile | 1 + drivers/memstick/host/rtsx_pci_ms.c | 641 +++++++++++++++++++++++++++++++++++ 3 files changed, 652 insertions(+) create mode 100644 drivers/memstick/host/rtsx_pci_ms.c
drivers/memstick/host/Kconfig +10 -0
@@ -42,3 +42,13 @@ config MEMSTICK_R592 To compile this driver as a module, choose M here: the module will be called r592. + +config MEMSTICK_REALTEK_PCI + tristate "Realtek PCI-E Memstick Card Interface Driver" + depends on MFD_RTSX_PCI + help + Say Y here to include driver code to support Memstick card interface + of Realtek PCI-E card reader + + To compile this driver as a module, choose M here: the module will + be called rtsx_pci_ms.
drivers/memstick/host/Makefile +1 -0
@@ -5,3 +5,4 @@ obj-$(CONFIG_MEMSTICK_TIFM_MS) += tifm_ms.o obj-$(CONFIG_MEMSTICK_JMICRON_38X) += jmb38x_ms.o obj-$(CONFIG_MEMSTICK_R592) += r592.o +obj-$(CONFIG_MEMSTICK_REALTEK_PCI) += rtsx_pci_ms.o
drivers/memstick/host/rtsx_pci_ms.c new file +641 -0
641 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Hi Chris, Samuel and Alex:
Can you help to review this patchset, please?
I have asked Greg to remove rts_pstor from the staging tree. So this driver have to be merged into 3.8 kernel, or else Realtek'sPCI-E card reader can not be accessed easily.
BR,
Wei WANG
Hi,
Quoted 7 lines · wwang
Hi Chris, Samuel and Alex:
Can you help to review this patchset, please?
I have asked Greg to remove
rts_pstorfrom the staging tree. So this driver have to be merged into 3.8 kernel, or else Realtek'sPCI-E card reader can not be accessed easily.
I'm happy with the MMC portion. I think we're mainly waiting for the MFD patch -- Samuel, do you have any remaining review comments that need to be fixed?
Thanks,
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
Quoted 9 lines · Chris Ball
Quoted 7 lines · wwang
Hi Chris, Samuel and Alex:
Can you help to review this patchset, please?
I have asked Greg to remove
rts_pstorfrom the staging tree. So this driver have to be merged into 3.8 kernel, or else Realtek'sPCI-E card reader can not be accessed easily.
Quoted 7 lines
I'm happy with the MMC portion. I think we're mainly waiting for the MFD patch -- Samuel, do you have any remaining review comments that need to be fixed?
Thanks,
- Chris.
Hi Chris:
Thank you for your comment. :-)
Hi Alex:
Do you have any comment on the MEMSTICK part in this v7 patchset? Can you help to merge the patch to the kernel tree?
Thanks.
Wei WANG
Alex Dubov
maintainerQuoted 4 lines
Hi Alex:
Hi,
Quoted 3 lines
Do you have any comment on the MEMSTICK part in this v7 patchset? Can you help to merge the patch to the kernel tree?
I'm afraid that presently I don't have much time to look at the memstick related stuff any further. Hopefully, somebody else can step in and take a look at your submission.
Sorry for that.
Quoted 4 lines
Thanks.
Wei WANG
Regards,
Alex
Quoted 8 lines · Alex Dubov
Hi,
Quoted 2 lines
Do you have any comment on the MEMSTICK part in this v7 patchset? Can you help to merge the patch to the kernel tree?
I'm afraid that presently I don't have much time to look at the memstick related stuff any further. Hopefully, somebody else can step in and take a look at your submission.
Sorry for that.
Hi Greg & Arnd:
Can you help to review the MEMSTICK part in my patch and merge it to the kernel tree? Alex is a little busy now and I can't find any other maintainer who can take care of MEMSTICK subsystem.
Best regards,
Wei WANG
Arnd Bergmann
Acked-byRe: [PATCH v7 0/3] Add modules to support realtek PCIE card reade
Quoted 8 lines · wwang
Quoted 6 lines · Alex Dubov
Hi,
Quoted 2 lines
Do you have any comment on the MEMSTICK part in this v7 patchset? Can you help to merge the patch to the kernel tree?
I'm afraid that presently I don't have much time to look at the memstick related stuff any further. Hopefully, somebody else can step in and take a look at your submission.
Quoted 8 lines
Quoted 2 lines
Sorry for that.
Hi Greg & Arnd:
Can you help to review the MEMSTICK part in my patch and merge it to the kernel tree? Alex is a little busy now and I can't find any other maintainer who can take care of MEMSTICK subsystem.
I don't know anything about memstick specific questions, but I looked at the code and it seems entirely reasonable and well-written.
Quoted 7 lines · wwang
Quoted 6 lines · Alex Dubov
Hi,
Quoted 2 lines
Do you have any comment on the MEMSTICK part in this v7 patchset? Can you help to merge the patch to the kernel tree?
I'm afraid that presently I don't have much time to look at the memstick related stuff any further. Hopefully, somebody else can step in and take a look at your submission.
Quoted 7 lines
Quoted 2 lines
Sorry for that.
Hi Greg & Arnd:
Can you help to review the MEMSTICK part in my patch and merge it to the kernel tree? Alex is a little busy now and I can't find any other maintainer who can take care of MEMSTICK subsystem.
I don't have the patches around anymore, sorry, care to resend them?
greg k-h
Quoted 10 lines · Chris Ball
Hi,
On Mon, Oct 29 2012, wwang wrote:
I'm happy with the MMC portion. I think we're mainly waiting for the MFD patch -- Samuel, do you have any remaining review comments that need to be fixed?Thanks,
- Chris.
Hi Chris:
I have noticed that the file rtsx_pci_sdmmc.c in your mmc-next branch is still v6 patch. In v7 patch, this MMC part has also been modified to comply with my MFD portion. So please update to this version.
And one more question. Samuel have merged all of my patch set in his for-next branch, including the MMC part. I don't know whether this will conflict with your tree in the next merge.
Hi Samuel:
Since the whole patch set has been merged in your for-next branch, does it mean that you will help to merge all of the three parts to linus's tree?
Thank you!
Wei WANG
Chris Ball
Acked-byHi,
Quoted 8 lines · wwang
I have noticed that the file
rtsx_pci_sdmmc.cin your mmc-next branch is still v6 patch. In v7 patch, this MMC part has also been modified to comply with my MFD portion. So please update to this version.And one more question. Samuel have merged all of my patch set in his for-next branch, including the MMC part. I don't know whether this will conflict with your tree in the next merge.
Quoted 5 lines
Hi Samuel:
Since the whole patch set has been merged in your for-next branch, does it mean that you will help to merge all of the three parts to linus's tree?
I've removed the patch from my tree to avoid conflicting with Samuel. I'm happy to either have the MMC patch go through the MFD tree with:
or to merge the MMC side of v7 myself, whichever Samuel prefers.
Thanks,
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child
Hi Chris,
Quoted 17 lines · Chris Ball
Hi,
Quoted 8 lines · wwang
I have noticed that the file
rtsx_pci_sdmmc.cin your mmc-next branch is still v6 patch. In v7 patch, this MMC part has also been modified to comply with my MFD portion. So please update to this version.And one more question. Samuel have merged all of my patch set in his for-next branch, including the MMC part. I don't know whether this will conflict with your tree in the next merge.
Quoted 5 lines
Hi Samuel:
Since the whole patch set has been merged in your for-next branch, does it mean that you will help to merge all of the three parts to linus's tree?
Quoted 6 lines
I've removed the patch from my tree to avoid conflicting with Samuel. I'm happy to either have the MMC patch go through the MFD tree with:
Acked-by Chris Ball <[email protected]>or to merge the MMC side of v7 myself, whichever Samuel prefers.
I'm taking the patch through my tree, thanks for the ACK.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Hi Wei,
Quoted 4 lines · On Mon, Oct 29, 2012 at 01:49:28PM +0800, [email protected] wrote:
From: Wei WANG <[email protected]>
Support for Realtek PCI-Express driver-based card readers including rts5209, rts5229 and rtl8411.
All 3 patches applied now, thanks a lot.
I also fixed the Kconfig entry where you forgot to select MFD_CORE.
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/