Lines Matching refs:uccs

46 void ucc_slow_graceful_stop_tx(struct ucc_slow_private * uccs)  in ucc_slow_graceful_stop_tx()  argument
48 struct ucc_slow_info *us_info = uccs->us_info; in ucc_slow_graceful_stop_tx()
57 void ucc_slow_stop_tx(struct ucc_slow_private * uccs) in ucc_slow_stop_tx() argument
59 struct ucc_slow_info *us_info = uccs->us_info; in ucc_slow_stop_tx()
67 void ucc_slow_restart_tx(struct ucc_slow_private * uccs) in ucc_slow_restart_tx() argument
69 struct ucc_slow_info *us_info = uccs->us_info; in ucc_slow_restart_tx()
77 void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode) in ucc_slow_enable() argument
82 us_regs = uccs->us_regs; in ucc_slow_enable()
88 uccs->enabled_tx = 1; in ucc_slow_enable()
92 uccs->enabled_rx = 1; in ucc_slow_enable()
98 void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode) in ucc_slow_disable() argument
103 us_regs = uccs->us_regs; in ucc_slow_disable()
109 uccs->enabled_tx = 0; in ucc_slow_disable()
113 uccs->enabled_rx = 0; in ucc_slow_disable()
125 struct ucc_slow_private *uccs; in ucc_slow_init() local
155 uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL); in ucc_slow_init()
156 if (!uccs) { in ucc_slow_init()
163 uccs->us_info = us_info; in ucc_slow_init()
165 uccs->us_regs = ioremap(us_info->regs, sizeof(struct ucc_slow)); in ucc_slow_init()
166 if (uccs->us_regs == NULL) { in ucc_slow_init()
168 kfree(uccs); in ucc_slow_init()
172 uccs->saved_uccm = 0; in ucc_slow_init()
173 uccs->p_rx_frame = 0; in ucc_slow_init()
174 us_regs = uccs->us_regs; in ucc_slow_init()
175 uccs->p_ucce = (u16 *) & (us_regs->ucce); in ucc_slow_init()
176 uccs->p_uccm = (u16 *) & (us_regs->uccm); in ucc_slow_init()
178 uccs->rx_frames = 0; in ucc_slow_init()
179 uccs->tx_frames = 0; in ucc_slow_init()
180 uccs->rx_discarded = 0; in ucc_slow_init()
184 uccs->us_pram_offset = in ucc_slow_init()
186 if (IS_ERR_VALUE(uccs->us_pram_offset)) { in ucc_slow_init()
188 ucc_slow_free(uccs); in ucc_slow_init()
193 uccs->us_pram_offset); in ucc_slow_init()
195 uccs->us_pram = qe_muram_addr(uccs->us_pram_offset); in ucc_slow_init()
201 ucc_slow_free(uccs); in ucc_slow_init()
205 out_be16(&uccs->us_pram->mrblr, us_info->max_rx_buf_length); in ucc_slow_init()
207 INIT_LIST_HEAD(&uccs->confQ); in ucc_slow_init()
210 uccs->rx_base_offset = in ucc_slow_init()
213 if (IS_ERR_VALUE(uccs->rx_base_offset)) { in ucc_slow_init()
216 uccs->rx_base_offset = 0; in ucc_slow_init()
217 ucc_slow_free(uccs); in ucc_slow_init()
221 uccs->tx_base_offset = in ucc_slow_init()
224 if (IS_ERR_VALUE(uccs->tx_base_offset)) { in ucc_slow_init()
226 uccs->tx_base_offset = 0; in ucc_slow_init()
227 ucc_slow_free(uccs); in ucc_slow_init()
232 bd = uccs->confBd = uccs->tx_bd = qe_muram_addr(uccs->tx_base_offset); in ucc_slow_init()
245 bd = uccs->rx_bd = qe_muram_addr(uccs->rx_base_offset); in ucc_slow_init()
295 uccs->us_pram->tbmr = UCC_BMR_BO_BE; in ucc_slow_init()
296 uccs->us_pram->rbmr = UCC_BMR_BO_BE; in ucc_slow_init()
299 out_be16(&uccs->us_pram->rbase, uccs->rx_base_offset); in ucc_slow_init()
300 out_be16(&uccs->us_pram->tbase, uccs->tx_base_offset); in ucc_slow_init()
316 ucc_slow_free(uccs); in ucc_slow_init()
324 ucc_slow_free(uccs); in ucc_slow_init()
349 *uccs_ret = uccs; in ucc_slow_init()
354 void ucc_slow_free(struct ucc_slow_private * uccs) in ucc_slow_free() argument
356 if (!uccs) in ucc_slow_free()
359 if (uccs->rx_base_offset) in ucc_slow_free()
360 qe_muram_free(uccs->rx_base_offset); in ucc_slow_free()
362 if (uccs->tx_base_offset) in ucc_slow_free()
363 qe_muram_free(uccs->tx_base_offset); in ucc_slow_free()
365 if (uccs->us_pram) in ucc_slow_free()
366 qe_muram_free(uccs->us_pram_offset); in ucc_slow_free()
368 if (uccs->us_regs) in ucc_slow_free()
369 iounmap(uccs->us_regs); in ucc_slow_free()
371 kfree(uccs); in ucc_slow_free()