Lines Matching refs:tcw
24 struct tcw *tcw_get_intrg(struct tcw *tcw) in tcw_get_intrg() argument
26 return (struct tcw *) ((addr_t) tcw->intrg); in tcw_get_intrg()
38 void *tcw_get_data(struct tcw *tcw) in tcw_get_data() argument
40 if (tcw->r) in tcw_get_data()
41 return (void *) ((addr_t) tcw->input); in tcw_get_data()
42 if (tcw->w) in tcw_get_data()
43 return (void *) ((addr_t) tcw->output); in tcw_get_data()
54 struct tccb *tcw_get_tccb(struct tcw *tcw) in tcw_get_tccb() argument
56 return (struct tccb *) ((addr_t) tcw->tccb); in tcw_get_tccb()
66 struct tsb *tcw_get_tsb(struct tcw *tcw) in tcw_get_tsb() argument
68 return (struct tsb *) ((addr_t) tcw->tsb); in tcw_get_tsb()
81 void tcw_init(struct tcw *tcw, int r, int w) in tcw_init() argument
83 memset(tcw, 0, sizeof(struct tcw)); in tcw_init()
84 tcw->format = TCW_FORMAT_DEFAULT; in tcw_init()
85 tcw->flags = TCW_FLAGS_TIDAW_FORMAT(TCW_TIDAW_FORMAT_DEFAULT); in tcw_init()
87 tcw->r = 1; in tcw_init()
89 tcw->w = 1; in tcw_init()
152 void tcw_finalize(struct tcw *tcw, int num_tidaws) in tcw_finalize() argument
160 tidaw = tcw_get_data(tcw); in tcw_finalize()
164 tccb = tcw_get_tccb(tcw); in tcw_finalize()
169 if (tcw->w && (tcw->flags & TCW_FLAGS_OUTPUT_TIDA)) in tcw_finalize()
171 if (tcw->r) in tcw_finalize()
172 tcw->input_count = count; in tcw_finalize()
173 else if (tcw->w) in tcw_finalize()
174 tcw->output_count = count; in tcw_finalize()
177 tcw->tccbl = (sizeof(struct tccb) + tca_size(tccb) + in tcw_finalize()
189 void tcw_set_intrg(struct tcw *tcw, struct tcw *intrg_tcw) in tcw_set_intrg() argument
191 tcw->intrg = (u32) ((addr_t) intrg_tcw); in tcw_set_intrg()
206 void tcw_set_data(struct tcw *tcw, void *data, int use_tidal) in tcw_set_data() argument
208 if (tcw->r) { in tcw_set_data()
209 tcw->input = (u64) ((addr_t) data); in tcw_set_data()
211 tcw->flags |= TCW_FLAGS_INPUT_TIDA; in tcw_set_data()
212 } else if (tcw->w) { in tcw_set_data()
213 tcw->output = (u64) ((addr_t) data); in tcw_set_data()
215 tcw->flags |= TCW_FLAGS_OUTPUT_TIDA; in tcw_set_data()
227 void tcw_set_tccb(struct tcw *tcw, struct tccb *tccb) in tcw_set_tccb() argument
229 tcw->tccb = (u64) ((addr_t) tccb); in tcw_set_tccb()
240 void tcw_set_tsb(struct tcw *tcw, struct tsb *tsb) in tcw_set_tsb() argument
242 tcw->tsb = (u64) ((addr_t) tsb); in tcw_set_tsb()
337 struct tidaw *tcw_add_tidaw(struct tcw *tcw, int num_tidaws, u8 flags, in tcw_add_tidaw() argument
343 tidaw = ((struct tidaw *) tcw_get_data(tcw)) + num_tidaws; in tcw_add_tidaw()