Lines Matching refs:can_write
326 int can_write; in s3c_hsotg_write_fifo() local
365 can_write = hs_ep->fifo_load - size_done; in s3c_hsotg_write_fifo()
367 __func__, can_write); in s3c_hsotg_write_fifo()
369 can_write = hs_ep->fifo_size - can_write; in s3c_hsotg_write_fifo()
371 __func__, can_write); in s3c_hsotg_write_fifo()
373 if (can_write <= 0) { in s3c_hsotg_write_fifo()
378 can_write = readl(hsotg->regs + DTXFSTS(hs_ep->index)); in s3c_hsotg_write_fifo()
380 can_write &= 0xffff; in s3c_hsotg_write_fifo()
381 can_write *= 4; in s3c_hsotg_write_fifo()
392 can_write = GNPTXSTS_NP_TXF_SPC_AVAIL_GET(gnptxsts); in s3c_hsotg_write_fifo()
393 can_write *= 4; /* fifo size is in 32bit quantities. */ in s3c_hsotg_write_fifo()
399 __func__, gnptxsts, can_write, to_write, max_transfer); in s3c_hsotg_write_fifo()
406 if (can_write > 512 && !periodic) in s3c_hsotg_write_fifo()
407 can_write = 512; in s3c_hsotg_write_fifo()
426 if (to_write > can_write) { in s3c_hsotg_write_fifo()
427 to_write = can_write; in s3c_hsotg_write_fifo()
454 to_write, hs_req->req.length, can_write, buf_pos); in s3c_hsotg_write_fifo()
470 return (to_write >= can_write) ? -ENOSPC : 0; in s3c_hsotg_write_fifo()