summaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/rtsx_pci.h
diff options
context:
space:
mode:
authorWei WANG2013-02-08 08:24:27 +0100
committerSamuel Ortiz2013-02-14 00:24:12 +0100
commitc3481955f6c78c8dd99921759306d7469c999ec2 (patch)
treeae65ba72e1076dd94690f16c2d03cdce56d7f34d /include/linux/mfd/rtsx_pci.h
parentmfd: ab8500: Fix compile error (diff)
downloadkernel-qcow2-linux-c3481955f6c78c8dd99921759306d7469c999ec2.tar.gz
kernel-qcow2-linux-c3481955f6c78c8dd99921759306d7469c999ec2.tar.xz
kernel-qcow2-linux-c3481955f6c78c8dd99921759306d7469c999ec2.zip
mfd: rtsx: Fix issue that booting OS with SD card inserted
Realtek card reader supports both SD and MS card. According to the settings of rtsx MFD driver, SD host will be probed before MS host. If we boot/reboot Linux with SD card inserted, the resetting flow of SD card will succeed, and the following resetting flow of MS is sure to fail. Then MS upper-level driver will ask rtsx driver to turn power off. This request leads to the result that the following SD commands fail and SD card can't be accessed again. In this commit, Realtek's SD and MS host driver will check whether the card that upper driver requesting is the one existing in the slot. If not, Realtek's host driver will refuse the operation to make sure the exlusive accessing at the same time. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include/linux/mfd/rtsx_pci.h')
-rw-r--r--include/linux/mfd/rtsx_pci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h
index 5d9b81e8aff4..26ea7f1b7caf 100644
--- a/include/linux/mfd/rtsx_pci.h
+++ b/include/linux/mfd/rtsx_pci.h
@@ -740,6 +740,7 @@ struct rtsx_pcr {
unsigned int card_inserted;
unsigned int card_removed;
+ unsigned int card_exist;
struct delayed_work carddet_work;
struct delayed_work idle_work;
@@ -804,6 +805,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk);
int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card);
int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card);
+int rtsx_pci_card_exclusive_check(struct rtsx_pcr *pcr, int card);
int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage);
unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr);
void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr);