Lines Matching refs:softc
139 jtag_t *softc;
147 softc = (jtag_t *) KMALLOC(sizeof(jtag_t),0);
148 if (softc) {
149 softc->jtag_input = probe_a + JTAG_CONS_INPUT;
150 softc->jtag_output = probe_a + JTAG_CONS_OUTPUT;
151 softc->jtag_control = probe_a + JTAG_CONS_CONTROL;
152 softc->waiting_input = 0;
154 cfe_attach(drv,softc,NULL,descr);
173 jtag_t *softc = ctx->dev_softc;
180 magic = SBREADCSR(softc->jtag_control);
191 * jtag_grab_dword(softc)
197 * softc - jtag structure
199 static void jtag_grab_dword(jtag_t *softc)
203 inbuf = SBREADCSR(softc->jtag_input);
204 softc->waiting_input = jtag_input_len(inbuf);
205 softc->input_buf = inbuf << 8;
222 jtag_t *softc = ctx->dev_softc;
231 if (softc->waiting_input == 0) {
232 jtag_grab_dword(softc);
235 while ((blen > 0) && (softc->waiting_input)) {
236 int bytes = blen > softc->waiting_input ? softc->waiting_input : blen;
241 b = (softc->input_buf >> 56) & 0xFF;
244 softc->input_buf <<= 8;
247 softc->waiting_input -= bytes;
250 if (softc->waiting_input == 0) {
252 jtag_grab_dword(softc);
276 jtag_t *softc = ctx->dev_softc;
278 if (softc->waiting_input == 0) {
279 jtag_grab_dword(softc);
282 inpstat->inp_status = softc->waiting_input ? 1 : 0;
301 jtag_t *softc = ctx->dev_softc;
323 SBWRITECSR(softc->jtag_output, data);