Lines Matching refs:uccs

42 void ucc_slow_graceful_stop_tx(struct ucc_slow_private * uccs)  in ucc_slow_graceful_stop_tx()  argument
44 struct ucc_slow_info *us_info = uccs->us_info; in ucc_slow_graceful_stop_tx()
53 void ucc_slow_stop_tx(struct ucc_slow_private * uccs) in ucc_slow_stop_tx() argument
55 struct ucc_slow_info *us_info = uccs->us_info; in ucc_slow_stop_tx()
63 void ucc_slow_restart_tx(struct ucc_slow_private * uccs) in ucc_slow_restart_tx() argument
65 struct ucc_slow_info *us_info = uccs->us_info; in ucc_slow_restart_tx()
73 void ucc_slow_enable(struct ucc_slow_private * uccs, enum comm_dir mode) in ucc_slow_enable() argument
78 us_regs = uccs->us_regs; in ucc_slow_enable()
84 uccs->enabled_tx = 1; in ucc_slow_enable()
88 uccs->enabled_rx = 1; in ucc_slow_enable()
94 void ucc_slow_disable(struct ucc_slow_private * uccs, enum comm_dir mode) in ucc_slow_disable() argument
99 us_regs = uccs->us_regs; in ucc_slow_disable()
105 uccs->enabled_tx = 0; in ucc_slow_disable()
109 uccs->enabled_rx = 0; in ucc_slow_disable()
121 struct ucc_slow_private *uccs; in ucc_slow_init() local
151 uccs = kzalloc(sizeof(struct ucc_slow_private), GFP_KERNEL); in ucc_slow_init()
152 if (!uccs) { in ucc_slow_init()
157 uccs->rx_base_offset = -1; in ucc_slow_init()
158 uccs->tx_base_offset = -1; in ucc_slow_init()
159 uccs->us_pram_offset = -1; in ucc_slow_init()
162 uccs->us_info = us_info; in ucc_slow_init()
164 uccs->us_regs = ioremap(us_info->regs, sizeof(struct ucc_slow)); in ucc_slow_init()
165 if (uccs->us_regs == NULL) { in ucc_slow_init()
167 kfree(uccs); in ucc_slow_init()
171 us_regs = uccs->us_regs; in ucc_slow_init()
172 uccs->p_ucce = &us_regs->ucce; in ucc_slow_init()
173 uccs->p_uccm = &us_regs->uccm; in ucc_slow_init()
176 uccs->us_pram_offset = in ucc_slow_init()
178 if (uccs->us_pram_offset < 0) { in ucc_slow_init()
180 ucc_slow_free(uccs); in ucc_slow_init()
185 uccs->us_pram_offset); in ucc_slow_init()
187 uccs->us_pram = qe_muram_addr(uccs->us_pram_offset); in ucc_slow_init()
193 ucc_slow_free(uccs); in ucc_slow_init()
197 iowrite16be(us_info->max_rx_buf_length, &uccs->us_pram->mrblr); in ucc_slow_init()
199 INIT_LIST_HEAD(&uccs->confQ); in ucc_slow_init()
202 uccs->rx_base_offset = in ucc_slow_init()
205 if (uccs->rx_base_offset < 0) { in ucc_slow_init()
208 ucc_slow_free(uccs); in ucc_slow_init()
212 uccs->tx_base_offset = in ucc_slow_init()
215 if (uccs->tx_base_offset < 0) { in ucc_slow_init()
217 ucc_slow_free(uccs); in ucc_slow_init()
222 bd = uccs->confBd = uccs->tx_bd = qe_muram_addr(uccs->tx_base_offset); in ucc_slow_init()
235 bd = uccs->rx_bd = qe_muram_addr(uccs->rx_base_offset); in ucc_slow_init()
285 iowrite8(UCC_BMR_BO_BE, &uccs->us_pram->tbmr); in ucc_slow_init()
286 iowrite8(UCC_BMR_BO_BE, &uccs->us_pram->rbmr); in ucc_slow_init()
289 iowrite16be(uccs->rx_base_offset, &uccs->us_pram->rbase); in ucc_slow_init()
290 iowrite16be(uccs->tx_base_offset, &uccs->us_pram->tbase); in ucc_slow_init()
306 ucc_slow_free(uccs); in ucc_slow_init()
314 ucc_slow_free(uccs); in ucc_slow_init()
339 *uccs_ret = uccs; in ucc_slow_init()
344 void ucc_slow_free(struct ucc_slow_private * uccs) in ucc_slow_free() argument
346 if (!uccs) in ucc_slow_free()
349 qe_muram_free(uccs->rx_base_offset); in ucc_slow_free()
350 qe_muram_free(uccs->tx_base_offset); in ucc_slow_free()
351 qe_muram_free(uccs->us_pram_offset); in ucc_slow_free()
353 if (uccs->us_regs) in ucc_slow_free()
354 iounmap(uccs->us_regs); in ucc_slow_free()
356 kfree(uccs); in ucc_slow_free()