Lines Matching refs:whc
25 static int whc_update_di(struct whc *whc, int idx) in whc_update_di() argument
30 le_writel(bit, whc->base + WUSBDIBUPDATED + offset); in whc_update_di()
32 return whci_wait_for(&whc->umc->dev, in whc_update_di()
33 whc->base + WUSBDIBUPDATED + offset, bit, 0, in whc_update_di()
45 struct whc *whc = wusbhc_to_whc(wusbhc); in whc_wusbhc_start() local
47 asl_start(whc); in whc_wusbhc_start()
48 pzl_start(whc); in whc_wusbhc_start()
55 struct whc *whc = wusbhc_to_whc(wusbhc); in whc_wusbhc_stop() local
59 pzl_stop(whc); in whc_wusbhc_stop()
60 asl_stop(whc); in whc_wusbhc_stop()
62 now_time = le_readl(whc->base + WUSBTIME) & WUSBTIME_CHANNEL_TIME_MASK; in whc_wusbhc_stop()
64 ret = whc_do_gencmd(whc, WUSBGENCMDSTS_CHAN_STOP, stop_time, NULL, 0); in whc_wusbhc_stop()
72 struct whc *whc = wusbhc_to_whc(wusbhc); in whc_mmcie_add() local
80 return whc_do_gencmd(whc, WUSBGENCMDSTS_MMCIE_ADD, params, wuie, wuie->bLength); in whc_mmcie_add()
85 struct whc *whc = wusbhc_to_whc(wusbhc); in whc_mmcie_rm() local
90 return whc_do_gencmd(whc, WUSBGENCMDSTS_MMCIE_RM, params, NULL, 0); in whc_mmcie_rm()
95 struct whc *whc = wusbhc_to_whc(wusbhc); in whc_bwa_set() local
98 whc_write_wusbcmd(whc, WUSBCMD_WUSBSI_MASK, WUSBCMD_WUSBSI(stream_index)); in whc_bwa_set()
100 return whc_do_gencmd(whc, WUSBGENCMDSTS_SET_MAS, 0, (void *)mas_bm, sizeof(*mas_bm)); in whc_bwa_set()
105 struct whc *whc = wusbhc_to_whc(wusbhc); in whc_dev_info_set() local
107 struct di_buf_entry *di = &whc->di_buf[idx]; in whc_dev_info_set()
110 mutex_lock(&whc->mutex); in whc_dev_info_set()
116 ret = whc_update_di(whc, idx); in whc_dev_info_set()
118 mutex_unlock(&whc->mutex); in whc_dev_info_set()
129 struct whc *whc = wusbhc_to_whc(wusbhc); in whc_set_num_dnts() local
136 le_writel(dntsctrl, whc->base + WUSBDNTSCTRL); in whc_set_num_dnts()
141 static int whc_set_key(struct whc *whc, u8 key_index, uint32_t tkid, in whc_set_key() argument
154 le_writel(tkid, whc->base + WUSBTKID); in whc_set_key()
156 le_writel(seckey[i], whc->base + WUSBSECKEY + 4*i); in whc_set_key()
157 le_writel(setkeycmd, whc->base + WUSBSETSECKEYCMD); in whc_set_key()
159 ret = whci_wait_for(&whc->umc->dev, whc->base + WUSBSETSECKEYCMD, in whc_set_key()
174 struct whc *whc = wusbhc_to_whc(wusbhc); in whc_set_ptk() local
175 struct di_buf_entry *di = &whc->di_buf[port_idx]; in whc_set_ptk()
178 mutex_lock(&whc->mutex); in whc_set_ptk()
181 ret = whc_set_key(whc, port_idx, tkid, ptk, key_size, false); in whc_set_ptk()
190 ret = whc_update_di(whc, port_idx); in whc_set_ptk()
192 mutex_unlock(&whc->mutex); in whc_set_ptk()
205 struct whc *whc = wusbhc_to_whc(wusbhc); in whc_set_gtk() local
208 mutex_lock(&whc->mutex); in whc_set_gtk()
210 ret = whc_set_key(whc, whc->n_devices, tkid, gtk, key_size, true); in whc_set_gtk()
212 mutex_unlock(&whc->mutex); in whc_set_gtk()
217 int whc_set_cluster_id(struct whc *whc, u8 bcid) in whc_set_cluster_id() argument
219 whc_write_wusbcmd(whc, WUSBCMD_BCID_MASK, WUSBCMD_BCID(bcid)); in whc_set_cluster_id()