| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* Driver for Realtek PCI-Express card reader |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * Copyright(c) 2009-2013 Realtek Semiconductor Corp. All rights reserved. |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 6 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 7 | | - * Free Software Foundation; either version 2, or (at your option) any |
|---|
| 8 | | - * later version. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, but |
|---|
| 11 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 13 | | - * General Public License for more details. |
|---|
| 14 | | - * |
|---|
| 15 | | - * You should have received a copy of the GNU General Public License along |
|---|
| 16 | | - * with this program; if not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | 5 | * |
|---|
| 18 | 6 | * Author: |
|---|
| 19 | 7 | * Wei WANG <wei_wang@realsil.com.cn> |
|---|
| .. | .. |
|---|
| 35 | 23 | |
|---|
| 36 | 24 | static void rts5229_fetch_vendor_settings(struct rtsx_pcr *pcr) |
|---|
| 37 | 25 | { |
|---|
| 26 | + struct pci_dev *pdev = pcr->pci; |
|---|
| 38 | 27 | u32 reg; |
|---|
| 39 | 28 | |
|---|
| 40 | | - rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); |
|---|
| 29 | + pci_read_config_dword(pdev, PCR_SETTING_REG1, ®); |
|---|
| 41 | 30 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); |
|---|
| 42 | 31 | |
|---|
| 43 | 32 | if (!rtsx_vendor_setting_valid(reg)) |
|---|
| .. | .. |
|---|
| 49 | 38 | pcr->card_drive_sel &= 0x3F; |
|---|
| 50 | 39 | pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg); |
|---|
| 51 | 40 | |
|---|
| 52 | | - rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG2, ®); |
|---|
| 41 | + pci_read_config_dword(pdev, PCR_SETTING_REG2, ®); |
|---|
| 53 | 42 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG2, reg); |
|---|
| 54 | 43 | pcr->sd30_drive_sel_3v3 = |
|---|
| 55 | 44 | map_sd_drive(rtsx_reg_to_sd30_drive_sel_3v3(reg)); |
|---|