Lines Matching refs:sc

55 void hif_write32_mb_reg_window(void *sc,
58 uint32_t hif_read32_mb_reg_window(void *sc,
160 static inline void hif_reg_write_result_check(struct hif_pci_softc *sc, in hif_reg_write_result_check() argument
166 value = qdf_ioread32(sc->mem + offset); in hif_reg_write_result_check()
188 void hif_select_window_confirm(struct hif_pci_softc *sc, uint32_t offset) in hif_select_window_confirm() argument
192 qdf_iowrite32(sc->mem + WINDOW_REG_ADDRESS, in hif_select_window_confirm()
194 sc->register_window = window; in hif_select_window_confirm()
195 hif_reg_write_result_check(sc, WINDOW_REG_ADDRESS, in hif_select_window_confirm()
201 void hif_select_window_confirm(struct hif_pci_softc *sc, uint32_t offset) in hif_select_window_confirm() argument
205 if (window != sc->register_window) { in hif_select_window_confirm()
206 qdf_iowrite32(sc->mem + WINDOW_REG_ADDRESS, in hif_select_window_confirm()
208 sc->register_window = window; in hif_select_window_confirm()
209 hif_reg_write_result_check(sc, WINDOW_REG_ADDRESS, in hif_select_window_confirm()
225 static inline void hif_lock_reg_access(struct hif_pci_softc *sc, in hif_lock_reg_access() argument
228 pld_lock_reg_window(sc->dev, flags); in hif_lock_reg_access()
240 static inline void hif_unlock_reg_access(struct hif_pci_softc *sc, in hif_unlock_reg_access() argument
243 pld_unlock_reg_window(sc->dev, flags); in hif_unlock_reg_access()
246 static inline void hif_lock_reg_access(struct hif_pci_softc *sc, in hif_lock_reg_access() argument
249 qdf_spin_lock_irqsave(&sc->register_access_lock); in hif_lock_reg_access()
252 static inline void hif_unlock_reg_access(struct hif_pci_softc *sc, in hif_unlock_reg_access() argument
255 qdf_spin_unlock_irqrestore(&sc->register_access_lock); in hif_unlock_reg_access()
268 struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn); in hif_write32_mb_reg_window() local
269 uint32_t offset = addr - sc->mem; in hif_write32_mb_reg_window()
272 if (!sc->use_register_windowing || in hif_write32_mb_reg_window()
276 hif_lock_reg_access(sc, &flags); in hif_write32_mb_reg_window()
277 hif_select_window_confirm(sc, offset); in hif_write32_mb_reg_window()
278 qdf_iowrite32(sc->mem + WINDOW_START + in hif_write32_mb_reg_window()
280 hif_unlock_reg_access(sc, &flags); in hif_write32_mb_reg_window()
286 struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn); in hif_read32_mb_reg_window() local
288 uint32_t offset = addr - sc->mem; in hif_read32_mb_reg_window()
291 if (!sc->use_register_windowing || in hif_read32_mb_reg_window()
295 hif_lock_reg_access(sc, &flags); in hif_read32_mb_reg_window()
296 hif_select_window_confirm(sc, offset); in hif_read32_mb_reg_window()
297 ret = qdf_ioread32(sc->mem + WINDOW_START + in hif_read32_mb_reg_window()
299 hif_unlock_reg_access(sc, &flags); in hif_read32_mb_reg_window()