Lines Matching refs:mvi
44 static inline u32 mvs_cr32(struct mvs_info *mvi, u32 addr) in mvs_cr32() argument
46 void __iomem *regs = mvi->regs; in mvs_cr32()
51 static inline void mvs_cw32(struct mvs_info *mvi, u32 addr, u32 val) in mvs_cw32() argument
53 void __iomem *regs = mvi->regs; in mvs_cw32()
58 static inline u32 mvs_read_phy_ctl(struct mvs_info *mvi, u32 port) in mvs_read_phy_ctl() argument
60 void __iomem *regs = mvi->regs; in mvs_read_phy_ctl()
65 static inline void mvs_write_phy_ctl(struct mvs_info *mvi, u32 port, u32 val) in mvs_write_phy_ctl() argument
67 void __iomem *regs = mvi->regs; in mvs_write_phy_ctl()
74 static inline u32 mvs_read_port(struct mvs_info *mvi, u32 off, in mvs_read_port() argument
77 void __iomem *regs = mvi->regs + off; in mvs_read_port()
78 void __iomem *regs2 = mvi->regs + off2; in mvs_read_port()
83 static inline void mvs_write_port(struct mvs_info *mvi, u32 off, u32 off2, in mvs_write_port() argument
86 void __iomem *regs = mvi->regs + off; in mvs_write_port()
87 void __iomem *regs2 = mvi->regs + off2; in mvs_write_port()
94 static inline u32 mvs_read_port_cfg_data(struct mvs_info *mvi, u32 port) in mvs_read_port_cfg_data() argument
96 return mvs_read_port(mvi, MVS_P0_CFG_DATA, in mvs_read_port_cfg_data()
100 static inline void mvs_write_port_cfg_data(struct mvs_info *mvi, in mvs_write_port_cfg_data() argument
103 mvs_write_port(mvi, MVS_P0_CFG_DATA, in mvs_write_port_cfg_data()
107 static inline void mvs_write_port_cfg_addr(struct mvs_info *mvi, in mvs_write_port_cfg_addr() argument
110 mvs_write_port(mvi, MVS_P0_CFG_ADDR, in mvs_write_port_cfg_addr()
115 static inline u32 mvs_read_port_vsr_data(struct mvs_info *mvi, u32 port) in mvs_read_port_vsr_data() argument
117 return mvs_read_port(mvi, MVS_P0_VSR_DATA, in mvs_read_port_vsr_data()
121 static inline void mvs_write_port_vsr_data(struct mvs_info *mvi, in mvs_write_port_vsr_data() argument
124 mvs_write_port(mvi, MVS_P0_VSR_DATA, in mvs_write_port_vsr_data()
128 static inline void mvs_write_port_vsr_addr(struct mvs_info *mvi, in mvs_write_port_vsr_addr() argument
131 mvs_write_port(mvi, MVS_P0_VSR_ADDR, in mvs_write_port_vsr_addr()
136 static inline u32 mvs_read_port_irq_stat(struct mvs_info *mvi, u32 port) in mvs_read_port_irq_stat() argument
138 return mvs_read_port(mvi, MVS_P0_INT_STAT, in mvs_read_port_irq_stat()
142 static inline void mvs_write_port_irq_stat(struct mvs_info *mvi, in mvs_write_port_irq_stat() argument
145 mvs_write_port(mvi, MVS_P0_INT_STAT, in mvs_write_port_irq_stat()
149 static inline u32 mvs_read_port_irq_mask(struct mvs_info *mvi, u32 port) in mvs_read_port_irq_mask() argument
151 return mvs_read_port(mvi, MVS_P0_INT_MASK, in mvs_read_port_irq_mask()
156 static inline void mvs_write_port_irq_mask(struct mvs_info *mvi, in mvs_write_port_irq_mask() argument
159 mvs_write_port(mvi, MVS_P0_INT_MASK, in mvs_write_port_irq_mask()
163 static inline void __devinit mvs_phy_hacks(struct mvs_info *mvi) in mvs_phy_hacks() argument
167 tmp = mvs_cr32(mvi, CMD_PHY_TIMER); in mvs_phy_hacks()
170 mvs_cw32(mvi, CMD_PHY_TIMER, tmp); in mvs_phy_hacks()
173 mvs_cw32(mvi, CMD_SAS_CTL1, 0x7f7f); in mvs_phy_hacks()
176 tmp = mvs_cr32(mvi, CMD_SAS_CTL0); in mvs_phy_hacks()
179 mvs_cw32(mvi, CMD_SAS_CTL0, tmp); in mvs_phy_hacks()
181 mvs_cw32(mvi, CMD_WD_TIMER, 0x7a0000); in mvs_phy_hacks()
184 mvs_cw32(mvi, CMD_APP_ERR_CONFIG, 0xffefbf7d); in mvs_phy_hacks()
187 static inline void mvs_int_sata(struct mvs_info *mvi) in mvs_int_sata() argument
190 void __iomem *regs = mvi->regs; in mvs_int_sata()
194 MVS_CHIP_DISP->clear_active_cmds(mvi); in mvs_int_sata()
197 static inline void mvs_int_full(struct mvs_info *mvi) in mvs_int_full() argument
199 void __iomem *regs = mvi->regs; in mvs_int_full()
204 mvs_int_rx(mvi, false); in mvs_int_full()
206 for (i = 0; i < mvi->chip->n_phy; i++) { in mvs_int_full()
209 mvs_int_port(mvi, i, tmp); in mvs_int_full()
213 MVS_CHIP_DISP->non_spec_ncq_error(mvi); in mvs_int_full()
216 mvs_int_sata(mvi); in mvs_int_full()
221 static inline void mvs_start_delivery(struct mvs_info *mvi, u32 tx) in mvs_start_delivery() argument
223 void __iomem *regs = mvi->regs; in mvs_start_delivery()
227 static inline u32 mvs_rx_update(struct mvs_info *mvi) in mvs_rx_update() argument
229 void __iomem *regs = mvi->regs; in mvs_rx_update()
243 static inline void mvs_show_pcie_usage(struct mvs_info *mvi) in mvs_show_pcie_usage() argument
251 if (mvi->flags & MVF_FLAG_SOC || mvi->id > 0) in mvs_show_pcie_usage()
254 pci_read_config_word(mvi->pdev, PCR_LINK_STAT, &link_stat); in mvs_show_pcie_usage()
258 dev_printk(KERN_INFO, mvi->dev, in mvs_show_pcie_usage()