.. | .. |
---|
| 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> |
---|
.. | .. |
---|
49 | 37 | |
---|
50 | 38 | static void rtl8411_fetch_vendor_settings(struct rtsx_pcr *pcr) |
---|
51 | 39 | { |
---|
| 40 | + struct pci_dev *pdev = pcr->pci; |
---|
52 | 41 | u32 reg1 = 0; |
---|
53 | 42 | u8 reg3 = 0; |
---|
54 | 43 | |
---|
55 | | - rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®1); |
---|
| 44 | + pci_read_config_dword(pdev, PCR_SETTING_REG1, ®1); |
---|
56 | 45 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg1); |
---|
57 | 46 | |
---|
58 | 47 | if (!rtsx_vendor_setting_valid(reg1)) |
---|
.. | .. |
---|
64 | 53 | pcr->card_drive_sel &= 0x3F; |
---|
65 | 54 | pcr->card_drive_sel |= rtsx_reg_to_card_drive_sel(reg1); |
---|
66 | 55 | |
---|
67 | | - rtsx_pci_read_config_byte(pcr, PCR_SETTING_REG3, ®3); |
---|
| 56 | + pci_read_config_byte(pdev, PCR_SETTING_REG3, ®3); |
---|
68 | 57 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG3, reg3); |
---|
69 | 58 | pcr->sd30_drive_sel_3v3 = rtl8411_reg_to_sd30_drive_sel_3v3(reg3); |
---|
70 | 59 | } |
---|
71 | 60 | |
---|
72 | 61 | static void rtl8411b_fetch_vendor_settings(struct rtsx_pcr *pcr) |
---|
73 | 62 | { |
---|
| 63 | + struct pci_dev *pdev = pcr->pci; |
---|
74 | 64 | u32 reg = 0; |
---|
75 | 65 | |
---|
76 | | - rtsx_pci_read_config_dword(pcr, PCR_SETTING_REG1, ®); |
---|
| 66 | + pci_read_config_dword(pdev, PCR_SETTING_REG1, ®); |
---|
77 | 67 | pcr_dbg(pcr, "Cfg 0x%x: 0x%x\n", PCR_SETTING_REG1, reg); |
---|
78 | 68 | |
---|
79 | 69 | if (!rtsx_vendor_setting_valid(reg)) |
---|