Lines Matching refs:uccf
26 void ucc_fast_dump_regs(struct ucc_fast_private * uccf) in ucc_fast_dump_regs() argument
28 printk(KERN_INFO "UCC%u Fast registers:\n", uccf->uf_info->ucc_num); in ucc_fast_dump_regs()
29 printk(KERN_INFO "Base address: 0x%p\n", uccf->uf_regs); in ucc_fast_dump_regs()
32 &uccf->uf_regs->gumr, qe_ioread32be(&uccf->uf_regs->gumr)); in ucc_fast_dump_regs()
34 &uccf->uf_regs->upsmr, qe_ioread32be(&uccf->uf_regs->upsmr)); in ucc_fast_dump_regs()
36 &uccf->uf_regs->utodr, qe_ioread16be(&uccf->uf_regs->utodr)); in ucc_fast_dump_regs()
38 &uccf->uf_regs->udsr, qe_ioread16be(&uccf->uf_regs->udsr)); in ucc_fast_dump_regs()
40 &uccf->uf_regs->ucce, qe_ioread32be(&uccf->uf_regs->ucce)); in ucc_fast_dump_regs()
42 &uccf->uf_regs->uccm, qe_ioread32be(&uccf->uf_regs->uccm)); in ucc_fast_dump_regs()
44 &uccf->uf_regs->uccs, qe_ioread8(&uccf->uf_regs->uccs)); in ucc_fast_dump_regs()
46 &uccf->uf_regs->urfb, qe_ioread32be(&uccf->uf_regs->urfb)); in ucc_fast_dump_regs()
48 &uccf->uf_regs->urfs, qe_ioread16be(&uccf->uf_regs->urfs)); in ucc_fast_dump_regs()
50 &uccf->uf_regs->urfet, qe_ioread16be(&uccf->uf_regs->urfet)); in ucc_fast_dump_regs()
52 &uccf->uf_regs->urfset, in ucc_fast_dump_regs()
53 qe_ioread16be(&uccf->uf_regs->urfset)); in ucc_fast_dump_regs()
55 &uccf->uf_regs->utfb, qe_ioread32be(&uccf->uf_regs->utfb)); in ucc_fast_dump_regs()
57 &uccf->uf_regs->utfs, qe_ioread16be(&uccf->uf_regs->utfs)); in ucc_fast_dump_regs()
59 &uccf->uf_regs->utfet, qe_ioread16be(&uccf->uf_regs->utfet)); in ucc_fast_dump_regs()
61 &uccf->uf_regs->utftt, qe_ioread16be(&uccf->uf_regs->utftt)); in ucc_fast_dump_regs()
63 &uccf->uf_regs->utpt, qe_ioread16be(&uccf->uf_regs->utpt)); in ucc_fast_dump_regs()
65 &uccf->uf_regs->urtry, qe_ioread32be(&uccf->uf_regs->urtry)); in ucc_fast_dump_regs()
67 &uccf->uf_regs->guemr, qe_ioread8(&uccf->uf_regs->guemr)); in ucc_fast_dump_regs()
87 void ucc_fast_transmit_on_demand(struct ucc_fast_private * uccf) in ucc_fast_transmit_on_demand() argument
89 qe_iowrite16be(UCC_FAST_TOD, &uccf->uf_regs->utodr); in ucc_fast_transmit_on_demand()
93 void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode) in ucc_fast_enable() argument
98 uf_regs = uccf->uf_regs; in ucc_fast_enable()
104 uccf->enabled_tx = 1; in ucc_fast_enable()
108 uccf->enabled_rx = 1; in ucc_fast_enable()
114 void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode) in ucc_fast_disable() argument
119 uf_regs = uccf->uf_regs; in ucc_fast_disable()
125 uccf->enabled_tx = 0; in ucc_fast_disable()
129 uccf->enabled_rx = 0; in ucc_fast_disable()
137 struct ucc_fast_private *uccf; in ucc_fast_init() local
194 uccf = kzalloc(sizeof(struct ucc_fast_private), GFP_KERNEL); in ucc_fast_init()
195 if (!uccf) { in ucc_fast_init()
200 uccf->ucc_fast_tx_virtual_fifo_base_offset = -1; in ucc_fast_init()
201 uccf->ucc_fast_rx_virtual_fifo_base_offset = -1; in ucc_fast_init()
204 uccf->uf_info = uf_info; in ucc_fast_init()
206 uccf->uf_regs = ioremap(uf_info->regs, sizeof(struct ucc_fast)); in ucc_fast_init()
207 if (uccf->uf_regs == NULL) { in ucc_fast_init()
209 kfree(uccf); in ucc_fast_init()
213 uccf->enabled_tx = 0; in ucc_fast_init()
214 uccf->enabled_rx = 0; in ucc_fast_init()
215 uccf->stopped_tx = 0; in ucc_fast_init()
216 uccf->stopped_rx = 0; in ucc_fast_init()
217 uf_regs = uccf->uf_regs; in ucc_fast_init()
218 uccf->p_ucce = &uf_regs->ucce; in ucc_fast_init()
219 uccf->p_uccm = &uf_regs->uccm; in ucc_fast_init()
221 uccf->p_utodr = &uf_regs->utodr; in ucc_fast_init()
224 uccf->tx_frames = 0; in ucc_fast_init()
225 uccf->rx_frames = 0; in ucc_fast_init()
226 uccf->rx_discarded = 0; in ucc_fast_init()
233 ucc_fast_free(uccf); in ucc_fast_init()
237 uccf->mrblr = uf_info->max_rx_buf_length; in ucc_fast_init()
268 uccf->ucc_fast_tx_virtual_fifo_base_offset = in ucc_fast_init()
270 if (uccf->ucc_fast_tx_virtual_fifo_base_offset < 0) { in ucc_fast_init()
273 ucc_fast_free(uccf); in ucc_fast_init()
278 uccf->ucc_fast_rx_virtual_fifo_base_offset = in ucc_fast_init()
282 if (uccf->ucc_fast_rx_virtual_fifo_base_offset < 0) { in ucc_fast_init()
285 ucc_fast_free(uccf); in ucc_fast_init()
297 qe_iowrite32be(uccf->ucc_fast_tx_virtual_fifo_base_offset, in ucc_fast_init()
299 qe_iowrite32be(uccf->ucc_fast_rx_virtual_fifo_base_offset, in ucc_fast_init()
317 ucc_fast_free(uccf); in ucc_fast_init()
326 ucc_fast_free(uccf); in ucc_fast_init()
335 ucc_fast_free(uccf); in ucc_fast_init()
344 ucc_fast_free(uccf); in ucc_fast_init()
353 ucc_fast_free(uccf); in ucc_fast_init()
362 ucc_fast_free(uccf); in ucc_fast_init()
377 *uccf_ret = uccf; in ucc_fast_init()
382 void ucc_fast_free(struct ucc_fast_private * uccf) in ucc_fast_free() argument
384 if (!uccf) in ucc_fast_free()
387 qe_muram_free(uccf->ucc_fast_tx_virtual_fifo_base_offset); in ucc_fast_free()
388 qe_muram_free(uccf->ucc_fast_rx_virtual_fifo_base_offset); in ucc_fast_free()
390 if (uccf->uf_regs) in ucc_fast_free()
391 iounmap(uccf->uf_regs); in ucc_fast_free()
393 kfree(uccf); in ucc_fast_free()