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.
Showing the changes to include/linux (1 of 5 files). Show all
Unified · Split
| @@ -158,10 +158,9 @@ · 157 unmodified lines | ||
| 158 | 158 | #define SG_TRANS_DATA (0x02 << 4) |
| 159 | 159 | #define SG_LINK_DESC (0x03 << 4) |
| 160 | 160 | |
| 161 | −/* SD bank voltage */ | |
| 162 | −#define SD_IO_3V3 0 | |
| 163 | −#define SD_IO_1V8 1 | |
| 164 | − | |
| 161 | +/* Output voltage */ | |
| 162 | +#define OUTPUT_3V3 0 | |
| 163 | +#define OUTPUT_1V8 1 | |
| 165 | 164 | |
| 166 | 165 | /* Card Clock Enable Register */ |
| 167 | 166 | #define SD_CLK_EN 0x04 |
| @@ -201,6 +200,20 @@ · 33 unmodified lines | ||
| 201 | 200 | #define CHANGE_CLK 0x01 |
| 202 | 201 | |
| 203 | 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 | 217 | #define BPP_LDO_POWB 0x03 |
| 205 | 218 | #define BPP_LDO_ON 0x00 |
| 206 | 219 | #define BPP_LDO_SUSPEND 0x02 |
| @@ -688,6 +701,8 @@ struct pcr_ops { · 481 unmodified lines | ||
| 688 | 701 | int (*disable_auto_blink)(struct rtsx_pcr *pcr); |
| 689 | 702 | int (*card_power_on)(struct rtsx_pcr *pcr, int card); |
| 690 | 703 | int (*card_power_off)(struct rtsx_pcr *pcr, int card); |
| 704 | + int (*switch_output_voltage)(struct rtsx_pcr *pcr, | |
| 705 | + u8 voltage); | |
| 691 | 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, · 89 unmodified lines | ||
| 783 | 798 | u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk); |
| 784 | 799 | int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card); |
| 785 | 800 | int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card); |
| 801 | +int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage); | |
| 786 | 802 | unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr); |
| 787 | 803 | void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr); |
| 788 | 804 | |