Lines Matching refs:pcr

101 #define rtsx_pci_writel(pcr, reg, value) \  argument
102 iowrite32(value, (pcr)->remap_addr + reg)
103 #define rtsx_pci_readl(pcr, reg) \ argument
104 ioread32((pcr)->remap_addr + reg)
105 #define rtsx_pci_writew(pcr, reg, value) \ argument
106 iowrite16(value, (pcr)->remap_addr + reg)
107 #define rtsx_pci_readw(pcr, reg) \ argument
108 ioread16((pcr)->remap_addr + reg)
109 #define rtsx_pci_writeb(pcr, reg, value) \ argument
110 iowrite8(value, (pcr)->remap_addr + reg)
111 #define rtsx_pci_readb(pcr, reg) \ argument
112 ioread8((pcr)->remap_addr + reg)
114 #define rtsx_pci_read_config_byte(pcr, where, val) \ argument
115 pci_read_config_byte((pcr)->pci, where, val)
117 #define rtsx_pci_write_config_byte(pcr, where, val) \ argument
118 pci_write_config_byte((pcr)->pci, where, val)
120 #define rtsx_pci_read_config_dword(pcr, where, val) \ argument
121 pci_read_config_dword((pcr)->pci, where, val)
123 #define rtsx_pci_write_config_dword(pcr, where, val) \ argument
124 pci_write_config_dword((pcr)->pci, where, val)
845 #define rtsx_pci_init_cmd(pcr) ((pcr)->ci = 0) argument
850 struct rtsx_pcr *pcr; member
854 int (*write_phy)(struct rtsx_pcr *pcr, u8 addr, u16 val);
855 int (*read_phy)(struct rtsx_pcr *pcr, u8 addr, u16 *val);
856 int (*extra_init_hw)(struct rtsx_pcr *pcr);
857 int (*optimize_phy)(struct rtsx_pcr *pcr);
858 int (*turn_on_led)(struct rtsx_pcr *pcr);
859 int (*turn_off_led)(struct rtsx_pcr *pcr);
860 int (*enable_auto_blink)(struct rtsx_pcr *pcr);
861 int (*disable_auto_blink)(struct rtsx_pcr *pcr);
862 int (*card_power_on)(struct rtsx_pcr *pcr, int card);
863 int (*card_power_off)(struct rtsx_pcr *pcr, int card);
864 int (*switch_output_voltage)(struct rtsx_pcr *pcr,
866 unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr);
868 void (*fetch_vendor_settings)(struct rtsx_pcr *pcr);
869 void (*force_power_down)(struct rtsx_pcr *pcr, u8 pm_state);
956 #define CHK_PCI_PID(pcr, pid) ((pcr)->pci->device == (pid)) argument
957 #define PCI_VID(pcr) ((pcr)->pci->vendor) argument
958 #define PCI_PID(pcr) ((pcr)->pci->device) argument
959 #define is_version(pcr, pid, ver) \ argument
960 (CHK_PCI_PID(pcr, pid) && (pcr)->ic_version == (ver))
961 #define pcr_dbg(pcr, fmt, arg...) \ argument
962 dev_dbg(&(pcr)->pci->dev, fmt, ##arg)
967 #define SDR104_TX_PHASE(pcr) SDR104_PHASE((pcr)->tx_initial_phase) argument
968 #define SDR50_TX_PHASE(pcr) SDR50_PHASE((pcr)->tx_initial_phase) argument
969 #define DDR50_TX_PHASE(pcr) DDR50_PHASE((pcr)->tx_initial_phase) argument
970 #define SDR104_RX_PHASE(pcr) SDR104_PHASE((pcr)->rx_initial_phase) argument
971 #define SDR50_RX_PHASE(pcr) SDR50_PHASE((pcr)->rx_initial_phase) argument
972 #define DDR50_RX_PHASE(pcr) DDR50_PHASE((pcr)->rx_initial_phase) argument
976 void rtsx_pci_start_run(struct rtsx_pcr *pcr);
977 int rtsx_pci_write_register(struct rtsx_pcr *pcr, u16 addr, u8 mask, u8 data);
978 int rtsx_pci_read_register(struct rtsx_pcr *pcr, u16 addr, u8 *data);
979 int rtsx_pci_write_phy_register(struct rtsx_pcr *pcr, u8 addr, u16 val);
980 int rtsx_pci_read_phy_register(struct rtsx_pcr *pcr, u8 addr, u16 *val);
981 void rtsx_pci_stop_cmd(struct rtsx_pcr *pcr);
982 void rtsx_pci_add_cmd(struct rtsx_pcr *pcr,
984 void rtsx_pci_send_cmd_no_wait(struct rtsx_pcr *pcr);
985 int rtsx_pci_send_cmd(struct rtsx_pcr *pcr, int timeout);
986 int rtsx_pci_transfer_data(struct rtsx_pcr *pcr, struct scatterlist *sglist,
988 int rtsx_pci_dma_map_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist,
990 void rtsx_pci_dma_unmap_sg(struct rtsx_pcr *pcr, struct scatterlist *sglist,
992 int rtsx_pci_dma_transfer(struct rtsx_pcr *pcr, struct scatterlist *sglist,
994 int rtsx_pci_read_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len);
995 int rtsx_pci_write_ppbuf(struct rtsx_pcr *pcr, u8 *buf, int buf_len);
996 int rtsx_pci_card_pull_ctl_enable(struct rtsx_pcr *pcr, int card);
997 int rtsx_pci_card_pull_ctl_disable(struct rtsx_pcr *pcr, int card);
998 int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
1000 int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card);
1001 int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card);
1002 int rtsx_pci_card_exclusive_check(struct rtsx_pcr *pcr, int card);
1003 int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage);
1004 unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr);
1005 void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr);
1007 static inline u8 *rtsx_pci_get_cmd_data(struct rtsx_pcr *pcr) in rtsx_pci_get_cmd_data() argument
1009 return (u8 *)(pcr->host_cmds_ptr); in rtsx_pci_get_cmd_data()
1012 static inline int rtsx_pci_update_cfg_byte(struct rtsx_pcr *pcr, int addr, in rtsx_pci_update_cfg_byte() argument
1018 err = pci_read_config_byte(pcr->pci, addr, &val); in rtsx_pci_update_cfg_byte()
1021 return pci_write_config_byte(pcr->pci, addr, (val & mask) | append); in rtsx_pci_update_cfg_byte()
1024 static inline void rtsx_pci_write_be32(struct rtsx_pcr *pcr, u16 reg, u32 val) in rtsx_pci_write_be32() argument
1026 rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg, 0xFF, val >> 24); in rtsx_pci_write_be32()
1027 rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 1, 0xFF, val >> 16); in rtsx_pci_write_be32()
1028 rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 2, 0xFF, val >> 8); in rtsx_pci_write_be32()
1029 rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg + 3, 0xFF, val); in rtsx_pci_write_be32()
1032 static inline int rtsx_pci_update_phy(struct rtsx_pcr *pcr, u8 addr, in rtsx_pci_update_phy() argument
1038 err = rtsx_pci_read_phy_register(pcr, addr, &val); in rtsx_pci_update_phy()
1042 return rtsx_pci_write_phy_register(pcr, addr, (val & mask) | append); in rtsx_pci_update_phy()