示例#1
0
文件: rtl8411.c 项目: 020gzh/linux
static void rtl8411b_fetch_vendor_settings(struct rtsx_pcr *pcr)
{
	u32 reg = 0;

	rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, &reg);
	pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg);

	if (!rtsx_vendor_setting_valid(reg))
		return;

	pcr->aspm_en = rtsx_reg_to_aspm(reg);
	pcr->sd30_drive_sel_1v8 =
		map_sd_drive(rtsx_reg_to_sd30_drive_sel_1v8(reg));
	pcr->sd30_drive_sel_3v3 =
		map_sd_drive(rtl8411b_reg_to_sd30_drive_sel_3v3(reg));
}
示例#2
0
文件: rts5229.c 项目: nemumu/linux
static void rts5229_fetch_vendor_settings(struct rtsx_pcr *pcr)
{
    u32 reg;

    rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, &reg);
    dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg);

    if (!rtsx_vendor_setting_valid(reg))
        return;

    pcr->aspm_en = rtsx_reg_to_aspm(reg);
    pcr->sd30_drive_sel_1v8 =
        map_sd_drive(rtsx_reg_to_sd30_drive_sel_1v8(reg));
    pcr->card_drive_sel &= 0x3F;
    pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg);

    rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, &reg);
    dev_dbg(&(pcr->pci->dev), "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg);
    pcr->sd30_drive_sel_3v3 =
        map_sd_drive(rtsx_reg_to_sd30_drive_sel_3v3(reg));
}
示例#3
0
文件: rtl8411.c 项目: 020gzh/linux
static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr)
{
	u32 reg1 = 0;
	u8 reg3 = 0;

	rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, &reg1);
	pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg1);

	if (!rtsx_vendor_setting_valid(reg1))
		return;

	pcr->aspm_en = rtsx_reg_to_aspm(reg1);
	pcr->sd30_drive_sel_1v8 =
		map_sd_drive(rtsx_reg_to_sd30_drive_sel_1v8(reg1));
	pcr->card_drive_sel &= 0x3F;
	pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg1);

	rtsx_pci_read_config_byte(pcr, PCR_SETTING_REG3, &reg3);
	pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG3, reg3);
	pcr->sd30_drive_sel_3v3 = rtl8411_reg_to_sd30_drive_sel_3v3(reg3);
}