Lines Matching refs:rtx
83 struct serialbuffer __iomem *rtx; in smc_init() local
112 rtx = (struct serialbuffer __iomem *)&cp->cp_dpmem[CPM_SERIAL_BASE]; in smc_init()
119 out_be32(&rtx->rxbd.cbd_bufaddr, (__force uint)&rtx->rxbuf); in smc_init()
120 out_be16(&rtx->rxbd.cbd_sc, 0); in smc_init()
122 out_be32(&rtx->txbd.cbd_bufaddr, (__force uint)&rtx->txbuf); in smc_init()
123 out_be16(&rtx->txbd.cbd_sc, 0); in smc_init()
145 setbits_be16(&rtx->txbd.cbd_sc, BD_SC_WRAP); in smc_init()
146 setbits_be16(&rtx->rxbd.cbd_sc, BD_SC_EMPTY | BD_SC_WRAP); in smc_init()
151 out_be32(&rtx->rxindex, 0); in smc_init()
173 struct serialbuffer __iomem *rtx; in smc_putc() local
178 rtx = (struct serialbuffer __iomem *)&cpmp->cp_dpmem[CPM_SERIAL_BASE]; in smc_putc()
181 out_8(&rtx->txbuf, c); in smc_putc()
182 out_be16(&rtx->txbd.cbd_datlen, 1); in smc_putc()
183 setbits_be16(&rtx->txbd.cbd_sc, BD_SC_READY); in smc_putc()
185 while (in_be16(&rtx->txbd.cbd_sc) & BD_SC_READY) in smc_putc()
199 struct serialbuffer __iomem *rtx; in smc_getc() local
203 rtx = (struct serialbuffer __iomem *)&cpmp->cp_dpmem[CPM_SERIAL_BASE]; in smc_getc()
206 while (in_be16(&rtx->rxbd.cbd_sc) & BD_SC_EMPTY) in smc_getc()
212 rxindex = in_be32(&rtx->rxindex); in smc_getc()
213 c = in_8(rtx->rxbuf + rxindex); in smc_getc()
217 if (rxindex >= in_be16(&rtx->rxbd.cbd_datlen)) { in smc_getc()
219 setbits_be16(&rtx->rxbd.cbd_sc, BD_SC_EMPTY); in smc_getc()
221 out_be32(&rtx->rxindex, rxindex); in smc_getc()
229 struct serialbuffer __iomem *rtx; in smc_tstc() local
231 rtx = (struct serialbuffer __iomem *)&cpmp->cp_dpmem[CPM_SERIAL_BASE]; in smc_tstc()
233 return !(in_be16(&rtx->rxbd.cbd_sc) & BD_SC_EMPTY); in smc_tstc()