Lines Matching refs:tccb

51  * tcw_get_tccb - return pointer to tccb associated with tcw
54 * Return pointer to the tccb associated with this tcw.
56 struct tccb *tcw_get_tccb(struct tcw *tcw)
58 return phys_to_virt(tcw->tccb);
95 static inline size_t tca_size(struct tccb *tccb)
97 return tccb->tcah.tcal - 12;
100 static u32 calc_dcw_count(struct tccb *tccb)
107 size = tca_size(tccb);
109 dcw = (struct dcw *) &tccb->tca[offset];
148 * tcat the tccb and terminate the data tidaw list if used.
151 * in contiguous storage (no ttic). The tcal field in the tccb must be
157 struct tccb *tccb;
165 /* Add tcat to tccb. */
166 tccb = tcw_get_tccb(tcw);
167 tcat = (struct tccb_tcat *) &tccb->tca[tca_size(tccb)];
170 count = calc_dcw_count(tccb);
179 tcw->tccbl = (sizeof(struct tccb) + tca_size(tccb) +
223 * tcw_set_tccb - set tccb address of a tcw
225 * @tccb: the tccb address
227 * Set the address of the tccb in the specified tcw.
229 void tcw_set_tccb(struct tcw *tcw, struct tccb *tccb)
231 tcw->tccb = virt_to_phys(tccb);
249 * tccb_init - initialize tccb
250 * @tccb: the tccb address
251 * @size: the maximum size of the tccb
254 * Initialize the header of the specified tccb by resetting all values to zero
257 void tccb_init(struct tccb *tccb, size_t size, u32 sac)
259 memset(tccb, 0, size);
260 tccb->tcah.format = TCCB_FORMAT_DEFAULT;
261 tccb->tcah.sac = sac;
262 tccb->tcah.tcal = 12;
279 * tccb_add_dcw - add a dcw to the tccb
280 * @tccb: the tccb address
281 * @tccb_size: the maximum tccb size
288 * Add a new dcw to the specified tccb by writing the dcw information specified
289 * by @cmd, @flags, @cd, @cd_count and @count to the tca of the tccb. Return
293 * Note: the tcal field of the tccb header will be updates to reflect added
296 struct dcw *tccb_add_dcw(struct tccb *tccb, size_t tccb_size, u8 cmd, u8 flags,
304 tca_offset = tca_size(tccb);
310 dcw = (struct dcw *) &tccb->tca[tca_offset];
318 tccb->tcah.tcal += size;