aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWei WANG <wei_wang@realsil.com.cn>2013-01-22 20:51:04 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2013-01-26 19:29:39 -0500
commitd817ac4e181710cd02b582b759d3123ad2cfa8d8 (patch)
tree1e4356b9baf0903293d9dc428a3b5badf8041015 /include
parent00441b5e6b98ad6a50b5cb7f88d473e3ea1e0d75 (diff)
mfd: rtsx: Add output voltage switch hook
Different card reader has different method to switch output voltage, add this callback to let the card reader implement its individual switch function. This is needed as rtl8411 has a specific switch output voltage procedure. Signed-off-by: Wei WANG <wei_wang@realsil.com.cn> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/rtsx_pci.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h
index 060b721fcbfb..271b6e5654af 100644
--- a/include/linux/mfd/rtsx_pci.h
+++ b/include/linux/mfd/rtsx_pci.h
@@ -158,10 +158,9 @@
158#define SG_TRANS_DATA (0x02 << 4) 158#define SG_TRANS_DATA (0x02 << 4)
159#define SG_LINK_DESC (0x03 << 4) 159#define SG_LINK_DESC (0x03 << 4)
160 160
161/* SD bank voltage */ 161/* Output voltage */
162#define SD_IO_3V3 0 162#define OUTPUT_3V3 0
163#define SD_IO_1V8 1 163#define OUTPUT_1V8 1
164
165 164
166/* Card Clock Enable Register */ 165/* Card Clock Enable Register */
167#define SD_CLK_EN 0x04 166#define SD_CLK_EN 0x04
@@ -201,6 +200,20 @@
201#define CHANGE_CLK 0x01 200#define CHANGE_CLK 0x01
202 201
203/* LDO_CTL */ 202/* LDO_CTL */
203#define BPP_ASIC_1V7 0x00
204#define BPP_ASIC_1V8 0x01
205#define BPP_ASIC_1V9 0x02
206#define BPP_ASIC_2V0 0x03
207#define BPP_ASIC_2V7 0x04
208#define BPP_ASIC_2V8 0x05
209#define BPP_ASIC_3V2 0x06
210#define BPP_ASIC_3V3 0x07
211#define BPP_REG_TUNED18 0x07
212#define BPP_TUNED18_SHIFT_8402 5
213#define BPP_TUNED18_SHIFT_8411 4
214#define BPP_PAD_MASK 0x04
215#define BPP_PAD_3V3 0x04
216#define BPP_PAD_1V8 0x00
204#define BPP_LDO_POWB 0x03 217#define BPP_LDO_POWB 0x03
205#define BPP_LDO_ON 0x00 218#define BPP_LDO_ON 0x00
206#define BPP_LDO_SUSPEND 0x02 219#define BPP_LDO_SUSPEND 0x02
@@ -688,6 +701,8 @@ struct pcr_ops {
688 int (*disable_auto_blink)(struct rtsx_pcr *pcr); 701 int (*disable_auto_blink)(struct rtsx_pcr *pcr);
689 int (*card_power_on)(struct rtsx_pcr *pcr, int card); 702 int (*card_power_on)(struct rtsx_pcr *pcr, int card);
690 int (*card_power_off)(struct rtsx_pcr *pcr, int card); 703 int (*card_power_off)(struct rtsx_pcr *pcr, int card);
704 int (*switch_output_voltage)(struct rtsx_pcr *pcr,
705 u8 voltage);
691 unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr); 706 unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr);
692}; 707};
693 708
@@ -783,6 +798,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
783 u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk); 798 u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk);
784int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card); 799int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card);
785int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card); 800int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card);
801int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage);
786unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr); 802unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr);
787void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr); 803void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr);
788 804