td                357 arch/mips/net/ebpf_jit.c 	enum reg_val_type td;
td                362 arch/mips/net/ebpf_jit.c 		td = get_reg_val_type(ctx, prog->len, BPF_REG_0);
td                363 arch/mips/net/ebpf_jit.c 		if (td == REG_64BIT)
td                662 arch/mips/net/ebpf_jit.c 	int src, dst, r, td, ts, mem_off, b_off;
td                724 arch/mips/net/ebpf_jit.c 		td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
td                725 arch/mips/net/ebpf_jit.c 		if (td == REG_64BIT) {
td                743 arch/mips/net/ebpf_jit.c 		td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
td                744 arch/mips/net/ebpf_jit.c 		if (td == REG_64BIT) {
td                757 arch/mips/net/ebpf_jit.c 		td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
td                758 arch/mips/net/ebpf_jit.c 		if (td == REG_64BIT)
td                922 arch/mips/net/ebpf_jit.c 		td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
td                923 arch/mips/net/ebpf_jit.c 		if (td == REG_64BIT) {
td               1029 arch/mips/net/ebpf_jit.c 		td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
td               1031 arch/mips/net/ebpf_jit.c 		if (td == REG_32BIT && ts != REG_32BIT) {
td               1034 arch/mips/net/ebpf_jit.c 		} else if (ts == REG_32BIT && td != REG_32BIT) {
td               1327 arch/mips/net/ebpf_jit.c 		td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
td               1328 arch/mips/net/ebpf_jit.c 		if (insn->imm == 64 && td == REG_32BIT)
td               1331 arch/mips/net/ebpf_jit.c 		if (insn->imm != 64 && td == REG_64BIT) {
td                 69 arch/um/drivers/vector_transports.c 	struct uml_l2tpv3_data *td = vp->transport_data;
td                 72 arch/um/drivers/vector_transports.c 	if (td->udp)
td                 74 arch/um/drivers/vector_transports.c 	(*(uint32_t *) (header + td->session_offset)) = td->tx_session;
td                 76 arch/um/drivers/vector_transports.c 	if (td->cookie) {
td                 77 arch/um/drivers/vector_transports.c 		if (td->cookie_is_64)
td                 78 arch/um/drivers/vector_transports.c 			(*(uint64_t *)(header + td->cookie_offset)) =
td                 79 arch/um/drivers/vector_transports.c 				td->tx_cookie;
td                 81 arch/um/drivers/vector_transports.c 			(*(uint32_t *)(header + td->cookie_offset)) =
td                 82 arch/um/drivers/vector_transports.c 				td->tx_cookie;
td                 84 arch/um/drivers/vector_transports.c 	if (td->has_counter) {
td                 85 arch/um/drivers/vector_transports.c 		counter = (uint32_t *)(header + td->counter_offset);
td                 86 arch/um/drivers/vector_transports.c 		if (td->pin_counter) {
td                 89 arch/um/drivers/vector_transports.c 			td->counter++;
td                 90 arch/um/drivers/vector_transports.c 			*counter = cpu_to_be32(td->counter);
td                 99 arch/um/drivers/vector_transports.c 	struct uml_gre_data *td = vp->transport_data;
td                101 arch/um/drivers/vector_transports.c 	*((uint32_t *) header) = *((uint32_t *) &td->expected_header);
td                102 arch/um/drivers/vector_transports.c 	if (td->key)
td                103 arch/um/drivers/vector_transports.c 		(*(uint32_t *) (header + td->key_offset)) = td->tx_key;
td                104 arch/um/drivers/vector_transports.c 	if (td->has_sequence) {
td                105 arch/um/drivers/vector_transports.c 		sequence = (uint32_t *)(header + td->sequence_offset);
td                106 arch/um/drivers/vector_transports.c 		if (td->pin_sequence)
td                109 arch/um/drivers/vector_transports.c 			*sequence = cpu_to_be32(++td->sequence);
td                133 arch/um/drivers/vector_transports.c 	struct uml_l2tpv3_data *td = vp->transport_data;
td                137 arch/um/drivers/vector_transports.c 	if ((!td->udp) && (!td->ipv6))
td                145 arch/um/drivers/vector_transports.c 	if (td->cookie) {
td                146 arch/um/drivers/vector_transports.c 		if (td->cookie_is_64)
td                147 arch/um/drivers/vector_transports.c 			cookie = *(uint64_t *)(header + td->cookie_offset);
td                149 arch/um/drivers/vector_transports.c 			cookie = *(uint32_t *)(header + td->cookie_offset);
td                150 arch/um/drivers/vector_transports.c 		if (cookie != td->rx_cookie) {
td                156 arch/um/drivers/vector_transports.c 	session = (uint32_t *) (header + td->session_offset);
td                157 arch/um/drivers/vector_transports.c 	if (*session != td->rx_session) {
td                170 arch/um/drivers/vector_transports.c 	struct uml_gre_data *td = vp->transport_data;
td                172 arch/um/drivers/vector_transports.c 	if (!td->ipv6)
td                175 arch/um/drivers/vector_transports.c 	if (*((uint32_t *) header) != *((uint32_t *) &td->expected_header)) {
td                178 arch/um/drivers/vector_transports.c 				*((uint32_t *) &td->expected_header),
td                184 arch/um/drivers/vector_transports.c 	if (td->key) {
td                185 arch/um/drivers/vector_transports.c 		key = (*(uint32_t *)(header + td->key_offset));
td                186 arch/um/drivers/vector_transports.c 		if (key != td->rx_key) {
td                189 arch/um/drivers/vector_transports.c 						key, td->rx_key);
td                243 arch/um/drivers/vector_transports.c 	struct uml_gre_data *td;
td                251 arch/um/drivers/vector_transports.c 	td = vp->transport_data;
td                252 arch/um/drivers/vector_transports.c 	td->sequence = 0;
td                254 arch/um/drivers/vector_transports.c 	td->expected_header.arptype = GRE_IRB;
td                255 arch/um/drivers/vector_transports.c 	td->expected_header.header = 0;
td                260 arch/um/drivers/vector_transports.c 	td->key_offset = 4;
td                261 arch/um/drivers/vector_transports.c 	td->sequence_offset = 4;
td                262 arch/um/drivers/vector_transports.c 	td->checksum_offset = 4;
td                264 arch/um/drivers/vector_transports.c 	td->ipv6 = false;
td                267 arch/um/drivers/vector_transports.c 			td->ipv6 = true;
td                269 arch/um/drivers/vector_transports.c 	td->key = false;
td                272 arch/um/drivers/vector_transports.c 			td->key = true;
td                273 arch/um/drivers/vector_transports.c 			td->expected_header.header |= GRE_MODE_KEY;
td                274 arch/um/drivers/vector_transports.c 			td->rx_key = cpu_to_be32(temp_rx);
td                275 arch/um/drivers/vector_transports.c 			td->tx_key = cpu_to_be32(temp_tx);
td                277 arch/um/drivers/vector_transports.c 			td->sequence_offset += 4;
td                283 arch/um/drivers/vector_transports.c 	td->sequence = false;
td                287 arch/um/drivers/vector_transports.c 			td->has_sequence = true;
td                288 arch/um/drivers/vector_transports.c 			td->expected_header.header |= GRE_MODE_SEQUENCE;
td                292 arch/um/drivers/vector_transports.c 					td->pin_sequence = true;
td                297 arch/um/drivers/vector_transports.c 	if (!td->ipv6)
td                305 arch/um/drivers/vector_transports.c 	struct uml_l2tpv3_data *td;
td                316 arch/um/drivers/vector_transports.c 	td = vp->transport_data;
td                320 arch/um/drivers/vector_transports.c 	td->counter = 0;
td                323 arch/um/drivers/vector_transports.c 	td->session_offset = 0;
td                324 arch/um/drivers/vector_transports.c 	td->cookie_offset = 4;
td                325 arch/um/drivers/vector_transports.c 	td->counter_offset = 4;
td                328 arch/um/drivers/vector_transports.c 	td->ipv6 = false;
td                331 arch/um/drivers/vector_transports.c 			td->ipv6 = true;
td                336 arch/um/drivers/vector_transports.c 			td->tx_session = cpu_to_be32(temp_txs);
td                337 arch/um/drivers/vector_transports.c 			td->rx_session = cpu_to_be32(temp_rxs);
td                345 arch/um/drivers/vector_transports.c 	td->cookie_is_64  = false;
td                348 arch/um/drivers/vector_transports.c 			td->cookie_is_64  = true;
td                350 arch/um/drivers/vector_transports.c 	td->cookie = false;
td                353 arch/um/drivers/vector_transports.c 			td->cookie = true;
td                354 arch/um/drivers/vector_transports.c 			if (td->cookie_is_64) {
td                355 arch/um/drivers/vector_transports.c 				td->rx_cookie = cpu_to_be64(temp_rx);
td                356 arch/um/drivers/vector_transports.c 				td->tx_cookie = cpu_to_be64(temp_tx);
td                358 arch/um/drivers/vector_transports.c 				td->counter_offset += 8;
td                360 arch/um/drivers/vector_transports.c 				td->rx_cookie = cpu_to_be32(temp_rx);
td                361 arch/um/drivers/vector_transports.c 				td->tx_cookie = cpu_to_be32(temp_tx);
td                363 arch/um/drivers/vector_transports.c 				td->counter_offset += 4;
td                370 arch/um/drivers/vector_transports.c 	td->has_counter = false;
td                373 arch/um/drivers/vector_transports.c 			td->has_counter = true;
td                378 arch/um/drivers/vector_transports.c 					td->pin_counter = true;
td                385 arch/um/drivers/vector_transports.c 			td->udp = true;
td                387 arch/um/drivers/vector_transports.c 			td->counter_offset += 4;
td                388 arch/um/drivers/vector_transports.c 			td->session_offset += 4;
td                389 arch/um/drivers/vector_transports.c 			td->cookie_offset += 4;
td                394 arch/um/drivers/vector_transports.c 	if ((!td->ipv6) && (!td->udp))
td                114 block/blk-throttle.c 	struct throtl_data *td;
td                269 block/blk-throttle.c 		return tg->td;
td                282 block/blk-throttle.c static uint64_t throtl_adjusted_limit(uint64_t low, struct throtl_data *td)
td                285 block/blk-throttle.c 	if (td->scale < 4096 && time_after_eq(jiffies,
td                286 block/blk-throttle.c 	    td->low_upgrade_time + td->scale * td->throtl_slice))
td                287 block/blk-throttle.c 		td->scale = (jiffies - td->low_upgrade_time) / td->throtl_slice;
td                289 block/blk-throttle.c 	return low + (low >> 1) * td->scale;
td                295 block/blk-throttle.c 	struct throtl_data *td;
td                301 block/blk-throttle.c 	td = tg->td;
td                302 block/blk-throttle.c 	ret = tg->bps[rw][td->limit_index];
td                303 block/blk-throttle.c 	if (ret == 0 && td->limit_index == LIMIT_LOW) {
td                306 block/blk-throttle.c 		    tg->iops[rw][td->limit_index])
td                312 block/blk-throttle.c 	if (td->limit_index == LIMIT_MAX && tg->bps[rw][LIMIT_LOW] &&
td                316 block/blk-throttle.c 		adjusted = throtl_adjusted_limit(tg->bps[rw][LIMIT_LOW], td);
td                325 block/blk-throttle.c 	struct throtl_data *td;
td                331 block/blk-throttle.c 	td = tg->td;
td                332 block/blk-throttle.c 	ret = tg->iops[rw][td->limit_index];
td                333 block/blk-throttle.c 	if (ret == 0 && tg->td->limit_index == LIMIT_LOW) {
td                336 block/blk-throttle.c 		    tg->bps[rw][td->limit_index])
td                342 block/blk-throttle.c 	if (td->limit_index == LIMIT_MAX && tg->iops[rw][LIMIT_LOW] &&
td                346 block/blk-throttle.c 		adjusted = throtl_adjusted_limit(tg->iops[rw][LIMIT_LOW], td);
td                522 block/blk-throttle.c 	struct throtl_data *td = blkg->q->td;
td                538 block/blk-throttle.c 	sq->parent_sq = &td->service_queue;
td                541 block/blk-throttle.c 	tg->td = td;
td                552 block/blk-throttle.c 	struct throtl_data *td = tg->td;
td                557 block/blk-throttle.c 			(td->limit_valid[td->limit_index] &&
td                572 block/blk-throttle.c static void blk_throtl_update_limit_valid(struct throtl_data *td)
td                579 block/blk-throttle.c 	blkg_for_each_descendant_post(blkg, pos_css, td->queue->root_blkg) {
td                590 block/blk-throttle.c 	td->limit_valid[LIMIT_LOW] = low_valid;
td                593 block/blk-throttle.c static void throtl_upgrade_state(struct throtl_data *td);
td                603 block/blk-throttle.c 	blk_throtl_update_limit_valid(tg->td);
td                605 block/blk-throttle.c 	if (!tg->td->limit_valid[tg->td->limit_index])
td                606 block/blk-throttle.c 		throtl_upgrade_state(tg->td);
td                774 block/blk-throttle.c 	tg->slice_end[rw] = jiffies + tg->td->throtl_slice;
td                786 block/blk-throttle.c 	tg->slice_end[rw] = jiffies + tg->td->throtl_slice;
td                796 block/blk-throttle.c 	tg->slice_end[rw] = roundup(jiffy_end, tg->td->throtl_slice);
td                802 block/blk-throttle.c 	tg->slice_end[rw] = roundup(jiffy_end, tg->td->throtl_slice);
td                842 block/blk-throttle.c 	throtl_set_slice_end(tg, rw, jiffies + tg->td->throtl_slice);
td                846 block/blk-throttle.c 	nr_slices = time_elapsed / tg->td->throtl_slice;
td                850 block/blk-throttle.c 	tmp = tg_bps_limit(tg, rw) * tg->td->throtl_slice * nr_slices;
td                854 block/blk-throttle.c 	io_trim = (tg_iops_limit(tg, rw) * tg->td->throtl_slice * nr_slices) /
td                870 block/blk-throttle.c 	tg->slice_start[rw] += nr_slices * tg->td->throtl_slice;
td                889 block/blk-throttle.c 	jiffy_elapsed_rnd = roundup(jiffy_elapsed + 1, tg->td->throtl_slice);
td                932 block/blk-throttle.c 		jiffy_elapsed_rnd = tg->td->throtl_slice;
td                934 block/blk-throttle.c 	jiffy_elapsed_rnd = roundup(jiffy_elapsed_rnd, tg->td->throtl_slice);
td               1001 block/blk-throttle.c 		    jiffies + tg->td->throtl_slice))
td               1003 block/blk-throttle.c 				jiffies + tg->td->throtl_slice);
td               1146 block/blk-throttle.c 		BUG_ON(tg->td->nr_queued[rw] <= 0);
td               1147 block/blk-throttle.c 		tg->td->nr_queued[rw]--;
td               1218 block/blk-throttle.c static bool throtl_can_upgrade(struct throtl_data *td,
td               1239 block/blk-throttle.c 	struct throtl_data *td = sq_to_td(sq);
td               1240 block/blk-throttle.c 	struct request_queue *q = td->queue;
td               1246 block/blk-throttle.c 	if (throtl_can_upgrade(td, NULL))
td               1247 block/blk-throttle.c 		throtl_upgrade_state(td);
td               1289 block/blk-throttle.c 		queue_work(kthrotld_workqueue, &td->dispatch_work);
td               1305 block/blk-throttle.c 	struct throtl_data *td = container_of(work, struct throtl_data,
td               1307 block/blk-throttle.c 	struct throtl_service_queue *td_sq = &td->service_queue;
td               1308 block/blk-throttle.c 	struct request_queue *q = td->queue;
td               1385 block/blk-throttle.c 			global ? tg->td->queue->root_blkg : tg_to_blkg(tg)) {
td               1687 block/blk-throttle.c 	blk_throtl_update_limit_valid(tg->td);
td               1688 block/blk-throttle.c 	if (tg->td->limit_valid[LIMIT_LOW]) {
td               1690 block/blk-throttle.c 			tg->td->limit_index = LIMIT_LOW;
td               1692 block/blk-throttle.c 		tg->td->limit_index = LIMIT_MAX;
td               1694 block/blk-throttle.c 		tg->td->limit_valid[LIMIT_LOW]);
td               1723 block/blk-throttle.c 	struct throtl_data *td = q->td;
td               1725 block/blk-throttle.c 	cancel_work_sync(&td->dispatch_work);
td               1800 block/blk-throttle.c 		tg->bio_cnt, ret, tg->td->scale);
td               1825 block/blk-throttle.c 		tg_last_low_overflow_time(tg) + tg->td->throtl_slice) &&
td               1843 block/blk-throttle.c static bool throtl_can_upgrade(struct throtl_data *td,
td               1849 block/blk-throttle.c 	if (td->limit_index != LIMIT_LOW)
td               1852 block/blk-throttle.c 	if (time_before(jiffies, td->low_downgrade_time + td->throtl_slice))
td               1856 block/blk-throttle.c 	blkg_for_each_descendant_post(blkg, pos_css, td->queue->root_blkg) {
td               1876 block/blk-throttle.c 	if (tg->td->limit_index != LIMIT_LOW)
td               1879 block/blk-throttle.c 	if (time_after(tg->last_check_time + tg->td->throtl_slice, now))
td               1885 block/blk-throttle.c 	     __tg_last_low_overflow_time(tg) + tg->td->throtl_slice))
td               1888 block/blk-throttle.c 	if (throtl_can_upgrade(tg->td, NULL))
td               1889 block/blk-throttle.c 		throtl_upgrade_state(tg->td);
td               1892 block/blk-throttle.c static void throtl_upgrade_state(struct throtl_data *td)
td               1897 block/blk-throttle.c 	throtl_log(&td->service_queue, "upgrade to max");
td               1898 block/blk-throttle.c 	td->limit_index = LIMIT_MAX;
td               1899 block/blk-throttle.c 	td->low_upgrade_time = jiffies;
td               1900 block/blk-throttle.c 	td->scale = 0;
td               1902 block/blk-throttle.c 	blkg_for_each_descendant_post(blkg, pos_css, td->queue->root_blkg) {
td               1911 block/blk-throttle.c 	throtl_select_dispatch(&td->service_queue);
td               1912 block/blk-throttle.c 	throtl_schedule_next_dispatch(&td->service_queue, true);
td               1913 block/blk-throttle.c 	queue_work(kthrotld_workqueue, &td->dispatch_work);
td               1916 block/blk-throttle.c static void throtl_downgrade_state(struct throtl_data *td, int new)
td               1918 block/blk-throttle.c 	td->scale /= 2;
td               1920 block/blk-throttle.c 	throtl_log(&td->service_queue, "downgrade, scale %d", td->scale);
td               1921 block/blk-throttle.c 	if (td->scale) {
td               1922 block/blk-throttle.c 		td->low_upgrade_time = jiffies - td->scale * td->throtl_slice;
td               1926 block/blk-throttle.c 	td->limit_index = new;
td               1927 block/blk-throttle.c 	td->low_downgrade_time = jiffies;
td               1932 block/blk-throttle.c 	struct throtl_data *td = tg->td;
td               1939 block/blk-throttle.c 	if (time_after_eq(now, td->low_upgrade_time + td->throtl_slice) &&
td               1941 block/blk-throttle.c 					td->throtl_slice) &&
td               1967 block/blk-throttle.c 	if (tg->td->limit_index != LIMIT_MAX ||
td               1968 block/blk-throttle.c 	    !tg->td->limit_valid[LIMIT_LOW])
td               1972 block/blk-throttle.c 	if (time_after(tg->last_check_time + tg->td->throtl_slice, now))
td               1979 block/blk-throttle.c 			tg->td->throtl_slice))
td               2013 block/blk-throttle.c 		throtl_downgrade_state(tg->td, LIMIT_LOW);
td               2035 block/blk-throttle.c static void throtl_update_latency_buckets(struct throtl_data *td)
td               2042 block/blk-throttle.c 	if (!blk_queue_nonrot(td->queue))
td               2044 block/blk-throttle.c 	if (time_before(jiffies, td->last_calculate_time + HZ))
td               2046 block/blk-throttle.c 	td->last_calculate_time = jiffies;
td               2051 block/blk-throttle.c 			struct latency_bucket *tmp = &td->tmp_buckets[rw][i];
td               2057 block/blk-throttle.c 				bucket = per_cpu_ptr(td->latency_buckets[rw],
td               2083 block/blk-throttle.c 				if (td->avg_buckets[rw][i].latency < last_latency[rw])
td               2084 block/blk-throttle.c 					td->avg_buckets[rw][i].latency =
td               2089 block/blk-throttle.c 			if (!td->avg_buckets[rw][i].valid)
td               2092 block/blk-throttle.c 				latency[rw] = (td->avg_buckets[rw][i].latency * 7 +
td               2095 block/blk-throttle.c 			td->avg_buckets[rw][i].latency = max(latency[rw],
td               2097 block/blk-throttle.c 			td->avg_buckets[rw][i].valid = true;
td               2098 block/blk-throttle.c 			last_latency[rw] = td->avg_buckets[rw][i].latency;
td               2103 block/blk-throttle.c 		throtl_log(&td->service_queue,
td               2106 block/blk-throttle.c 			td->avg_buckets[READ][i].latency,
td               2107 block/blk-throttle.c 			td->avg_buckets[READ][i].valid,
td               2108 block/blk-throttle.c 			td->avg_buckets[WRITE][i].latency,
td               2109 block/blk-throttle.c 			td->avg_buckets[WRITE][i].valid);
td               2112 block/blk-throttle.c static inline void throtl_update_latency_buckets(struct throtl_data *td)
td               2125 block/blk-throttle.c 	struct throtl_data *td = tg->td;
td               2135 block/blk-throttle.c 	throtl_update_latency_buckets(td);
td               2154 block/blk-throttle.c 			if (throtl_can_upgrade(td, tg)) {
td               2155 block/blk-throttle.c 				throtl_upgrade_state(td);
td               2199 block/blk-throttle.c 	td->nr_queued[rw]++;
td               2220 block/blk-throttle.c 	if (throttled || !td->track_bio_latency)
td               2227 block/blk-throttle.c static void throtl_track_latency(struct throtl_data *td, sector_t size,
td               2233 block/blk-throttle.c 	if (!td || td->limit_index != LIMIT_LOW ||
td               2235 block/blk-throttle.c 	    !blk_queue_nonrot(td->queue))
td               2240 block/blk-throttle.c 	latency = get_cpu_ptr(td->latency_buckets[op]);
td               2243 block/blk-throttle.c 	put_cpu_ptr(td->latency_buckets[op]);
td               2249 block/blk-throttle.c 	struct throtl_data *td = q->td;
td               2251 block/blk-throttle.c 	throtl_track_latency(td, blk_rq_stats_sectors(rq), req_op(rq),
td               2281 block/blk-throttle.c 		throtl_track_latency(tg->td, bio_issue_size(&bio->bi_issue),
td               2284 block/blk-throttle.c 	if (tg->latency_target && lat >= tg->td->filtered_latency) {
td               2289 block/blk-throttle.c 		threshold = tg->td->avg_buckets[rw][bucket].latency +
td               2301 block/blk-throttle.c 		tg->bio_cnt_reset_time = tg->td->throtl_slice + jiffies;
td               2339 block/blk-throttle.c 	struct throtl_data *td = q->td;
td               2353 block/blk-throttle.c 	blkg_for_each_descendant_post(blkg, pos_css, td->queue->root_blkg)
td               2357 block/blk-throttle.c 	tg_drain_bios(&td->service_queue);
td               2364 block/blk-throttle.c 		while ((bio = throtl_pop_queued(&td->service_queue.queued[rw],
td               2373 block/blk-throttle.c 	struct throtl_data *td;
td               2376 block/blk-throttle.c 	td = kzalloc_node(sizeof(*td), GFP_KERNEL, q->node);
td               2377 block/blk-throttle.c 	if (!td)
td               2379 block/blk-throttle.c 	td->latency_buckets[READ] = __alloc_percpu(sizeof(struct latency_bucket) *
td               2381 block/blk-throttle.c 	if (!td->latency_buckets[READ]) {
td               2382 block/blk-throttle.c 		kfree(td);
td               2385 block/blk-throttle.c 	td->latency_buckets[WRITE] = __alloc_percpu(sizeof(struct latency_bucket) *
td               2387 block/blk-throttle.c 	if (!td->latency_buckets[WRITE]) {
td               2388 block/blk-throttle.c 		free_percpu(td->latency_buckets[READ]);
td               2389 block/blk-throttle.c 		kfree(td);
td               2393 block/blk-throttle.c 	INIT_WORK(&td->dispatch_work, blk_throtl_dispatch_work_fn);
td               2394 block/blk-throttle.c 	throtl_service_queue_init(&td->service_queue);
td               2396 block/blk-throttle.c 	q->td = td;
td               2397 block/blk-throttle.c 	td->queue = q;
td               2399 block/blk-throttle.c 	td->limit_valid[LIMIT_MAX] = true;
td               2400 block/blk-throttle.c 	td->limit_index = LIMIT_MAX;
td               2401 block/blk-throttle.c 	td->low_upgrade_time = jiffies;
td               2402 block/blk-throttle.c 	td->low_downgrade_time = jiffies;
td               2407 block/blk-throttle.c 		free_percpu(td->latency_buckets[READ]);
td               2408 block/blk-throttle.c 		free_percpu(td->latency_buckets[WRITE]);
td               2409 block/blk-throttle.c 		kfree(td);
td               2416 block/blk-throttle.c 	BUG_ON(!q->td);
td               2419 block/blk-throttle.c 	free_percpu(q->td->latency_buckets[READ]);
td               2420 block/blk-throttle.c 	free_percpu(q->td->latency_buckets[WRITE]);
td               2421 block/blk-throttle.c 	kfree(q->td);
td               2426 block/blk-throttle.c 	struct throtl_data *td;
td               2429 block/blk-throttle.c 	td = q->td;
td               2430 block/blk-throttle.c 	BUG_ON(!td);
td               2433 block/blk-throttle.c 		td->throtl_slice = DFL_THROTL_SLICE_SSD;
td               2434 block/blk-throttle.c 		td->filtered_latency = LATENCY_FILTERED_SSD;
td               2436 block/blk-throttle.c 		td->throtl_slice = DFL_THROTL_SLICE_HD;
td               2437 block/blk-throttle.c 		td->filtered_latency = LATENCY_FILTERED_HD;
td               2439 block/blk-throttle.c 			td->avg_buckets[READ][i].latency = DFL_HD_BASELINE_LATENCY;
td               2440 block/blk-throttle.c 			td->avg_buckets[WRITE][i].latency = DFL_HD_BASELINE_LATENCY;
td               2445 block/blk-throttle.c 	td->throtl_slice = DFL_THROTL_SLICE_HD;
td               2448 block/blk-throttle.c 	td->track_bio_latency = !queue_is_mq(q);
td               2449 block/blk-throttle.c 	if (!td->track_bio_latency)
td               2456 block/blk-throttle.c 	if (!q->td)
td               2458 block/blk-throttle.c 	return sprintf(page, "%u\n", jiffies_to_msecs(q->td->throtl_slice));
td               2467 block/blk-throttle.c 	if (!q->td)
td               2474 block/blk-throttle.c 	q->td->throtl_slice = t;
td                109 drivers/ata/pata_bk3710.c 	u8 td, tkw, t0;
td                116 drivers/ata/pata_bk3710.c 	td = DIV_ROUND_UP(t->active, ideclk_period);
td                117 drivers/ata/pata_bk3710.c 	tkw = t0 - td - 1;
td                118 drivers/ata/pata_bk3710.c 	td--;
td                121 drivers/ata/pata_bk3710.c 	val32 |= td << (dev ? 8 : 0);
td                 82 drivers/ata/pata_mpc52xx.c 	u8 td;
td                 91 drivers/ata/pata_mpc52xx.c 	{ .t0M = 32, .td = 15, .th = 2, .tj = 2, .tkw = 15, .tm = 4, .tn = 1 },
td                 92 drivers/ata/pata_mpc52xx.c 	{ .t0M = 10, .td = 6,  .th = 1, .tj = 1, .tkw = 4,  .tm = 2, .tn = 1 },
td                 93 drivers/ata/pata_mpc52xx.c 	{ .t0M = 8,  .td = 5,  .th = 1, .tj = 1, .tkw = 2,  .tm = 2, .tn = 1 },
td                 97 drivers/ata/pata_mpc52xx.c 	{ .t0M = 64, .td = 29, .th = 3, .tj = 3, .tkw = 29, .tm = 7, .tn = 2 },
td                 98 drivers/ata/pata_mpc52xx.c 	{ .t0M = 20, .td = 11, .th = 2, .tj = 1, .tkw = 7,  .tm = 4, .tn = 1 },
td                 99 drivers/ata/pata_mpc52xx.c 	{ .t0M = 16, .td = 10, .th = 2, .tj = 1, .tkw = 4,  .tm = 4, .tn = 1 },
td                302 drivers/ata/pata_mpc52xx.c 	t->mdma1 = ((u32)s->t0M << 24) | ((u32)s->td << 16) | ((u32)s->tkw << 8) | s->tm;
td                698 drivers/atm/firestream.c 	struct FS_BPENTRY *td;
td                721 drivers/atm/firestream.c 			td = bus_to_virt (tmp);
td                724 drivers/atm/firestream.c 				    td->flags, td->next, td->bsa, td->aal_bufsize, td->skb );
td                726 drivers/atm/firestream.c 			skb = td->skb;
td                731 drivers/atm/firestream.c 			td->dev->ntxpckts--;
td                737 drivers/atm/firestream.c 					fs_dprintk (FS_DEBUG_QSIZE, "[%d]", td->dev->ntxpckts);
td                747 drivers/atm/firestream.c 			fs_dprintk (FS_DEBUG_ALLOC, "Free trans-d: %p\n", td); 
td                748 drivers/atm/firestream.c 			memset (td, ATM_POISON_FREE, sizeof(struct FS_BPENTRY));
td                749 drivers/atm/firestream.c 			kfree (td);
td               1161 drivers/atm/firestream.c 	struct FS_BPENTRY *td;
td               1175 drivers/atm/firestream.c 	td = kmalloc (sizeof (struct FS_BPENTRY), GFP_ATOMIC);
td               1176 drivers/atm/firestream.c 	fs_dprintk (FS_DEBUG_ALLOC, "Alloc transd: %p(%zd)\n", td, sizeof (struct FS_BPENTRY));
td               1177 drivers/atm/firestream.c 	if (!td) {
td               1185 drivers/atm/firestream.c 	td->flags =  TD_EPI | TD_DATA | skb->len;
td               1186 drivers/atm/firestream.c 	td->next = 0;
td               1187 drivers/atm/firestream.c 	td->bsa  = virt_to_bus (skb->data);
td               1188 drivers/atm/firestream.c 	td->skb = skb;
td               1189 drivers/atm/firestream.c 	td->dev = dev;
td               1193 drivers/atm/firestream.c 	da[qd] = td;
td               1194 drivers/atm/firestream.c 	dq[qd].flags = td->flags;
td               1195 drivers/atm/firestream.c 	dq[qd].next  = td->next;
td               1196 drivers/atm/firestream.c 	dq[qd].bsa   = td->bsa;
td               1197 drivers/atm/firestream.c 	dq[qd].skb   = td->skb;
td               1198 drivers/atm/firestream.c 	dq[qd].dev   = td->dev;
td               1205 drivers/atm/firestream.c 		      virt_to_bus (td), 0, 
td               1206 drivers/atm/firestream.c 		      virt_to_bus (td));
td                655 drivers/base/power/domain.c 			to_gpd_data(pdd)->td.constraint_changed = true;
td                750 drivers/base/power/domain.c 	struct gpd_timing_data *td = &dev_gpd_data(dev)->td;
td                790 drivers/base/power/domain.c 		if (elapsed_ns > td->suspend_latency_ns) {
td                791 drivers/base/power/domain.c 			td->suspend_latency_ns = elapsed_ns;
td                795 drivers/base/power/domain.c 			td->constraint_changed = true;
td                824 drivers/base/power/domain.c 	struct gpd_timing_data *td = &dev_gpd_data(dev)->td;
td                870 drivers/base/power/domain.c 		if (elapsed_ns > td->resume_latency_ns) {
td                871 drivers/base/power/domain.c 			td->resume_latency_ns = elapsed_ns;
td                875 drivers/base/power/domain.c 			td->constraint_changed = true;
td               1411 drivers/base/power/domain.c 	gpd_data->td.constraint_changed = true;
td               1412 drivers/base/power/domain.c 	gpd_data->td.effective_constraint_ns = PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS;
td                 28 drivers/base/power/domain_governor.c 		constraint_ns = dev_gpd_data(dev)->td.effective_constraint_ns;
td                 52 drivers/base/power/domain_governor.c 	struct gpd_timing_data *td = &dev_gpd_data(dev)->td;
td                 60 drivers/base/power/domain_governor.c 	if (!td->constraint_changed) {
td                 61 drivers/base/power/domain_governor.c 		bool ret = td->cached_suspend_ok;
td                 66 drivers/base/power/domain_governor.c 	td->constraint_changed = false;
td                 67 drivers/base/power/domain_governor.c 	td->cached_suspend_ok = false;
td                 68 drivers/base/power/domain_governor.c 	td->effective_constraint_ns = 0;
td                 88 drivers/base/power/domain_governor.c 		td->effective_constraint_ns = PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS;
td                 89 drivers/base/power/domain_governor.c 		td->cached_suspend_ok = true;
td                 99 drivers/base/power/domain_governor.c 		constraint_ns -= td->suspend_latency_ns +
td                100 drivers/base/power/domain_governor.c 				td->resume_latency_ns;
td                109 drivers/base/power/domain_governor.c 		td->effective_constraint_ns = constraint_ns;
td                110 drivers/base/power/domain_governor.c 		td->cached_suspend_ok = true;
td                117 drivers/base/power/domain_governor.c 	return td->cached_suspend_ok;
td                161 drivers/base/power/domain_governor.c 		struct gpd_timing_data *td;
td                169 drivers/base/power/domain_governor.c 		td = &to_gpd_data(pdd)->td;
td                170 drivers/base/power/domain_governor.c 		constraint_ns = td->effective_constraint_ns;
td                503 drivers/block/drbd/drbd_debugfs.c 	struct drbd_thread_timing_details td;
td                507 drivers/block/drbd/drbd_debugfs.c 		td = *tdp;
td                508 drivers/block/drbd/drbd_debugfs.c 	} while (td.cb_nr != tdp->cb_nr);
td                509 drivers/block/drbd/drbd_debugfs.c 	if (!td.cb_addr)
td                512 drivers/block/drbd/drbd_debugfs.c 			td.cb_nr,
td                513 drivers/block/drbd/drbd_debugfs.c 			jiffies_to_msecs(now - td.start_jif),
td                514 drivers/block/drbd/drbd_debugfs.c 			td.caller_fn, td.line,
td                515 drivers/block/drbd/drbd_debugfs.c 			td.cb_addr);
td               1999 drivers/block/drbd/drbd_worker.c 	struct drbd_thread_timing_details *td = tdp + i;
td               2001 drivers/block/drbd/drbd_worker.c 	td->start_jif = jiffies;
td               2002 drivers/block/drbd/drbd_worker.c 	td->cb_addr = cb;
td               2003 drivers/block/drbd/drbd_worker.c 	td->caller_fn = fn;
td               2004 drivers/block/drbd/drbd_worker.c 	td->line = line;
td               2005 drivers/block/drbd/drbd_worker.c 	td->cb_nr = *cb_nr;
td               2008 drivers/block/drbd/drbd_worker.c 	td = tdp + i;
td               2009 drivers/block/drbd/drbd_worker.c 	memset(td, 0, sizeof(*td));
td                 80 drivers/char/agp/isoch.c 	struct pci_dev *td = bridge->dev, *dev;
td                120 drivers/char/agp/isoch.c 	pci_read_config_dword(td, bridge->capndx+AGPNISTAT, &tnistat);
td                121 drivers/char/agp/isoch.c 	pci_read_config_dword(td, bridge->capndx+AGPSTAT, &tstatus);
td                158 drivers/char/agp/isoch.c 		dev_err(&td->dev, "isochronous bandwidth required "
td                173 drivers/char/agp/isoch.c 	pci_read_config_word(td, bridge->capndx+AGPNICMD, &tnicmd);
td                176 drivers/char/agp/isoch.c 	pci_write_config_word(td, bridge->capndx+AGPNICMD, tnicmd);
td                179 drivers/char/agp/isoch.c 	pci_read_config_dword(td, bridge->capndx+AGPNISTAT, &tnistat);
td                193 drivers/char/agp/isoch.c 		dev_err(&td->dev, "number of isochronous "
td                234 drivers/char/agp/isoch.c 		dev_err(&td->dev, "number of request queue slots "
td                320 drivers/char/agp/isoch.c 	struct pci_dev *td = bridge->dev, *dev = NULL;
td                332 drivers/char/agp/isoch.c 	pci_read_config_dword(td, bridge->capndx+AGPSTAT, &tstatus);
td                364 drivers/char/agp/isoch.c 					dev_info(&td->dev, "wacky, found unclassified AGP device %s [%04x/%04x]\n",
td                413 drivers/char/agp/isoch.c 			dev_err(&td->dev, "woah!  Non-AGP device %s on "
td                422 drivers/char/agp/isoch.c 			dev_err(&td->dev, "woah!  AGP 2.0 device %s on "
td                434 drivers/char/agp/isoch.c 			dev_err(&td->dev, "woah!  AGP 3.x device %s not "
td                451 drivers/char/agp/isoch.c 			dev_info(&td->dev, "something bad happened setting "
td                330 drivers/clk/tegra/clk-dfll.c static inline u32 dfll_readl(struct tegra_dfll *td, u32 offs)
td                332 drivers/clk/tegra/clk-dfll.c 	return __raw_readl(td->base + offs);
td                335 drivers/clk/tegra/clk-dfll.c static inline void dfll_writel(struct tegra_dfll *td, u32 val, u32 offs)
td                338 drivers/clk/tegra/clk-dfll.c 	__raw_writel(val, td->base + offs);
td                341 drivers/clk/tegra/clk-dfll.c static inline void dfll_wmb(struct tegra_dfll *td)
td                343 drivers/clk/tegra/clk-dfll.c 	dfll_readl(td, DFLL_CTRL);
td                348 drivers/clk/tegra/clk-dfll.c static inline u32 dfll_i2c_readl(struct tegra_dfll *td, u32 offs)
td                350 drivers/clk/tegra/clk-dfll.c 	return __raw_readl(td->i2c_base + offs);
td                353 drivers/clk/tegra/clk-dfll.c static inline void dfll_i2c_writel(struct tegra_dfll *td, u32 val, u32 offs)
td                355 drivers/clk/tegra/clk-dfll.c 	__raw_writel(val, td->i2c_base + offs);
td                358 drivers/clk/tegra/clk-dfll.c static inline void dfll_i2c_wmb(struct tegra_dfll *td)
td                360 drivers/clk/tegra/clk-dfll.c 	dfll_i2c_readl(td, DFLL_I2C_CFG);
td                370 drivers/clk/tegra/clk-dfll.c static bool dfll_is_running(struct tegra_dfll *td)
td                372 drivers/clk/tegra/clk-dfll.c 	return td->mode >= DFLL_OPEN_LOOP;
td                390 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = dev_get_drvdata(dev);
td                393 drivers/clk/tegra/clk-dfll.c 	ret = clk_enable(td->ref_clk);
td                399 drivers/clk/tegra/clk-dfll.c 	ret = clk_enable(td->soc_clk);
td                402 drivers/clk/tegra/clk-dfll.c 		clk_disable(td->ref_clk);
td                406 drivers/clk/tegra/clk-dfll.c 	ret = clk_enable(td->i2c_clk);
td                409 drivers/clk/tegra/clk-dfll.c 		clk_disable(td->soc_clk);
td                410 drivers/clk/tegra/clk-dfll.c 		clk_disable(td->ref_clk);
td                427 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = dev_get_drvdata(dev);
td                429 drivers/clk/tegra/clk-dfll.c 	clk_disable(td->ref_clk);
td                430 drivers/clk/tegra/clk-dfll.c 	clk_disable(td->soc_clk);
td                431 drivers/clk/tegra/clk-dfll.c 	clk_disable(td->i2c_clk);
td                449 drivers/clk/tegra/clk-dfll.c static void dfll_tune_low(struct tegra_dfll *td)
td                451 drivers/clk/tegra/clk-dfll.c 	td->tune_range = DFLL_TUNE_LOW;
td                453 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, td->soc->cvb->cpu_dfll_data.tune0_low, DFLL_TUNE0);
td                454 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, td->soc->cvb->cpu_dfll_data.tune1, DFLL_TUNE1);
td                455 drivers/clk/tegra/clk-dfll.c 	dfll_wmb(td);
td                457 drivers/clk/tegra/clk-dfll.c 	if (td->soc->set_clock_trimmers_low)
td                458 drivers/clk/tegra/clk-dfll.c 		td->soc->set_clock_trimmers_low();
td                491 drivers/clk/tegra/clk-dfll.c static void dfll_set_mode(struct tegra_dfll *td,
td                494 drivers/clk/tegra/clk-dfll.c 	td->mode = mode;
td                495 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, mode - 1, DFLL_CTRL);
td                496 drivers/clk/tegra/clk-dfll.c 	dfll_wmb(td);
td                503 drivers/clk/tegra/clk-dfll.c static unsigned long get_dvco_rate_below(struct tegra_dfll *td, u8 out_min)
td                509 drivers/clk/tegra/clk-dfll.c 	min_uv = td->lut_uv[out_min];
td                511 drivers/clk/tegra/clk-dfll.c 		opp = dev_pm_opp_find_freq_ceil(td->soc->dev, &rate);
td                539 drivers/clk/tegra/clk-dfll.c static int dfll_i2c_set_output_enabled(struct tegra_dfll *td, bool enable)
td                543 drivers/clk/tegra/clk-dfll.c 	val = dfll_i2c_readl(td, DFLL_OUTPUT_CFG);
td                550 drivers/clk/tegra/clk-dfll.c 	dfll_i2c_writel(td, val, DFLL_OUTPUT_CFG);
td                551 drivers/clk/tegra/clk-dfll.c 	dfll_i2c_wmb(td);
td                570 drivers/clk/tegra/clk-dfll.c static int dfll_pwm_set_output_enabled(struct tegra_dfll *td, bool enable)
td                576 drivers/clk/tegra/clk-dfll.c 		ret = pinctrl_select_state(td->pwm_pin, td->pwm_enable_state);
td                578 drivers/clk/tegra/clk-dfll.c 			dev_err(td->dev, "setting enable state failed\n");
td                581 drivers/clk/tegra/clk-dfll.c 		val = dfll_readl(td, DFLL_OUTPUT_CFG);
td                583 drivers/clk/tegra/clk-dfll.c 		div = DIV_ROUND_UP(td->ref_rate, td->pwm_rate);
td                586 drivers/clk/tegra/clk-dfll.c 		dfll_writel(td, val, DFLL_OUTPUT_CFG);
td                587 drivers/clk/tegra/clk-dfll.c 		dfll_wmb(td);
td                590 drivers/clk/tegra/clk-dfll.c 		dfll_writel(td, val, DFLL_OUTPUT_CFG);
td                591 drivers/clk/tegra/clk-dfll.c 		dfll_wmb(td);
td                593 drivers/clk/tegra/clk-dfll.c 		ret = pinctrl_select_state(td->pwm_pin, td->pwm_disable_state);
td                595 drivers/clk/tegra/clk-dfll.c 			dev_warn(td->dev, "setting disable state failed\n");
td                597 drivers/clk/tegra/clk-dfll.c 		val = dfll_readl(td, DFLL_OUTPUT_CFG);
td                599 drivers/clk/tegra/clk-dfll.c 		dfll_writel(td, val, DFLL_OUTPUT_CFG);
td                600 drivers/clk/tegra/clk-dfll.c 		dfll_wmb(td);
td                614 drivers/clk/tegra/clk-dfll.c static u32 dfll_set_force_output_value(struct tegra_dfll *td, u8 out_val)
td                616 drivers/clk/tegra/clk-dfll.c 	u32 val = dfll_readl(td, DFLL_OUTPUT_FORCE);
td                619 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, val, DFLL_OUTPUT_FORCE);
td                620 drivers/clk/tegra/clk-dfll.c 	dfll_wmb(td);
td                622 drivers/clk/tegra/clk-dfll.c 	return dfll_readl(td, DFLL_OUTPUT_FORCE);
td                632 drivers/clk/tegra/clk-dfll.c static void dfll_set_force_output_enabled(struct tegra_dfll *td, bool enable)
td                634 drivers/clk/tegra/clk-dfll.c 	u32 val = dfll_readl(td, DFLL_OUTPUT_FORCE);
td                641 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, val, DFLL_OUTPUT_FORCE);
td                642 drivers/clk/tegra/clk-dfll.c 	dfll_wmb(td);
td                652 drivers/clk/tegra/clk-dfll.c static int dfll_force_output(struct tegra_dfll *td, unsigned int out_sel)
td                659 drivers/clk/tegra/clk-dfll.c 	val = dfll_set_force_output_value(td, out_sel);
td                660 drivers/clk/tegra/clk-dfll.c 	if ((td->mode < DFLL_CLOSED_LOOP) &&
td                662 drivers/clk/tegra/clk-dfll.c 		dfll_set_force_output_enabled(td, true);
td                675 drivers/clk/tegra/clk-dfll.c static void dfll_load_i2c_lut(struct tegra_dfll *td)
td                681 drivers/clk/tegra/clk-dfll.c 		if (i < td->lut_min)
td                682 drivers/clk/tegra/clk-dfll.c 			lut_index = td->lut_min;
td                683 drivers/clk/tegra/clk-dfll.c 		else if (i > td->lut_max)
td                684 drivers/clk/tegra/clk-dfll.c 			lut_index = td->lut_max;
td                688 drivers/clk/tegra/clk-dfll.c 		val = regulator_list_hardware_vsel(td->vdd_reg,
td                689 drivers/clk/tegra/clk-dfll.c 						     td->lut[lut_index]);
td                690 drivers/clk/tegra/clk-dfll.c 		__raw_writel(val, td->lut_base + i * 4);
td                693 drivers/clk/tegra/clk-dfll.c 	dfll_i2c_wmb(td);
td                706 drivers/clk/tegra/clk-dfll.c static void dfll_init_i2c_if(struct tegra_dfll *td)
td                710 drivers/clk/tegra/clk-dfll.c 	if (td->i2c_slave_addr > 0x7f) {
td                711 drivers/clk/tegra/clk-dfll.c 		val = td->i2c_slave_addr << DFLL_I2C_CFG_SLAVE_ADDR_SHIFT_10BIT;
td                714 drivers/clk/tegra/clk-dfll.c 		val = td->i2c_slave_addr << DFLL_I2C_CFG_SLAVE_ADDR_SHIFT_7BIT;
td                718 drivers/clk/tegra/clk-dfll.c 	dfll_i2c_writel(td, val, DFLL_I2C_CFG);
td                720 drivers/clk/tegra/clk-dfll.c 	dfll_i2c_writel(td, td->i2c_reg, DFLL_I2C_VDD_REG_ADDR);
td                722 drivers/clk/tegra/clk-dfll.c 	val = DIV_ROUND_UP(td->i2c_clk_rate, td->i2c_fs_rate * 8);
td                728 drivers/clk/tegra/clk-dfll.c 	__raw_writel(val, td->i2c_controller_base + DFLL_I2C_CLK_DIVISOR);
td                729 drivers/clk/tegra/clk-dfll.c 	dfll_i2c_wmb(td);
td                740 drivers/clk/tegra/clk-dfll.c static void dfll_init_out_if(struct tegra_dfll *td)
td                744 drivers/clk/tegra/clk-dfll.c 	td->lut_min = td->lut_bottom;
td                745 drivers/clk/tegra/clk-dfll.c 	td->lut_max = td->lut_size - 1;
td                746 drivers/clk/tegra/clk-dfll.c 	td->lut_safe = td->lut_min + (td->lut_min < td->lut_max ? 1 : 0);
td                749 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, 0, DFLL_OUTPUT_CFG);
td                750 drivers/clk/tegra/clk-dfll.c 	dfll_wmb(td);
td                752 drivers/clk/tegra/clk-dfll.c 	val = (td->lut_safe << DFLL_OUTPUT_CFG_SAFE_SHIFT) |
td                753 drivers/clk/tegra/clk-dfll.c 	      (td->lut_max << DFLL_OUTPUT_CFG_MAX_SHIFT) |
td                754 drivers/clk/tegra/clk-dfll.c 	      (td->lut_min << DFLL_OUTPUT_CFG_MIN_SHIFT);
td                755 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, val, DFLL_OUTPUT_CFG);
td                756 drivers/clk/tegra/clk-dfll.c 	dfll_wmb(td);
td                758 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, 0, DFLL_OUTPUT_FORCE);
td                759 drivers/clk/tegra/clk-dfll.c 	dfll_i2c_writel(td, 0, DFLL_INTR_EN);
td                760 drivers/clk/tegra/clk-dfll.c 	dfll_i2c_writel(td, DFLL_INTR_MAX_MASK | DFLL_INTR_MIN_MASK,
td                763 drivers/clk/tegra/clk-dfll.c 	if (td->pmu_if == TEGRA_DFLL_PMU_PWM) {
td                764 drivers/clk/tegra/clk-dfll.c 		u32 vinit = td->reg_init_uV;
td                765 drivers/clk/tegra/clk-dfll.c 		int vstep = td->soc->alignment.step_uv;
td                766 drivers/clk/tegra/clk-dfll.c 		unsigned long vmin = td->lut_uv[0];
td                773 drivers/clk/tegra/clk-dfll.c 			dfll_force_output(td, vsel);
td                776 drivers/clk/tegra/clk-dfll.c 		dfll_load_i2c_lut(td);
td                777 drivers/clk/tegra/clk-dfll.c 		dfll_init_i2c_if(td);
td                795 drivers/clk/tegra/clk-dfll.c static int find_lut_index_for_rate(struct tegra_dfll *td, unsigned long rate)
td                800 drivers/clk/tegra/clk-dfll.c 	opp = dev_pm_opp_find_freq_ceil(td->soc->dev, &rate);
td                804 drivers/clk/tegra/clk-dfll.c 	align_step = dev_pm_opp_get_voltage(opp) / td->soc->alignment.step_uv;
td                807 drivers/clk/tegra/clk-dfll.c 	for (i = td->lut_bottom; i < td->lut_size; i++) {
td                808 drivers/clk/tegra/clk-dfll.c 		if ((td->lut_uv[i] / td->soc->alignment.step_uv) >= align_step)
td                826 drivers/clk/tegra/clk-dfll.c static int dfll_calculate_rate_request(struct tegra_dfll *td,
td                839 drivers/clk/tegra/clk-dfll.c 	if (rate < td->dvco_rate_min) {
td                843 drivers/clk/tegra/clk-dfll.c 					  td->dvco_rate_min / 1000);
td                845 drivers/clk/tegra/clk-dfll.c 			dev_err(td->dev, "%s: Rate %lu is too low\n",
td                850 drivers/clk/tegra/clk-dfll.c 		rate = td->dvco_rate_min;
td                854 drivers/clk/tegra/clk-dfll.c 	val = DVCO_RATE_TO_MULT(rate, td->ref_rate);
td                856 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "%s: Rate %lu is above dfll range\n",
td                861 drivers/clk/tegra/clk-dfll.c 	req->dvco_target_rate = MULT_TO_DVCO_RATE(req->mult_bits, td->ref_rate);
td                864 drivers/clk/tegra/clk-dfll.c 	req->lut_index = find_lut_index_for_rate(td, req->dvco_target_rate);
td                879 drivers/clk/tegra/clk-dfll.c static void dfll_set_frequency_request(struct tegra_dfll *td,
td                886 drivers/clk/tegra/clk-dfll.c 	force_val = (req->lut_index - td->lut_safe) * coef / td->cg;
td                895 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, val, DFLL_FREQ_REQ);
td                896 drivers/clk/tegra/clk-dfll.c 	dfll_wmb(td);
td                911 drivers/clk/tegra/clk-dfll.c static int dfll_request_rate(struct tegra_dfll *td, unsigned long rate)
td                916 drivers/clk/tegra/clk-dfll.c 	if (td->mode == DFLL_UNINITIALIZED) {
td                917 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "%s: Cannot set DFLL rate in %s mode\n",
td                918 drivers/clk/tegra/clk-dfll.c 			__func__, mode_name[td->mode]);
td                922 drivers/clk/tegra/clk-dfll.c 	ret = dfll_calculate_rate_request(td, &req, rate);
td                926 drivers/clk/tegra/clk-dfll.c 	td->last_unrounded_rate = rate;
td                927 drivers/clk/tegra/clk-dfll.c 	td->last_req = req;
td                929 drivers/clk/tegra/clk-dfll.c 	if (td->mode == DFLL_CLOSED_LOOP)
td                930 drivers/clk/tegra/clk-dfll.c 		dfll_set_frequency_request(td, &td->last_req);
td                946 drivers/clk/tegra/clk-dfll.c static int dfll_disable(struct tegra_dfll *td)
td                948 drivers/clk/tegra/clk-dfll.c 	if (td->mode != DFLL_OPEN_LOOP) {
td                949 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "cannot disable DFLL in %s mode\n",
td                950 drivers/clk/tegra/clk-dfll.c 			mode_name[td->mode]);
td                954 drivers/clk/tegra/clk-dfll.c 	dfll_set_mode(td, DFLL_DISABLED);
td                955 drivers/clk/tegra/clk-dfll.c 	pm_runtime_put_sync(td->dev);
td                967 drivers/clk/tegra/clk-dfll.c static int dfll_enable(struct tegra_dfll *td)
td                969 drivers/clk/tegra/clk-dfll.c 	if (td->mode != DFLL_DISABLED) {
td                970 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "cannot enable DFLL in %s mode\n",
td                971 drivers/clk/tegra/clk-dfll.c 			mode_name[td->mode]);
td                975 drivers/clk/tegra/clk-dfll.c 	pm_runtime_get_sync(td->dev);
td                976 drivers/clk/tegra/clk-dfll.c 	dfll_set_mode(td, DFLL_OPEN_LOOP);
td                992 drivers/clk/tegra/clk-dfll.c static void dfll_set_open_loop_config(struct tegra_dfll *td)
td                997 drivers/clk/tegra/clk-dfll.c 	if (td->tune_range != DFLL_TUNE_LOW)
td                998 drivers/clk/tegra/clk-dfll.c 		dfll_tune_low(td);
td               1000 drivers/clk/tegra/clk-dfll.c 	val = dfll_readl(td, DFLL_FREQ_REQ);
td               1003 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, val, DFLL_FREQ_REQ);
td               1004 drivers/clk/tegra/clk-dfll.c 	dfll_wmb(td);
td               1015 drivers/clk/tegra/clk-dfll.c static int dfll_lock(struct tegra_dfll *td)
td               1017 drivers/clk/tegra/clk-dfll.c 	struct dfll_rate_req *req = &td->last_req;
td               1019 drivers/clk/tegra/clk-dfll.c 	switch (td->mode) {
td               1025 drivers/clk/tegra/clk-dfll.c 			dev_err(td->dev, "%s: Cannot lock DFLL at rate 0\n",
td               1030 drivers/clk/tegra/clk-dfll.c 		if (td->pmu_if == TEGRA_DFLL_PMU_PWM)
td               1031 drivers/clk/tegra/clk-dfll.c 			dfll_pwm_set_output_enabled(td, true);
td               1033 drivers/clk/tegra/clk-dfll.c 			dfll_i2c_set_output_enabled(td, true);
td               1035 drivers/clk/tegra/clk-dfll.c 		dfll_set_mode(td, DFLL_CLOSED_LOOP);
td               1036 drivers/clk/tegra/clk-dfll.c 		dfll_set_frequency_request(td, req);
td               1037 drivers/clk/tegra/clk-dfll.c 		dfll_set_force_output_enabled(td, false);
td               1041 drivers/clk/tegra/clk-dfll.c 		BUG_ON(td->mode > DFLL_CLOSED_LOOP);
td               1042 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "%s: Cannot lock DFLL in %s mode\n",
td               1043 drivers/clk/tegra/clk-dfll.c 			__func__, mode_name[td->mode]);
td               1055 drivers/clk/tegra/clk-dfll.c static int dfll_unlock(struct tegra_dfll *td)
td               1057 drivers/clk/tegra/clk-dfll.c 	switch (td->mode) {
td               1059 drivers/clk/tegra/clk-dfll.c 		dfll_set_open_loop_config(td);
td               1060 drivers/clk/tegra/clk-dfll.c 		dfll_set_mode(td, DFLL_OPEN_LOOP);
td               1061 drivers/clk/tegra/clk-dfll.c 		if (td->pmu_if == TEGRA_DFLL_PMU_PWM)
td               1062 drivers/clk/tegra/clk-dfll.c 			dfll_pwm_set_output_enabled(td, false);
td               1064 drivers/clk/tegra/clk-dfll.c 			dfll_i2c_set_output_enabled(td, false);
td               1071 drivers/clk/tegra/clk-dfll.c 		BUG_ON(td->mode > DFLL_CLOSED_LOOP);
td               1072 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "%s: Cannot unlock DFLL in %s mode\n",
td               1073 drivers/clk/tegra/clk-dfll.c 			__func__, mode_name[td->mode]);
td               1089 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = clk_hw_to_dfll(hw);
td               1091 drivers/clk/tegra/clk-dfll.c 	return dfll_is_running(td);
td               1096 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = clk_hw_to_dfll(hw);
td               1099 drivers/clk/tegra/clk-dfll.c 	ret = dfll_enable(td);
td               1103 drivers/clk/tegra/clk-dfll.c 	ret = dfll_lock(td);
td               1105 drivers/clk/tegra/clk-dfll.c 		dfll_disable(td);
td               1112 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = clk_hw_to_dfll(hw);
td               1115 drivers/clk/tegra/clk-dfll.c 	ret = dfll_unlock(td);
td               1117 drivers/clk/tegra/clk-dfll.c 		dfll_disable(td);
td               1123 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = clk_hw_to_dfll(hw);
td               1125 drivers/clk/tegra/clk-dfll.c 	return td->last_unrounded_rate;
td               1132 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = clk_hw_to_dfll(hw);
td               1136 drivers/clk/tegra/clk-dfll.c 	ret = dfll_calculate_rate_request(td, &req, clk_req->rate);
td               1152 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = clk_hw_to_dfll(hw);
td               1154 drivers/clk/tegra/clk-dfll.c 	return dfll_request_rate(td, rate);
td               1179 drivers/clk/tegra/clk-dfll.c static int dfll_register_clk(struct tegra_dfll *td)
td               1183 drivers/clk/tegra/clk-dfll.c 	dfll_clk_init_data.name = td->output_clock_name;
td               1184 drivers/clk/tegra/clk-dfll.c 	td->dfll_clk_hw.init = &dfll_clk_init_data;
td               1186 drivers/clk/tegra/clk-dfll.c 	td->dfll_clk = clk_register(td->dev, &td->dfll_clk_hw);
td               1187 drivers/clk/tegra/clk-dfll.c 	if (IS_ERR(td->dfll_clk)) {
td               1188 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "DFLL clock registration error\n");
td               1192 drivers/clk/tegra/clk-dfll.c 	ret = of_clk_add_provider(td->dev->of_node, of_clk_src_simple_get,
td               1193 drivers/clk/tegra/clk-dfll.c 				  td->dfll_clk);
td               1195 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "of_clk_add_provider() failed\n");
td               1197 drivers/clk/tegra/clk-dfll.c 		clk_unregister(td->dfll_clk);
td               1211 drivers/clk/tegra/clk-dfll.c static void dfll_unregister_clk(struct tegra_dfll *td)
td               1213 drivers/clk/tegra/clk-dfll.c 	of_clk_del_provider(td->dev->of_node);
td               1214 drivers/clk/tegra/clk-dfll.c 	clk_unregister(td->dfll_clk);
td               1215 drivers/clk/tegra/clk-dfll.c 	td->dfll_clk = NULL;
td               1254 drivers/clk/tegra/clk-dfll.c static u64 dfll_read_monitor_rate(struct tegra_dfll *td)
td               1259 drivers/clk/tegra/clk-dfll.c 	if (!dfll_is_running(td))
td               1262 drivers/clk/tegra/clk-dfll.c 	v = dfll_readl(td, DFLL_MONITOR_DATA);
td               1264 drivers/clk/tegra/clk-dfll.c 	pre_scaler_rate = dfll_calc_monitored_rate(v, td->ref_rate);
td               1266 drivers/clk/tegra/clk-dfll.c 	s = dfll_readl(td, DFLL_FREQ_REQ);
td               1275 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = data;
td               1277 drivers/clk/tegra/clk-dfll.c 	*val = dfll_is_running(td);
td               1283 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = data;
td               1285 drivers/clk/tegra/clk-dfll.c 	return val ? dfll_enable(td) : dfll_disable(td);
td               1292 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = data;
td               1294 drivers/clk/tegra/clk-dfll.c 	*val = (td->mode == DFLL_CLOSED_LOOP);
td               1300 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = data;
td               1302 drivers/clk/tegra/clk-dfll.c 	return val ? dfll_lock(td) :  dfll_unlock(td);
td               1308 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = data;
td               1310 drivers/clk/tegra/clk-dfll.c 	*val = dfll_read_monitor_rate(td);
td               1317 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = data;
td               1319 drivers/clk/tegra/clk-dfll.c 	return dfll_request_rate(td, val);
td               1326 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = s->private;
td               1331 drivers/clk/tegra/clk-dfll.c 			val = dfll_i2c_readl(td, offs);
td               1333 drivers/clk/tegra/clk-dfll.c 			val = dfll_readl(td, offs);
td               1340 drivers/clk/tegra/clk-dfll.c 			   dfll_i2c_readl(td, offs));
td               1343 drivers/clk/tegra/clk-dfll.c 			   dfll_i2c_readl(td, offs));
td               1345 drivers/clk/tegra/clk-dfll.c 	if (td->pmu_if == TEGRA_DFLL_PMU_I2C) {
td               1349 drivers/clk/tegra/clk-dfll.c 			   __raw_readl(td->i2c_controller_base + offs));
td               1354 drivers/clk/tegra/clk-dfll.c 				   __raw_readl(td->lut_base + offs));
td               1362 drivers/clk/tegra/clk-dfll.c static void dfll_debug_init(struct tegra_dfll *td)
td               1366 drivers/clk/tegra/clk-dfll.c 	if (!td || (td->mode == DFLL_UNINITIALIZED))
td               1370 drivers/clk/tegra/clk-dfll.c 	td->debugfs_dir = root;
td               1372 drivers/clk/tegra/clk-dfll.c 	debugfs_create_file_unsafe("enable", 0644, root, td,
td               1374 drivers/clk/tegra/clk-dfll.c 	debugfs_create_file_unsafe("lock", 0444, root, td, &lock_fops);
td               1375 drivers/clk/tegra/clk-dfll.c 	debugfs_create_file_unsafe("rate", 0444, root, td, &rate_fops);
td               1376 drivers/clk/tegra/clk-dfll.c 	debugfs_create_file("registers", 0444, root, td, &attr_registers_fops);
td               1380 drivers/clk/tegra/clk-dfll.c static void inline dfll_debug_init(struct tegra_dfll *td) { }
td               1395 drivers/clk/tegra/clk-dfll.c static void dfll_set_default_params(struct tegra_dfll *td)
td               1399 drivers/clk/tegra/clk-dfll.c 	val = DIV_ROUND_UP(td->ref_rate, td->sample_rate * 32);
td               1401 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, val, DFLL_CONFIG);
td               1403 drivers/clk/tegra/clk-dfll.c 	val = (td->force_mode << DFLL_PARAMS_FORCE_MODE_SHIFT) |
td               1404 drivers/clk/tegra/clk-dfll.c 		(td->cf << DFLL_PARAMS_CF_PARAM_SHIFT) |
td               1405 drivers/clk/tegra/clk-dfll.c 		(td->ci << DFLL_PARAMS_CI_PARAM_SHIFT) |
td               1406 drivers/clk/tegra/clk-dfll.c 		(td->cg << DFLL_PARAMS_CG_PARAM_SHIFT) |
td               1407 drivers/clk/tegra/clk-dfll.c 		(td->cg_scale ? DFLL_PARAMS_CG_SCALE : 0);
td               1408 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, val, DFLL_PARAMS);
td               1410 drivers/clk/tegra/clk-dfll.c 	dfll_tune_low(td);
td               1411 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, td->droop_ctrl, DFLL_DROOP_CTRL);
td               1412 drivers/clk/tegra/clk-dfll.c 	dfll_writel(td, DFLL_MONITOR_CTRL_FREQ, DFLL_MONITOR_CTRL);
td               1423 drivers/clk/tegra/clk-dfll.c static int dfll_init_clks(struct tegra_dfll *td)
td               1425 drivers/clk/tegra/clk-dfll.c 	td->ref_clk = devm_clk_get(td->dev, "ref");
td               1426 drivers/clk/tegra/clk-dfll.c 	if (IS_ERR(td->ref_clk)) {
td               1427 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "missing ref clock\n");
td               1428 drivers/clk/tegra/clk-dfll.c 		return PTR_ERR(td->ref_clk);
td               1431 drivers/clk/tegra/clk-dfll.c 	td->soc_clk = devm_clk_get(td->dev, "soc");
td               1432 drivers/clk/tegra/clk-dfll.c 	if (IS_ERR(td->soc_clk)) {
td               1433 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "missing soc clock\n");
td               1434 drivers/clk/tegra/clk-dfll.c 		return PTR_ERR(td->soc_clk);
td               1437 drivers/clk/tegra/clk-dfll.c 	td->i2c_clk = devm_clk_get(td->dev, "i2c");
td               1438 drivers/clk/tegra/clk-dfll.c 	if (IS_ERR(td->i2c_clk)) {
td               1439 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "missing i2c clock\n");
td               1440 drivers/clk/tegra/clk-dfll.c 		return PTR_ERR(td->i2c_clk);
td               1442 drivers/clk/tegra/clk-dfll.c 	td->i2c_clk_rate = clk_get_rate(td->i2c_clk);
td               1456 drivers/clk/tegra/clk-dfll.c static int dfll_init(struct tegra_dfll *td)
td               1460 drivers/clk/tegra/clk-dfll.c 	td->ref_rate = clk_get_rate(td->ref_clk);
td               1461 drivers/clk/tegra/clk-dfll.c 	if (td->ref_rate != REF_CLOCK_RATE) {
td               1462 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "unexpected ref clk rate %lu, expecting %lu",
td               1463 drivers/clk/tegra/clk-dfll.c 			td->ref_rate, REF_CLOCK_RATE);
td               1467 drivers/clk/tegra/clk-dfll.c 	reset_control_deassert(td->dvco_rst);
td               1469 drivers/clk/tegra/clk-dfll.c 	ret = clk_prepare(td->ref_clk);
td               1471 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "failed to prepare ref_clk\n");
td               1475 drivers/clk/tegra/clk-dfll.c 	ret = clk_prepare(td->soc_clk);
td               1477 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "failed to prepare soc_clk\n");
td               1481 drivers/clk/tegra/clk-dfll.c 	ret = clk_prepare(td->i2c_clk);
td               1483 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "failed to prepare i2c_clk\n");
td               1487 drivers/clk/tegra/clk-dfll.c 	td->last_unrounded_rate = 0;
td               1489 drivers/clk/tegra/clk-dfll.c 	pm_runtime_enable(td->dev);
td               1490 drivers/clk/tegra/clk-dfll.c 	pm_runtime_get_sync(td->dev);
td               1492 drivers/clk/tegra/clk-dfll.c 	dfll_set_mode(td, DFLL_DISABLED);
td               1493 drivers/clk/tegra/clk-dfll.c 	dfll_set_default_params(td);
td               1495 drivers/clk/tegra/clk-dfll.c 	if (td->soc->init_clock_trimmers)
td               1496 drivers/clk/tegra/clk-dfll.c 		td->soc->init_clock_trimmers();
td               1498 drivers/clk/tegra/clk-dfll.c 	dfll_set_open_loop_config(td);
td               1500 drivers/clk/tegra/clk-dfll.c 	dfll_init_out_if(td);
td               1502 drivers/clk/tegra/clk-dfll.c 	pm_runtime_put_sync(td->dev);
td               1507 drivers/clk/tegra/clk-dfll.c 	clk_unprepare(td->soc_clk);
td               1509 drivers/clk/tegra/clk-dfll.c 	clk_unprepare(td->ref_clk);
td               1511 drivers/clk/tegra/clk-dfll.c 	reset_control_assert(td->dvco_rst);
td               1524 drivers/clk/tegra/clk-dfll.c static int find_vdd_map_entry_exact(struct tegra_dfll *td, int uV)
td               1528 drivers/clk/tegra/clk-dfll.c 	if (WARN_ON(td->pmu_if == TEGRA_DFLL_PMU_PWM))
td               1531 drivers/clk/tegra/clk-dfll.c 	align_step = uV / td->soc->alignment.step_uv;
td               1532 drivers/clk/tegra/clk-dfll.c 	n_voltages = regulator_count_voltages(td->vdd_reg);
td               1534 drivers/clk/tegra/clk-dfll.c 		reg_uV = regulator_list_voltage(td->vdd_reg, i);
td               1538 drivers/clk/tegra/clk-dfll.c 		reg_volt_id = reg_uV / td->soc->alignment.step_uv;
td               1544 drivers/clk/tegra/clk-dfll.c 	dev_err(td->dev, "no voltage map entry for %d uV\n", uV);
td               1552 drivers/clk/tegra/clk-dfll.c static int find_vdd_map_entry_min(struct tegra_dfll *td, int uV)
td               1556 drivers/clk/tegra/clk-dfll.c 	if (WARN_ON(td->pmu_if == TEGRA_DFLL_PMU_PWM))
td               1559 drivers/clk/tegra/clk-dfll.c 	align_step = uV / td->soc->alignment.step_uv;
td               1560 drivers/clk/tegra/clk-dfll.c 	n_voltages = regulator_count_voltages(td->vdd_reg);
td               1562 drivers/clk/tegra/clk-dfll.c 		reg_uV = regulator_list_voltage(td->vdd_reg, i);
td               1566 drivers/clk/tegra/clk-dfll.c 		reg_volt_id = reg_uV / td->soc->alignment.step_uv;
td               1572 drivers/clk/tegra/clk-dfll.c 	dev_err(td->dev, "no voltage map entry rounding to %d uV\n", uV);
td               1585 drivers/clk/tegra/clk-dfll.c static int dfll_build_pwm_lut(struct tegra_dfll *td, unsigned long v_max)
td               1590 drivers/clk/tegra/clk-dfll.c 	int v_min = td->soc->cvb->min_millivolts * 1000;
td               1593 drivers/clk/tegra/clk-dfll.c 		reg_volt = td->lut_uv[i];
td               1600 drivers/clk/tegra/clk-dfll.c 		td->lut[i] = i;
td               1606 drivers/clk/tegra/clk-dfll.c 	td->lut_size = i;
td               1608 drivers/clk/tegra/clk-dfll.c 	    (lut_bottom + 1 >= td->lut_size)) {
td               1609 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "no voltage above DFLL minimum %d mV\n",
td               1610 drivers/clk/tegra/clk-dfll.c 			td->soc->cvb->min_millivolts);
td               1613 drivers/clk/tegra/clk-dfll.c 	td->lut_bottom = lut_bottom;
td               1616 drivers/clk/tegra/clk-dfll.c 	rate = get_dvco_rate_below(td, td->lut_bottom);
td               1618 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "no opp below DFLL minimum voltage %d mV\n",
td               1619 drivers/clk/tegra/clk-dfll.c 			td->soc->cvb->min_millivolts);
td               1622 drivers/clk/tegra/clk-dfll.c 	td->dvco_rate_min = rate;
td               1640 drivers/clk/tegra/clk-dfll.c static int dfll_build_i2c_lut(struct tegra_dfll *td, unsigned long v_max)
td               1646 drivers/clk/tegra/clk-dfll.c 	v = td->soc->cvb->min_millivolts * 1000;
td               1647 drivers/clk/tegra/clk-dfll.c 	lut = find_vdd_map_entry_exact(td, v);
td               1650 drivers/clk/tegra/clk-dfll.c 	td->lut[0] = lut;
td               1651 drivers/clk/tegra/clk-dfll.c 	td->lut_bottom = 0;
td               1656 drivers/clk/tegra/clk-dfll.c 		opp = dev_pm_opp_find_freq_ceil(td->soc->dev, &rate);
td               1661 drivers/clk/tegra/clk-dfll.c 		if (v_opp <= td->soc->cvb->min_millivolts * 1000)
td               1662 drivers/clk/tegra/clk-dfll.c 			td->dvco_rate_min = dev_pm_opp_get_freq(opp);
td               1671 drivers/clk/tegra/clk-dfll.c 			selector = find_vdd_map_entry_min(td, v);
td               1674 drivers/clk/tegra/clk-dfll.c 			if (selector != td->lut[j - 1])
td               1675 drivers/clk/tegra/clk-dfll.c 				td->lut[j++] = selector;
td               1679 drivers/clk/tegra/clk-dfll.c 		selector = find_vdd_map_entry_exact(td, v);
td               1682 drivers/clk/tegra/clk-dfll.c 		if (selector != td->lut[j - 1])
td               1683 drivers/clk/tegra/clk-dfll.c 			td->lut[j++] = selector;
td               1688 drivers/clk/tegra/clk-dfll.c 	td->lut_size = j;
td               1690 drivers/clk/tegra/clk-dfll.c 	if (!td->dvco_rate_min)
td               1691 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "no opp above DFLL minimum voltage %d mV\n",
td               1692 drivers/clk/tegra/clk-dfll.c 			td->soc->cvb->min_millivolts);
td               1695 drivers/clk/tegra/clk-dfll.c 		for (j = 0; j < td->lut_size; j++)
td               1696 drivers/clk/tegra/clk-dfll.c 			td->lut_uv[j] =
td               1697 drivers/clk/tegra/clk-dfll.c 				regulator_list_voltage(td->vdd_reg,
td               1698 drivers/clk/tegra/clk-dfll.c 						       td->lut[j]);
td               1705 drivers/clk/tegra/clk-dfll.c static int dfll_build_lut(struct tegra_dfll *td)
td               1711 drivers/clk/tegra/clk-dfll.c 	opp = dev_pm_opp_find_freq_floor(td->soc->dev, &rate);
td               1713 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "couldn't get vmax opp, empty opp table?\n");
td               1719 drivers/clk/tegra/clk-dfll.c 	if (td->pmu_if == TEGRA_DFLL_PMU_PWM)
td               1720 drivers/clk/tegra/clk-dfll.c 		return dfll_build_pwm_lut(td, v_max);
td               1722 drivers/clk/tegra/clk-dfll.c 		return dfll_build_i2c_lut(td, v_max);
td               1735 drivers/clk/tegra/clk-dfll.c static bool read_dt_param(struct tegra_dfll *td, const char *param, u32 *dest)
td               1737 drivers/clk/tegra/clk-dfll.c 	int err = of_property_read_u32(td->dev->of_node, param, dest);
td               1740 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "failed to read DT parameter %s: %d\n",
td               1756 drivers/clk/tegra/clk-dfll.c static int dfll_fetch_i2c_params(struct tegra_dfll *td)
td               1764 drivers/clk/tegra/clk-dfll.c 	if (!read_dt_param(td, "nvidia,i2c-fs-rate", &td->i2c_fs_rate))
td               1767 drivers/clk/tegra/clk-dfll.c 	regmap = regulator_get_regmap(td->vdd_reg);
td               1771 drivers/clk/tegra/clk-dfll.c 	td->i2c_slave_addr = i2c_client->addr;
td               1773 drivers/clk/tegra/clk-dfll.c 	ret = regulator_get_hardware_vsel_register(td->vdd_reg,
td               1777 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev,
td               1781 drivers/clk/tegra/clk-dfll.c 	td->i2c_reg = vsel_reg;
td               1786 drivers/clk/tegra/clk-dfll.c static int dfll_fetch_pwm_params(struct tegra_dfll *td)
td               1791 drivers/clk/tegra/clk-dfll.c 	if (!td->soc->alignment.step_uv || !td->soc->alignment.offset_uv) {
td               1792 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev,
td               1797 drivers/clk/tegra/clk-dfll.c 		td->lut_uv[i] = td->soc->alignment.offset_uv +
td               1798 drivers/clk/tegra/clk-dfll.c 				i * td->soc->alignment.step_uv;
td               1800 drivers/clk/tegra/clk-dfll.c 	ret = read_dt_param(td, "nvidia,pwm-tristate-microvolts",
td               1801 drivers/clk/tegra/clk-dfll.c 			    &td->reg_init_uV);
td               1803 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "couldn't get initialized voltage\n");
td               1807 drivers/clk/tegra/clk-dfll.c 	ret = read_dt_param(td, "nvidia,pwm-period-nanoseconds", &pwm_period);
td               1809 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "couldn't get PWM period\n");
td               1812 drivers/clk/tegra/clk-dfll.c 	td->pwm_rate = (NSEC_PER_SEC / pwm_period) * (MAX_DFLL_VOLTAGES - 1);
td               1814 drivers/clk/tegra/clk-dfll.c 	td->pwm_pin = devm_pinctrl_get(td->dev);
td               1815 drivers/clk/tegra/clk-dfll.c 	if (IS_ERR(td->pwm_pin)) {
td               1816 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "DT: missing pinctrl device\n");
td               1817 drivers/clk/tegra/clk-dfll.c 		return PTR_ERR(td->pwm_pin);
td               1820 drivers/clk/tegra/clk-dfll.c 	td->pwm_enable_state = pinctrl_lookup_state(td->pwm_pin,
td               1822 drivers/clk/tegra/clk-dfll.c 	if (IS_ERR(td->pwm_enable_state)) {
td               1823 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "DT: missing pwm enabled state\n");
td               1824 drivers/clk/tegra/clk-dfll.c 		return PTR_ERR(td->pwm_enable_state);
td               1827 drivers/clk/tegra/clk-dfll.c 	td->pwm_disable_state = pinctrl_lookup_state(td->pwm_pin,
td               1829 drivers/clk/tegra/clk-dfll.c 	if (IS_ERR(td->pwm_disable_state)) {
td               1830 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "DT: missing pwm disabled state\n");
td               1831 drivers/clk/tegra/clk-dfll.c 		return PTR_ERR(td->pwm_disable_state);
td               1844 drivers/clk/tegra/clk-dfll.c static int dfll_fetch_common_params(struct tegra_dfll *td)
td               1848 drivers/clk/tegra/clk-dfll.c 	ok &= read_dt_param(td, "nvidia,droop-ctrl", &td->droop_ctrl);
td               1849 drivers/clk/tegra/clk-dfll.c 	ok &= read_dt_param(td, "nvidia,sample-rate", &td->sample_rate);
td               1850 drivers/clk/tegra/clk-dfll.c 	ok &= read_dt_param(td, "nvidia,force-mode", &td->force_mode);
td               1851 drivers/clk/tegra/clk-dfll.c 	ok &= read_dt_param(td, "nvidia,cf", &td->cf);
td               1852 drivers/clk/tegra/clk-dfll.c 	ok &= read_dt_param(td, "nvidia,ci", &td->ci);
td               1853 drivers/clk/tegra/clk-dfll.c 	ok &= read_dt_param(td, "nvidia,cg", &td->cg);
td               1854 drivers/clk/tegra/clk-dfll.c 	td->cg_scale = of_property_read_bool(td->dev->of_node,
td               1857 drivers/clk/tegra/clk-dfll.c 	if (of_property_read_string(td->dev->of_node, "clock-output-names",
td               1858 drivers/clk/tegra/clk-dfll.c 				    &td->output_clock_name)) {
td               1859 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "missing clock-output-names property\n");
td               1883 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td;
td               1891 drivers/clk/tegra/clk-dfll.c 	td = devm_kzalloc(&pdev->dev, sizeof(*td), GFP_KERNEL);
td               1892 drivers/clk/tegra/clk-dfll.c 	if (!td)
td               1894 drivers/clk/tegra/clk-dfll.c 	td->dev = &pdev->dev;
td               1895 drivers/clk/tegra/clk-dfll.c 	platform_set_drvdata(pdev, td);
td               1897 drivers/clk/tegra/clk-dfll.c 	td->soc = soc;
td               1899 drivers/clk/tegra/clk-dfll.c 	td->dvco_rst = devm_reset_control_get(td->dev, "dvco");
td               1900 drivers/clk/tegra/clk-dfll.c 	if (IS_ERR(td->dvco_rst)) {
td               1901 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "couldn't get dvco reset\n");
td               1902 drivers/clk/tegra/clk-dfll.c 		return PTR_ERR(td->dvco_rst);
td               1905 drivers/clk/tegra/clk-dfll.c 	ret = dfll_fetch_common_params(td);
td               1907 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "couldn't parse device tree parameters\n");
td               1911 drivers/clk/tegra/clk-dfll.c 	if (of_property_read_bool(td->dev->of_node, "nvidia,pwm-to-pmic")) {
td               1912 drivers/clk/tegra/clk-dfll.c 		td->pmu_if = TEGRA_DFLL_PMU_PWM;
td               1913 drivers/clk/tegra/clk-dfll.c 		ret = dfll_fetch_pwm_params(td);
td               1915 drivers/clk/tegra/clk-dfll.c 		td->vdd_reg = devm_regulator_get(td->dev, "vdd-cpu");
td               1916 drivers/clk/tegra/clk-dfll.c 		if (IS_ERR(td->vdd_reg)) {
td               1917 drivers/clk/tegra/clk-dfll.c 			dev_err(td->dev, "couldn't get vdd_cpu regulator\n");
td               1918 drivers/clk/tegra/clk-dfll.c 			return PTR_ERR(td->vdd_reg);
td               1920 drivers/clk/tegra/clk-dfll.c 		td->pmu_if = TEGRA_DFLL_PMU_I2C;
td               1921 drivers/clk/tegra/clk-dfll.c 		ret = dfll_fetch_i2c_params(td);
td               1926 drivers/clk/tegra/clk-dfll.c 	ret = dfll_build_lut(td);
td               1928 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "couldn't build LUT\n");
td               1934 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "no control register resource\n");
td               1938 drivers/clk/tegra/clk-dfll.c 	td->base = devm_ioremap(td->dev, mem->start, resource_size(mem));
td               1939 drivers/clk/tegra/clk-dfll.c 	if (!td->base) {
td               1940 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "couldn't ioremap DFLL control registers\n");
td               1946 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "no i2c_base resource\n");
td               1950 drivers/clk/tegra/clk-dfll.c 	td->i2c_base = devm_ioremap(td->dev, mem->start, resource_size(mem));
td               1951 drivers/clk/tegra/clk-dfll.c 	if (!td->i2c_base) {
td               1952 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "couldn't ioremap i2c_base resource\n");
td               1958 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "no i2c_controller_base resource\n");
td               1962 drivers/clk/tegra/clk-dfll.c 	td->i2c_controller_base = devm_ioremap(td->dev, mem->start,
td               1964 drivers/clk/tegra/clk-dfll.c 	if (!td->i2c_controller_base) {
td               1965 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev,
td               1972 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev, "no lut_base resource\n");
td               1976 drivers/clk/tegra/clk-dfll.c 	td->lut_base = devm_ioremap(td->dev, mem->start, resource_size(mem));
td               1977 drivers/clk/tegra/clk-dfll.c 	if (!td->lut_base) {
td               1978 drivers/clk/tegra/clk-dfll.c 		dev_err(td->dev,
td               1983 drivers/clk/tegra/clk-dfll.c 	ret = dfll_init_clks(td);
td               1990 drivers/clk/tegra/clk-dfll.c 	ret = dfll_init(td);
td               1994 drivers/clk/tegra/clk-dfll.c 	ret = dfll_register_clk(td);
td               2000 drivers/clk/tegra/clk-dfll.c 	dfll_debug_init(td);
td               2016 drivers/clk/tegra/clk-dfll.c 	struct tegra_dfll *td = platform_get_drvdata(pdev);
td               2019 drivers/clk/tegra/clk-dfll.c 	if (td->mode != DFLL_DISABLED) {
td               2025 drivers/clk/tegra/clk-dfll.c 	debugfs_remove_recursive(td->debugfs_dir);
td               2027 drivers/clk/tegra/clk-dfll.c 	dfll_unregister_clk(td);
td               2030 drivers/clk/tegra/clk-dfll.c 	clk_unprepare(td->ref_clk);
td               2031 drivers/clk/tegra/clk-dfll.c 	clk_unprepare(td->soc_clk);
td               2032 drivers/clk/tegra/clk-dfll.c 	clk_unprepare(td->i2c_clk);
td               2034 drivers/clk/tegra/clk-dfll.c 	reset_control_assert(td->dvco_rst);
td               2036 drivers/clk/tegra/clk-dfll.c 	return td->soc;
td                259 drivers/dma/tegra20-apb-dma.c 		struct dma_async_tx_descriptor *td)
td                261 drivers/dma/tegra20-apb-dma.c 	return container_of(td, struct tegra_dma_desc, txd);
td                196 drivers/dma/tegra210-adma.c 		struct dma_async_tx_descriptor *td)
td                198 drivers/dma/tegra210-adma.c 	return container_of(td, struct tegra_adma_desc, vd.tx);
td                645 drivers/dma/ti/cppi41.c 	struct cppi41_desc *td;
td                650 drivers/dma/ti/cppi41.c 	td = cdd->cd;
td                651 drivers/dma/ti/cppi41.c 	td += cdd->first_td_desc;
td                657 drivers/dma/ti/cppi41.c 		cppi41_compute_td_desc(td);
td                690 drivers/dma/ti/cppi41.c 			pd0 = td->pd0;
td                114 drivers/dma/timb_dma.c 	struct timb_dma *td = tdchantotd(td_chan);
td                118 drivers/dma/timb_dma.c 	ier = ioread32(td->membase + TIMBDMA_IER);
td                122 drivers/dma/timb_dma.c 	iowrite32(ier, td->membase + TIMBDMA_IER);
td                129 drivers/dma/timb_dma.c 	struct timb_dma *td = (struct timb_dma *)((u8 *)td_chan -
td                134 drivers/dma/timb_dma.c 	dev_dbg(chan2dev(&td_chan->chan), "Checking irq: %d, td: %p\n", id, td);
td                136 drivers/dma/timb_dma.c 	isr = ioread32(td->membase + TIMBDMA_ISR) & (1 << id);
td                138 drivers/dma/timb_dma.c 		iowrite32(isr, td->membase + TIMBDMA_ISR);
td                258 drivers/dma/timb_dma.c static u32 __td_ier_mask(struct timb_dma *td)
td                263 drivers/dma/timb_dma.c 	for (i = 0; i < td->dma.chancnt; i++) {
td                264 drivers/dma/timb_dma.c 		struct timb_dma_chan *td_chan = td->channels + i;
td                568 drivers/dma/timb_dma.c 	struct timb_dma *td = (struct timb_dma *)data;
td                574 drivers/dma/timb_dma.c 	isr = ioread32(td->membase + TIMBDMA_ISR);
td                575 drivers/dma/timb_dma.c 	ipr = isr & __td_ier_mask(td);
td                578 drivers/dma/timb_dma.c 	iowrite32(ipr, td->membase + TIMBDMA_ISR);
td                580 drivers/dma/timb_dma.c 	for (i = 0; i < td->dma.chancnt; i++)
td                582 drivers/dma/timb_dma.c 			struct timb_dma_chan *td_chan = td->channels + i;
td                590 drivers/dma/timb_dma.c 	ier = __td_ier_mask(td);
td                591 drivers/dma/timb_dma.c 	iowrite32(ier, td->membase + TIMBDMA_IER);
td                597 drivers/dma/timb_dma.c 	struct timb_dma *td = devid;
td                598 drivers/dma/timb_dma.c 	u32 ipr = ioread32(td->membase + TIMBDMA_IPR);
td                602 drivers/dma/timb_dma.c 		iowrite32(0, td->membase + TIMBDMA_IER);
td                604 drivers/dma/timb_dma.c 		tasklet_schedule(&td->tasklet);
td                615 drivers/dma/timb_dma.c 	struct timb_dma *td;
td                638 drivers/dma/timb_dma.c 	td  = kzalloc(struct_size(td, channels, pdata->nr_channels),
td                640 drivers/dma/timb_dma.c 	if (!td) {
td                645 drivers/dma/timb_dma.c 	dev_dbg(&pdev->dev, "Allocated TD: %p\n", td);
td                647 drivers/dma/timb_dma.c 	td->membase = ioremap(iomem->start, resource_size(iomem));
td                648 drivers/dma/timb_dma.c 	if (!td->membase) {
td                655 drivers/dma/timb_dma.c 	iowrite32(TIMBDMA_32BIT_ADDR, td->membase + TIMBDMA_ACR);
td                658 drivers/dma/timb_dma.c 	iowrite32(0x0, td->membase + TIMBDMA_IER);
td                659 drivers/dma/timb_dma.c 	iowrite32(0xFFFFFFFF, td->membase + TIMBDMA_ISR);
td                661 drivers/dma/timb_dma.c 	tasklet_init(&td->tasklet, td_tasklet, (unsigned long)td);
td                663 drivers/dma/timb_dma.c 	err = request_irq(irq, td_irq, IRQF_SHARED, DRIVER_NAME, td);
td                669 drivers/dma/timb_dma.c 	td->dma.device_alloc_chan_resources	= td_alloc_chan_resources;
td                670 drivers/dma/timb_dma.c 	td->dma.device_free_chan_resources	= td_free_chan_resources;
td                671 drivers/dma/timb_dma.c 	td->dma.device_tx_status		= td_tx_status;
td                672 drivers/dma/timb_dma.c 	td->dma.device_issue_pending		= td_issue_pending;
td                674 drivers/dma/timb_dma.c 	dma_cap_set(DMA_SLAVE, td->dma.cap_mask);
td                675 drivers/dma/timb_dma.c 	dma_cap_set(DMA_PRIVATE, td->dma.cap_mask);
td                676 drivers/dma/timb_dma.c 	td->dma.device_prep_slave_sg = td_prep_slave_sg;
td                677 drivers/dma/timb_dma.c 	td->dma.device_terminate_all = td_terminate_all;
td                679 drivers/dma/timb_dma.c 	td->dma.dev = &pdev->dev;
td                681 drivers/dma/timb_dma.c 	INIT_LIST_HEAD(&td->dma.channels);
td                684 drivers/dma/timb_dma.c 		struct timb_dma_chan *td_chan = &td->channels[i];
td                695 drivers/dma/timb_dma.c 		td_chan->chan.device = &td->dma;
td                708 drivers/dma/timb_dma.c 		td_chan->membase = td->membase +
td                715 drivers/dma/timb_dma.c 		list_add_tail(&td_chan->chan.device_node, &td->dma.channels);
td                718 drivers/dma/timb_dma.c 	err = dma_async_device_register(&td->dma);
td                724 drivers/dma/timb_dma.c 	platform_set_drvdata(pdev, td);
td                730 drivers/dma/timb_dma.c 	free_irq(irq, td);
td                732 drivers/dma/timb_dma.c 	tasklet_kill(&td->tasklet);
td                733 drivers/dma/timb_dma.c 	iounmap(td->membase);
td                735 drivers/dma/timb_dma.c 	kfree(td);
td                745 drivers/dma/timb_dma.c 	struct timb_dma *td = platform_get_drvdata(pdev);
td                749 drivers/dma/timb_dma.c 	dma_async_device_unregister(&td->dma);
td                750 drivers/dma/timb_dma.c 	free_irq(irq, td);
td                751 drivers/dma/timb_dma.c 	tasklet_kill(&td->tasklet);
td                752 drivers/dma/timb_dma.c 	iounmap(td->membase);
td                753 drivers/dma/timb_dma.c 	kfree(td);
td               4237 drivers/gpu/drm/amd/amdgpu/si_dpm.c 	enum r600_td td = R600_TD_DFLT;
td               4242 drivers/gpu/drm/amd/amdgpu/si_dpm.c 	if (td == R600_TD_AUTO)
td               4247 drivers/gpu/drm/amd/amdgpu/si_dpm.c 	if (td == R600_TD_UP)
td               4250 drivers/gpu/drm/amd/amdgpu/si_dpm.c 	if (td == R600_TD_DOWN)
td                358 drivers/gpu/drm/radeon/r600_dpm.c 		    enum r600_td td)
td                360 drivers/gpu/drm/radeon/r600_dpm.c 	if (td == R600_TD_AUTO)
td                364 drivers/gpu/drm/radeon/r600_dpm.c 	if (td == R600_TD_UP)
td                366 drivers/gpu/drm/radeon/r600_dpm.c 	if (td == R600_TD_DOWN)
td                158 drivers/gpu/drm/radeon/r600_dpm.h void r600_select_td(struct radeon_device *rdev, enum r600_td td);
td                847 drivers/gpu/drm/radeon/rv770_dpm.c 	enum r600_td td = R600_TD_DFLT;
td                852 drivers/gpu/drm/radeon/rv770_dpm.c 	if (td == R600_TD_AUTO)
td                856 drivers/gpu/drm/radeon/rv770_dpm.c 	if (td == R600_TD_UP)
td                858 drivers/gpu/drm/radeon/rv770_dpm.c 	if (td == R600_TD_DOWN)
td               3772 drivers/gpu/drm/radeon/si_dpm.c 	enum r600_td td = R600_TD_DFLT;
td               3777 drivers/gpu/drm/radeon/si_dpm.c 	if (td == R600_TD_AUTO)
td               3782 drivers/gpu/drm/radeon/si_dpm.c 	if (td == R600_TD_UP)
td               3785 drivers/gpu/drm/radeon/si_dpm.c 	if (td == R600_TD_DOWN)
td                433 drivers/gpu/drm/radeon/sumo_dpm.c 	enum r600_td td = R600_TD_DFLT;
td                440 drivers/gpu/drm/radeon/sumo_dpm.c 	if (td == R600_TD_AUTO)
td                445 drivers/gpu/drm/radeon/sumo_dpm.c 	if (td == R600_TD_UP)
td                448 drivers/gpu/drm/radeon/sumo_dpm.c 	if (td == R600_TD_DOWN)
td                172 drivers/hid/hid-multitouch.c static void mt_post_parse_default_settings(struct mt_device *td,
td                174 drivers/hid/hid-multitouch.c static void mt_post_parse(struct mt_device *td, struct mt_application *app);
td                385 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hdev);
td                387 drivers/hid/hid-multitouch.c 	return sprintf(buf, "%u\n", td->mtclass.quirks);
td                395 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hdev);
td                403 drivers/hid/hid-multitouch.c 	td->mtclass.quirks = val;
td                405 drivers/hid/hid-multitouch.c 	list_for_each_entry(application, &td->applications, list) {
td                460 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hdev);
td                466 drivers/hid/hid-multitouch.c 		td->maxcontacts = field->value[0];
td                467 drivers/hid/hid-multitouch.c 		if (!td->maxcontacts &&
td                469 drivers/hid/hid-multitouch.c 			td->maxcontacts = field->logical_maximum;
td                470 drivers/hid/hid-multitouch.c 		if (td->mtclass.maxcontacts)
td                472 drivers/hid/hid-multitouch.c 			td->maxcontacts = td->mtclass.maxcontacts;
td                483 drivers/hid/hid-multitouch.c 			td->is_buttonpad = true;
td                532 drivers/hid/hid-multitouch.c static struct mt_application *mt_allocate_application(struct mt_device *td,
td                538 drivers/hid/hid-multitouch.c 	mt_application = devm_kzalloc(&td->hdev->dev, sizeof(*mt_application),
td                554 drivers/hid/hid-multitouch.c 		td->inputmode_value = MT_INPUTMODE_TOUCHPAD;
td                559 drivers/hid/hid-multitouch.c 	mt_application->quirks = td->mtclass.quirks;
td                562 drivers/hid/hid-multitouch.c 	list_add_tail(&mt_application->list, &td->applications);
td                567 drivers/hid/hid-multitouch.c static struct mt_application *mt_find_application(struct mt_device *td,
td                573 drivers/hid/hid-multitouch.c 	list_for_each_entry(tmp, &td->applications, list) {
td                575 drivers/hid/hid-multitouch.c 			if (!(td->mtclass.quirks & MT_QUIRK_SEPARATE_APP_REPORT) ||
td                584 drivers/hid/hid-multitouch.c 		mt_application = mt_allocate_application(td, report);
td                589 drivers/hid/hid-multitouch.c static struct mt_report_data *mt_allocate_report_data(struct mt_device *td,
td                596 drivers/hid/hid-multitouch.c 	rdata = devm_kzalloc(&td->hdev->dev, sizeof(*rdata), GFP_KERNEL);
td                601 drivers/hid/hid-multitouch.c 	rdata->application = mt_find_application(td, report);
td                604 drivers/hid/hid-multitouch.c 		devm_kfree(&td->hdev->dev, rdata);
td                620 drivers/hid/hid-multitouch.c 	list_add_tail(&rdata->list, &td->reports);
td                625 drivers/hid/hid-multitouch.c static struct mt_report_data *mt_find_report_data(struct mt_device *td,
td                630 drivers/hid/hid-multitouch.c 	list_for_each_entry(tmp, &td->reports, list) {
td                638 drivers/hid/hid-multitouch.c 		rdata = mt_allocate_report_data(td, report);
td                693 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hdev);
td                694 drivers/hid/hid-multitouch.c 	struct mt_class *cls = &td->mtclass;
td                704 drivers/hid/hid-multitouch.c 		td->inputmode_value = MT_INPUTMODE_TOUCHPAD;
td                878 drivers/hid/hid-multitouch.c static int mt_compute_slot(struct mt_device *td, struct mt_application *app,
td                899 drivers/hid/hid-multitouch.c static void mt_release_pending_palms(struct mt_device *td,
td                906 drivers/hid/hid-multitouch.c 	for_each_set_bit(slotnum, app->pending_palm_slots, td->maxcontacts) {
td                925 drivers/hid/hid-multitouch.c static void mt_sync_frame(struct mt_device *td, struct mt_application *app,
td                935 drivers/hid/hid-multitouch.c 	mt_release_pending_palms(td, app, input);
td                940 drivers/hid/hid-multitouch.c 	if (test_bit(MT_IO_FLAGS_ACTIVE_SLOTS, &td->mt_io_flags))
td                941 drivers/hid/hid-multitouch.c 		set_bit(MT_IO_FLAGS_PENDING_SLOTS, &td->mt_io_flags);
td                943 drivers/hid/hid-multitouch.c 		clear_bit(MT_IO_FLAGS_PENDING_SLOTS, &td->mt_io_flags);
td                944 drivers/hid/hid-multitouch.c 	clear_bit(MT_IO_FLAGS_ACTIVE_SLOTS, &td->mt_io_flags);
td                977 drivers/hid/hid-multitouch.c static int mt_process_slot(struct mt_device *td, struct input_dev *input,
td               1009 drivers/hid/hid-multitouch.c 	slotnum = mt_compute_slot(td, app, slot, input);
td               1010 drivers/hid/hid-multitouch.c 	if (slotnum < 0 || slotnum >= td->maxcontacts)
td               1098 drivers/hid/hid-multitouch.c 		set_bit(MT_IO_FLAGS_ACTIVE_SLOTS, &td->mt_io_flags);
td               1146 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hid);
td               1159 drivers/hid/hid-multitouch.c 	if (test_and_set_bit(MT_IO_FLAGS_RUNNING, &td->mt_io_flags))
td               1194 drivers/hid/hid-multitouch.c 		if (!mt_process_slot(td, input, app, slot))
td               1212 drivers/hid/hid-multitouch.c 		mt_sync_frame(td, app, input);
td               1233 drivers/hid/hid-multitouch.c 		if (test_bit(MT_IO_FLAGS_PENDING_SLOTS, &td->mt_io_flags))
td               1234 drivers/hid/hid-multitouch.c 			mod_timer(&td->release_timer,
td               1237 drivers/hid/hid-multitouch.c 			del_timer(&td->release_timer);
td               1240 drivers/hid/hid-multitouch.c 	clear_bit(MT_IO_FLAGS_RUNNING, &td->mt_io_flags);
td               1247 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hdev);
td               1248 drivers/hid/hid-multitouch.c 	struct mt_class *cls = &td->mtclass;
td               1252 drivers/hid/hid-multitouch.c 	if (!td->maxcontacts)
td               1253 drivers/hid/hid-multitouch.c 		td->maxcontacts = MT_DEFAULT_MAXCONTACT;
td               1255 drivers/hid/hid-multitouch.c 	mt_post_parse(td, app);
td               1256 drivers/hid/hid-multitouch.c 	if (td->serial_maybe)
td               1257 drivers/hid/hid-multitouch.c 		mt_post_parse_default_settings(td, app);
td               1268 drivers/hid/hid-multitouch.c 		td->is_buttonpad = true;
td               1270 drivers/hid/hid-multitouch.c 	if (td->is_buttonpad)
td               1274 drivers/hid/hid-multitouch.c 					       BITS_TO_LONGS(td->maxcontacts),
td               1280 drivers/hid/hid-multitouch.c 	ret = input_mt_init_slots(input, td->maxcontacts, app->mt_flags);
td               1294 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hdev);
td               1298 drivers/hid/hid-multitouch.c 	rdata = mt_find_report_data(td, field->report);
td               1312 drivers/hid/hid-multitouch.c 	if (!td->mtclass.export_all_inputs &&
td               1367 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hdev);
td               1370 drivers/hid/hid-multitouch.c 	rdata = mt_find_report_data(td, field->report);
td               1383 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hid);
td               1386 drivers/hid/hid-multitouch.c 	rdata = mt_find_report_data(td, field->report);
td               1395 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hid);
td               1402 drivers/hid/hid-multitouch.c 	rdata = mt_find_report_data(td, report);
td               1418 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hdev);
td               1419 drivers/hid/hid-multitouch.c 	struct mt_class *cls = &td->mtclass;
td               1450 drivers/hid/hid-multitouch.c 		field->value[index] = td->inputmode_value;
td               1519 drivers/hid/hid-multitouch.c static void mt_post_parse_default_settings(struct mt_device *td,
td               1536 drivers/hid/hid-multitouch.c static void mt_post_parse(struct mt_device *td, struct mt_application *app)
td               1544 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hdev);
td               1553 drivers/hid/hid-multitouch.c 		rdata = mt_find_report_data(td, report);
td               1644 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hid);
td               1663 drivers/hid/hid-multitouch.c 	list_for_each_entry(application, &td->applications, list) {
td               1670 drivers/hid/hid-multitouch.c 	struct mt_device *td = from_timer(td, t, release_timer);
td               1671 drivers/hid/hid-multitouch.c 	struct hid_device *hdev = td->hdev;
td               1677 drivers/hid/hid-multitouch.c 	if (test_and_set_bit(MT_IO_FLAGS_RUNNING, &td->mt_io_flags))
td               1679 drivers/hid/hid-multitouch.c 	if (test_bit(MT_IO_FLAGS_PENDING_SLOTS, &td->mt_io_flags))
td               1681 drivers/hid/hid-multitouch.c 	clear_bit(MT_IO_FLAGS_RUNNING, &td->mt_io_flags);
td               1687 drivers/hid/hid-multitouch.c 	struct mt_device *td;
td               1697 drivers/hid/hid-multitouch.c 	td = devm_kzalloc(&hdev->dev, sizeof(struct mt_device), GFP_KERNEL);
td               1698 drivers/hid/hid-multitouch.c 	if (!td) {
td               1702 drivers/hid/hid-multitouch.c 	td->hdev = hdev;
td               1703 drivers/hid/hid-multitouch.c 	td->mtclass = *mtclass;
td               1704 drivers/hid/hid-multitouch.c 	td->inputmode_value = MT_INPUTMODE_TOUCHSCREEN;
td               1705 drivers/hid/hid-multitouch.c 	hid_set_drvdata(hdev, td);
td               1707 drivers/hid/hid-multitouch.c 	INIT_LIST_HEAD(&td->applications);
td               1708 drivers/hid/hid-multitouch.c 	INIT_LIST_HEAD(&td->reports);
td               1711 drivers/hid/hid-multitouch.c 		td->serial_maybe = true;
td               1733 drivers/hid/hid-multitouch.c 	timer_setup(&td->release_timer, mt_expired_timeout, 0);
td               1778 drivers/hid/hid-multitouch.c 	struct mt_device *td = hid_get_drvdata(hdev);
td               1780 drivers/hid/hid-multitouch.c 	del_timer_sync(&td->release_timer);
td                102 drivers/ide/palm_bk3710.c 	u8 td, tkw, t0;
td                113 drivers/ide/palm_bk3710.c 	td = DIV_ROUND_UP(t->active, ideclk_period);
td                114 drivers/ide/palm_bk3710.c 	tkw = t0 - td - 1;
td                115 drivers/ide/palm_bk3710.c 	td -= 1;
td                118 drivers/ide/palm_bk3710.c 	val32 |= (td << (dev ? 8 : 0));
td               1687 drivers/infiniband/hw/mlx5/main.c int mlx5_ib_enable_lb(struct mlx5_ib_dev *dev, bool td, bool qp)
td               1692 drivers/infiniband/hw/mlx5/main.c 	if (td)
td               1710 drivers/infiniband/hw/mlx5/main.c void mlx5_ib_disable_lb(struct mlx5_ib_dev *dev, bool td, bool qp)
td               1713 drivers/infiniband/hw/mlx5/main.c 	if (td)
td               1118 drivers/infiniband/hw/mlx5/mlx5_ib.h int mlx5_ib_enable_lb(struct mlx5_ib_dev *dev, bool td, bool qp);
td               1119 drivers/infiniband/hw/mlx5/mlx5_ib.h void mlx5_ib_disable_lb(struct mlx5_ib_dev *dev, bool td, bool qp);
td               2925 drivers/infiniband/hw/qib/qib_iba6120.c 		u64 ta, tb, tc, td, te;
td               2928 drivers/infiniband/hw/qib/qib_iba6120.c 		qib_snapshot_counters(ppd, &ta, &tb, &tc, &td, &te);
td               2933 drivers/infiniband/hw/qib/qib_iba6120.c 		cs->rpkts = td - cs->rpkts;
td                791 drivers/md/dm-thin-metadata.c 	struct dm_thin_device *td, *tmp;
td                795 drivers/md/dm-thin-metadata.c 	list_for_each_entry_safe(td, tmp, &pmd->thin_devices, list) {
td                796 drivers/md/dm-thin-metadata.c 		if (!td->changed)
td                799 drivers/md/dm-thin-metadata.c 		key = td->id;
td                801 drivers/md/dm-thin-metadata.c 		details.mapped_blocks = cpu_to_le64(td->mapped_blocks);
td                802 drivers/md/dm-thin-metadata.c 		details.transaction_id = cpu_to_le64(td->transaction_id);
td                803 drivers/md/dm-thin-metadata.c 		details.creation_time = cpu_to_le32(td->creation_time);
td                804 drivers/md/dm-thin-metadata.c 		details.snapshotted_time = cpu_to_le32(td->snapshotted_time);
td                812 drivers/md/dm-thin-metadata.c 		if (td->open_count)
td                813 drivers/md/dm-thin-metadata.c 			td->changed = 0;
td                815 drivers/md/dm-thin-metadata.c 			list_del(&td->list);
td                816 drivers/md/dm-thin-metadata.c 			kfree(td);
td                937 drivers/md/dm-thin-metadata.c 	struct dm_thin_device *td, *tmp;
td                940 drivers/md/dm-thin-metadata.c 	list_for_each_entry_safe(td, tmp, &pmd->thin_devices, list) {
td                941 drivers/md/dm-thin-metadata.c 		if (td->open_count)
td                944 drivers/md/dm-thin-metadata.c 			list_del(&td->list);
td                945 drivers/md/dm-thin-metadata.c 			kfree(td);
td                978 drivers/md/dm-thin-metadata.c 			 struct dm_thin_device **td)
td                997 drivers/md/dm-thin-metadata.c 			*td = td2;
td               1020 drivers/md/dm-thin-metadata.c 	*td = kmalloc(sizeof(**td), GFP_NOIO);
td               1021 drivers/md/dm-thin-metadata.c 	if (!*td)
td               1024 drivers/md/dm-thin-metadata.c 	(*td)->pmd = pmd;
td               1025 drivers/md/dm-thin-metadata.c 	(*td)->id = dev;
td               1026 drivers/md/dm-thin-metadata.c 	(*td)->open_count = 1;
td               1027 drivers/md/dm-thin-metadata.c 	(*td)->changed = changed;
td               1028 drivers/md/dm-thin-metadata.c 	(*td)->aborted_with_changes = false;
td               1029 drivers/md/dm-thin-metadata.c 	(*td)->mapped_blocks = le64_to_cpu(details_le.mapped_blocks);
td               1030 drivers/md/dm-thin-metadata.c 	(*td)->transaction_id = le64_to_cpu(details_le.transaction_id);
td               1031 drivers/md/dm-thin-metadata.c 	(*td)->creation_time = le32_to_cpu(details_le.creation_time);
td               1032 drivers/md/dm-thin-metadata.c 	(*td)->snapshotted_time = le32_to_cpu(details_le.snapshotted_time);
td               1034 drivers/md/dm-thin-metadata.c 	list_add(&(*td)->list, &pmd->thin_devices);
td               1039 drivers/md/dm-thin-metadata.c static void __close_device(struct dm_thin_device *td)
td               1041 drivers/md/dm-thin-metadata.c 	--td->open_count;
td               1051 drivers/md/dm-thin-metadata.c 	struct dm_thin_device *td;
td               1077 drivers/md/dm-thin-metadata.c 	r = __open_device(pmd, dev, 1, &td);
td               1083 drivers/md/dm-thin-metadata.c 	__close_device(td);
td               1105 drivers/md/dm-thin-metadata.c 	struct dm_thin_device *td;
td               1107 drivers/md/dm-thin-metadata.c 	r = __open_device(pmd, origin, 0, &td);
td               1111 drivers/md/dm-thin-metadata.c 	td->changed = 1;
td               1112 drivers/md/dm-thin-metadata.c 	td->snapshotted_time = time;
td               1114 drivers/md/dm-thin-metadata.c 	snap->mapped_blocks = td->mapped_blocks;
td               1116 drivers/md/dm-thin-metadata.c 	__close_device(td);
td               1127 drivers/md/dm-thin-metadata.c 	struct dm_thin_device *td;
td               1158 drivers/md/dm-thin-metadata.c 	r = __open_device(pmd, dev, 1, &td);
td               1162 drivers/md/dm-thin-metadata.c 	r = __set_snapshot_details(pmd, td, origin, pmd->time);
td               1163 drivers/md/dm-thin-metadata.c 	__close_device(td);
td               1195 drivers/md/dm-thin-metadata.c 	struct dm_thin_device *td;
td               1198 drivers/md/dm-thin-metadata.c 	r = __open_device(pmd, dev, 0, &td);
td               1202 drivers/md/dm-thin-metadata.c 	if (td->open_count > 1) {
td               1203 drivers/md/dm-thin-metadata.c 		__close_device(td);
td               1207 drivers/md/dm-thin-metadata.c 	list_del(&td->list);
td               1208 drivers/md/dm-thin-metadata.c 	kfree(td);
td               1438 drivers/md/dm-thin-metadata.c 			     struct dm_thin_device **td)
td               1444 drivers/md/dm-thin-metadata.c 		r = __open_device(pmd, dev, 0, td);
td               1450 drivers/md/dm-thin-metadata.c int dm_pool_close_thin_device(struct dm_thin_device *td)
td               1452 drivers/md/dm-thin-metadata.c 	pmd_write_lock_in_core(td->pmd);
td               1453 drivers/md/dm-thin-metadata.c 	__close_device(td);
td               1454 drivers/md/dm-thin-metadata.c 	pmd_write_unlock(td->pmd);
td               1459 drivers/md/dm-thin-metadata.c dm_thin_id dm_thin_dev_id(struct dm_thin_device *td)
td               1461 drivers/md/dm-thin-metadata.c 	return td->id;
td               1470 drivers/md/dm-thin-metadata.c static bool __snapshotted_since(struct dm_thin_device *td, uint32_t time)
td               1472 drivers/md/dm-thin-metadata.c 	return td->snapshotted_time > time;
td               1475 drivers/md/dm-thin-metadata.c static void unpack_lookup_result(struct dm_thin_device *td, __le64 value,
td               1485 drivers/md/dm-thin-metadata.c 	result->shared = __snapshotted_since(td, exception_time);
td               1488 drivers/md/dm-thin-metadata.c static int __find_block(struct dm_thin_device *td, dm_block_t block,
td               1493 drivers/md/dm-thin-metadata.c 	struct dm_pool_metadata *pmd = td->pmd;
td               1494 drivers/md/dm-thin-metadata.c 	dm_block_t keys[2] = { td->id, block };
td               1504 drivers/md/dm-thin-metadata.c 		unpack_lookup_result(td, value, result);
td               1509 drivers/md/dm-thin-metadata.c int dm_thin_find_block(struct dm_thin_device *td, dm_block_t block,
td               1513 drivers/md/dm-thin-metadata.c 	struct dm_pool_metadata *pmd = td->pmd;
td               1521 drivers/md/dm-thin-metadata.c 	r = __find_block(td, block, can_issue_io, result);
td               1527 drivers/md/dm-thin-metadata.c static int __find_next_mapped_block(struct dm_thin_device *td, dm_block_t block,
td               1533 drivers/md/dm-thin-metadata.c 	struct dm_pool_metadata *pmd = td->pmd;
td               1534 drivers/md/dm-thin-metadata.c 	dm_block_t keys[2] = { td->id, block };
td               1538 drivers/md/dm-thin-metadata.c 		unpack_lookup_result(td, value, result);
td               1543 drivers/md/dm-thin-metadata.c static int __find_mapped_range(struct dm_thin_device *td,
td               1555 drivers/md/dm-thin-metadata.c 	r = __find_next_mapped_block(td, begin, &begin, &lookup);
td               1569 drivers/md/dm-thin-metadata.c 		r = __find_block(td, begin, true, &lookup);
td               1589 drivers/md/dm-thin-metadata.c int dm_thin_find_mapped_range(struct dm_thin_device *td,
td               1595 drivers/md/dm-thin-metadata.c 	struct dm_pool_metadata *pmd = td->pmd;
td               1599 drivers/md/dm-thin-metadata.c 		r = __find_mapped_range(td, begin, end, thin_begin, thin_end,
td               1607 drivers/md/dm-thin-metadata.c static int __insert(struct dm_thin_device *td, dm_block_t block,
td               1612 drivers/md/dm-thin-metadata.c 	struct dm_pool_metadata *pmd = td->pmd;
td               1613 drivers/md/dm-thin-metadata.c 	dm_block_t keys[2] = { td->id, block };
td               1623 drivers/md/dm-thin-metadata.c 	td->changed = 1;
td               1625 drivers/md/dm-thin-metadata.c 		td->mapped_blocks++;
td               1630 drivers/md/dm-thin-metadata.c int dm_thin_insert_block(struct dm_thin_device *td, dm_block_t block,
td               1635 drivers/md/dm-thin-metadata.c 	pmd_write_lock(td->pmd);
td               1636 drivers/md/dm-thin-metadata.c 	if (!td->pmd->fail_io)
td               1637 drivers/md/dm-thin-metadata.c 		r = __insert(td, block, data_block);
td               1638 drivers/md/dm-thin-metadata.c 	pmd_write_unlock(td->pmd);
td               1643 drivers/md/dm-thin-metadata.c static int __remove(struct dm_thin_device *td, dm_block_t block)
td               1646 drivers/md/dm-thin-metadata.c 	struct dm_pool_metadata *pmd = td->pmd;
td               1647 drivers/md/dm-thin-metadata.c 	dm_block_t keys[2] = { td->id, block };
td               1653 drivers/md/dm-thin-metadata.c 	td->mapped_blocks--;
td               1654 drivers/md/dm-thin-metadata.c 	td->changed = 1;
td               1659 drivers/md/dm-thin-metadata.c static int __remove_range(struct dm_thin_device *td, dm_block_t begin, dm_block_t end)
td               1663 drivers/md/dm-thin-metadata.c 	struct dm_pool_metadata *pmd = td->pmd;
td               1664 drivers/md/dm-thin-metadata.c 	dm_block_t keys[1] = { td->id };
td               1707 drivers/md/dm-thin-metadata.c 	td->mapped_blocks -= total_count;
td               1708 drivers/md/dm-thin-metadata.c 	td->changed = 1;
td               1718 drivers/md/dm-thin-metadata.c int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block)
td               1722 drivers/md/dm-thin-metadata.c 	pmd_write_lock(td->pmd);
td               1723 drivers/md/dm-thin-metadata.c 	if (!td->pmd->fail_io)
td               1724 drivers/md/dm-thin-metadata.c 		r = __remove(td, block);
td               1725 drivers/md/dm-thin-metadata.c 	pmd_write_unlock(td->pmd);
td               1730 drivers/md/dm-thin-metadata.c int dm_thin_remove_range(struct dm_thin_device *td,
td               1735 drivers/md/dm-thin-metadata.c 	pmd_write_lock(td->pmd);
td               1736 drivers/md/dm-thin-metadata.c 	if (!td->pmd->fail_io)
td               1737 drivers/md/dm-thin-metadata.c 		r = __remove_range(td, begin, end);
td               1738 drivers/md/dm-thin-metadata.c 	pmd_write_unlock(td->pmd);
td               1787 drivers/md/dm-thin-metadata.c bool dm_thin_changed_this_transaction(struct dm_thin_device *td)
td               1791 drivers/md/dm-thin-metadata.c 	down_read(&td->pmd->root_lock);
td               1792 drivers/md/dm-thin-metadata.c 	r = td->changed;
td               1793 drivers/md/dm-thin-metadata.c 	up_read(&td->pmd->root_lock);
td               1801 drivers/md/dm-thin-metadata.c 	struct dm_thin_device *td, *tmp;
td               1804 drivers/md/dm-thin-metadata.c 	list_for_each_entry_safe(td, tmp, &pmd->thin_devices, list) {
td               1805 drivers/md/dm-thin-metadata.c 		if (td->changed) {
td               1806 drivers/md/dm-thin-metadata.c 			r = td->changed;
td               1815 drivers/md/dm-thin-metadata.c bool dm_thin_aborted_changes(struct dm_thin_device *td)
td               1819 drivers/md/dm-thin-metadata.c 	down_read(&td->pmd->root_lock);
td               1820 drivers/md/dm-thin-metadata.c 	r = td->aborted_with_changes;
td               1821 drivers/md/dm-thin-metadata.c 	up_read(&td->pmd->root_lock);
td               1865 drivers/md/dm-thin-metadata.c 	struct dm_thin_device *td;
td               1867 drivers/md/dm-thin-metadata.c 	list_for_each_entry(td, &pmd->thin_devices, list)
td               1868 drivers/md/dm-thin-metadata.c 		td->aborted_with_changes = td->changed;
td               1948 drivers/md/dm-thin-metadata.c int dm_thin_get_mapped_count(struct dm_thin_device *td, dm_block_t *result)
td               1951 drivers/md/dm-thin-metadata.c 	struct dm_pool_metadata *pmd = td->pmd;
td               1955 drivers/md/dm-thin-metadata.c 		*result = td->mapped_blocks;
td               1963 drivers/md/dm-thin-metadata.c static int __highest_block(struct dm_thin_device *td, dm_block_t *result)
td               1968 drivers/md/dm-thin-metadata.c 	struct dm_pool_metadata *pmd = td->pmd;
td               1970 drivers/md/dm-thin-metadata.c 	r = dm_btree_lookup(&pmd->tl_info, pmd->root, &td->id, &value_le);
td               1979 drivers/md/dm-thin-metadata.c int dm_thin_get_highest_mapped_block(struct dm_thin_device *td,
td               1983 drivers/md/dm-thin-metadata.c 	struct dm_pool_metadata *pmd = td->pmd;
td               1987 drivers/md/dm-thin-metadata.c 		r = __highest_block(td, result);
td                129 drivers/md/dm-thin-metadata.h 			     struct dm_thin_device **td);
td                131 drivers/md/dm-thin-metadata.h int dm_pool_close_thin_device(struct dm_thin_device *td);
td                133 drivers/md/dm-thin-metadata.h dm_thin_id dm_thin_dev_id(struct dm_thin_device *td);
td                146 drivers/md/dm-thin-metadata.h int dm_thin_find_block(struct dm_thin_device *td, dm_block_t block,
td                153 drivers/md/dm-thin-metadata.h int dm_thin_find_mapped_range(struct dm_thin_device *td,
td                166 drivers/md/dm-thin-metadata.h int dm_thin_insert_block(struct dm_thin_device *td, dm_block_t block,
td                169 drivers/md/dm-thin-metadata.h int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block);
td                170 drivers/md/dm-thin-metadata.h int dm_thin_remove_range(struct dm_thin_device *td,
td                176 drivers/md/dm-thin-metadata.h bool dm_thin_changed_this_transaction(struct dm_thin_device *td);
td                180 drivers/md/dm-thin-metadata.h bool dm_thin_aborted_changes(struct dm_thin_device *td);
td                182 drivers/md/dm-thin-metadata.h int dm_thin_get_highest_mapped_block(struct dm_thin_device *td,
td                185 drivers/md/dm-thin-metadata.h int dm_thin_get_mapped_count(struct dm_thin_device *td, dm_block_t *result);
td                120 drivers/md/dm-thin.c static void build_key(struct dm_thin_device *td, enum lock_space ls,
td                124 drivers/md/dm-thin.c 	key->dev = dm_thin_dev_id(td);
td                129 drivers/md/dm-thin.c static void build_data_key(struct dm_thin_device *td, dm_block_t b,
td                132 drivers/md/dm-thin.c 	build_key(td, PHYSICAL, b, b + 1llu, key);
td                135 drivers/md/dm-thin.c static void build_virtual_key(struct dm_thin_device *td, dm_block_t b,
td                138 drivers/md/dm-thin.c 	build_key(td, VIRTUAL, b, b + 1llu, key);
td                346 drivers/md/dm-thin.c 	struct dm_thin_device *td;
td                744 drivers/md/dm-thin.c 		dm_thin_changed_this_transaction(tc->td);
td                773 drivers/md/dm-thin.c 	if (dm_thin_aborted_changes(tc->td)) {
td                981 drivers/md/dm-thin.c 	if (dm_thin_aborted_changes(tc->td)) {
td               1012 drivers/md/dm-thin.c 	r = dm_thin_insert_block(tc->td, m->virt_begin, m->data_block);
td               1066 drivers/md/dm-thin.c 	r = dm_thin_remove_range(tc->td, m->cell->key.block_begin, m->cell->key.block_end);
td               1162 drivers/md/dm-thin.c 	r = dm_thin_remove_range(tc->td, m->virt_begin, m->virt_end);
td               1697 drivers/md/dm-thin.c 		r = dm_thin_find_mapped_range(tc->td, begin, end, &virt_begin, &virt_end,
td               1706 drivers/md/dm-thin.c 		build_key(tc->td, PHYSICAL, data_begin, data_begin + (virt_end - virt_begin), &data_key);
td               1778 drivers/md/dm-thin.c 	build_key(tc->td, VIRTUAL, begin, end, &virt_key);
td               1874 drivers/md/dm-thin.c 	build_data_key(tc->td, lookup_result->block, &key);
td               1957 drivers/md/dm-thin.c 	r = dm_thin_find_block(tc->td, block, 1, &lookup_result);
td               2010 drivers/md/dm-thin.c 	build_virtual_key(tc->td, block, &key);
td               2025 drivers/md/dm-thin.c 	r = dm_thin_find_block(tc->td, block, 1, &lookup_result);
td               2722 drivers/md/dm-thin.c 	struct dm_thin_device *td = tc->td;
td               2749 drivers/md/dm-thin.c 	build_virtual_key(tc->td, block, &key);
td               2753 drivers/md/dm-thin.c 	r = dm_thin_find_block(td, block, 0, &result);
td               2779 drivers/md/dm-thin.c 		build_data_key(tc->td, result.block, &key);
td               4171 drivers/md/dm-thin.c 	dm_pool_close_thin_device(tc->td);
td               4270 drivers/md/dm-thin.c 	r = dm_pool_open_thin_device(tc->pool->pmd, tc->dev_id, &tc->td);
td               4317 drivers/md/dm-thin.c 	dm_pool_close_thin_device(tc->td);
td               4427 drivers/md/dm-thin.c 	if (!tc->td)
td               4432 drivers/md/dm-thin.c 			r = dm_thin_get_mapped_count(tc->td, &mapped);
td               4438 drivers/md/dm-thin.c 			r = dm_thin_get_highest_mapped_block(tc->td, &highest);
td                742 drivers/md/dm.c static int open_table_device(struct table_device *td, dev_t dev,
td                749 drivers/md/dm.c 	BUG_ON(td->dm_dev.bdev);
td                751 drivers/md/dm.c 	bdev = blkdev_get_by_dev(dev, td->dm_dev.mode | FMODE_EXCL, _dm_claim_ptr);
td                757 drivers/md/dm.c 		blkdev_put(bdev, td->dm_dev.mode | FMODE_EXCL);
td                761 drivers/md/dm.c 	td->dm_dev.bdev = bdev;
td                762 drivers/md/dm.c 	td->dm_dev.dax_dev = dax_get_by_host(bdev->bd_disk->disk_name);
td                769 drivers/md/dm.c static void close_table_device(struct table_device *td, struct mapped_device *md)
td                771 drivers/md/dm.c 	if (!td->dm_dev.bdev)
td                774 drivers/md/dm.c 	bd_unlink_disk_holder(td->dm_dev.bdev, dm_disk(md));
td                775 drivers/md/dm.c 	blkdev_put(td->dm_dev.bdev, td->dm_dev.mode | FMODE_EXCL);
td                776 drivers/md/dm.c 	put_dax(td->dm_dev.dax_dev);
td                777 drivers/md/dm.c 	td->dm_dev.bdev = NULL;
td                778 drivers/md/dm.c 	td->dm_dev.dax_dev = NULL;
td                784 drivers/md/dm.c 	struct table_device *td;
td                786 drivers/md/dm.c 	list_for_each_entry(td, l, list)
td                787 drivers/md/dm.c 		if (td->dm_dev.bdev->bd_dev == dev && td->dm_dev.mode == mode)
td                788 drivers/md/dm.c 			return td;
td                797 drivers/md/dm.c 	struct table_device *td;
td                800 drivers/md/dm.c 	td = find_table_device(&md->table_devices, dev, mode);
td                801 drivers/md/dm.c 	if (!td) {
td                802 drivers/md/dm.c 		td = kmalloc_node(sizeof(*td), GFP_KERNEL, md->numa_node_id);
td                803 drivers/md/dm.c 		if (!td) {
td                808 drivers/md/dm.c 		td->dm_dev.mode = mode;
td                809 drivers/md/dm.c 		td->dm_dev.bdev = NULL;
td                811 drivers/md/dm.c 		if ((r = open_table_device(td, dev, md))) {
td                813 drivers/md/dm.c 			kfree(td);
td                817 drivers/md/dm.c 		format_dev_t(td->dm_dev.name, dev);
td                819 drivers/md/dm.c 		refcount_set(&td->count, 1);
td                820 drivers/md/dm.c 		list_add(&td->list, &md->table_devices);
td                822 drivers/md/dm.c 		refcount_inc(&td->count);
td                826 drivers/md/dm.c 	*result = &td->dm_dev;
td                833 drivers/md/dm.c 	struct table_device *td = container_of(d, struct table_device, dm_dev);
td                836 drivers/md/dm.c 	if (refcount_dec_and_test(&td->count)) {
td                837 drivers/md/dm.c 		close_table_device(td, md);
td                838 drivers/md/dm.c 		list_del(&td->list);
td                839 drivers/md/dm.c 		kfree(td);
td                850 drivers/md/dm.c 		struct table_device *td = list_entry(tmp, struct table_device, list);
td                853 drivers/md/dm.c 		       td->dm_dev.name, refcount_read(&td->count));
td                854 drivers/md/dm.c 		kfree(td);
td                396 drivers/media/platform/sti/hva/hva-h264.c 	struct hva_h264_td td;
td                596 drivers/media/platform/sti/hva/hva-h264.c 	struct hva_h264_td *td = &task->td;
td                624 drivers/media/platform/sti/hva/hva-h264.c 	memset(td, 0, sizeof(struct hva_h264_td));
td                626 drivers/media/platform/sti/hva/hva-h264.c 	td->frame_width = frame_width;
td                627 drivers/media/platform/sti/hva/hva-h264.c 	td->frame_height = frame_height;
td                630 drivers/media/platform/sti/hva/hva-h264.c 	td->window_width =  frame_width;
td                631 drivers/media/platform/sti/hva/hva-h264.c 	td->window_height = frame_height;
td                632 drivers/media/platform/sti/hva/hva-h264.c 	td->window_horizontal_offset = 0;
td                633 drivers/media/platform/sti/hva/hva-h264.c 	td->window_vertical_offset = 0;
td                635 drivers/media/platform/sti/hva/hva-h264.c 	td->first_picture_in_sequence = (!frame_num) ? 1 : 0;
td                638 drivers/media/platform/sti/hva/hva-h264.c 	td->pic_order_cnt_type = 2;
td                641 drivers/media/platform/sti/hva/hva-h264.c 	td->use_constrained_intra_flag = false;
td                642 drivers/media/platform/sti/hva/hva-h264.c 	td->brc_type = (ctrls->bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR)
td                645 drivers/media/platform/sti/hva/hva-h264.c 	td->entropy_coding_mode = (ctrls->entropy_mode == cavlc) ? CAVLC :
td                648 drivers/media/platform/sti/hva/hva-h264.c 	td->bit_rate = ctrls->bitrate;
td                656 drivers/media/platform/sti/hva/hva-h264.c 		td->framerate_den = 1;
td                657 drivers/media/platform/sti/hva/hva-h264.c 		td->framerate_num = (time_per_frame->denominator +
td                666 drivers/media/platform/sti/hva/hva-h264.c 		td->bit_rate /= time_per_frame->numerator;
td                667 drivers/media/platform/sti/hva/hva-h264.c 		td->bit_rate *= time_per_frame->denominator;
td                668 drivers/media/platform/sti/hva/hva-h264.c 		td->bit_rate /= td->framerate_num;
td                670 drivers/media/platform/sti/hva/hva-h264.c 		td->framerate_den = time_per_frame->numerator;
td                671 drivers/media/platform/sti/hva/hva-h264.c 		td->framerate_num = time_per_frame->denominator;
td                683 drivers/media/platform/sti/hva/hva-h264.c 	if (td->bit_rate > max_bitrate) {
td                686 drivers/media/platform/sti/hva/hva-h264.c 			pctx->name, td->bit_rate, max_bitrate);
td                687 drivers/media/platform/sti/hva/hva-h264.c 		td->bit_rate = max_bitrate;
td                691 drivers/media/platform/sti/hva/hva-h264.c 	td->cpb_buffer_size = ctrls->cpb_size * 8000;
td                702 drivers/media/platform/sti/hva/hva-h264.c 	if (td->cpb_buffer_size > max_cpb_buffer_size) {
td                705 drivers/media/platform/sti/hva/hva-h264.c 			pctx->name, td->cpb_buffer_size, max_cpb_buffer_size);
td                706 drivers/media/platform/sti/hva/hva-h264.c 		td->cpb_buffer_size = max_cpb_buffer_size;
td                710 drivers/media/platform/sti/hva/hva-h264.c 	td->brc_no_skip = 0;
td                714 drivers/media/platform/sti/hva/hva-h264.c 	    td->bit_rate)
td                715 drivers/media/platform/sti/hva/hva-h264.c 		td->delay = 1000 * (td->cpb_buffer_size / td->bit_rate);
td                717 drivers/media/platform/sti/hva/hva-h264.c 		td->delay = 0;
td                721 drivers/media/platform/sti/hva/hva-h264.c 		td->sampling_mode = SAMPLING_MODE_NV12;
td                724 drivers/media/platform/sti/hva/hva-h264.c 		td->sampling_mode = SAMPLING_MODE_NV21;
td                739 drivers/media/platform/sti/hva/hva-h264.c 	td->rgb2_yuv_y_coeff = 0x12031008;
td                740 drivers/media/platform/sti/hva/hva-h264.c 	td->rgb2_yuv_u_coeff = 0x800EF7FB;
td                741 drivers/media/platform/sti/hva/hva-h264.c 	td->rgb2_yuv_v_coeff = 0x80FEF40E;
td                744 drivers/media/platform/sti/hva/hva-h264.c 	td->transform_mode = ctrls->dct8x8;
td                747 drivers/media/platform/sti/hva/hva-h264.c 	td->encoder_complexity = 2;
td                750 drivers/media/platform/sti/hva/hva-h264.c 	td->quant = 28;
td                752 drivers/media/platform/sti/hva/hva-h264.c 	if (td->framerate_den == 0) {
td                759 drivers/media/platform/sti/hva/hva-h264.c 	if (td->framerate_num == 0)
td                760 drivers/media/platform/sti/hva/hva-h264.c 		td->brc_type = 0;
td                763 drivers/media/platform/sti/hva/hva-h264.c 	td->strict_hrd_compliancy = 1;
td                766 drivers/media/platform/sti/hva/hva-h264.c 	td->qp_min = clamp_val(ctrls->qpmin, 0, 51);
td                767 drivers/media/platform/sti/hva/hva-h264.c 	td->qp_max = clamp_val(ctrls->qpmax, 0, 51);
td                769 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_source_buffer = frame->paddr;
td                770 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_fwd_ref_buffer = fwd_ref_frame->paddr;
td                771 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_rec_buffer = loc_rec_frame->paddr;
td                773 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_output_bitstream_end = (u32)stream->paddr + stream->size;
td                775 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_output_bitstream_start = (u32)stream->paddr;
td                776 drivers/media/platform/sti/hva/hva-h264.c 	td->bitstream_offset = (((u32)stream->paddr & 0xF) << 3) &
td                779 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_param_out = (u32)ctx->task->paddr +
td                785 drivers/media/platform/sti/hva/hva-h264.c 		td->addr_spatial_context =  ALIGN(paddr, 0x100);
td                788 drivers/media/platform/sti/hva/hva-h264.c 		td->addr_temporal_context = ALIGN(paddr, 0x100);
td                791 drivers/media/platform/sti/hva/hva-h264.c 		td->addr_temporal_context = ALIGN(paddr, 0x100);
td                794 drivers/media/platform/sti/hva/hva-h264.c 		td->addr_spatial_context =  ALIGN(paddr, 0x100);
td                799 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_brc_in_out_parameter =  ALIGN(paddr, 0x100);
td                801 drivers/media/platform/sti/hva/hva-h264.c 	paddr = td->addr_brc_in_out_parameter + BRC_DATA_SIZE;
td                802 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_slice_header =  ALIGN(paddr, 0x100);
td                803 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_external_sw =  ALIGN(addr_esram, 0x100);
td                806 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_local_rec_buffer = ALIGN(addr_esram, 0x100);
td                809 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_lctx = ALIGN(addr_esram, 0x100);
td                812 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_cabac_context_buffer = ALIGN(addr_esram, 0x100);
td                815 drivers/media/platform/sti/hva/hva-h264.c 		td->picture_coding_type = PICTURE_CODING_TYPE_I;
td                818 drivers/media/platform/sti/hva/hva-h264.c 		td->picture_coding_type = PICTURE_CODING_TYPE_P;
td                823 drivers/media/platform/sti/hva/hva-h264.c 	slice_header_vaddr = seq_info->vaddr + (td->addr_slice_header -
td                827 drivers/media/platform/sti/hva/hva-h264.c 				   &td->slice_header_size_in_bits,
td                828 drivers/media/platform/sti/hva/hva-h264.c 				   &td->slice_header_offset0,
td                829 drivers/media/platform/sti/hva/hva-h264.c 				   &td->slice_header_offset1,
td                830 drivers/media/platform/sti/hva/hva-h264.c 				   &td->slice_header_offset2);
td                832 drivers/media/platform/sti/hva/hva-h264.c 	td->chroma_qp_index_offset = 2;
td                833 drivers/media/platform/sti/hva/hva-h264.c 	td->slice_synchro_enable = 0;
td                834 drivers/media/platform/sti/hva/hva-h264.c 	td->max_slice_number = 1;
td                862 drivers/media/platform/sti/hva/hva-h264.c 	td->non_vcl_nalu_size = payload * 8;
td                865 drivers/media/platform/sti/hva/hva-h264.c 	td->addr_output_bitstream_start += ((payload >> 4) << 4);
td                866 drivers/media/platform/sti/hva/hva-h264.c 	td->bitstream_offset += (payload - ((payload >> 4) << 4)) * 8;
td                 32 drivers/mtd/nand/onenand/onenand_bbt.c static int check_short_pattern(uint8_t *buf, int len, int paglen, struct nand_bbt_descr *td)
td                 38 drivers/mtd/nand/onenand/onenand_bbt.c 	for (i = 0; i < td->len; i++) {
td                 39 drivers/mtd/nand/onenand/onenand_bbt.c 		if (p[i] != td->pattern[i])
td                 90 drivers/mtd/nand/raw/nand_bbt.c static int check_pattern_no_oob(uint8_t *buf, struct nand_bbt_descr *td)
td                 92 drivers/mtd/nand/raw/nand_bbt.c 	if (memcmp(buf, td->pattern, td->len))
td                107 drivers/mtd/nand/raw/nand_bbt.c static int check_pattern(uint8_t *buf, int len, int paglen, struct nand_bbt_descr *td)
td                109 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_NO_OOB)
td                110 drivers/mtd/nand/raw/nand_bbt.c 		return check_pattern_no_oob(buf, td);
td                113 drivers/mtd/nand/raw/nand_bbt.c 	if (memcmp(buf + paglen + td->offs, td->pattern, td->len))
td                128 drivers/mtd/nand/raw/nand_bbt.c static int check_short_pattern(uint8_t *buf, struct nand_bbt_descr *td)
td                131 drivers/mtd/nand/raw/nand_bbt.c 	if (memcmp(buf + td->offs, td->pattern, td->len))
td                142 drivers/mtd/nand/raw/nand_bbt.c static u32 add_marker_len(struct nand_bbt_descr *td)
td                146 drivers/mtd/nand/raw/nand_bbt.c 	if (!(td->options & NAND_BBT_NO_OOB))
td                149 drivers/mtd/nand/raw/nand_bbt.c 	len = td->len;
td                150 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_VERSION)
td                167 drivers/mtd/nand/raw/nand_bbt.c 		    struct nand_bbt_descr *td, int offs)
td                173 drivers/mtd/nand/raw/nand_bbt.c 	int bits = td->options & NAND_BBT_NRBITS_MSK;
td                176 drivers/mtd/nand/raw/nand_bbt.c 	int reserved_block_code = td->reserved_block_code;
td                179 drivers/mtd/nand/raw/nand_bbt.c 	marker_len = add_marker_len(td);
td                260 drivers/mtd/nand/raw/nand_bbt.c 			struct nand_bbt_descr *td, int chip)
td                266 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_PERCHIP) {
td                270 drivers/mtd/nand/raw/nand_bbt.c 				res = read_bbt(this, buf, td->pages[i],
td                272 drivers/mtd/nand/raw/nand_bbt.c 					td, offs);
td                278 drivers/mtd/nand/raw/nand_bbt.c 		res = read_bbt(this, buf, td->pages[0],
td                279 drivers/mtd/nand/raw/nand_bbt.c 				mtd->size >> this->bbt_erase_shift, td, 0);
td                288 drivers/mtd/nand/raw/nand_bbt.c 			  struct nand_bbt_descr *td)
td                294 drivers/mtd/nand/raw/nand_bbt.c 	len = td->len;
td                295 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_VERSION)
td                344 drivers/mtd/nand/raw/nand_bbt.c 		     size_t len, struct nand_bbt_descr *td)
td                346 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_NO_OOB)
td                347 drivers/mtd/nand/raw/nand_bbt.c 		return scan_read_data(this, buf, offs, td);
td                369 drivers/mtd/nand/raw/nand_bbt.c static u32 bbt_get_ver_offs(struct nand_chip *this, struct nand_bbt_descr *td)
td                372 drivers/mtd/nand/raw/nand_bbt.c 	u32 ver_offs = td->veroffs;
td                374 drivers/mtd/nand/raw/nand_bbt.c 	if (!(td->options & NAND_BBT_NO_OOB))
td                390 drivers/mtd/nand/raw/nand_bbt.c 			  struct nand_bbt_descr *td, struct nand_bbt_descr *md)
td                395 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_VERSION) {
td                396 drivers/mtd/nand/raw/nand_bbt.c 		scan_read(this, buf, (loff_t)td->pages[0] << this->page_shift,
td                397 drivers/mtd/nand/raw/nand_bbt.c 			  mtd->writesize, td);
td                398 drivers/mtd/nand/raw/nand_bbt.c 		td->version[0] = buf[bbt_get_ver_offs(this, td)];
td                400 drivers/mtd/nand/raw/nand_bbt.c 			 td->pages[0], td->version[0]);
td                524 drivers/mtd/nand/raw/nand_bbt.c 		      struct nand_bbt_descr *td)
td                535 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_LASTBLOCK) {
td                544 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_PERCHIP) {
td                555 drivers/mtd/nand/raw/nand_bbt.c 		td->version[i] = 0;
td                556 drivers/mtd/nand/raw/nand_bbt.c 		td->pages[i] = -1;
td                558 drivers/mtd/nand/raw/nand_bbt.c 		for (block = 0; block < td->maxblocks; block++) {
td                564 drivers/mtd/nand/raw/nand_bbt.c 			scan_read(this, buf, offs, mtd->writesize, td);
td                565 drivers/mtd/nand/raw/nand_bbt.c 			if (!check_pattern(buf, scanlen, mtd->writesize, td)) {
td                566 drivers/mtd/nand/raw/nand_bbt.c 				td->pages[i] = actblock << blocktopage;
td                567 drivers/mtd/nand/raw/nand_bbt.c 				if (td->options & NAND_BBT_VERSION) {
td                568 drivers/mtd/nand/raw/nand_bbt.c 					offs = bbt_get_ver_offs(this, td);
td                569 drivers/mtd/nand/raw/nand_bbt.c 					td->version[i] = buf[offs];
td                578 drivers/mtd/nand/raw/nand_bbt.c 		if (td->pages[i] == -1)
td                582 drivers/mtd/nand/raw/nand_bbt.c 				td->pages[i], td->version[i]);
td                597 drivers/mtd/nand/raw/nand_bbt.c 			     struct nand_bbt_descr *td,
td                601 drivers/mtd/nand/raw/nand_bbt.c 	search_bbt(this, buf, td);
td                621 drivers/mtd/nand/raw/nand_bbt.c static int get_bbt_block(struct nand_chip *this, struct nand_bbt_descr *td,
td                632 drivers/mtd/nand/raw/nand_bbt.c 	if (td->pages[chip] != -1)
td                633 drivers/mtd/nand/raw/nand_bbt.c 		return td->pages[chip] >>
td                637 drivers/mtd/nand/raw/nand_bbt.c 	if (!(td->options & NAND_BBT_PERCHIP))
td                644 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_LASTBLOCK) {
td                652 drivers/mtd/nand/raw/nand_bbt.c 	for (i = 0; i < td->maxblocks; i++) {
td                685 drivers/mtd/nand/raw/nand_bbt.c 			       struct nand_bbt_descr *td,
td                699 drivers/mtd/nand/raw/nand_bbt.c 	td->pages[chip] = -1;
td                713 drivers/mtd/nand/raw/nand_bbt.c 		     struct nand_bbt_descr *td, struct nand_bbt_descr *md,
td                723 drivers/mtd/nand/raw/nand_bbt.c 	uint8_t rcode = td->reserved_block_code;
td                736 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_PERCHIP) {
td                754 drivers/mtd/nand/raw/nand_bbt.c 		block = get_bbt_block(this, td, md, chip);
td                768 drivers/mtd/nand/raw/nand_bbt.c 		bits = td->options & NAND_BBT_NRBITS_MSK;
td                789 drivers/mtd/nand/raw/nand_bbt.c 		if (td->options & NAND_BBT_SAVECONTENT) {
td                815 drivers/mtd/nand/raw/nand_bbt.c 		} else if (td->options & NAND_BBT_NO_OOB) {
td                817 drivers/mtd/nand/raw/nand_bbt.c 			offs = td->len;
td                819 drivers/mtd/nand/raw/nand_bbt.c 			if (td->options & NAND_BBT_VERSION)
td                829 drivers/mtd/nand/raw/nand_bbt.c 			memcpy(buf, td->pattern, td->len);
td                841 drivers/mtd/nand/raw/nand_bbt.c 			memcpy(&buf[ooboffs + td->offs], td->pattern, td->len);
td                844 drivers/mtd/nand/raw/nand_bbt.c 		if (td->options & NAND_BBT_VERSION)
td                845 drivers/mtd/nand/raw/nand_bbt.c 			buf[ooboffs + td->veroffs] = td->version[chip];
td                863 drivers/mtd/nand/raw/nand_bbt.c 			mark_bbt_block_bad(this, td, chip, block);
td                868 drivers/mtd/nand/raw/nand_bbt.c 				     td->options & NAND_BBT_NO_OOB ?
td                873 drivers/mtd/nand/raw/nand_bbt.c 			mark_bbt_block_bad(this, td, chip, block);
td                878 drivers/mtd/nand/raw/nand_bbt.c 			 (unsigned long long)to, td->version[chip]);
td                881 drivers/mtd/nand/raw/nand_bbt.c 		td->pages[chip++] = page;
td                921 drivers/mtd/nand/raw/nand_bbt.c 	struct nand_bbt_descr *td = this->bbt_td;
td                926 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_PERCHIP)
td                938 drivers/mtd/nand/raw/nand_bbt.c 		chipsel = (td->options & NAND_BBT_PERCHIP) ? i : -1;
td                941 drivers/mtd/nand/raw/nand_bbt.c 			if (td->pages[i] == -1 && md->pages[i] == -1) {
td                944 drivers/mtd/nand/raw/nand_bbt.c 			} else if (td->pages[i] == -1) {
td                948 drivers/mtd/nand/raw/nand_bbt.c 				rd = td;
td                950 drivers/mtd/nand/raw/nand_bbt.c 			} else if (td->version[i] == md->version[i]) {
td                951 drivers/mtd/nand/raw/nand_bbt.c 				rd = td;
td                952 drivers/mtd/nand/raw/nand_bbt.c 				if (!(td->options & NAND_BBT_VERSION))
td                954 drivers/mtd/nand/raw/nand_bbt.c 			} else if (((int8_t)(td->version[i] - md->version[i])) > 0) {
td                955 drivers/mtd/nand/raw/nand_bbt.c 				rd = td;
td                962 drivers/mtd/nand/raw/nand_bbt.c 			if (td->pages[i] == -1) {
td                966 drivers/mtd/nand/raw/nand_bbt.c 				rd = td;
td                972 drivers/mtd/nand/raw/nand_bbt.c 			if (!(td->options & NAND_BBT_CREATE))
td                979 drivers/mtd/nand/raw/nand_bbt.c 			td->version[i] = 1;
td               1013 drivers/mtd/nand/raw/nand_bbt.c 			td->version[i] = max(td->version[i], md->version[i]);
td               1014 drivers/mtd/nand/raw/nand_bbt.c 			md->version[i] = td->version[i];
td               1018 drivers/mtd/nand/raw/nand_bbt.c 		if ((writeops & 0x01) && (td->options & NAND_BBT_WRITE)) {
td               1019 drivers/mtd/nand/raw/nand_bbt.c 			res = write_bbt(this, buf, td, md, chipsel);
td               1026 drivers/mtd/nand/raw/nand_bbt.c 			res = write_bbt(this, buf, md, td, chipsel);
td               1047 drivers/mtd/nand/raw/nand_bbt.c 	struct nand_bbt_descr *td = this->bbt_td;
td               1050 drivers/mtd/nand/raw/nand_bbt.c 	if (!this->bbt || !td)
td               1061 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_PERCHIP) {
td               1069 drivers/mtd/nand/raw/nand_bbt.c 	td->version[chip]++;
td               1074 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_WRITE) {
td               1075 drivers/mtd/nand/raw/nand_bbt.c 		res = write_bbt(this, buf, td, md, chipsel);
td               1081 drivers/mtd/nand/raw/nand_bbt.c 		res = write_bbt(this, buf, md, td, chipsel);
td               1097 drivers/mtd/nand/raw/nand_bbt.c static void mark_bbt_region(struct nand_chip *this, struct nand_bbt_descr *td)
td               1105 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_PERCHIP) {
td               1114 drivers/mtd/nand/raw/nand_bbt.c 		if ((td->options & NAND_BBT_ABSPAGE) ||
td               1115 drivers/mtd/nand/raw/nand_bbt.c 		    !(td->options & NAND_BBT_WRITE)) {
td               1116 drivers/mtd/nand/raw/nand_bbt.c 			if (td->pages[i] == -1)
td               1118 drivers/mtd/nand/raw/nand_bbt.c 			block = td->pages[i] >> (this->bbt_erase_shift - this->page_shift);
td               1122 drivers/mtd/nand/raw/nand_bbt.c 					td->reserved_block_code)
td               1128 drivers/mtd/nand/raw/nand_bbt.c 		if (td->options & NAND_BBT_LASTBLOCK)
td               1129 drivers/mtd/nand/raw/nand_bbt.c 			block = ((i + 1) * nrblocks) - td->maxblocks;
td               1132 drivers/mtd/nand/raw/nand_bbt.c 		for (j = 0; j < td->maxblocks; j++) {
td               1144 drivers/mtd/nand/raw/nand_bbt.c 		if (update && td->reserved_block_code)
td               1216 drivers/mtd/nand/raw/nand_bbt.c 	struct nand_bbt_descr *td = this->bbt_td;
td               1232 drivers/mtd/nand/raw/nand_bbt.c 	if (!td) {
td               1239 drivers/mtd/nand/raw/nand_bbt.c 	verify_bbt_descr(this, td);
td               1252 drivers/mtd/nand/raw/nand_bbt.c 	if (td->options & NAND_BBT_ABSPAGE) {
td               1253 drivers/mtd/nand/raw/nand_bbt.c 		read_abs_bbts(this, buf, td, md);
td               1256 drivers/mtd/nand/raw/nand_bbt.c 		search_read_bbts(this, buf, td, md);
td               1264 drivers/mtd/nand/raw/nand_bbt.c 	mark_bbt_region(this, td);
td                356 drivers/net/ethernet/amd/7990.c 	volatile struct lance_tx_desc *td;
td                369 drivers/net/ethernet/amd/7990.c 		td = &ib->btx_ring[i];
td                372 drivers/net/ethernet/amd/7990.c 		if (td->tmd1_bits & LE_T1_OWN)
td                375 drivers/net/ethernet/amd/7990.c 		if (td->tmd1_bits & LE_T1_ERR) {
td                376 drivers/net/ethernet/amd/7990.c 			status = td->misc;
td                416 drivers/net/ethernet/amd/7990.c 		} else if ((td->tmd1_bits & LE_T1_POK) == LE_T1_POK) {
td                420 drivers/net/ethernet/amd/7990.c 			td->tmd1_bits &= ~(LE_T1_POK);
td                423 drivers/net/ethernet/amd/7990.c 			if (td->tmd1_bits & LE_T1_EONE)
td                427 drivers/net/ethernet/amd/7990.c 			if (td->tmd1_bits & LE_T1_EMORE)
td                329 drivers/net/ethernet/amd/a2065.c 	volatile struct lance_tx_desc *td;
td                339 drivers/net/ethernet/amd/a2065.c 		td = &ib->btx_ring[i];
td                342 drivers/net/ethernet/amd/a2065.c 		if (td->tmd1_bits & LE_T1_OWN)
td                345 drivers/net/ethernet/amd/a2065.c 		if (td->tmd1_bits & LE_T1_ERR) {
td                346 drivers/net/ethernet/amd/a2065.c 			status = td->misc;
td                385 drivers/net/ethernet/amd/a2065.c 		} else if ((td->tmd1_bits & LE_T1_POK) == LE_T1_POK) {
td                387 drivers/net/ethernet/amd/a2065.c 			td->tmd1_bits &= ~(LE_T1_POK);
td                390 drivers/net/ethernet/amd/a2065.c 			if (td->tmd1_bits & LE_T1_EONE)
td                394 drivers/net/ethernet/amd/a2065.c 			if (td->tmd1_bits & LE_T1_EMORE)
td                247 drivers/net/ethernet/amd/declance.c #define tds_ptr(td, rt, type) 						\
td                248 drivers/net/ethernet/amd/declance.c 	((volatile u16 *)((u8 *)(td) + tds_off(rt, type)))
td                648 drivers/net/ethernet/amd/declance.c 	volatile u16 *td;
td                657 drivers/net/ethernet/amd/declance.c 		td = lib_ptr(ib, btx_ring[i], lp->type);
td                659 drivers/net/ethernet/amd/declance.c 		if (*tds_ptr(td, tmd1, lp->type) & LE_T1_OWN)
td                662 drivers/net/ethernet/amd/declance.c 		if (*tds_ptr(td, tmd1, lp->type) & LE_T1_ERR) {
td                663 drivers/net/ethernet/amd/declance.c 			status = *tds_ptr(td, misc, lp->type);
td                698 drivers/net/ethernet/amd/declance.c 		} else if ((*tds_ptr(td, tmd1, lp->type) & LE_T1_POK) ==
td                703 drivers/net/ethernet/amd/declance.c 			*tds_ptr(td, tmd1, lp->type) &= ~(LE_T1_POK);
td                706 drivers/net/ethernet/amd/declance.c 			if (*tds_ptr(td, tmd1, lp->type) & LE_T1_EONE)
td                710 drivers/net/ethernet/amd/declance.c 			if (*tds_ptr(td, tmd1, lp->type) & LE_T1_EMORE)
td                577 drivers/net/ethernet/amd/sunlance.c 		struct lance_tx_desc *td = &ib->btx_ring [i];
td                578 drivers/net/ethernet/amd/sunlance.c 		u8 bits = td->tmd1_bits;
td                585 drivers/net/ethernet/amd/sunlance.c 			u16 status = td->misc;
td                623 drivers/net/ethernet/amd/sunlance.c 			td->tmd1_bits = bits & ~(LE_T1_POK);
td                745 drivers/net/ethernet/amd/sunlance.c 		struct lance_tx_desc __iomem *td = &ib->btx_ring [i];
td                746 drivers/net/ethernet/amd/sunlance.c 		u8 bits = sbus_readb(&td->tmd1_bits);
td                753 drivers/net/ethernet/amd/sunlance.c 			u16 status = sbus_readw(&td->misc);
td                791 drivers/net/ethernet/amd/sunlance.c 			sbus_writeb(bits & ~(LE_T1_POK), &td->tmd1_bits);
td                227 drivers/net/ethernet/apple/bmac.c 	volatile struct dbdma_regs __iomem *td = bp->tx_dma;
td                231 drivers/net/ethernet/apple/bmac.c 	if (td)
td                232 drivers/net/ethernet/apple/bmac.c 		dbdma_reset(td);
td                475 drivers/net/ethernet/apple/bmac.c 		volatile struct dbdma_regs __iomem *td = bp->tx_dma;
td                484 drivers/net/ethernet/apple/bmac.c 		td->control = cpu_to_le32(DBDMA_CLEAR(RUN|PAUSE|FLUSH|WAKE));	/* clear run bit */
td                586 drivers/net/ethernet/apple/bmac.c 	volatile struct dbdma_regs __iomem *td = bp->tx_dma;
td                599 drivers/net/ethernet/apple/bmac.c 	dbdma_reset(td);
td                600 drivers/net/ethernet/apple/bmac.c 	out_le32(&td->wait_sel, 0x00200020);
td                601 drivers/net/ethernet/apple/bmac.c 	out_le32(&td->cmdptr, virt_to_bus(bp->tx_cmds));
td                642 drivers/net/ethernet/apple/bmac.c 	volatile struct dbdma_regs __iomem *td = bp->tx_dma;
td                667 drivers/net/ethernet/apple/bmac.c 	dbdma_continue(td);
td               1391 drivers/net/ethernet/apple/bmac.c 	volatile struct dbdma_regs __iomem *td = bp->tx_dma;
td               1408 drivers/net/ethernet/apple/bmac.c 	td->control = cpu_to_le32(DBDMA_CLEAR(RUN|PAUSE|FLUSH|WAKE));	/* clear run bit */
td               1473 drivers/net/ethernet/apple/bmac.c 	volatile struct dbdma_regs __iomem *td = bp->tx_dma;
td               1497 drivers/net/ethernet/apple/bmac.c 	out_le32(&td->control, DBDMA_CLEAR(RUN|PAUSE|FLUSH|WAKE|ACTIVE|DEAD));
td               1525 drivers/net/ethernet/apple/bmac.c 		out_le32(&td->cmdptr, virt_to_bus(cp));
td               1526 drivers/net/ethernet/apple/bmac.c 		out_le32(&td->control, DBDMA_SET(RUN));
td                433 drivers/net/ethernet/apple/mace.c     volatile struct dbdma_regs __iomem *td = mp->tx_dma;
td                482 drivers/net/ethernet/apple/mace.c     out_le32(&td->control, (RUN|PAUSE|FLUSH|WAKE) << 16);
td                483 drivers/net/ethernet/apple/mace.c     out_le32(&td->cmdptr, virt_to_bus(mp->tx_cmds));
td                503 drivers/net/ethernet/apple/mace.c     volatile struct dbdma_regs __iomem *td = mp->tx_dma;
td                511 drivers/net/ethernet/apple/mace.c     td->control = cpu_to_le32((RUN|PAUSE|FLUSH|WAKE) << 16); /* clear run bit */
td                532 drivers/net/ethernet/apple/mace.c     volatile struct dbdma_regs __iomem *td = mp->tx_dma;
td                571 drivers/net/ethernet/apple/mace.c 	out_le32(&td->control, ((RUN|WAKE) << 16) + (RUN|WAKE));
td                662 drivers/net/ethernet/apple/mace.c     volatile struct dbdma_regs __iomem *td = mp->tx_dma;
td                692 drivers/net/ethernet/apple/mace.c 	dstat = le32_to_cpu(td->status);
td                694 drivers/net/ethernet/apple/mace.c 	out_le32(&td->control, RUN << 16);
td                796 drivers/net/ethernet/apple/mace.c 	out_le32(&td->control, ((RUN|WAKE) << 16) + (RUN|WAKE));
td                808 drivers/net/ethernet/apple/mace.c     volatile struct dbdma_regs __iomem *td = mp->tx_dma;
td                827 drivers/net/ethernet/apple/mace.c     dbdma_reset(td);
td                855 drivers/net/ethernet/apple/mace.c 	out_le32(&td->cmdptr, virt_to_bus(cp));
td                856 drivers/net/ethernet/apple/mace.c 	out_le32(&td->control, (RUN << 16) | RUN);
td               1394 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	struct t3c_data *td = T3C_DATA(tdev);
td               1405 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c 	flush_work(&td->tid_release_task);
td                562 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	struct t3c_data *td = container_of(work, struct t3c_data,
td                565 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	struct t3cdev *tdev = td->dev;
td                568 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	spin_lock_bh(&td->tid_release_lock);
td                569 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	while (td->tid_release_list) {
td                570 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 		struct t3c_tid_entry *p = td->tid_release_list;
td                572 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 		td->tid_release_list = p->ctx;
td                573 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 		spin_unlock_bh(&td->tid_release_lock);
td                578 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 			skb = td->nofail_skb;
td                580 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 			spin_lock_bh(&td->tid_release_lock);
td                581 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 			p->ctx = (void *)td->tid_release_list;
td                582 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 			td->tid_release_list = p;
td                585 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 		mk_tid_release(skb, p - td->tid_maps.tid_tab);
td                588 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 		if (skb == td->nofail_skb)
td                589 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 			td->nofail_skb =
td                592 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 		spin_lock_bh(&td->tid_release_lock);
td                594 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	td->release_list_incomplete = (td->tid_release_list == NULL) ? 0 : 1;
td                595 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	spin_unlock_bh(&td->tid_release_lock);
td                597 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	if (!td->nofail_skb)
td                598 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 		td->nofail_skb =
td                606 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	struct t3c_data *td = T3C_DATA(tdev);
td                607 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	struct t3c_tid_entry *p = &td->tid_maps.tid_tab[tid];
td                609 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	spin_lock_bh(&td->tid_release_lock);
td                610 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	p->ctx = (void *)td->tid_release_list;
td                612 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	td->tid_release_list = p;
td                613 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	if (!p->ctx || td->release_list_incomplete)
td                614 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 		schedule_work(&td->tid_release_task);
td                615 drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c 	spin_unlock_bh(&td->tid_release_lock);
td               1213 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 	struct dpni_taildrop td = {0};
td               1219 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 	td.enable = enable;
td               1220 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 	td.threshold = DPAA2_ETH_TAILDROP_THRESH;
td               1227 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c 					priv->fq[i].flowid, &td);
td                205 drivers/net/ethernet/korina.c 	struct dma_desc *td;
td                209 drivers/net/ethernet/korina.c 	td = &lp->td_ring[lp->tx_chain_tail];
td                234 drivers/net/ethernet/korina.c 	dma_cache_inv((u32) td, sizeof(*td));
td                235 drivers/net/ethernet/korina.c 	td->ca = CPHYSADDR(skb->data);
td                242 drivers/net/ethernet/korina.c 			td->control = DMA_COUNT(length) |
td                253 drivers/net/ethernet/korina.c 			td->control = DMA_COUNT(length) |
td                259 drivers/net/ethernet/korina.c 			lp->td_ring[chain_prev].link =  CPHYSADDR(td);
td                272 drivers/net/ethernet/korina.c 			td->control = DMA_COUNT(length) |
td                279 drivers/net/ethernet/korina.c 			td->control = DMA_COUNT(length) |
td                283 drivers/net/ethernet/korina.c 			lp->td_ring[chain_prev].link =  CPHYSADDR(td);
td                287 drivers/net/ethernet/korina.c 	dma_cache_wback((u32) td, sizeof(*td));
td                526 drivers/net/ethernet/korina.c 	struct dma_desc *td = &lp->td_ring[lp->tx_next_done];
td                533 drivers/net/ethernet/korina.c 	while (IS_DMA_FINISHED(td->control)) {
td                591 drivers/net/ethernet/korina.c 		td = &lp->td_ring[lp->tx_next_done];
td               2735 drivers/net/ethernet/marvell/skge.c 	struct skge_tx_desc *td;
td               2747 drivers/net/ethernet/marvell/skge.c 	td = e->desc;
td               2748 drivers/net/ethernet/marvell/skge.c 	BUG_ON(td->control & BMU_OWN);
td               2758 drivers/net/ethernet/marvell/skge.c 	td->dma_lo = lower_32_bits(map);
td               2759 drivers/net/ethernet/marvell/skge.c 	td->dma_hi = upper_32_bits(map);
td               2773 drivers/net/ethernet/marvell/skge.c 		td->csum_offs = 0;
td               2774 drivers/net/ethernet/marvell/skge.c 		td->csum_start = offset;
td               2775 drivers/net/ethernet/marvell/skge.c 		td->csum_write = offset + skb->csum_offset;
td               2782 drivers/net/ethernet/marvell/skge.c 		struct skge_tx_desc *tf = td;
td               2809 drivers/net/ethernet/marvell/skge.c 	td->control = BMU_OWN | BMU_SW | BMU_STF | control | len;
td               2874 drivers/net/ethernet/marvell/skge.c 		struct skge_tx_desc *td = e->desc;
td               2876 drivers/net/ethernet/marvell/skge.c 		skge_tx_unmap(skge->hw->pdev, e, td->control);
td               2878 drivers/net/ethernet/marvell/skge.c 		if (td->control & BMU_EOF)
td               2880 drivers/net/ethernet/marvell/skge.c 		td->control = 0;
td                 48 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	mutex_lock(&mdev->mlx5e_res.td.list_lock);
td                 49 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	list_add(&tir->list, &mdev->mlx5e_res.td.tirs_list);
td                 50 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	mutex_unlock(&mdev->mlx5e_res.td.list_lock);
td                 58 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	mutex_lock(&mdev->mlx5e_res.td.list_lock);
td                 61 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	mutex_unlock(&mdev->mlx5e_res.td.list_lock);
td                102 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	err = mlx5_core_alloc_transport_domain(mdev, &res->td.tdn);
td                120 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	INIT_LIST_HEAD(&mdev->mlx5e_res.td.tirs_list);
td                121 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	mutex_init(&mdev->mlx5e_res.td.list_lock);
td                128 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	mlx5_core_dealloc_transport_domain(mdev, res->td.tdn);
td                140 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	mlx5_core_dealloc_transport_domain(mdev, res->td.tdn);
td                167 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	mutex_lock(&mdev->mlx5e_res.td.list_lock);
td                168 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	list_for_each_entry(tir, &mdev->mlx5e_res.td.tirs_list, list) {
td                179 drivers/net/ethernet/mellanox/mlx5/core/en_common.c 	mutex_unlock(&mdev->mlx5e_res.td.list_lock);
td               3207 drivers/net/ethernet/mellanox/mlx5/core/en_main.c 	MLX5_SET(tisc, tisc, transport_domain, mdev->mlx5e_res.td.tdn);
td               3280 drivers/net/ethernet/mellanox/mlx5/core/en_main.c 	MLX5_SET(tirc, tirc, transport_domain, priv->mdev->mlx5e_res.td.tdn);
td                428 drivers/net/ethernet/seeq/sgiseeq.c 	struct sgiseeq_tx_desc *td;
td                437 drivers/net/ethernet/seeq/sgiseeq.c 	td = &sp->tx_desc[i];
td                438 drivers/net/ethernet/seeq/sgiseeq.c 	dma_sync_desc_cpu(dev, td);
td                439 drivers/net/ethernet/seeq/sgiseeq.c 	while ((td->tdma.cntinfo & (HPCDMA_XIU | HPCDMA_ETXD)) ==
td                442 drivers/net/ethernet/seeq/sgiseeq.c 		td = &sp->tx_desc[i];
td                443 drivers/net/ethernet/seeq/sgiseeq.c 		dma_sync_desc_cpu(dev, td);
td                445 drivers/net/ethernet/seeq/sgiseeq.c 	if (td->tdma.cntinfo & HPCDMA_XIU) {
td                446 drivers/net/ethernet/seeq/sgiseeq.c 		hregs->tx_ndptr = VIRT_TO_DMA(sp, td);
td                455 drivers/net/ethernet/seeq/sgiseeq.c 	struct sgiseeq_tx_desc *td;
td                473 drivers/net/ethernet/seeq/sgiseeq.c 		td = &sp->tx_desc[j];
td                475 drivers/net/ethernet/seeq/sgiseeq.c 		dma_sync_desc_cpu(dev, td);
td                476 drivers/net/ethernet/seeq/sgiseeq.c 		if (!(td->tdma.cntinfo & (HPCDMA_XIU)))
td                478 drivers/net/ethernet/seeq/sgiseeq.c 		if (!(td->tdma.cntinfo & (HPCDMA_ETXD))) {
td                480 drivers/net/ethernet/seeq/sgiseeq.c 				hregs->tx_ndptr = VIRT_TO_DMA(sp, td);
td                487 drivers/net/ethernet/seeq/sgiseeq.c 		td->tdma.cntinfo &= ~(HPCDMA_XIU | HPCDMA_XIE);
td                488 drivers/net/ethernet/seeq/sgiseeq.c 		td->tdma.cntinfo |= HPCDMA_EOX;
td                489 drivers/net/ethernet/seeq/sgiseeq.c 		if (td->skb) {
td                490 drivers/net/ethernet/seeq/sgiseeq.c 			dev_kfree_skb_any(td->skb);
td                491 drivers/net/ethernet/seeq/sgiseeq.c 			td->skb = NULL;
td                493 drivers/net/ethernet/seeq/sgiseeq.c 		dma_sync_desc_dev(dev, td);
td                588 drivers/net/ethernet/seeq/sgiseeq.c 	struct sgiseeq_tx_desc *td;
td                605 drivers/net/ethernet/seeq/sgiseeq.c 	td = &sp->tx_desc[entry];
td                606 drivers/net/ethernet/seeq/sgiseeq.c 	dma_sync_desc_cpu(dev, td);
td                621 drivers/net/ethernet/seeq/sgiseeq.c 	td->skb = skb;
td                622 drivers/net/ethernet/seeq/sgiseeq.c 	td->tdma.pbuf = dma_map_single(dev->dev.parent, skb->data,
td                624 drivers/net/ethernet/seeq/sgiseeq.c 	td->tdma.cntinfo = (len & HPCDMA_BCNT) |
td                626 drivers/net/ethernet/seeq/sgiseeq.c 	dma_sync_desc_dev(dev, td);
td                122 drivers/net/ethernet/ti/davinci_cpdma.c 	int	int_set, int_clear, td;
td                912 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->td	= CPDMA_RXTEARDOWN;
td                919 drivers/net/ethernet/ti/davinci_cpdma.c 		chan->td	= CPDMA_TXTEARDOWN;
td               1330 drivers/net/ethernet/ti/davinci_cpdma.c 	dma_reg_write(ctlr, chan->td, chan_linear(chan));
td               1714 drivers/net/ethernet/via/via-velocity.c 		struct velocity_td_info *tdinfo, struct tx_desc *td)
td               1728 drivers/net/ethernet/via/via-velocity.c 				       td->td_buf[i].size & ~TD_QUEUE);
td               1890 drivers/net/ethernet/via/via-velocity.c 	struct tx_desc *td;
td               1905 drivers/net/ethernet/via/via-velocity.c 			td = &(vptr->tx.rings[qnum][idx]);
td               1908 drivers/net/ethernet/via/via-velocity.c 			if (td->tdesc0.len & OWNED_BY_NIC)
td               1914 drivers/net/ethernet/via/via-velocity.c 			if (td->tdesc0.TSR & TSR0_TERR) {
td               1917 drivers/net/ethernet/via/via-velocity.c 				if (td->tdesc0.TSR & TSR0_CDH)
td               1919 drivers/net/ethernet/via/via-velocity.c 				if (td->tdesc0.TSR & TSR0_CRS)
td               1921 drivers/net/ethernet/via/via-velocity.c 				if (td->tdesc0.TSR & TSR0_ABT)
td               1923 drivers/net/ethernet/via/via-velocity.c 				if (td->tdesc0.TSR & TSR0_OWC)
td               1929 drivers/net/ethernet/via/via-velocity.c 			velocity_free_tx_buf(vptr, tdinfo, td);
td                393 drivers/net/fddi/skfp/fplustm.c static void copy_tx_mac(struct s_smc *smc, u_long td, struct fddi_mac *mac,
td                417 drivers/net/fddi/skfp/fplustm.c 	write_mdr(smc,td) ;	/* write over memory data reg to buffer */
td                473 drivers/net/fddi/skfp/fplustm.c 	u_int	td ;
td                481 drivers/net/fddi/skfp/fplustm.c 	td = TX_DESCRIPTOR | ((((u_int)len-1)&3)<<27) ;
td                489 drivers/net/fddi/skfp/fplustm.c 	copy_tx_mac(smc,td,(struct fddi_mac *)mac,
td                498 drivers/net/fddi/skfp/fplustm.c 	td = TX_DESCRIPTOR | ((((u_int)len-1)&3)<<27) ;
td                504 drivers/net/fddi/skfp/fplustm.c 	copy_tx_mac(smc,td,(struct fddi_mac *)mac,
td                514 drivers/net/fddi/skfp/fplustm.c 	td = TX_DESCRIPTOR | ((((u_int)len-1)&3)<<27) ;
td                522 drivers/net/fddi/skfp/fplustm.c 	copy_tx_mac(smc,td,(struct fddi_mac *)mac,
td               1109 drivers/net/wireless/ath/ath5k/debug.c 	struct ath5k_hw_5212_tx_desc *td = &ds->ud.ds_tx5212;
td               1120 drivers/net/wireless/ath/ath5k/debug.c 		ds->ds_data, td->tx_ctl.tx_control_0, td->tx_ctl.tx_control_1,
td               1121 drivers/net/wireless/ath/ath5k/debug.c 		td->tx_ctl.tx_control_2, td->tx_ctl.tx_control_3,
td               1122 drivers/net/wireless/ath/ath5k/debug.c 		td->tx_stat.tx_status_0, td->tx_stat.tx_status_1,
td                 94 drivers/net/wireless/mediatek/mt7601u/debugfs.c 	struct tssi_data *td = &dev->ee->tssi_data;
td                126 drivers/net/wireless/mediatek/mt7601u/debugfs.c 	seq_printf(file, "\t slope:%02hhx\n", td->slope);
td                128 drivers/net/wireless/mediatek/mt7601u/debugfs.c 		   td->offset[0], td->offset[1], td->offset[2]);
td                129 drivers/net/wireless/mediatek/mt7601u/debugfs.c 	seq_printf(file, "\t delta_off:%08x\n", td->tx0_delta_offset);
td                116 drivers/nfc/st-nci/se.c 	u8 td;
td                121 drivers/nfc/st-nci/se.c 		td = ST_NCI_ATR_GET_Y_FROM_TD(info->se_info.atr[i]);
td                122 drivers/nfc/st-nci/se.c 		if (ST_NCI_ATR_TA_PRESENT(td))
td                124 drivers/nfc/st-nci/se.c 		if (ST_NCI_ATR_TB_PRESENT(td)) {
td                 51 drivers/nfc/st21nfca/se.c 	u8 td;
td                 56 drivers/nfc/st21nfca/se.c 		td = ST21NFCA_ATR_GET_Y_FROM_TD(info->se_info.atr[i]);
td                 57 drivers/nfc/st21nfca/se.c 		if (ST21NFCA_ATR_TA_PRESENT(td))
td                 59 drivers/nfc/st21nfca/se.c 		if (ST21NFCA_ATR_TB_PRESENT(td)) {
td                 33 drivers/scsi/snic/snic_trc.c 	struct snic_trc_data *td = NULL;
td                 37 drivers/scsi/snic/snic_trc.c 	td = &trc->buf[trc->wr_idx];
td                 53 drivers/scsi/snic/snic_trc.c 	td->ts = 0;	/* Marker for checking the record, for complete data*/
td                 58 drivers/scsi/snic/snic_trc.c 	return td;
td                 65 drivers/scsi/snic/snic_trc.c snic_fmt_trc_data(struct snic_trc_data *td, char *buf, int buf_sz)
td                 70 drivers/scsi/snic/snic_trc.c 	jiffies_to_timespec64(td->ts, &tmspec);
td                 76 drivers/scsi/snic/snic_trc.c 			td->fn,
td                 77 drivers/scsi/snic/snic_trc.c 			td->hno,
td                 78 drivers/scsi/snic/snic_trc.c 			td->tag,
td                 79 drivers/scsi/snic/snic_trc.c 			td->data[0], td->data[1], td->data[2], td->data[3],
td                 80 drivers/scsi/snic/snic_trc.c 			td->data[4]);
td                 91 drivers/scsi/snic/snic_trc.c 	struct snic_trc_data *td = NULL;
td                101 drivers/scsi/snic/snic_trc.c 	td = &trc->buf[trc->rd_idx];
td                103 drivers/scsi/snic/snic_trc.c 	if (td->ts == 0) {
td                115 drivers/scsi/snic/snic_trc.c 	return snic_fmt_trc_data(td, buf, buf_sz);
td                 92 drivers/staging/wusbcore/host/whci/asl.c 		struct whc_qtd *td;
td                 94 drivers/staging/wusbcore/host/whci/asl.c 		td = &qset->qtd[qset->td_start];
td                 95 drivers/staging/wusbcore/host/whci/asl.c 		status = le32_to_cpu(td->status);
td                105 drivers/staging/wusbcore/host/whci/asl.c 			process_halted_qtd(whc, qset, td);
td                114 drivers/staging/wusbcore/host/whci/asl.c 		process_inactive_qtd(whc, qset, td);
td                 98 drivers/staging/wusbcore/host/whci/pzl.c 		struct whc_qtd *td;
td                100 drivers/staging/wusbcore/host/whci/pzl.c 		td = &qset->qtd[qset->td_start];
td                101 drivers/staging/wusbcore/host/whci/pzl.c 		status = le32_to_cpu(td->status);
td                111 drivers/staging/wusbcore/host/whci/pzl.c 			process_halted_qtd(whc, qset, td);
td                120 drivers/staging/wusbcore/host/whci/pzl.c 		process_inactive_qtd(whc, qset, td);
td                157 drivers/thermal/intel/intel_bxt_pmic_thermal.c 	struct pmic_thermal_data *td;
td                166 drivers/thermal/intel/intel_bxt_pmic_thermal.c 	td = (struct pmic_thermal_data *)
td                170 drivers/thermal/intel/intel_bxt_pmic_thermal.c 	for (i = 0; i < td->num_maps; i++) {
td                171 drivers/thermal/intel/intel_bxt_pmic_thermal.c 		for (j = 0; j < td->maps[i].num_trips; j++) {
td                172 drivers/thermal/intel/intel_bxt_pmic_thermal.c 			reg = td->maps[i].trip_config[j].irq_reg;
td                173 drivers/thermal/intel/intel_bxt_pmic_thermal.c 			mask = td->maps[i].trip_config[j].irq_mask;
td                191 drivers/thermal/intel/intel_bxt_pmic_thermal.c 			evt_stat_reg = td->maps[i].trip_config[j].evt_stat;
td                195 drivers/thermal/intel/intel_bxt_pmic_thermal.c 			tzd = thermal_zone_get_zone_by_name(td->maps[i].handle);
td                 82 drivers/usb/c67x00/c67x00-sched.c #define td_udev(td)	((td)->ep_data->dev)
td                115 drivers/usb/c67x00/c67x00-sched.c #define td_residue(td)		((__s8)(td->residue))
td                116 drivers/usb/c67x00/c67x00-sched.c #define td_ly_base_addr(td)	(__le16_to_cpu((td)->ly_base_addr))
td                117 drivers/usb/c67x00/c67x00-sched.c #define td_port_length(td)	(__le16_to_cpu((td)->port_length))
td                118 drivers/usb/c67x00/c67x00-sched.c #define td_next_td_addr(td)	(__le16_to_cpu((td)->next_td_addr))
td                120 drivers/usb/c67x00/c67x00-sched.c #define td_active(td)		((td)->retry_cnt & TD_RETRYCNTMASK_ACT_FLG)
td                121 drivers/usb/c67x00/c67x00-sched.c #define td_length(td)		(td_port_length(td) & TD_PORTLENMASK_DL)
td                123 drivers/usb/c67x00/c67x00-sched.c #define td_sequence_ok(td)	(!td->status || \
td                124 drivers/usb/c67x00/c67x00-sched.c 				 (!(td->status & TD_STATUSMASK_SEQ) ==	\
td                125 drivers/usb/c67x00/c67x00-sched.c 				  !(td->ctrl_reg & SEQ_SEL)))
td                127 drivers/usb/c67x00/c67x00-sched.c #define td_acked(td)		(!td->status || \
td                128 drivers/usb/c67x00/c67x00-sched.c 				 (td->status & TD_STATUSMASK_ACK))
td                129 drivers/usb/c67x00/c67x00-sched.c #define td_actual_bytes(td)	(td_length(td) - td_residue(td))
td                136 drivers/usb/c67x00/c67x00-sched.c static void dbg_td(struct c67x00_hcd *c67x00, struct c67x00_td *td, char *msg)
td                140 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "### %s at 0x%04x\n", msg, td->td_addr);
td                141 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "urb:      0x%p\n", td->urb);
td                142 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "endpoint:   %4d\n", usb_pipeendpoint(td->pipe));
td                143 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "pipeout:    %4d\n", usb_pipeout(td->pipe));
td                144 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "ly_base_addr: 0x%04x\n", td_ly_base_addr(td));
td                145 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "port_length:  0x%04x\n", td_port_length(td));
td                146 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "pid_ep:         0x%02x\n", td->pid_ep);
td                147 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "dev_addr:       0x%02x\n", td->dev_addr);
td                148 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "ctrl_reg:       0x%02x\n", td->ctrl_reg);
td                149 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "status:         0x%02x\n", td->status);
td                150 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "retry_cnt:      0x%02x\n", td->retry_cnt);
td                151 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "residue:        0x%02x\n", td->residue);
td                152 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "next_td_addr: 0x%04x\n", td_next_td_addr(td));
td                153 drivers/usb/c67x00/c67x00-sched.c 	dev_dbg(dev, "data: %*ph\n", td_length(td), td->data);
td                200 drivers/usb/c67x00/c67x00-sched.c 	struct c67x00_td *td;
td                218 drivers/usb/c67x00/c67x00-sched.c 	list_for_each_entry(td, &c67x00->td_list, td_list)
td                219 drivers/usb/c67x00/c67x00-sched.c 		if (urb == td->urb)
td                220 drivers/usb/c67x00/c67x00-sched.c 			td->urb = NULL;
td                567 drivers/usb/c67x00/c67x00-sched.c 	struct c67x00_td *td;
td                577 drivers/usb/c67x00/c67x00-sched.c 	td = kzalloc(sizeof(*td), GFP_ATOMIC);
td                578 drivers/usb/c67x00/c67x00-sched.c 	if (!td)
td                581 drivers/usb/c67x00/c67x00-sched.c 	td->pipe = urb->pipe;
td                582 drivers/usb/c67x00/c67x00-sched.c 	td->ep_data = urbp->ep_data;
td                584 drivers/usb/c67x00/c67x00-sched.c 	if ((td_udev(td)->speed == USB_SPEED_LOW) &&
td                588 drivers/usb/c67x00/c67x00-sched.c 	switch (usb_pipetype(td->pipe)) {
td                610 drivers/usb/c67x00/c67x00-sched.c 	td->td_addr = c67x00->next_td_addr;
td                614 drivers/usb/c67x00/c67x00-sched.c 	td->ly_base_addr = __cpu_to_le16(c67x00->next_buf_addr);
td                615 drivers/usb/c67x00/c67x00-sched.c 	td->port_length = __cpu_to_le16((c67x00->sie->sie_num << 15) |
td                617 drivers/usb/c67x00/c67x00-sched.c 	td->pid_ep = ((pid & 0xF) << TD_PIDEP_OFFSET) |
td                618 drivers/usb/c67x00/c67x00-sched.c 	    (usb_pipeendpoint(td->pipe) & 0xF);
td                619 drivers/usb/c67x00/c67x00-sched.c 	td->dev_addr = usb_pipedevice(td->pipe) & 0x7F;
td                620 drivers/usb/c67x00/c67x00-sched.c 	td->ctrl_reg = cmd;
td                621 drivers/usb/c67x00/c67x00-sched.c 	td->status = 0;
td                622 drivers/usb/c67x00/c67x00-sched.c 	td->retry_cnt = (tt << TT_OFFSET) | (active_flag << 4) | retry_cnt;
td                623 drivers/usb/c67x00/c67x00-sched.c 	td->residue = 0;
td                624 drivers/usb/c67x00/c67x00-sched.c 	td->next_td_addr = __cpu_to_le16(c67x00->next_td_addr);
td                627 drivers/usb/c67x00/c67x00-sched.c 	td->data = data;
td                628 drivers/usb/c67x00/c67x00-sched.c 	td->urb = urb;
td                629 drivers/usb/c67x00/c67x00-sched.c 	td->privdata = privdata;
td                633 drivers/usb/c67x00/c67x00-sched.c 	list_add_tail(&td->td_list, &c67x00->td_list);
td                637 drivers/usb/c67x00/c67x00-sched.c static inline void c67x00_release_td(struct c67x00_td *td)
td                639 drivers/usb/c67x00/c67x00-sched.c 	list_del_init(&td->td_list);
td                640 drivers/usb/c67x00/c67x00-sched.c 	kfree(td);
td                797 drivers/usb/c67x00/c67x00-sched.c 	struct c67x00_td *td, *ttd;
td                803 drivers/usb/c67x00/c67x00-sched.c 		list_for_each_entry_safe(td, ttd, &c67x00->td_list, td_list) {
td                804 drivers/usb/c67x00/c67x00-sched.c 			dbg_td(c67x00, td, "Unprocessed td");
td                805 drivers/usb/c67x00/c67x00-sched.c 			c67x00_release_td(td);
td                829 drivers/usb/c67x00/c67x00-sched.c c67x00_parse_td(struct c67x00_hcd *c67x00, struct c67x00_td *td)
td                832 drivers/usb/c67x00/c67x00-sched.c 				td->td_addr, td, CY_TD_SIZE);
td                834 drivers/usb/c67x00/c67x00-sched.c 	if (usb_pipein(td->pipe) && td_actual_bytes(td))
td                835 drivers/usb/c67x00/c67x00-sched.c 		c67x00_ll_read_mem_le16(c67x00->sie->dev, td_ly_base_addr(td),
td                836 drivers/usb/c67x00/c67x00-sched.c 					td->data, td_actual_bytes(td));
td                839 drivers/usb/c67x00/c67x00-sched.c static int c67x00_td_to_error(struct c67x00_hcd *c67x00, struct c67x00_td *td)
td                841 drivers/usb/c67x00/c67x00-sched.c 	if (td->status & TD_STATUSMASK_ERR) {
td                842 drivers/usb/c67x00/c67x00-sched.c 		dbg_td(c67x00, td, "ERROR_FLAG");
td                845 drivers/usb/c67x00/c67x00-sched.c 	if (td->status & TD_STATUSMASK_STALL) {
td                849 drivers/usb/c67x00/c67x00-sched.c 	if (td->status & TD_STATUSMASK_TMOUT) {
td                850 drivers/usb/c67x00/c67x00-sched.c 		dbg_td(c67x00, td, "TIMEOUT");
td                857 drivers/usb/c67x00/c67x00-sched.c static inline int c67x00_end_of_data(struct c67x00_td *td)
td                860 drivers/usb/c67x00/c67x00-sched.c 	struct urb *urb = td->urb;
td                863 drivers/usb/c67x00/c67x00-sched.c 	act_bytes = td_actual_bytes(td);
td                868 drivers/usb/c67x00/c67x00-sched.c 	maxps = usb_maxpacket(td_udev(td), td->pipe, usb_pipeout(td->pipe));
td                891 drivers/usb/c67x00/c67x00-sched.c 	struct c67x00_td *td, *tmp;
td                892 drivers/usb/c67x00/c67x00-sched.c 	td = last_td;
td                894 drivers/usb/c67x00/c67x00-sched.c 	while (td->td_list.next != &c67x00->td_list) {
td                895 drivers/usb/c67x00/c67x00-sched.c 		td = list_entry(td->td_list.next, struct c67x00_td, td_list);
td                896 drivers/usb/c67x00/c67x00-sched.c 		if (td->pipe == last_td->pipe) {
td                897 drivers/usb/c67x00/c67x00-sched.c 			c67x00_release_td(td);
td                898 drivers/usb/c67x00/c67x00-sched.c 			td = tmp;
td                900 drivers/usb/c67x00/c67x00-sched.c 		tmp = td;
td                907 drivers/usb/c67x00/c67x00-sched.c 					struct c67x00_td *td)
td                909 drivers/usb/c67x00/c67x00-sched.c 	struct urb *urb = td->urb;
td                914 drivers/usb/c67x00/c67x00-sched.c 	urb->actual_length += td_actual_bytes(td);
td                916 drivers/usb/c67x00/c67x00-sched.c 	switch (usb_pipetype(td->pipe)) {
td                919 drivers/usb/c67x00/c67x00-sched.c 		switch (td->privdata) {
td                929 drivers/usb/c67x00/c67x00-sched.c 			if (c67x00_end_of_data(td)) {
td                931 drivers/usb/c67x00/c67x00-sched.c 				c67x00_clear_pipe(c67x00, td);
td                944 drivers/usb/c67x00/c67x00-sched.c 		if (unlikely(c67x00_end_of_data(td))) {
td                945 drivers/usb/c67x00/c67x00-sched.c 			c67x00_clear_pipe(c67x00, td);
td                952 drivers/usb/c67x00/c67x00-sched.c static void c67x00_handle_isoc(struct c67x00_hcd *c67x00, struct c67x00_td *td)
td                954 drivers/usb/c67x00/c67x00-sched.c 	struct urb *urb = td->urb;
td                960 drivers/usb/c67x00/c67x00-sched.c 	cnt = td->privdata;
td                962 drivers/usb/c67x00/c67x00-sched.c 	if (td->status & TD_ERROR_MASK)
td                965 drivers/usb/c67x00/c67x00-sched.c 	urb->iso_frame_desc[cnt].actual_length = td_actual_bytes(td);
td                966 drivers/usb/c67x00/c67x00-sched.c 	urb->iso_frame_desc[cnt].status = c67x00_td_to_error(c67x00, td);
td                979 drivers/usb/c67x00/c67x00-sched.c 	struct c67x00_td *td, *tmp;
td                984 drivers/usb/c67x00/c67x00-sched.c 	list_for_each_entry_safe(td, tmp, &c67x00->td_list, td_list) {
td                986 drivers/usb/c67x00/c67x00-sched.c 		c67x00_parse_td(c67x00, td);
td                987 drivers/usb/c67x00/c67x00-sched.c 		urb = td->urb;	/* urb can be NULL! */
td                992 drivers/usb/c67x00/c67x00-sched.c 		if (usb_pipeisoc(td->pipe)) {
td                994 drivers/usb/c67x00/c67x00-sched.c 			c67x00_handle_isoc(c67x00, td);
td               1001 drivers/usb/c67x00/c67x00-sched.c 		if (td->status & TD_ERROR_MASK) {
td               1003 drivers/usb/c67x00/c67x00-sched.c 					    c67x00_td_to_error(c67x00, td));
td               1007 drivers/usb/c67x00/c67x00-sched.c 		if ((td->status & TD_STATUSMASK_NAK) || !td_sequence_ok(td) ||
td               1008 drivers/usb/c67x00/c67x00-sched.c 		    !td_acked(td))
td               1014 drivers/usb/c67x00/c67x00-sched.c 		if (unlikely(td->status & TD_STATUSMASK_OVF)) {
td               1015 drivers/usb/c67x00/c67x00-sched.c 			if (td_residue(td) & TD_RESIDUE_OVERFLOW) {
td               1023 drivers/usb/c67x00/c67x00-sched.c 		c67x00_handle_successful_td(c67x00, td);
td               1027 drivers/usb/c67x00/c67x00-sched.c 			c67x00_clear_pipe(c67x00, td);
td               1029 drivers/usb/c67x00/c67x00-sched.c 			usb_settoggle(td_udev(td), usb_pipeendpoint(td->pipe),
td               1030 drivers/usb/c67x00/c67x00-sched.c 				      usb_pipeout(td->pipe),
td               1031 drivers/usb/c67x00/c67x00-sched.c 				      !(td->ctrl_reg & SEQ_SEL));
td               1033 drivers/usb/c67x00/c67x00-sched.c 		tmp = list_entry(td->td_list.next, typeof(*td), td_list);
td               1034 drivers/usb/c67x00/c67x00-sched.c 		c67x00_release_td(td);
td               1051 drivers/usb/c67x00/c67x00-sched.c static void c67x00_send_td(struct c67x00_hcd *c67x00, struct c67x00_td *td)
td               1053 drivers/usb/c67x00/c67x00-sched.c 	int len = td_length(td);
td               1055 drivers/usb/c67x00/c67x00-sched.c 	if (len && ((td->pid_ep & TD_PIDEPMASK_PID) != TD_PID_IN))
td               1056 drivers/usb/c67x00/c67x00-sched.c 		c67x00_ll_write_mem_le16(c67x00->sie->dev, td_ly_base_addr(td),
td               1057 drivers/usb/c67x00/c67x00-sched.c 					 td->data, len);
td               1060 drivers/usb/c67x00/c67x00-sched.c 				 td->td_addr, td, CY_TD_SIZE);
td               1065 drivers/usb/c67x00/c67x00-sched.c 	struct c67x00_td *td;
td               1072 drivers/usb/c67x00/c67x00-sched.c 	list_for_each_entry(td, &c67x00->td_list, td_list) {
td               1073 drivers/usb/c67x00/c67x00-sched.c 		if (td->td_list.next == &c67x00->td_list)
td               1074 drivers/usb/c67x00/c67x00-sched.c 			td->next_td_addr = 0;	/* Last td in list */
td               1076 drivers/usb/c67x00/c67x00-sched.c 		c67x00_send_td(c67x00, td);
td                169 drivers/usb/chipidea/debug.c 			list_for_each_entry_safe(node, tmpnode, &req->tds, td) {
td                384 drivers/usb/chipidea/udc.c 				struct td_node, td);
td                388 drivers/usb/chipidea/udc.c 	INIT_LIST_HEAD(&node->td);
td                389 drivers/usb/chipidea/udc.c 	list_add_tail(&node->td, &hwreq->tds);
td                459 drivers/usb/chipidea/udc.c 	firstnode = list_first_entry(&hwreq->tds, struct td_node, td);
td                462 drivers/usb/chipidea/udc.c 		struct td_node, td);
td                480 drivers/usb/chipidea/udc.c 				struct td_node, td);
td                496 drivers/usb/chipidea/udc.c 	hwep->qh.ptr->td.next = cpu_to_le32(firstnode->dma);
td                497 drivers/usb/chipidea/udc.c 	hwep->qh.ptr->td.token &=
td                531 drivers/usb/chipidea/udc.c 	hwep->qh.ptr->td.next = cpu_to_le32(node->dma);
td                532 drivers/usb/chipidea/udc.c 	hwep->qh.ptr->td.token &=
td                559 drivers/usb/chipidea/udc.c 	list_for_each_entry_safe(node, tmpnode, &hwreq->tds, td) {
td                602 drivers/usb/chipidea/udc.c 		list_del_init(&node->td);
td                639 drivers/usb/chipidea/udc.c 		list_for_each_entry_safe(node, tmpnode, &hwreq->tds, td) {
td                641 drivers/usb/chipidea/udc.c 			list_del_init(&node->td);
td               1270 drivers/usb/chipidea/udc.c 	hwep->qh.ptr->td.next |= cpu_to_le32(TD_TERMINATE);   /* needed? */
td               1371 drivers/usb/chipidea/udc.c 	list_for_each_entry_safe(node, tmpnode, &hwreq->tds, td) {
td               1373 drivers/usb/chipidea/udc.c 		list_del_init(&node->td);
td               1429 drivers/usb/chipidea/udc.c 	list_for_each_entry_safe(node, tmpnode, &hwreq->tds, td) {
td               1431 drivers/usb/chipidea/udc.c 		list_del(&node->td);
td                 54 drivers/usb/chipidea/udc.h 	struct ci_hw_td		td;
td                 61 drivers/usb/chipidea/udc.h 	struct list_head	td;
td                505 drivers/usb/gadget/udc/amd5536udc.h 	struct udc_data_dma		*td;
td                702 drivers/usb/gadget/udc/fsl_udc_core.c static void fsl_prime_ep(struct fsl_ep *ep, struct ep_td_struct *td)
td                707 drivers/usb/gadget/udc/fsl_udc_core.c 	qh->next_dtd_ptr = cpu_to_hc32(td->td_dma
td                566 drivers/usb/gadget/udc/net2280.c 		struct net2280_dma	*td;
td                568 drivers/usb/gadget/udc/net2280.c 		td = dma_pool_alloc(ep->dev->requests, gfp_flags,
td                570 drivers/usb/gadget/udc/net2280.c 		if (!td) {
td                574 drivers/usb/gadget/udc/net2280.c 		td->dmacount = 0;	/* not VALID */
td                575 drivers/usb/gadget/udc/net2280.c 		td->dmadesc = td->dmaaddr;
td                576 drivers/usb/gadget/udc/net2280.c 		req->td = td;
td                595 drivers/usb/gadget/udc/net2280.c 	if (req->td)
td                596 drivers/usb/gadget/udc/net2280.c 		dma_pool_free(ep->dev->requests, req->td, req->td_dma);
td                799 drivers/usb/gadget/udc/net2280.c 	struct net2280_dma	*td = req->td;
td                819 drivers/usb/gadget/udc/net2280.c 	td->dmaaddr = cpu_to_le32 (req->req.dma);
td                823 drivers/usb/gadget/udc/net2280.c 	td->dmacount = cpu_to_le32(dmacount);
td                896 drivers/usb/gadget/udc/net2280.c 			req->td->dmacount = cpu_to_le32(req->req.length - tmp);
td                899 drivers/usb/gadget/udc/net2280.c 			req->td->dmadesc = 0;
td                925 drivers/usb/gadget/udc/net2280.c 	req->td->dmadesc = cpu_to_le32 (ep->td_dma);
td                928 drivers/usb/gadget/udc/net2280.c 	req->td->dmacount |= cpu_to_le32(BIT(END_OF_CHAIN));
td                941 drivers/usb/gadget/udc/net2280.c 	ep->dummy = req->td;
td                942 drivers/usb/gadget/udc/net2280.c 	req->td = end;
td               1149 drivers/usb/gadget/udc/net2280.c 		req_dma_count = le32_to_cpup(&req->td->dmacount);
td               1157 drivers/usb/gadget/udc/net2280.c 		if (unlikely(req->td->dmadesc == 0)) {
td               1289 drivers/usb/gadget/udc/net2280.c 				req->td->dmacount = 0;	/* invalidate */
td               1874 drivers/usb/gadget/udc/net2280.c 				struct net2280_dma	*td;
td               1876 drivers/usb/gadget/udc/net2280.c 				td = req->td;
td               1880 drivers/usb/gadget/udc/net2280.c 					le32_to_cpu(td->dmacount),
td               1881 drivers/usb/gadget/udc/net2280.c 					le32_to_cpu(td->dmaaddr),
td               1882 drivers/usb/gadget/udc/net2280.c 					le32_to_cpu(td->dmadesc));
td               2667 drivers/usb/gadget/udc/net2280.c 				req->td->dmacount = 0;
td               3737 drivers/usb/gadget/udc/net2280.c 		struct net2280_dma	*td;
td               3739 drivers/usb/gadget/udc/net2280.c 		td = dma_pool_alloc(dev->requests, GFP_KERNEL,
td               3741 drivers/usb/gadget/udc/net2280.c 		if (!td) {
td               3746 drivers/usb/gadget/udc/net2280.c 		td->dmacount = 0;	/* not VALID */
td               3747 drivers/usb/gadget/udc/net2280.c 		td->dmadesc = td->dmaaddr;
td               3748 drivers/usb/gadget/udc/net2280.c 		dev->ep[i].dummy = td;
td                141 drivers/usb/gadget/udc/net2280.h 	struct net2280_dma		*td;
td               1511 drivers/usb/gadget/udc/pch_udc.c 	struct pch_udc_data_dma_desc *td = req->td_data;
td               1515 drivers/usb/gadget/udc/pch_udc.c 	dma_addr_t addr = (dma_addr_t)td->next;
td               1516 drivers/usb/gadget/udc/pch_udc.c 	td->next = 0x00;
td               1519 drivers/usb/gadget/udc/pch_udc.c 		td = phys_to_virt(addr);
td               1520 drivers/usb/gadget/udc/pch_udc.c 		addr2 = (dma_addr_t)td->next;
td               1521 drivers/usb/gadget/udc/pch_udc.c 		dma_pool_free(dev->data_requests, td, addr);
td               1544 drivers/usb/gadget/udc/pch_udc.c 	struct pch_udc_data_dma_desc *td = req->td_data, *last;
td               1553 drivers/usb/gadget/udc/pch_udc.c 		td->dataptr = req->req.dma;
td               1555 drivers/usb/gadget/udc/pch_udc.c 		td->dataptr = req->dma;
td               1557 drivers/usb/gadget/udc/pch_udc.c 	td->status = PCH_UDC_BS_HST_BSY;
td               1559 drivers/usb/gadget/udc/pch_udc.c 		td->status = PCH_UDC_BS_HST_BSY | min(buf_len, bytes);
td               1562 drivers/usb/gadget/udc/pch_udc.c 		last = td;
td               1563 drivers/usb/gadget/udc/pch_udc.c 		td = dma_pool_alloc(ep->dev->data_requests, gfp_flags,
td               1565 drivers/usb/gadget/udc/pch_udc.c 		if (!td)
td               1568 drivers/usb/gadget/udc/pch_udc.c 		td->dataptr = req->td_data->dataptr + i;
td               1572 drivers/usb/gadget/udc/pch_udc.c 	req->td_data_last = td;
td               1573 drivers/usb/gadget/udc/pch_udc.c 	td->status |= PCH_UDC_DMA_LAST;
td               1574 drivers/usb/gadget/udc/pch_udc.c 	td->next = req->td_data_phys;
td               2167 drivers/usb/gadget/udc/pch_udc.c 	struct pch_udc_data_dma_desc *td;
td               2178 drivers/usb/gadget/udc/pch_udc.c 		td = req->td_data_last;
td               2180 drivers/usb/gadget/udc/pch_udc.c 		td = req->td_data;
td               2183 drivers/usb/gadget/udc/pch_udc.c 		if ((td->status & PCH_UDC_RXTX_STS) != PCH_UDC_RTS_SUCC) {
td               2190 drivers/usb/gadget/udc/pch_udc.c 		if ((td->status & PCH_UDC_BUFF_STS) == PCH_UDC_BS_DMA_DONE)
td               2191 drivers/usb/gadget/udc/pch_udc.c 			if (td->status & PCH_UDC_DMA_LAST) {
td               2192 drivers/usb/gadget/udc/pch_udc.c 				count = td->status & PCH_UDC_RXTX_BYTES;
td               2195 drivers/usb/gadget/udc/pch_udc.c 		if (td == req->td_data_last) {
td               2199 drivers/usb/gadget/udc/pch_udc.c 		addr = (dma_addr_t)td->next;
td               2200 drivers/usb/gadget/udc/pch_udc.c 		td = phys_to_virt(addr);
td               2206 drivers/usb/gadget/udc/pch_udc.c 	td->status |= PCH_UDC_BS_HST_BSY;
td                568 drivers/usb/gadget/udc/snps_udc_core.c 	struct udc_data_dma *td = req->td_data;
td                572 drivers/usb/gadget/udc/snps_udc_core.c 	dma_addr_t addr = (dma_addr_t)td->next;
td                578 drivers/usb/gadget/udc/snps_udc_core.c 		td = phys_to_virt(addr);
td                579 drivers/usb/gadget/udc/snps_udc_core.c 		addr_next = (dma_addr_t)td->next;
td                580 drivers/usb/gadget/udc/snps_udc_core.c 		dma_pool_free(dev->data_requests, td, addr);
td                769 drivers/usb/gadget/udc/snps_udc_core.c 	struct udc_data_dma	*td = NULL;
td                796 drivers/usb/gadget/udc/snps_udc_core.c 	td = req->td_data;
td                801 drivers/usb/gadget/udc/snps_udc_core.c 			td = dma_pool_alloc(ep->dev->data_requests,
td                803 drivers/usb/gadget/udc/snps_udc_core.c 			if (!td)
td                806 drivers/usb/gadget/udc/snps_udc_core.c 			td->status = 0;
td                809 drivers/usb/gadget/udc/snps_udc_core.c 			td = (struct udc_data_dma *)phys_to_virt(
td                811 drivers/usb/gadget/udc/snps_udc_core.c 			td->status = 0;
td                813 drivers/usb/gadget/udc/snps_udc_core.c 			td = (struct udc_data_dma *)phys_to_virt(last->next);
td                814 drivers/usb/gadget/udc/snps_udc_core.c 			td->status = 0;
td                817 drivers/usb/gadget/udc/snps_udc_core.c 		if (td)
td                818 drivers/usb/gadget/udc/snps_udc_core.c 			td->bufptr = req->req.dma + i; /* assign buffer */
td                846 drivers/usb/gadget/udc/snps_udc_core.c 				td->status = AMD_ADDBITS(td->status,
td                859 drivers/usb/gadget/udc/snps_udc_core.c 				td->status = AMD_ADDBITS(td->status,
td                864 drivers/usb/gadget/udc/snps_udc_core.c 		last = td;
td                867 drivers/usb/gadget/udc/snps_udc_core.c 	if (td) {
td                868 drivers/usb/gadget/udc/snps_udc_core.c 		td->status |= AMD_BIT(UDC_DMA_IN_STS_L);
td                870 drivers/usb/gadget/udc/snps_udc_core.c 		req->td_data_last = td;
td               1002 drivers/usb/gadget/udc/snps_udc_core.c 	struct udc_data_dma	*td;
td               1004 drivers/usb/gadget/udc/snps_udc_core.c 	td = req->td_data;
td               1005 drivers/usb/gadget/udc/snps_udc_core.c 	while (td && !(td->status & AMD_BIT(UDC_DMA_IN_STS_L)))
td               1006 drivers/usb/gadget/udc/snps_udc_core.c 		td = phys_to_virt(td->next);
td               1008 drivers/usb/gadget/udc/snps_udc_core.c 	return td;
td               1015 drivers/usb/gadget/udc/snps_udc_core.c 	struct udc_data_dma	*td;
td               1018 drivers/usb/gadget/udc/snps_udc_core.c 	td = req->td_data;
td               1020 drivers/usb/gadget/udc/snps_udc_core.c 	count = AMD_GETBITS(td->status, UDC_DMA_OUT_STS_RXBYTES);
td               1022 drivers/usb/gadget/udc/snps_udc_core.c 	while (td && !(td->status & AMD_BIT(UDC_DMA_IN_STS_L))) {
td               1023 drivers/usb/gadget/udc/snps_udc_core.c 		td = phys_to_virt(td->next);
td               1025 drivers/usb/gadget/udc/snps_udc_core.c 		if (td) {
td               1026 drivers/usb/gadget/udc/snps_udc_core.c 			count += AMD_GETBITS(td->status,
td               1901 drivers/usb/gadget/udc/snps_udc_core.c 		dev->ep[UDC_EP0OUT_IX].td->status |=
td               2090 drivers/usb/gadget/udc/snps_udc_core.c 	struct udc_data_dma	*td = NULL;
td               2170 drivers/usb/gadget/udc/snps_udc_core.c 			td = udc_get_last_dma_desc(req);
td               2171 drivers/usb/gadget/udc/snps_udc_core.c 			dma_done = AMD_GETBITS(td->status, UDC_DMA_OUT_STS_BS);
td               2183 drivers/usb/gadget/udc/snps_udc_core.c 				VDBG(dev, "last desc = %p\n", td);
td               2190 drivers/usb/gadget/udc/snps_udc_core.c 					count = AMD_GETBITS(td->status,
td               2304 drivers/usb/gadget/udc/snps_udc_core.c 	struct udc_data_dma *td;
td               2348 drivers/usb/gadget/udc/snps_udc_core.c 				td = udc_get_last_dma_desc(req);
td               2349 drivers/usb/gadget/udc/snps_udc_core.c 				if (td)
td               2617 drivers/usb/gadget/udc/snps_udc_core.c 				dev->ep[UDC_EP0OUT_IX].td->status =
td               2619 drivers/usb/gadget/udc/snps_udc_core.c 					dev->ep[UDC_EP0OUT_IX].td->status,
td               3078 drivers/usb/gadget/udc/snps_udc_core.c 	dma_pool_free(dev->stp_requests, dev->ep[UDC_EP0OUT_IX].td,
td               3137 drivers/usb/gadget/udc/snps_udc_core.c 	dev->ep[UDC_EP0OUT_IX].td = td_data;
td                376 drivers/usb/host/ehci-dbg.c 	struct ehci_qtd		*td;
td                419 drivers/usb/host/ehci-dbg.c 		td = list_entry(entry, struct ehci_qtd, qtd_list);
td                420 drivers/usb/host/ehci-dbg.c 		scratch = hc32_to_cpup(ehci, &td->hw_token);
td                422 drivers/usb/host/ehci-dbg.c 		if (hw_curr == td->qtd_dma) {
td                424 drivers/usb/host/ehci-dbg.c 		} else if (hw->hw_qtd_next == cpu_to_hc32(ehci, td->qtd_dma)) {
td                427 drivers/usb/host/ehci-dbg.c 			if (td->hw_alt_next == ehci->async->hw->hw_alt_next)
td                429 drivers/usb/host/ehci-dbg.c 			else if (td->hw_alt_next != list_end)
td                449 drivers/usb/host/ehci-dbg.c 				td, mark, type,
td                452 drivers/usb/host/ehci-dbg.c 				td->urb,
td                453 drivers/usb/host/ehci-dbg.c 				(u32) td->qtd_dma,
td                454 drivers/usb/host/ehci-dbg.c 				hc32_to_cpup(ehci, &td->hw_buf[0]));
td                171 drivers/usb/host/fhci-hcd.c 	struct td *td;
td                172 drivers/usb/host/fhci-hcd.c 	struct td *next_td;
td                179 drivers/usb/host/fhci-hcd.c 	list_for_each_entry_safe(td, next_td, &fhci->empty_tds, node) {
td                180 drivers/usb/host/fhci-hcd.c 		list_del(&td->node);
td                181 drivers/usb/host/fhci-hcd.c 		kfree(td);
td                217 drivers/usb/host/fhci-hcd.c 		struct td *td;
td                219 drivers/usb/host/fhci-hcd.c 		td = kmalloc(sizeof(*td), GFP_KERNEL);
td                220 drivers/usb/host/fhci-hcd.c 		if (!td)
td                222 drivers/usb/host/fhci-hcd.c 		fhci_recycle_empty_td(fhci, td);
td                518 drivers/usb/host/fhci-hcd.c 			struct td *td = fhci_remove_td_from_ed(ed);
td                519 drivers/usb/host/fhci-hcd.c 			fhci_urb_complete_free(fhci, td->urb);
td                 23 drivers/usb/host/fhci-mem.c static void init_td(struct td *td)
td                 25 drivers/usb/host/fhci-mem.c 	memset(td, 0, sizeof(*td));
td                 26 drivers/usb/host/fhci-mem.c 	INIT_LIST_HEAD(&td->node);
td                 27 drivers/usb/host/fhci-mem.c 	INIT_LIST_HEAD(&td->frame_lh);
td                 37 drivers/usb/host/fhci-mem.c static struct td *get_empty_td(struct fhci_hcd *fhci)
td                 39 drivers/usb/host/fhci-mem.c 	struct td *td;
td                 42 drivers/usb/host/fhci-mem.c 		td = list_entry(fhci->empty_tds.next, struct td, node);
td                 45 drivers/usb/host/fhci-mem.c 		td = kmalloc(sizeof(*td), GFP_ATOMIC);
td                 46 drivers/usb/host/fhci-mem.c 		if (!td)
td                 49 drivers/usb/host/fhci-mem.c 			init_td(td);
td                 52 drivers/usb/host/fhci-mem.c 	return td;
td                 55 drivers/usb/host/fhci-mem.c void fhci_recycle_empty_td(struct fhci_hcd *fhci, struct td *td)
td                 57 drivers/usb/host/fhci-mem.c 	init_td(td);
td                 58 drivers/usb/host/fhci-mem.c 	list_add(&td->node, &fhci->empty_tds);
td                 85 drivers/usb/host/fhci-mem.c struct td *fhci_td_fill(struct fhci_hcd *fhci, struct urb *urb,
td                 90 drivers/usb/host/fhci-mem.c 	struct td *td = get_empty_td(fhci);
td                 92 drivers/usb/host/fhci-mem.c 	if (!td)
td                 95 drivers/usb/host/fhci-mem.c 	td->urb = urb;
td                 96 drivers/usb/host/fhci-mem.c 	td->ed = ed;
td                 97 drivers/usb/host/fhci-mem.c 	td->type = type;
td                 98 drivers/usb/host/fhci-mem.c 	td->toggle = toggle;
td                 99 drivers/usb/host/fhci-mem.c 	td->data = data;
td                100 drivers/usb/host/fhci-mem.c 	td->len = len;
td                101 drivers/usb/host/fhci-mem.c 	td->iso_index = index;
td                102 drivers/usb/host/fhci-mem.c 	td->interval = interval;
td                103 drivers/usb/host/fhci-mem.c 	td->start_frame = start_frame;
td                104 drivers/usb/host/fhci-mem.c 	td->ioc = ioc;
td                105 drivers/usb/host/fhci-mem.c 	td->status = USB_TD_OK;
td                107 drivers/usb/host/fhci-mem.c 	urb_priv->tds[index] = td;
td                109 drivers/usb/host/fhci-mem.c 	return td;
td                 53 drivers/usb/host/fhci-q.c void fhci_add_td_to_frame(struct fhci_time_frame *frame, struct td *td)
td                 55 drivers/usb/host/fhci-q.c 	list_add_tail(&td->frame_lh, &frame->tds_list);
td                 58 drivers/usb/host/fhci-q.c void fhci_add_tds_to_ed(struct ed *ed, struct td **td_list, int number)
td                 63 drivers/usb/host/fhci-q.c 		struct td *td = td_list[i];
td                 64 drivers/usb/host/fhci-q.c 		list_add_tail(&td->node, &ed->td_list);
td                 70 drivers/usb/host/fhci-q.c static struct td *peek_td_from_ed(struct ed *ed)
td                 72 drivers/usb/host/fhci-q.c 	struct td *td;
td                 75 drivers/usb/host/fhci-q.c 		td = list_entry(ed->td_list.next, struct td, node);
td                 77 drivers/usb/host/fhci-q.c 		td = NULL;
td                 79 drivers/usb/host/fhci-q.c 	return td;
td                 82 drivers/usb/host/fhci-q.c struct td *fhci_remove_td_from_frame(struct fhci_time_frame *frame)
td                 84 drivers/usb/host/fhci-q.c 	struct td *td;
td                 87 drivers/usb/host/fhci-q.c 		td = list_entry(frame->tds_list.next, struct td, frame_lh);
td                 90 drivers/usb/host/fhci-q.c 		td = NULL;
td                 92 drivers/usb/host/fhci-q.c 	return td;
td                 95 drivers/usb/host/fhci-q.c struct td *fhci_peek_td_from_frame(struct fhci_time_frame *frame)
td                 97 drivers/usb/host/fhci-q.c 	struct td *td;
td                100 drivers/usb/host/fhci-q.c 		td = list_entry(frame->tds_list.next, struct td, frame_lh);
td                102 drivers/usb/host/fhci-q.c 		td = NULL;
td                104 drivers/usb/host/fhci-q.c 	return td;
td                107 drivers/usb/host/fhci-q.c struct td *fhci_remove_td_from_ed(struct ed *ed)
td                109 drivers/usb/host/fhci-q.c 	struct td *td;
td                112 drivers/usb/host/fhci-q.c 		td = list_entry(ed->td_list.next, struct td, node);
td                117 drivers/usb/host/fhci-q.c 			ed->td_head = list_entry(ed->td_list.next, struct td,
td                122 drivers/usb/host/fhci-q.c 		td = NULL;
td                124 drivers/usb/host/fhci-q.c 	return td;
td                127 drivers/usb/host/fhci-q.c struct td *fhci_remove_td_from_done_list(struct fhci_controller_list *p_list)
td                129 drivers/usb/host/fhci-q.c 	struct td *td;
td                132 drivers/usb/host/fhci-q.c 		td = list_entry(p_list->done_list.next, struct td, node);
td                135 drivers/usb/host/fhci-q.c 		td = NULL;
td                137 drivers/usb/host/fhci-q.c 	return td;
td                142 drivers/usb/host/fhci-q.c 	struct td *td;
td                144 drivers/usb/host/fhci-q.c 	td = ed->td_head;
td                145 drivers/usb/host/fhci-q.c 	list_del_init(&td->node);
td                149 drivers/usb/host/fhci-q.c 		ed->td_head = list_entry(ed->td_list.next, struct td, node);
td                154 drivers/usb/host/fhci-q.c 	ed->toggle_carry = td->toggle;
td                155 drivers/usb/host/fhci-q.c 	list_add_tail(&td->node, &usb->hc_list->done_list);
td                156 drivers/usb/host/fhci-q.c 	if (td->ioc)
td                174 drivers/usb/host/fhci-q.c 		ed->td_head = list_entry(ed->td_list.next, struct td, node);
td                214 drivers/usb/host/fhci-q.c void fhci_done_td(struct urb *urb, struct td *td)
td                216 drivers/usb/host/fhci-q.c 	struct ed *ed = td->ed;
td                217 drivers/usb/host/fhci-q.c 	u32 cc = td->status;
td                227 drivers/usb/host/fhci-q.c 			len = urb->iso_frame_desc[td->iso_index].length;
td                229 drivers/usb/host/fhci-q.c 			len = td->actual_len;
td                232 drivers/usb/host/fhci-q.c 		urb->iso_frame_desc[td->iso_index].actual_length = len;
td                233 drivers/usb/host/fhci-q.c 		urb->iso_frame_desc[td->iso_index].status =
td                242 drivers/usb/host/fhci-q.c 		if (td->error_cnt >= 3)
td                259 drivers/usb/host/fhci-q.c 		if (td->type != FHCI_TA_SETUP || td->iso_index != 0)
td                260 drivers/usb/host/fhci-q.c 			urb->actual_length += td->actual_len;
td                267 drivers/usb/host/fhci-q.c 	struct td *td = peek_td_from_ed(ed);
td                268 drivers/usb/host/fhci-q.c 	struct urb *urb = td->urb;
td                272 drivers/usb/host/fhci-q.c 		td = fhci_remove_td_from_ed(ed);
td                274 drivers/usb/host/fhci-q.c 		if (td->status != USB_TD_INPROGRESS)
td                275 drivers/usb/host/fhci-q.c 			fhci_done_td(urb, td);
td                 42 drivers/usb/host/fhci-sched.c 	struct td *td;
td                 48 drivers/usb/host/fhci-sched.c 	td = fhci_remove_td_from_frame(usb->actual_frame);
td                 49 drivers/usb/host/fhci-sched.c 	td_pkt = td->pkt;
td                 51 drivers/usb/host/fhci-sched.c 	td->status = pkt->status;
td                 52 drivers/usb/host/fhci-sched.c 	if (td->type == FHCI_TA_IN && td_pkt->info & PKT_DUMMY_PACKET) {
td                 53 drivers/usb/host/fhci-sched.c 		if ((td->data + td->actual_len) && trans_len)
td                 54 drivers/usb/host/fhci-sched.c 			memcpy(td->data + td->actual_len, pkt->data,
td                 61 drivers/usb/host/fhci-sched.c 	ed = td->ed;
td                 64 drivers/usb/host/fhci-sched.c 			struct td *td_next =
td                 65 drivers/usb/host/fhci-sched.c 			    list_entry(ed->td_list.next->next, struct td,
td                 70 drivers/usb/host/fhci-sched.c 		td->actual_len = trans_len;
td                 72 drivers/usb/host/fhci-sched.c 	} else if ((td->status & USB_TD_ERROR) &&
td                 73 drivers/usb/host/fhci-sched.c 			!(td->status & USB_TD_TX_ER_NAK)) {
td                 79 drivers/usb/host/fhci-sched.c 		if ((td->status & USB_TD_RX_DATA_UNDERUN) ||
td                 80 drivers/usb/host/fhci-sched.c 				(td->status & USB_TD_TX_ER_STALL) ||
td                 81 drivers/usb/host/fhci-sched.c 				(td->status & USB_TD_RX_ER_PID) ||
td                 82 drivers/usb/host/fhci-sched.c 				(++td->error_cnt >= 3)) {
td                 86 drivers/usb/host/fhci-sched.c 			if (td->status & USB_TD_RX_DATA_UNDERUN) {
td                 88 drivers/usb/host/fhci-sched.c 				td->toggle = !td->toggle;
td                 89 drivers/usb/host/fhci-sched.c 				td->actual_len += trans_len;
td                 96 drivers/usb/host/fhci-sched.c 			td->nak_cnt = 0;
td                 97 drivers/usb/host/fhci-sched.c 			td->error_cnt++;
td                 98 drivers/usb/host/fhci-sched.c 			td->status = USB_TD_OK;
td                100 drivers/usb/host/fhci-sched.c 	} else if (td->status & USB_TD_TX_ER_NAK) {
td                103 drivers/usb/host/fhci-sched.c 		td->nak_cnt++;
td                104 drivers/usb/host/fhci-sched.c 		td->error_cnt = 0;
td                105 drivers/usb/host/fhci-sched.c 		td->status = USB_TD_OK;
td                108 drivers/usb/host/fhci-sched.c 		td->error_cnt = 0;
td                109 drivers/usb/host/fhci-sched.c 		td->nak_cnt = 0;
td                110 drivers/usb/host/fhci-sched.c 		td->toggle = !td->toggle;
td                111 drivers/usb/host/fhci-sched.c 		td->actual_len += trans_len;
td                113 drivers/usb/host/fhci-sched.c 		if (td->len == td->actual_len)
td                129 drivers/usb/host/fhci-sched.c 	struct td *td;
td                136 drivers/usb/host/fhci-sched.c 	while ((td = fhci_peek_td_from_frame(usb->actual_frame)) != NULL) {
td                137 drivers/usb/host/fhci-sched.c 		struct packet *pkt = td->pkt;
td                155 drivers/usb/host/fhci-sched.c static int add_packet(struct fhci_usb *usb, struct ed *ed, struct td *td)
td                162 drivers/usb/host/fhci-sched.c 	if (td->toggle == USB_TD_TOGGLE_CARRY)
td                163 drivers/usb/host/fhci-sched.c 		td->toggle = ed->toggle_carry;
td                167 drivers/usb/host/fhci-sched.c 		len = td->len;
td                168 drivers/usb/host/fhci-sched.c 		if (td->type != FHCI_TA_IN)
td                169 drivers/usb/host/fhci-sched.c 			data = td->data;
td                173 drivers/usb/host/fhci-sched.c 		len = min(td->len - td->actual_len, ed->max_pkt_size);
td                174 drivers/usb/host/fhci-sched.c 		if (!((td->type == FHCI_TA_IN) &&
td                175 drivers/usb/host/fhci-sched.c 		      ((len + td->actual_len) == td->len)))
td                176 drivers/usb/host/fhci-sched.c 			data = td->data + td->actual_len;
td                179 drivers/usb/host/fhci-sched.c 		len = min(td->len, ed->max_pkt_size);
td                180 drivers/usb/host/fhci-sched.c 		if (!((td->type == FHCI_TA_IN) &&
td                181 drivers/usb/host/fhci-sched.c 		      ((td->len + CRC_SIZE) >= ed->max_pkt_size)))
td                182 drivers/usb/host/fhci-sched.c 			data = td->data;
td                217 drivers/usb/host/fhci-sched.c 	td->pkt = pkt;
td                229 drivers/usb/host/fhci-sched.c 	td->status = USB_TD_INPROGRESS;
td                232 drivers/usb/host/fhci-sched.c 	fhci_add_td_to_frame(usb->actual_frame, td);
td                239 drivers/usb/host/fhci-sched.c 	} else if (fhci_host_transaction(usb, pkt, td->type, ed->dev_addr,
td                240 drivers/usb/host/fhci-sched.c 			ed->ep_addr, ed->mode, ed->speed, td->toggle)) {
td                242 drivers/usb/host/fhci-sched.c 		list_del_init(&td->frame_lh);
td                243 drivers/usb/host/fhci-sched.c 		td->status = USB_TD_OK;
td                280 drivers/usb/host/fhci-sched.c 	struct td *td;
td                285 drivers/usb/host/fhci-sched.c 		td = ed->td_head;
td                287 drivers/usb/host/fhci-sched.c 		if (!td || td->status == USB_TD_INPROGRESS)
td                292 drivers/usb/host/fhci-sched.c 				td->status = USB_TD_OK;
td                305 drivers/usb/host/fhci-sched.c 				   td->start_frame) & 0x7ff) < td->interval))
td                308 drivers/usb/host/fhci-sched.c 		if (add_packet(usb, ed, td) < 0)
td                312 drivers/usb/host/fhci-sched.c 		td->start_frame = usb->actual_frame->frame_num;
td                635 drivers/usb/host/fhci-sched.c 	struct td *td;
td                643 drivers/usb/host/fhci-sched.c 	td = fhci_remove_td_from_done_list(fhci->hc_list);
td                644 drivers/usb/host/fhci-sched.c 	while (td != NULL) {
td                645 drivers/usb/host/fhci-sched.c 		urb = td->urb;
td                647 drivers/usb/host/fhci-sched.c 		ed = td->ed;
td                650 drivers/usb/host/fhci-sched.c 		fhci_done_td(urb, td);
td                672 drivers/usb/host/fhci-sched.c 		td = fhci_remove_td_from_done_list(fhci->hc_list);
td                704 drivers/usb/host/fhci-sched.c 	struct td *td;
td                773 drivers/usb/host/fhci-sched.c 			td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
td                784 drivers/usb/host/fhci-sched.c 		td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
td                792 drivers/usb/host/fhci-sched.c 			td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
td                801 drivers/usb/host/fhci-sched.c 		td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
td                811 drivers/usb/host/fhci-sched.c 		td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, FHCI_TA_SETUP,
td                816 drivers/usb/host/fhci-sched.c 			td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
td                825 drivers/usb/host/fhci-sched.c 			td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
td                830 drivers/usb/host/fhci-sched.c 			 td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++,
td                847 drivers/usb/host/fhci-sched.c 			td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt,
td                 73 drivers/usb/host/fhci-tds.c 				      struct usb_td __iomem *td,
td                 79 drivers/usb/host/fhci-tds.c 		return ++td;
td                152 drivers/usb/host/fhci-tds.c 	struct usb_td __iomem *td;
td                168 drivers/usb/host/fhci-tds.c 	ep_mem_size = ring_len * sizeof(*td) + sizeof(struct fhci_ep_pram);
td                203 drivers/usb/host/fhci-tds.c 	ep->ep_pram_ptr = (void __iomem *)ep->td_base + sizeof(*td) * ring_len;
td                211 drivers/usb/host/fhci-tds.c 	td = ep->td_base;
td                213 drivers/usb/host/fhci-tds.c 		out_be32(&td->buf_ptr, 0);
td                214 drivers/usb/host/fhci-tds.c 		out_be16(&td->status, 0);
td                215 drivers/usb/host/fhci-tds.c 		out_be16(&td->length, 0);
td                216 drivers/usb/host/fhci-tds.c 		out_be16(&td->extra, 0);
td                217 drivers/usb/host/fhci-tds.c 		td++;
td                219 drivers/usb/host/fhci-tds.c 	td--;
td                220 drivers/usb/host/fhci-tds.c 	out_be16(&td->status, TD_W); /* for last TD set Wrap bit */
td                221 drivers/usb/host/fhci-tds.c 	out_be16(&td->length, 0);
td                281 drivers/usb/host/fhci-tds.c 	struct usb_td __iomem *td;
td                293 drivers/usb/host/fhci-tds.c 		td = ep->conf_td;
td                294 drivers/usb/host/fhci-tds.c 		td_status = in_be16(&td->status);
td                295 drivers/usb/host/fhci-tds.c 		td_length = in_be16(&td->length);
td                296 drivers/usb/host/fhci-tds.c 		buf = in_be32(&td->buf_ptr);
td                297 drivers/usb/host/fhci-tds.c 		extra_data = in_be16(&td->extra);
td                307 drivers/usb/host/fhci-tds.c 		clrbits16(&td->status, ~TD_W);
td                308 drivers/usb/host/fhci-tds.c 		out_be16(&td->length, 0);
td                309 drivers/usb/host/fhci-tds.c 		out_be32(&td->buf_ptr, 0);
td                310 drivers/usb/host/fhci-tds.c 		out_be16(&td->extra, 0);
td                386 drivers/usb/host/fhci-tds.c 	struct usb_td __iomem *td;
td                392 drivers/usb/host/fhci-tds.c 	td = ep->empty_td;
td                393 drivers/usb/host/fhci-tds.c 	td_status = in_be16(&td->status);
td                395 drivers/usb/host/fhci-tds.c 	if (td_status & TD_R && in_be16(&td->length)) {
td                404 drivers/usb/host/fhci-tds.c 	pkt->priv_data = td;
td                405 drivers/usb/host/fhci-tds.c 	out_be32(&td->buf_ptr, virt_to_phys(pkt->data));
td                421 drivers/usb/host/fhci-tds.c 	out_be16(&td->extra, extra_data);
td                450 drivers/usb/host/fhci-tds.c 	out_be16(&td->status, td_status);
td                454 drivers/usb/host/fhci-tds.c 		out_be16(&td->length, pkt->len + CRC_SIZE);
td                456 drivers/usb/host/fhci-tds.c 		out_be16(&td->length, pkt->len);
td                473 drivers/usb/host/fhci-tds.c 	struct usb_td __iomem *td;
td                476 drivers/usb/host/fhci-tds.c 	td = ep->td_base;
td                478 drivers/usb/host/fhci-tds.c 		td_status = in_be16(&td->status);
td                479 drivers/usb/host/fhci-tds.c 		buf = in_be32(&td->buf_ptr);
td                480 drivers/usb/host/fhci-tds.c 		extra_data = in_be16(&td->extra);
td                484 drivers/usb/host/fhci-tds.c 			out_be16(&td->status, (td_status & ~TD_R) | TD_TO);
td                486 drivers/usb/host/fhci-tds.c 		else if (in_be32(&td->buf_ptr) == DUMMY_BD_BUFFER)
td                487 drivers/usb/host/fhci-tds.c 			out_be32(&td->buf_ptr, DUMMY2_BD_BUFFER);
td                492 drivers/usb/host/fhci-tds.c 		td++;
td                497 drivers/usb/host/fhci-tds.c 	td = ep->td_base;
td                499 drivers/usb/host/fhci-tds.c 		out_be16(&td->status, 0);
td                500 drivers/usb/host/fhci-tds.c 		out_be16(&td->length, 0);
td                501 drivers/usb/host/fhci-tds.c 		out_be32(&td->buf_ptr, 0);
td                502 drivers/usb/host/fhci-tds.c 		out_be16(&td->extra, 0);
td                503 drivers/usb/host/fhci-tds.c 		td++;
td                504 drivers/usb/host/fhci-tds.c 	} while (!(in_be16(&td->status) & TD_W));
td                505 drivers/usb/host/fhci-tds.c 	out_be16(&td->status, TD_W); /* for last TD set Wrap bit */
td                506 drivers/usb/host/fhci-tds.c 	out_be16(&td->length, 0);
td                507 drivers/usb/host/fhci-tds.c 	out_be32(&td->buf_ptr, 0);
td                508 drivers/usb/host/fhci-tds.c 	out_be16(&td->extra, 0);
td                530 drivers/usb/host/fhci-tds.c 	struct usb_td __iomem *td;
td                538 drivers/usb/host/fhci-tds.c 	td = cpm_muram_addr(tb_ptr);
td                539 drivers/usb/host/fhci-tds.c 	td_status = in_be16(&td->status);
td                540 drivers/usb/host/fhci-tds.c 	buf_ptr = in_be32(&td->buf_ptr);
td                541 drivers/usb/host/fhci-tds.c 	extra_data = in_be16(&td->extra);
td                544 drivers/usb/host/fhci-tds.c 			out_be16(&td->status, (td_status & ~TD_R) | TD_TO);
td                546 drivers/usb/host/fhci-tds.c 			out_be32(&td->buf_ptr, 0);
td                552 drivers/usb/host/fhci-tds.c 		td = next_bd(ep->td_base, td, td_status);
td                553 drivers/usb/host/fhci-tds.c 		td_status = in_be16(&td->status);
td                554 drivers/usb/host/fhci-tds.c 		buf_ptr = in_be32(&td->buf_ptr);
td                555 drivers/usb/host/fhci-tds.c 		extra_data = in_be16(&td->extra);
td                594 drivers/usb/host/fhci-tds.c 	struct usb_td __iomem *td;
td                598 drivers/usb/host/fhci-tds.c 	td = cpm_muram_addr(tb_ptr);
td                600 drivers/usb/host/fhci-tds.c 	if (in_be32(&td->buf_ptr) == DUMMY_BD_BUFFER) {
td                601 drivers/usb/host/fhci-tds.c 		struct usb_td __iomem *old_td = td;
td                604 drivers/usb/host/fhci-tds.c 		td_status = in_be16(&td->status);
td                606 drivers/usb/host/fhci-tds.c 		td = next_bd(ep->td_base, td, td_status);
td                607 drivers/usb/host/fhci-tds.c 		tb_ptr = cpm_muram_offset(td);
td                611 drivers/usb/host/fhci-tds.c 		if (in_be16(&td->status) & TD_R)
td                336 drivers/usb/host/fhci.h 	struct td *td_head;	/* a pointer to the current TD handled */
td                390 drivers/usb/host/fhci.h 	struct td **tds;
td                514 drivers/usb/host/fhci.h void fhci_recycle_empty_td(struct fhci_hcd *fhci, struct td *td);
td                517 drivers/usb/host/fhci.h struct td *fhci_td_fill(struct fhci_hcd *fhci, struct urb *urb,
td                521 drivers/usb/host/fhci.h void fhci_add_tds_to_ed(struct ed *ed, struct td **td_list, int number);
td                565 drivers/usb/host/fhci.h struct td *fhci_remove_td_from_ed(struct ed *ed);
td                566 drivers/usb/host/fhci.h struct td *fhci_remove_td_from_frame(struct fhci_time_frame *frame);
td                568 drivers/usb/host/fhci.h struct td *fhci_peek_td_from_frame(struct fhci_time_frame *frame);
td                569 drivers/usb/host/fhci.h void fhci_add_td_to_frame(struct fhci_time_frame *frame, struct td *td);
td                570 drivers/usb/host/fhci.h struct td *fhci_remove_td_from_done_list(struct fhci_controller_list *p_list);
td                571 drivers/usb/host/fhci.h void fhci_done_td(struct urb *urb, struct td *td);
td                358 drivers/usb/host/fotg210-hcd.c 	struct fotg210_qtd *td;
td                394 drivers/usb/host/fotg210-hcd.c 	list_for_each_entry(td, &qh->qtd_list, qtd_list) {
td                395 drivers/usb/host/fotg210-hcd.c 		scratch = hc32_to_cpup(fotg210, &td->hw_token);
td                397 drivers/usb/host/fotg210-hcd.c 		if (hw_curr == td->qtd_dma)
td                399 drivers/usb/host/fotg210-hcd.c 		else if (hw->hw_qtd_next == cpu_to_hc32(fotg210, td->qtd_dma))
td                402 drivers/usb/host/fotg210-hcd.c 			if (td->hw_alt_next == fotg210->async->hw->hw_alt_next)
td                404 drivers/usb/host/fotg210-hcd.c 			else if (td->hw_alt_next != list_end)
td                409 drivers/usb/host/fotg210-hcd.c 				td, mark, ({ char *tmp;
td                426 drivers/usb/host/fotg210-hcd.c 				td->urb);
td                 29 drivers/usb/host/imx21-dbg.c 	int frame, struct td *td) {}
td                 31 drivers/usb/host/imx21-dbg.c 	int frame, struct td *td, int cc, int len) {}
td                119 drivers/usb/host/imx21-dbg.c 	int frame, struct td *td)
td                125 drivers/usb/host/imx21-dbg.c 	trace->schedule_frame = td->frame;
td                127 drivers/usb/host/imx21-dbg.c 	trace->request_len = td->len;
td                128 drivers/usb/host/imx21-dbg.c 	trace->td = td;
td                132 drivers/usb/host/imx21-dbg.c 	int frame, struct td *td, int cc, int len)
td                140 drivers/usb/host/imx21-dbg.c 		if (trace->td == td) {
td                144 drivers/usb/host/imx21-dbg.c 			trace->td = NULL;
td                190 drivers/usb/host/imx21-hcd.c 	etd->td = NULL;
td                558 drivers/usb/host/imx21-hcd.c 	struct td *td;
td                577 drivers/usb/host/imx21-hcd.c 		td = list_entry(ep_priv->td_list.next, struct td, list);
td                578 drivers/usb/host/imx21-hcd.c 		list_del(&td->list);
td                579 drivers/usb/host/imx21-hcd.c 		urb_priv = td->urb->hcpriv;
td                582 drivers/usb/host/imx21-hcd.c 		if (frame_after(cur_frame, td->frame)) {
td                584 drivers/usb/host/imx21-hcd.c 				cur_frame, td->frame);
td                586 drivers/usb/host/imx21-hcd.c 			td->urb->iso_frame_desc[
td                587 drivers/usb/host/imx21-hcd.c 				td->isoc_index].actual_length = 0;
td                588 drivers/usb/host/imx21-hcd.c 			td->urb->iso_frame_desc[td->isoc_index].status = -EXDEV;
td                590 drivers/usb/host/imx21-hcd.c 				urb_done(hcd, td->urb, urb_priv->isoc_status);
td                595 drivers/usb/host/imx21-hcd.c 		etd->td = td;
td                596 drivers/usb/host/imx21-hcd.c 		etd->ep = td->ep;
td                597 drivers/usb/host/imx21-hcd.c 		etd->urb = td->urb;
td                598 drivers/usb/host/imx21-hcd.c 		etd->len = td->len;
td                599 drivers/usb/host/imx21-hcd.c 		etd->dma_handle = td->dma_handle;
td                600 drivers/usb/host/imx21-hcd.c 		etd->cpu_buffer = td->cpu_buffer;
td                602 drivers/usb/host/imx21-hcd.c 		debug_isoc_submitted(imx21, cur_frame, td);
td                604 drivers/usb/host/imx21-hcd.c 		dir = usb_pipeout(td->urb->pipe) ? TD_DIR_OUT : TD_DIR_IN;
td                605 drivers/usb/host/imx21-hcd.c 		setup_etd_dword0(imx21, etd_num, td->urb, dir, etd->dmem_size);
td                609 drivers/usb/host/imx21-hcd.c 			((td->frame & 0xFFFF) << DW2_STARTFRM));
td                612 drivers/usb/host/imx21-hcd.c 			(td->len << DW3_PKTLEN0));
td                625 drivers/usb/host/imx21-hcd.c 	struct td *td = etd->td;
td                627 drivers/usb/host/imx21-hcd.c 	int isoc_index = td->isoc_index;
td                648 drivers/usb/host/imx21-hcd.c 		imx21_hc_get_frame(hcd), td, cc, bytes_xfrd);
td                654 drivers/usb/host/imx21-hcd.c 			cc,  imx21_hc_get_frame(hcd), td->frame,
td                655 drivers/usb/host/imx21-hcd.c 			bytes_xfrd, td->len, urb, etd_num, isoc_index);
td                670 drivers/usb/host/imx21-hcd.c 	etd->td = NULL;
td                734 drivers/usb/host/imx21-hcd.c 	struct td *td = NULL;
td                744 drivers/usb/host/imx21-hcd.c 	urb_priv->isoc_td = kcalloc(urb->number_of_packets, sizeof(struct td),
td                808 drivers/usb/host/imx21-hcd.c 				struct td, list)->frame + urb->interval);
td                831 drivers/usb/host/imx21-hcd.c 	td = urb_priv->isoc_td;
td                832 drivers/usb/host/imx21-hcd.c 	for (; i < urb->number_of_packets; i++, td++) {
td                834 drivers/usb/host/imx21-hcd.c 		td->ep = ep;
td                835 drivers/usb/host/imx21-hcd.c 		td->urb = urb;
td                836 drivers/usb/host/imx21-hcd.c 		td->len = urb->iso_frame_desc[i].length;
td                837 drivers/usb/host/imx21-hcd.c 		td->isoc_index = i;
td                838 drivers/usb/host/imx21-hcd.c 		td->frame = wrap_frame(urb->start_frame + urb->interval * i);
td                839 drivers/usb/host/imx21-hcd.c 		td->dma_handle = urb->transfer_dma + offset;
td                840 drivers/usb/host/imx21-hcd.c 		td->cpu_buffer = urb->transfer_buffer + offset;
td                841 drivers/usb/host/imx21-hcd.c 		list_add_tail(&td->list, &ep_priv->td_list);
td                845 drivers/usb/host/imx21-hcd.c 		urb->number_of_packets, urb->start_frame, td->frame);
td                871 drivers/usb/host/imx21-hcd.c 	struct td *td, *tmp;
td                886 drivers/usb/host/imx21-hcd.c 	list_for_each_entry_safe(td, tmp, &ep_priv->td_list, list) {
td                887 drivers/usb/host/imx21-hcd.c 		if (td->urb == urb) {
td                888 drivers/usb/host/imx21-hcd.c 			dev_vdbg(imx21->dev, "removing td %p\n", td);
td                889 drivers/usb/host/imx21-hcd.c 			list_del(&td->list);
td                322 drivers/usb/host/imx21-hcd.h 	struct td *isoc_td;
td                352 drivers/usb/host/imx21-hcd.h 	struct td *td;
td                401 drivers/usb/host/imx21-hcd.h 	struct td *td;
td                256 drivers/usb/host/ohci-dbg.c 		const struct td *td)
td                258 drivers/usb/host/ohci-dbg.c 	u32	tmp = hc32_to_cpup (ohci, &td->hwINFO);
td                261 drivers/usb/host/ohci-dbg.c 		label, td,
td                263 drivers/usb/host/ohci-dbg.c 		td->urb, td->index,
td                264 drivers/usb/host/ohci-dbg.c 		hc32_to_cpup (ohci, &td->hwNextTD));
td                285 drivers/usb/host/ohci-dbg.c 		cbp = hc32_to_cpup (ohci, &td->hwCBP);
td                286 drivers/usb/host/ohci-dbg.c 		be = hc32_to_cpup (ohci, &td->hwBE);
td                297 drivers/usb/host/ohci-dbg.c 			hc32_to_cpup (ohci, &td->hwCBP) & ~0x0fff,
td                298 drivers/usb/host/ohci-dbg.c 			hc32_to_cpup (ohci, &td->hwBE));
td                300 drivers/usb/host/ohci-dbg.c 			u16	psw = ohci_hwPSW (ohci, td, i);
td                351 drivers/usb/host/ohci-dbg.c 			struct td		*td;
td                352 drivers/usb/host/ohci-dbg.c 			td = list_entry (tmp, struct td, td_list);
td                353 drivers/usb/host/ohci-dbg.c 			ohci_dump_td (ohci, "  ->", td);
td                416 drivers/usb/host/ohci-dbg.c 		struct td	*td;
td                436 drivers/usb/host/ohci-dbg.c 			td = list_entry (entry, struct td, td_list);
td                437 drivers/usb/host/ohci-dbg.c 			info = hc32_to_cpup (ohci, &td->hwINFO);
td                438 drivers/usb/host/ohci-dbg.c 			cbp = hc32_to_cpup (ohci, &td->hwCBP);
td                439 drivers/usb/host/ohci-dbg.c 			be = hc32_to_cpup (ohci, &td->hwBE);
td                442 drivers/usb/host/ohci-dbg.c 					td,
td                451 drivers/usb/host/ohci-dbg.c 					TD_CC_GET (info), td->urb, info);
td                194 drivers/usb/host/ohci-hcd.c 	urb_priv = kzalloc (sizeof (urb_priv_t) + size * sizeof (struct td *),
td                204 drivers/usb/host/ohci-hcd.c 		urb_priv->td [i] = td_alloc (ohci, mem_flags);
td                205 drivers/usb/host/ohci-hcd.c 		if (!urb_priv->td [i]) {
td                752 drivers/usb/host/ohci-hcd.c 	struct td	*td, *td_start, *td_next;
td                796 drivers/usb/host/ohci-hcd.c 		td = ed->pending_td;
td                799 drivers/usb/host/ohci-hcd.c 		if (!td) {
td                803 drivers/usb/host/ohci-hcd.c 				td = td_next;
td                809 drivers/usb/host/ohci-hcd.c 		td_start = td;
td                810 drivers/usb/host/ohci-hcd.c 		td_next = list_prepare_entry(td, &ed->td_list, td_list);
td                814 drivers/usb/host/ohci-hcd.c 			td = td_next;	/* head pointer has passed this TD */
td                816 drivers/usb/host/ohci-hcd.c 		if (td != td_start) {
td                823 drivers/usb/host/ohci-hcd.c 			ed->pending_td = td;
td               1042 drivers/usb/host/ohci-hcd.c 		struct urb	*urb = priv->td[0]->urb;
td               1279 drivers/usb/host/ohci-hcd.c 		sizeof (struct ed), sizeof (struct td));
td                 48 drivers/usb/host/ohci-mem.c 		sizeof (struct td),
td                 76 drivers/usb/host/ohci-mem.c static inline struct td *
td                 79 drivers/usb/host/ohci-mem.c 	struct td *td;
td                 82 drivers/usb/host/ohci-mem.c 	td = hc->td_hash [TD_HASH_FUNC(td_dma)];
td                 83 drivers/usb/host/ohci-mem.c 	while (td && td->td_dma != td_dma)
td                 84 drivers/usb/host/ohci-mem.c 		td = td->td_hash;
td                 85 drivers/usb/host/ohci-mem.c 	return td;
td                 89 drivers/usb/host/ohci-mem.c static struct td *
td                 93 drivers/usb/host/ohci-mem.c 	struct td	*td;
td                 97 drivers/usb/host/ohci-mem.c 		td = gen_pool_dma_zalloc_align(hcd->localmem_pool,
td                 98 drivers/usb/host/ohci-mem.c 				sizeof(*td), &dma, 32);
td                100 drivers/usb/host/ohci-mem.c 		td = dma_pool_zalloc(hc->td_cache, mem_flags, &dma);
td                101 drivers/usb/host/ohci-mem.c 	if (td) {
td                103 drivers/usb/host/ohci-mem.c 		td->hwNextTD = cpu_to_hc32 (hc, dma);
td                104 drivers/usb/host/ohci-mem.c 		td->td_dma = dma;
td                107 drivers/usb/host/ohci-mem.c 	return td;
td                111 drivers/usb/host/ohci-mem.c td_free (struct ohci_hcd *hc, struct td *td)
td                113 drivers/usb/host/ohci-mem.c 	struct td	**prev = &hc->td_hash [TD_HASH_FUNC (td->td_dma)];
td                116 drivers/usb/host/ohci-mem.c 	while (*prev && *prev != td)
td                119 drivers/usb/host/ohci-mem.c 		*prev = td->td_hash;
td                120 drivers/usb/host/ohci-mem.c 	else if ((td->hwINFO & cpu_to_hc32(hc, TD_DONE)) != 0)
td                121 drivers/usb/host/ohci-mem.c 		ohci_dbg (hc, "no hash for td %p\n", td);
td                124 drivers/usb/host/ohci-mem.c 		gen_pool_free(hcd->localmem_pool, (unsigned long)td,
td                125 drivers/usb/host/ohci-mem.c 			      sizeof(*td));
td                127 drivers/usb/host/ohci-mem.c 		dma_pool_free(hc->td_cache, td, td->td_dma);
td                 20 drivers/usb/host/ohci-q.c 		struct td	*td;
td                 23 drivers/usb/host/ohci-q.c 			td = urb_priv->td [i];
td                 24 drivers/usb/host/ohci-q.c 			if (td)
td                 25 drivers/usb/host/ohci-q.c 				td_free (hc, td);
td                414 drivers/usb/host/ohci-q.c 		struct td	*td;
td                425 drivers/usb/host/ohci-q.c 		td = td_alloc (ohci, GFP_ATOMIC);
td                426 drivers/usb/host/ohci-q.c 		if (!td) {
td                432 drivers/usb/host/ohci-q.c 		ed->dummy = td;
td                433 drivers/usb/host/ohci-q.c 		ed->hwTailP = cpu_to_hc32 (ohci, td->td_dma);
td                520 drivers/usb/host/ohci-q.c 	struct td		*td, *td_pt;
td                543 drivers/usb/host/ohci-q.c 	td_pt = urb_priv->td [index];
td                546 drivers/usb/host/ohci-q.c 	td = urb_priv->td [index] = urb_priv->ed->dummy;
td                549 drivers/usb/host/ohci-q.c 	td->ed = urb_priv->ed;
td                550 drivers/usb/host/ohci-q.c 	td->next_dl_td = NULL;
td                551 drivers/usb/host/ohci-q.c 	td->index = index;
td                552 drivers/usb/host/ohci-q.c 	td->urb = urb;
td                553 drivers/usb/host/ohci-q.c 	td->data_dma = data;
td                557 drivers/usb/host/ohci-q.c 	td->hwINFO = cpu_to_hc32 (ohci, info);
td                559 drivers/usb/host/ohci-q.c 		td->hwCBP = cpu_to_hc32 (ohci, data & 0xFFFFF000);
td                560 drivers/usb/host/ohci-q.c 		*ohci_hwPSWp(ohci, td, 0) = cpu_to_hc16 (ohci,
td                563 drivers/usb/host/ohci-q.c 		td->hwCBP = cpu_to_hc32 (ohci, data);
td                566 drivers/usb/host/ohci-q.c 		td->hwBE = cpu_to_hc32 (ohci, data + len - 1);
td                568 drivers/usb/host/ohci-q.c 		td->hwBE = 0;
td                569 drivers/usb/host/ohci-q.c 	td->hwNextTD = cpu_to_hc32 (ohci, td_pt->td_dma);
td                572 drivers/usb/host/ohci-q.c 	list_add_tail (&td->td_list, &td->ed->td_list);
td                575 drivers/usb/host/ohci-q.c 	hash = TD_HASH_FUNC (td->td_dma);
td                576 drivers/usb/host/ohci-q.c 	td->td_hash = ohci->td_hash [hash];
td                577 drivers/usb/host/ohci-q.c 	ohci->td_hash [hash] = td;
td                581 drivers/usb/host/ohci-q.c 	td->ed->hwTailP = td->hwNextTD;
td                756 drivers/usb/host/ohci-q.c static int td_done(struct ohci_hcd *ohci, struct urb *urb, struct td *td)
td                758 drivers/usb/host/ohci-q.c 	u32	tdINFO = hc32_to_cpup (ohci, &td->hwINFO);
td                762 drivers/usb/host/ohci-q.c 	list_del (&td->td_list);
td                766 drivers/usb/host/ohci-q.c 		u16	tdPSW = ohci_hwPSW(ohci, td, 0);
td                778 drivers/usb/host/ohci-q.c 			dlen = urb->iso_frame_desc [td->index].length;
td                786 drivers/usb/host/ohci-q.c 		urb->iso_frame_desc [td->index].actual_length = dlen;
td                787 drivers/usb/host/ohci-q.c 		urb->iso_frame_desc [td->index].status = cc_to_error [cc];
td                792 drivers/usb/host/ohci-q.c 				urb, td, 1 + td->index, dlen, cc);
td                800 drivers/usb/host/ohci-q.c 		u32	tdBE = hc32_to_cpup (ohci, &td->hwBE);
td                812 drivers/usb/host/ohci-q.c 		if ((type != PIPE_CONTROL || td->index != 0) && tdBE != 0) {
td                813 drivers/usb/host/ohci-q.c 			if (td->hwCBP == 0)
td                814 drivers/usb/host/ohci-q.c 				urb->actual_length += tdBE - td->data_dma + 1;
td                817 drivers/usb/host/ohci-q.c 					  hc32_to_cpup (ohci, &td->hwCBP)
td                818 drivers/usb/host/ohci-q.c 					- td->data_dma;
td                824 drivers/usb/host/ohci-q.c 				urb, td, 1 + td->index, cc,
td                833 drivers/usb/host/ohci-q.c static void ed_halted(struct ohci_hcd *ohci, struct td *td, int cc)
td                835 drivers/usb/host/ohci-q.c 	struct urb		*urb = td->urb;
td                837 drivers/usb/host/ohci-q.c 	struct ed		*ed = td->ed;
td                838 drivers/usb/host/ohci-q.c 	struct list_head	*tmp = td->td_list.next;
td                853 drivers/usb/host/ohci-q.c 		struct td	*next;
td                855 drivers/usb/host/ohci-q.c 		next = list_entry (tmp, struct td, td_list);
td                893 drivers/usb/host/ohci-q.c 			hc32_to_cpu (ohci, td->hwINFO),
td                899 drivers/usb/host/ohci-q.c static void add_to_done_list(struct ohci_hcd *ohci, struct td *td)
td                901 drivers/usb/host/ohci-q.c 	struct td	*td2, *td_prev;
td                904 drivers/usb/host/ohci-q.c 	if (td->next_dl_td)
td                908 drivers/usb/host/ohci-q.c 	ed = td->ed;
td                909 drivers/usb/host/ohci-q.c 	td2 = td_prev = td;
td                926 drivers/usb/host/ohci-q.c 	ohci->dl_end = td->next_dl_td = td;
td                938 drivers/usb/host/ohci-q.c 	struct td	*td = NULL;
td                950 drivers/usb/host/ohci-q.c 		td = dma_to_td (ohci, td_dma);
td                951 drivers/usb/host/ohci-q.c 		if (!td) {
td                956 drivers/usb/host/ohci-q.c 		td->hwINFO |= cpu_to_hc32 (ohci, TD_DONE);
td                957 drivers/usb/host/ohci-q.c 		cc = TD_CC_GET (hc32_to_cpup (ohci, &td->hwINFO));
td                964 drivers/usb/host/ohci-q.c 				&& (td->ed->hwHeadP & cpu_to_hc32 (ohci, ED_H)))
td                965 drivers/usb/host/ohci-q.c 			ed_halted(ohci, td, cc);
td                967 drivers/usb/host/ohci-q.c 		td_dma = hc32_to_cpup (ohci, &td->hwNextTD);
td                968 drivers/usb/host/ohci-q.c 		add_to_done_list(ohci, td);
td                996 drivers/usb/host/ohci-q.c 			struct td	*td;
td                999 drivers/usb/host/ohci-q.c 			td = list_first_entry(&ed->td_list, struct td, td_list);
td               1003 drivers/usb/host/ohci-q.c 			if (td->td_dma != head &&
td               1008 drivers/usb/host/ohci-q.c 			if (td->next_dl_td)
td               1038 drivers/usb/host/ohci-q.c 			struct td	*td;
td               1044 drivers/usb/host/ohci-q.c 			td = list_entry (entry, struct td, td_list);
td               1045 drivers/usb/host/ohci-q.c 			urb = td->urb;
td               1046 drivers/usb/host/ohci-q.c 			urb_priv = td->urb->hcpriv;
td               1049 drivers/usb/host/ohci-q.c 				prev = &td->hwNextTD;
td               1055 drivers/usb/host/ohci-q.c 			*prev = td->hwNextTD | savebits;
td               1062 drivers/usb/host/ohci-q.c 			tdINFO = hc32_to_cpup(ohci, &td->hwINFO);
td               1069 drivers/usb/host/ohci-q.c 			td_done (ohci, urb, td);
td               1150 drivers/usb/host/ohci-q.c static void takeback_td(struct ohci_hcd *ohci, struct td *td)
td               1152 drivers/usb/host/ohci-q.c 	struct urb	*urb = td->urb;
td               1154 drivers/usb/host/ohci-q.c 	struct ed	*ed = td->ed;
td               1158 drivers/usb/host/ohci-q.c 	status = td_done(ohci, urb, td);
td               1173 drivers/usb/host/ohci-q.c 		td = list_entry(ed->td_list.next, struct td, td_list);
td               1174 drivers/usb/host/ohci-q.c 		if (!(td->hwINFO & cpu_to_hc32(ohci, TD_DONE))) {
td               1200 drivers/usb/host/ohci-q.c 	struct td	*td;
td               1203 drivers/usb/host/ohci-q.c 		td = ohci->dl_start;
td               1204 drivers/usb/host/ohci-q.c 		if (td == ohci->dl_end)
td               1207 drivers/usb/host/ohci-q.c 			ohci->dl_start = td->next_dl_td;
td               1209 drivers/usb/host/ohci-q.c 		takeback_td(ohci, td);
td                 45 drivers/usb/host/ohci.h 	struct td		*dummy;		/* next TD to activate */
td                 74 drivers/usb/host/ohci.h 	struct td		*pending_td;
td                132 drivers/usb/host/ohci.h 	struct td	*td_hash;	/* dma-->td hashtable */
td                133 drivers/usb/host/ohci.h 	struct td	*next_dl_td;
td                340 drivers/usb/host/ohci.h 	struct td		*td [0];	// all TDs in this request
td                393 drivers/usb/host/ohci.h 	struct td		*td_hash [TD_HASH_SIZE];
td                394 drivers/usb/host/ohci.h 	struct td		*dl_start, *dl_end;	/* the done list */
td                675 drivers/usb/host/ohci.h                                  const struct td *td, int index)
td                678 drivers/usb/host/ohci.h 			&td->hwPSW[index ^ 1] : &td->hwPSW[index]);
td                682 drivers/usb/host/ohci.h                                const struct td *td, int index)
td                684 drivers/usb/host/ohci.h 	return hc16_to_cpup(ohci, ohci_hwPSWp(ohci, td, index));
td                630 drivers/usb/host/r8a66597-hcd.c static void pipe_setting(struct r8a66597 *r8a66597, struct r8a66597_td *td)
td                633 drivers/usb/host/r8a66597-hcd.c 	struct urb *urb = td->urb;
td                635 drivers/usb/host/r8a66597-hcd.c 	if (td->pipenum > 0) {
td                636 drivers/usb/host/r8a66597-hcd.c 		info = &td->pipe->info;
td                643 drivers/usb/host/r8a66597-hcd.c 			r8a66597_pipe_toggle(r8a66597, td->pipe, 0);
td                644 drivers/usb/host/r8a66597-hcd.c 			pipe_toggle_set(r8a66597, td->pipe, urb, 0);
td                645 drivers/usb/host/r8a66597-hcd.c 			clear_all_buffer(r8a66597, td->pipe);
td                649 drivers/usb/host/r8a66597-hcd.c 		pipe_toggle_restore(r8a66597, td->pipe, urb);
td                837 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td, *next;
td                844 drivers/usb/host/r8a66597-hcd.c 	list_for_each_entry_safe(td, next, list, queue) {
td                845 drivers/usb/host/r8a66597-hcd.c 		if (td->address != address)
td                848 drivers/usb/host/r8a66597-hcd.c 		urb = td->urb;
td                849 drivers/usb/host/r8a66597-hcd.c 		list_del(&td->queue);
td                850 drivers/usb/host/r8a66597-hcd.c 		kfree(td);
td               1067 drivers/usb/host/r8a66597-hcd.c 				 struct r8a66597_td *td)
td               1070 drivers/usb/host/r8a66597-hcd.c 	__le16 *p = (__le16 *)td->urb->setup_packet;
td               1073 drivers/usb/host/r8a66597-hcd.c 	r8a66597_write(r8a66597, make_devsel(td->address) | td->maxpacket,
td               1086 drivers/usb/host/r8a66597-hcd.c 				struct r8a66597_td *td)
td               1088 drivers/usb/host/r8a66597-hcd.c 	struct urb *urb = td->urb;
td               1095 drivers/usb/host/r8a66597-hcd.c 			r8a66597_pipe_toggle(r8a66597, td->pipe, 1);
td               1098 drivers/usb/host/r8a66597-hcd.c 		pipe_irq_disable(r8a66597, td->pipenum);
td               1099 drivers/usb/host/r8a66597-hcd.c 		pipe_start(r8a66597, td->pipe);
td               1100 drivers/usb/host/r8a66597-hcd.c 		pipe_irq_enable(r8a66597, urb, td->pipenum);
td               1103 drivers/usb/host/r8a66597-hcd.c 			pipe_irq_disable(r8a66597, td->pipenum);
td               1104 drivers/usb/host/r8a66597-hcd.c 			pipe_setting(r8a66597, td);
td               1105 drivers/usb/host/r8a66597-hcd.c 			pipe_stop(r8a66597, td->pipe);
td               1106 drivers/usb/host/r8a66597-hcd.c 			r8a66597_write(r8a66597, ~(1 << td->pipenum), BRDYSTS);
td               1108 drivers/usb/host/r8a66597-hcd.c 			if (td->pipe->pipetre) {
td               1110 drivers/usb/host/r8a66597-hcd.c 						td->pipe->pipetre);
td               1114 drivers/usb/host/r8a66597-hcd.c 						   td->maxpacket),
td               1115 drivers/usb/host/r8a66597-hcd.c 						td->pipe->pipetrn);
td               1117 drivers/usb/host/r8a66597-hcd.c 						td->pipe->pipetre);
td               1120 drivers/usb/host/r8a66597-hcd.c 			pipe_start(r8a66597, td->pipe);
td               1121 drivers/usb/host/r8a66597-hcd.c 			pipe_irq_enable(r8a66597, urb, td->pipenum);
td               1128 drivers/usb/host/r8a66597-hcd.c 				 struct r8a66597_td *td)
td               1131 drivers/usb/host/r8a66597-hcd.c 	struct urb *urb = td->urb;
td               1134 drivers/usb/host/r8a66597-hcd.c 		pipe_stop(r8a66597, td->pipe);
td               1139 drivers/usb/host/r8a66597-hcd.c 			r8a66597_pipe_toggle(r8a66597, td->pipe, 1);
td               1144 drivers/usb/host/r8a66597-hcd.c 			pipe_setting(r8a66597, td);
td               1145 drivers/usb/host/r8a66597-hcd.c 		if (td->pipe->pipetre)
td               1146 drivers/usb/host/r8a66597-hcd.c 			r8a66597_bclr(r8a66597, TRENB, td->pipe->pipetre);
td               1148 drivers/usb/host/r8a66597-hcd.c 	r8a66597_write(r8a66597, ~(1 << td->pipenum), BRDYSTS);
td               1150 drivers/usb/host/r8a66597-hcd.c 	fifo_change_from_pipe(r8a66597, td->pipe);
td               1151 drivers/usb/host/r8a66597-hcd.c 	tmp = r8a66597_read(r8a66597, td->pipe->fifoctr);
td               1153 drivers/usb/host/r8a66597-hcd.c 		pipe_irq_enable(r8a66597, urb, td->pipenum);
td               1155 drivers/usb/host/r8a66597-hcd.c 		packet_write(r8a66597, td->pipenum);
td               1156 drivers/usb/host/r8a66597-hcd.c 	pipe_start(r8a66597, td->pipe);
td               1161 drivers/usb/host/r8a66597-hcd.c 				  struct r8a66597_td *td)
td               1163 drivers/usb/host/r8a66597-hcd.c 	struct urb *urb = td->urb;
td               1165 drivers/usb/host/r8a66597-hcd.c 	r8a66597_pipe_toggle(r8a66597, td->pipe, 1);
td               1166 drivers/usb/host/r8a66597-hcd.c 	pipe_stop(r8a66597, td->pipe);
td               1183 drivers/usb/host/r8a66597-hcd.c 	pipe_start(r8a66597, td->pipe);
td               1196 drivers/usb/host/r8a66597-hcd.c static int start_transfer(struct r8a66597 *r8a66597, struct r8a66597_td *td)
td               1198 drivers/usb/host/r8a66597-hcd.c 	BUG_ON(!td);
td               1200 drivers/usb/host/r8a66597-hcd.c 	switch (td->type) {
td               1202 drivers/usb/host/r8a66597-hcd.c 		if (is_set_address(td->urb->setup_packet)) {
td               1203 drivers/usb/host/r8a66597-hcd.c 			td->set_address = 1;
td               1204 drivers/usb/host/r8a66597-hcd.c 			td->urb->setup_packet[2] = alloc_usb_address(r8a66597,
td               1205 drivers/usb/host/r8a66597-hcd.c 								     td->urb);
td               1206 drivers/usb/host/r8a66597-hcd.c 			if (td->urb->setup_packet[2] == 0)
td               1209 drivers/usb/host/r8a66597-hcd.c 		prepare_setup_packet(r8a66597, td);
td               1212 drivers/usb/host/r8a66597-hcd.c 		prepare_packet_read(r8a66597, td);
td               1215 drivers/usb/host/r8a66597-hcd.c 		prepare_packet_write(r8a66597, td);
td               1218 drivers/usb/host/r8a66597-hcd.c 		prepare_status_packet(r8a66597, td);
td               1228 drivers/usb/host/r8a66597-hcd.c static int check_transfer_finish(struct r8a66597_td *td, struct urb *urb)
td               1231 drivers/usb/host/r8a66597-hcd.c 		if (urb->number_of_packets == td->iso_cnt)
td               1237 drivers/usb/host/r8a66597-hcd.c 	    (td->short_packet) || (td->zero_packet))
td               1244 drivers/usb/host/r8a66597-hcd.c static void set_td_timer(struct r8a66597 *r8a66597, struct r8a66597_td *td)
td               1248 drivers/usb/host/r8a66597-hcd.c 	BUG_ON(!td);
td               1250 drivers/usb/host/r8a66597-hcd.c 	if (!list_empty(&r8a66597->pipe_queue[td->pipenum]) &&
td               1251 drivers/usb/host/r8a66597-hcd.c 	    !usb_pipecontrol(td->urb->pipe) && usb_pipein(td->urb->pipe)) {
td               1252 drivers/usb/host/r8a66597-hcd.c 		r8a66597->timeout_map |= 1 << td->pipenum;
td               1253 drivers/usb/host/r8a66597-hcd.c 		switch (usb_pipetype(td->urb->pipe)) {
td               1263 drivers/usb/host/r8a66597-hcd.c 		mod_timer(&r8a66597->timers[td->pipenum].td,
td               1269 drivers/usb/host/r8a66597-hcd.c static void finish_request(struct r8a66597 *r8a66597, struct r8a66597_td *td,
td               1278 drivers/usb/host/r8a66597-hcd.c 	if (likely(td)) {
td               1279 drivers/usb/host/r8a66597-hcd.c 		if (td->set_address && (status != 0 || urb->unlinked))
td               1282 drivers/usb/host/r8a66597-hcd.c 		pipe_toggle_save(r8a66597, td->pipe, urb);
td               1283 drivers/usb/host/r8a66597-hcd.c 		list_del(&td->queue);
td               1284 drivers/usb/host/r8a66597-hcd.c 		kfree(td);
td               1298 drivers/usb/host/r8a66597-hcd.c 		td = r8a66597_get_td(r8a66597, pipenum);
td               1299 drivers/usb/host/r8a66597-hcd.c 		if (unlikely(!td))
td               1302 drivers/usb/host/r8a66597-hcd.c 		start_transfer(r8a66597, td);
td               1303 drivers/usb/host/r8a66597-hcd.c 		set_td_timer(r8a66597, td);
td               1312 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td = r8a66597_get_td(r8a66597, pipenum);
td               1317 drivers/usb/host/r8a66597-hcd.c 	if (unlikely(!td))
td               1319 drivers/usb/host/r8a66597-hcd.c 	urb = td->urb;
td               1321 drivers/usb/host/r8a66597-hcd.c 	fifo_change_from_pipe(r8a66597, td->pipe);
td               1322 drivers/usb/host/r8a66597-hcd.c 	tmp = r8a66597_read(r8a66597, td->pipe->fifoctr);
td               1324 drivers/usb/host/r8a66597-hcd.c 		pipe_stop(r8a66597, td->pipe);
td               1327 drivers/usb/host/r8a66597-hcd.c 		finish_request(r8a66597, td, pipenum, td->urb, -EPIPE);
td               1335 drivers/usb/host/r8a66597-hcd.c 				urb->iso_frame_desc[td->iso_cnt].offset);
td               1336 drivers/usb/host/r8a66597-hcd.c 		urb_len = urb->iso_frame_desc[td->iso_cnt].length;
td               1341 drivers/usb/host/r8a66597-hcd.c 	bufsize = min(urb_len, (int) td->maxpacket);
td               1353 drivers/usb/host/r8a66597-hcd.c 		td->zero_packet = 1;
td               1355 drivers/usb/host/r8a66597-hcd.c 		td->short_packet = 1;
td               1358 drivers/usb/host/r8a66597-hcd.c 		urb->iso_frame_desc[td->iso_cnt].actual_length = size;
td               1359 drivers/usb/host/r8a66597-hcd.c 		urb->iso_frame_desc[td->iso_cnt].status = status;
td               1360 drivers/usb/host/r8a66597-hcd.c 		td->iso_cnt++;
td               1365 drivers/usb/host/r8a66597-hcd.c 	if (finish || check_transfer_finish(td, urb)) {
td               1366 drivers/usb/host/r8a66597-hcd.c 		pipe_stop(r8a66597, td->pipe);
td               1374 drivers/usb/host/r8a66597-hcd.c 			r8a66597_write(r8a66597, BCLR, td->pipe->fifoctr);
td               1376 drivers/usb/host/r8a66597-hcd.c 			r8a66597_read_fifo(r8a66597, td->pipe->fifoaddr,
td               1381 drivers/usb/host/r8a66597-hcd.c 		finish_request(r8a66597, td, pipenum, urb, status);
td               1389 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td = r8a66597_get_td(r8a66597, pipenum);
td               1392 drivers/usb/host/r8a66597-hcd.c 	if (unlikely(!td))
td               1394 drivers/usb/host/r8a66597-hcd.c 	urb = td->urb;
td               1396 drivers/usb/host/r8a66597-hcd.c 	fifo_change_from_pipe(r8a66597, td->pipe);
td               1397 drivers/usb/host/r8a66597-hcd.c 	tmp = r8a66597_read(r8a66597, td->pipe->fifoctr);
td               1399 drivers/usb/host/r8a66597-hcd.c 		pipe_stop(r8a66597, td->pipe);
td               1402 drivers/usb/host/r8a66597-hcd.c 		finish_request(r8a66597, td, pipenum, urb, -EPIPE);
td               1407 drivers/usb/host/r8a66597-hcd.c 	bufsize = td->maxpacket;
td               1410 drivers/usb/host/r8a66597-hcd.c 				urb->iso_frame_desc[td->iso_cnt].offset);
td               1412 drivers/usb/host/r8a66597-hcd.c 			   (int)urb->iso_frame_desc[td->iso_cnt].length);
td               1423 drivers/usb/host/r8a66597-hcd.c 		r8a66597_write_fifo(r8a66597, td->pipe, buf, size);
td               1424 drivers/usb/host/r8a66597-hcd.c 		if (!usb_pipebulk(urb->pipe) || td->maxpacket != size)
td               1425 drivers/usb/host/r8a66597-hcd.c 			r8a66597_write(r8a66597, BVAL, td->pipe->fifoctr);
td               1431 drivers/usb/host/r8a66597-hcd.c 		urb->iso_frame_desc[td->iso_cnt].actual_length = size;
td               1432 drivers/usb/host/r8a66597-hcd.c 		urb->iso_frame_desc[td->iso_cnt].status = 0;
td               1433 drivers/usb/host/r8a66597-hcd.c 		td->iso_cnt++;
td               1437 drivers/usb/host/r8a66597-hcd.c 	if (check_transfer_finish(td, urb)) {
td               1449 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td = r8a66597_get_td(r8a66597, 0);
td               1453 drivers/usb/host/r8a66597-hcd.c 	if (unlikely(!td))
td               1455 drivers/usb/host/r8a66597-hcd.c 	urb = td->urb;
td               1457 drivers/usb/host/r8a66597-hcd.c 	switch (td->type) {
td               1460 drivers/usb/host/r8a66597-hcd.c 		if (check_transfer_finish(td, urb))
td               1461 drivers/usb/host/r8a66597-hcd.c 			td->type = USB_PID_ACK;
td               1465 drivers/usb/host/r8a66597-hcd.c 			td->type = USB_PID_ACK;
td               1467 drivers/usb/host/r8a66597-hcd.c 			td->type = USB_PID_OUT;
td               1469 drivers/usb/host/r8a66597-hcd.c 			td->type = USB_PID_IN;
td               1477 drivers/usb/host/r8a66597-hcd.c 		finish_request(r8a66597, td, 0, urb, status);
td               1479 drivers/usb/host/r8a66597-hcd.c 		start_transfer(r8a66597, td);
td               1484 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td = r8a66597_get_td(r8a66597, pipenum);
td               1486 drivers/usb/host/r8a66597-hcd.c 	if (td) {
td               1487 drivers/usb/host/r8a66597-hcd.c 		u16 pid = r8a66597_read(r8a66597, td->pipe->pipectr) & PID;
td               1502 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td;
td               1508 drivers/usb/host/r8a66597-hcd.c 		td = r8a66597_get_td(r8a66597, 0);
td               1509 drivers/usb/host/r8a66597-hcd.c 		if (td && td->type == USB_PID_IN)
td               1519 drivers/usb/host/r8a66597-hcd.c 			td = r8a66597_get_td(r8a66597, pipenum);
td               1520 drivers/usb/host/r8a66597-hcd.c 			if (unlikely(!td))
td               1523 drivers/usb/host/r8a66597-hcd.c 			if (td->type == USB_PID_IN)
td               1525 drivers/usb/host/r8a66597-hcd.c 			else if (td->type == USB_PID_OUT)
td               1537 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td;
td               1544 drivers/usb/host/r8a66597-hcd.c 		td = r8a66597_get_td(r8a66597, 0);
td               1545 drivers/usb/host/r8a66597-hcd.c 		if (td && td->type != USB_PID_OUT)
td               1553 drivers/usb/host/r8a66597-hcd.c 			struct r8a66597_td *td;
td               1554 drivers/usb/host/r8a66597-hcd.c 			td = r8a66597_get_td(r8a66597, pipenum);
td               1555 drivers/usb/host/r8a66597-hcd.c 			if (unlikely(!td))
td               1558 drivers/usb/host/r8a66597-hcd.c 			tmp = r8a66597_read(r8a66597, td->pipe->pipectr);
td               1562 drivers/usb/host/r8a66597-hcd.c 				finish_request(r8a66597, td, pipenum, td->urb,
td               1589 drivers/usb/host/r8a66597-hcd.c 			struct r8a66597_td *td;
td               1590 drivers/usb/host/r8a66597-hcd.c 			td = r8a66597_get_td(r8a66597, pipenum);
td               1591 drivers/usb/host/r8a66597-hcd.c 			if (unlikely(!td))
td               1596 drivers/usb/host/r8a66597-hcd.c 			pipe_stop(r8a66597, td->pipe);
td               1597 drivers/usb/host/r8a66597-hcd.c 			finish_request(r8a66597, td, pipenum, td->urb, status);
td               1729 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td;
td               1739 drivers/usb/host/r8a66597-hcd.c 		td = r8a66597_get_td(r8a66597, pipenum);
td               1740 drivers/usb/host/r8a66597-hcd.c 		if (td)
td               1741 drivers/usb/host/r8a66597-hcd.c 			start_transfer(r8a66597, td);
td               1749 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_timers *timers = from_timer(timers, t, td);
td               1753 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td, *new_td = NULL;
td               1760 drivers/usb/host/r8a66597-hcd.c 		if (timer_pending(&r8a66597->timers[pipenum].td))
td               1763 drivers/usb/host/r8a66597-hcd.c 		td = r8a66597_get_td(r8a66597, pipenum);
td               1764 drivers/usb/host/r8a66597-hcd.c 		if (!td) {
td               1769 drivers/usb/host/r8a66597-hcd.c 		if (td->urb->actual_length) {
td               1770 drivers/usb/host/r8a66597-hcd.c 			set_td_timer(r8a66597, td);
td               1774 drivers/usb/host/r8a66597-hcd.c 		pipe = td->pipe;
td               1778 drivers/usb/host/r8a66597-hcd.c 		new_td = td;
td               1784 drivers/usb/host/r8a66597-hcd.c 				new_td = td;
td               1787 drivers/usb/host/r8a66597-hcd.c 		} while (td != new_td && td->address == new_td->address &&
td               1788 drivers/usb/host/r8a66597-hcd.c 			td->pipe->info.epnum == new_td->pipe->info.epnum);
td               1792 drivers/usb/host/r8a66597-hcd.c 		if (td == new_td)
td               1860 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td;
td               1863 drivers/usb/host/r8a66597-hcd.c 	td = kzalloc(sizeof(struct r8a66597_td), GFP_ATOMIC);
td               1864 drivers/usb/host/r8a66597-hcd.c 	if (td == NULL)
td               1868 drivers/usb/host/r8a66597-hcd.c 	td->pipenum = pipenum;
td               1869 drivers/usb/host/r8a66597-hcd.c 	td->pipe = hep->hcpriv;
td               1870 drivers/usb/host/r8a66597-hcd.c 	td->urb = urb;
td               1871 drivers/usb/host/r8a66597-hcd.c 	td->address = get_urb_to_r8a66597_addr(r8a66597, urb);
td               1872 drivers/usb/host/r8a66597-hcd.c 	td->maxpacket = usb_maxpacket(urb->dev, urb->pipe,
td               1875 drivers/usb/host/r8a66597-hcd.c 		td->type = USB_PID_SETUP;
td               1877 drivers/usb/host/r8a66597-hcd.c 		td->type = USB_PID_IN;
td               1879 drivers/usb/host/r8a66597-hcd.c 		td->type = USB_PID_OUT;
td               1880 drivers/usb/host/r8a66597-hcd.c 	INIT_LIST_HEAD(&td->queue);
td               1882 drivers/usb/host/r8a66597-hcd.c 	return td;
td               1891 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td = NULL;
td               1921 drivers/usb/host/r8a66597-hcd.c 	td = r8a66597_make_td(r8a66597, urb, hep);
td               1922 drivers/usb/host/r8a66597-hcd.c 	if (td == NULL) {
td               1926 drivers/usb/host/r8a66597-hcd.c 	if (list_empty(&r8a66597->pipe_queue[td->pipenum]))
td               1928 drivers/usb/host/r8a66597-hcd.c 	list_add_tail(&td->queue, &r8a66597->pipe_queue[td->pipenum]);
td               1929 drivers/usb/host/r8a66597-hcd.c 	urb->hcpriv = td;
td               1932 drivers/usb/host/r8a66597-hcd.c 		if (td->pipe->info.timer_interval) {
td               1933 drivers/usb/host/r8a66597-hcd.c 			r8a66597->interval_map |= 1 << td->pipenum;
td               1934 drivers/usb/host/r8a66597-hcd.c 			mod_timer(&r8a66597->timers[td->pipenum].interval,
td               1936 drivers/usb/host/r8a66597-hcd.c 					td->pipe->info.timer_interval));
td               1938 drivers/usb/host/r8a66597-hcd.c 			ret = start_transfer(r8a66597, td);
td               1940 drivers/usb/host/r8a66597-hcd.c 				list_del(&td->queue);
td               1941 drivers/usb/host/r8a66597-hcd.c 				kfree(td);
td               1945 drivers/usb/host/r8a66597-hcd.c 		set_td_timer(r8a66597, td);
td               1959 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td;
td               1969 drivers/usb/host/r8a66597-hcd.c 		td = urb->hcpriv;
td               1970 drivers/usb/host/r8a66597-hcd.c 		pipe_stop(r8a66597, td->pipe);
td               1971 drivers/usb/host/r8a66597-hcd.c 		pipe_irq_disable(r8a66597, td->pipenum);
td               1972 drivers/usb/host/r8a66597-hcd.c 		disable_irq_empty(r8a66597, td->pipenum);
td               1973 drivers/usb/host/r8a66597-hcd.c 		finish_request(r8a66597, td, td->pipenum, urb, status);
td               1987 drivers/usb/host/r8a66597-hcd.c 	struct r8a66597_td *td;
td               2007 drivers/usb/host/r8a66597-hcd.c 	td = r8a66597_get_td(r8a66597, pipenum);
td               2008 drivers/usb/host/r8a66597-hcd.c 	if (td)
td               2009 drivers/usb/host/r8a66597-hcd.c 		urb = td->urb;
td               2010 drivers/usb/host/r8a66597-hcd.c 	finish_request(r8a66597, td, pipenum, urb, -ESHUTDOWN);
td               2484 drivers/usb/host/r8a66597-hcd.c 		timer_setup(&r8a66597->timers[i].td, r8a66597_td_timer, 0);
td                100 drivers/usb/host/r8a66597.h 	struct timer_list td;
td                154 drivers/usb/host/r8a66597.h 	struct r8a66597_td *td;
td                156 drivers/usb/host/r8a66597.h 	td = r8a66597_get_td(r8a66597, pipenum);
td                157 drivers/usb/host/r8a66597.h 	return (td ? td->urb : NULL);
td                 43 drivers/usb/host/uhci-debug.c static int uhci_show_td(struct uhci_hcd *uhci, struct uhci_td *td, char *buf,
td                 50 drivers/usb/host/uhci-debug.c 	status = td_status(uhci, td);
td                 51 drivers/usb/host/uhci-debug.c 	out += sprintf(out, "%*s[%p] link (%08x) ", space, "", td,
td                 52 drivers/usb/host/uhci-debug.c 		hc32_to_cpu(uhci, td->link));
td                 69 drivers/usb/host/uhci-debug.c 	token = td_token(uhci, td);
td                 92 drivers/usb/host/uhci-debug.c 	out += sprintf(out, "(buf=%08x)\n", hc32_to_cpu(uhci, td->buffer));
td                104 drivers/usb/host/uhci-debug.c 	struct uhci_td *td;
td                139 drivers/usb/host/uhci-debug.c 	list_for_each_entry(td, &urbp->td_list, list) {
td                143 drivers/usb/host/uhci-debug.c 			out += uhci_show_td(uhci, td, out,
td                148 drivers/usb/host/uhci-debug.c 			if (td_status(uhci, td) & TD_CTRL_ACTIVE)
td                222 drivers/usb/host/uhci-debug.c 		struct uhci_td *td = list_entry(urbp->td_list.next,
td                225 drivers/usb/host/uhci-debug.c 		if (element != LINK_TO_TD(uhci, td))
td                379 drivers/usb/host/uhci-debug.c 	struct uhci_td *td;
td                420 drivers/usb/host/uhci-debug.c 		td = uhci->frame_cpu[i];
td                422 drivers/usb/host/uhci-debug.c 		if (!td)
td                431 drivers/usb/host/uhci-debug.c 		head = &td->fl_list;
td                434 drivers/usb/host/uhci-debug.c 			td = list_entry(tmp, struct uhci_td, fl_list);
td                436 drivers/usb/host/uhci-debug.c 			if (link != LINK_TO_TD(uhci, td)) {
td                446 drivers/usb/host/uhci-debug.c 				out += uhci_show_td(uhci, td, out,
td                451 drivers/usb/host/uhci-debug.c 			link = td->link;
td                227 drivers/usb/host/uhci-hcd.h #define td_token(uhci, td)	hc32_to_cpu((uhci), (td)->token)
td                278 drivers/usb/host/uhci-hcd.h #define td_status(uhci, td)		hc32_to_cpu((uhci), \
td                279 drivers/usb/host/uhci-hcd.h 						READ_ONCE((td)->status))
td                281 drivers/usb/host/uhci-hcd.h #define LINK_TO_TD(uhci, td)		(cpu_to_hc32((uhci), (td)->dma_handle))
td                109 drivers/usb/host/uhci-q.c 	struct uhci_td *td;
td                111 drivers/usb/host/uhci-q.c 	td = dma_pool_alloc(uhci->td_pool, GFP_ATOMIC, &dma_handle);
td                112 drivers/usb/host/uhci-q.c 	if (!td)
td                115 drivers/usb/host/uhci-q.c 	td->dma_handle = dma_handle;
td                116 drivers/usb/host/uhci-q.c 	td->frame = -1;
td                118 drivers/usb/host/uhci-q.c 	INIT_LIST_HEAD(&td->list);
td                119 drivers/usb/host/uhci-q.c 	INIT_LIST_HEAD(&td->fl_list);
td                121 drivers/usb/host/uhci-q.c 	return td;
td                124 drivers/usb/host/uhci-q.c static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td)
td                126 drivers/usb/host/uhci-q.c 	if (!list_empty(&td->list))
td                127 drivers/usb/host/uhci-q.c 		dev_WARN(uhci_dev(uhci), "td %p still in list!\n", td);
td                128 drivers/usb/host/uhci-q.c 	if (!list_empty(&td->fl_list))
td                129 drivers/usb/host/uhci-q.c 		dev_WARN(uhci_dev(uhci), "td %p still in fl_list!\n", td);
td                131 drivers/usb/host/uhci-q.c 	dma_pool_free(uhci->td_pool, td, td->dma_handle);
td                134 drivers/usb/host/uhci-q.c static inline void uhci_fill_td(struct uhci_hcd *uhci, struct uhci_td *td,
td                137 drivers/usb/host/uhci-q.c 	td->status = cpu_to_hc32(uhci, status);
td                138 drivers/usb/host/uhci-q.c 	td->token = cpu_to_hc32(uhci, token);
td                139 drivers/usb/host/uhci-q.c 	td->buffer = cpu_to_hc32(uhci, buffer);
td                142 drivers/usb/host/uhci-q.c static void uhci_add_td_to_urbp(struct uhci_td *td, struct urb_priv *urbp)
td                144 drivers/usb/host/uhci-q.c 	list_add_tail(&td->list, &urbp->td_list);
td                147 drivers/usb/host/uhci-q.c static void uhci_remove_td_from_urbp(struct uhci_td *td)
td                149 drivers/usb/host/uhci-q.c 	list_del_init(&td->list);
td                156 drivers/usb/host/uhci-q.c 		struct uhci_td *td, unsigned framenum)
td                160 drivers/usb/host/uhci-q.c 	td->frame = framenum;
td                169 drivers/usb/host/uhci-q.c 		list_add_tail(&td->fl_list, &ftd->fl_list);
td                171 drivers/usb/host/uhci-q.c 		td->link = ltd->link;
td                173 drivers/usb/host/uhci-q.c 		ltd->link = LINK_TO_TD(uhci, td);
td                175 drivers/usb/host/uhci-q.c 		td->link = uhci->frame[framenum];
td                177 drivers/usb/host/uhci-q.c 		uhci->frame[framenum] = LINK_TO_TD(uhci, td);
td                178 drivers/usb/host/uhci-q.c 		uhci->frame_cpu[framenum] = td;
td                183 drivers/usb/host/uhci-q.c 		struct uhci_td *td)
td                186 drivers/usb/host/uhci-q.c 	if (td->frame == -1) {
td                187 drivers/usb/host/uhci-q.c 		WARN_ON(!list_empty(&td->fl_list));
td                191 drivers/usb/host/uhci-q.c 	if (uhci->frame_cpu[td->frame] == td) {
td                192 drivers/usb/host/uhci-q.c 		if (list_empty(&td->fl_list)) {
td                193 drivers/usb/host/uhci-q.c 			uhci->frame[td->frame] = td->link;
td                194 drivers/usb/host/uhci-q.c 			uhci->frame_cpu[td->frame] = NULL;
td                198 drivers/usb/host/uhci-q.c 			ntd = list_entry(td->fl_list.next,
td                201 drivers/usb/host/uhci-q.c 			uhci->frame[td->frame] = LINK_TO_TD(uhci, ntd);
td                202 drivers/usb/host/uhci-q.c 			uhci->frame_cpu[td->frame] = ntd;
td                207 drivers/usb/host/uhci-q.c 		ptd = list_entry(td->fl_list.prev, struct uhci_td, fl_list);
td                208 drivers/usb/host/uhci-q.c 		ptd->link = td->link;
td                211 drivers/usb/host/uhci-q.c 	list_del_init(&td->fl_list);
td                212 drivers/usb/host/uhci-q.c 	td->frame = -1;
td                239 drivers/usb/host/uhci-q.c 	struct uhci_td *td;
td                241 drivers/usb/host/uhci-q.c 	list_for_each_entry(td, &urbp->td_list, list)
td                242 drivers/usb/host/uhci-q.c 		uhci_remove_td_from_frame_list(uhci, td);
td                318 drivers/usb/host/uhci-q.c 	struct uhci_td *td;
td                342 drivers/usb/host/uhci-q.c 		td = list_entry(urbp->td_list.prev, struct uhci_td,
td                344 drivers/usb/host/uhci-q.c 		ptd->link = td->link;
td                360 drivers/usb/host/uhci-q.c 	td = list_entry(urbp->td_list.next, struct uhci_td, list);
td                362 drivers/usb/host/uhci-q.c 	qh->initial_toggle = uhci_toggle(td_token(uhci, td));
td                376 drivers/usb/host/uhci-q.c 	struct uhci_td *td;
td                398 drivers/usb/host/uhci-q.c 		td = list_entry(urbp->td_list.next, struct uhci_td, list);
td                399 drivers/usb/host/uhci-q.c 		if (toggle > 1 || uhci_toggle(td_token(uhci, td)) == toggle) {
td                400 drivers/usb/host/uhci-q.c 			td = list_entry(urbp->td_list.prev, struct uhci_td,
td                402 drivers/usb/host/uhci-q.c 			toggle = uhci_toggle(td_token(uhci, td)) ^ 1;
td                406 drivers/usb/host/uhci-q.c 			list_for_each_entry(td, &urbp->td_list, list) {
td                407 drivers/usb/host/uhci-q.c 				td->token ^= cpu_to_hc32(uhci,
td                489 drivers/usb/host/uhci-q.c 		struct uhci_td *td = list_entry(urbp->td_list.next,
td                492 drivers/usb/host/uhci-q.c 		qh->element = LINK_TO_TD(uhci, td);
td                743 drivers/usb/host/uhci-q.c 	struct uhci_td *td, *tmp;
td                749 drivers/usb/host/uhci-q.c 	list_for_each_entry_safe(td, tmp, &urbp->td_list, list) {
td                750 drivers/usb/host/uhci-q.c 		uhci_remove_td_from_urbp(td);
td                751 drivers/usb/host/uhci-q.c 		uhci_free_td(uhci, td);
td                792 drivers/usb/host/uhci-q.c 	struct uhci_td *td;
td                812 drivers/usb/host/uhci-q.c 	td = qh->dummy_td;
td                813 drivers/usb/host/uhci-q.c 	uhci_add_td_to_urbp(td, urbp);
td                814 drivers/usb/host/uhci-q.c 	uhci_fill_td(uhci, td, status, destination | uhci_explen(8),
td                816 drivers/usb/host/uhci-q.c 	plink = &td->link;
td                844 drivers/usb/host/uhci-q.c 		td = uhci_alloc_td(uhci);
td                845 drivers/usb/host/uhci-q.c 		if (!td)
td                847 drivers/usb/host/uhci-q.c 		*plink = LINK_TO_TD(uhci, td);
td                852 drivers/usb/host/uhci-q.c 		uhci_add_td_to_urbp(td, urbp);
td                853 drivers/usb/host/uhci-q.c 		uhci_fill_td(uhci, td, status,
td                855 drivers/usb/host/uhci-q.c 		plink = &td->link;
td                864 drivers/usb/host/uhci-q.c 	td = uhci_alloc_td(uhci);
td                865 drivers/usb/host/uhci-q.c 	if (!td)
td                867 drivers/usb/host/uhci-q.c 	*plink = LINK_TO_TD(uhci, td);
td                873 drivers/usb/host/uhci-q.c 	uhci_add_td_to_urbp(td, urbp);
td                874 drivers/usb/host/uhci-q.c 	uhci_fill_td(uhci, td, status | TD_CTRL_IOC,
td                876 drivers/usb/host/uhci-q.c 	plink = &td->link;
td                881 drivers/usb/host/uhci-q.c 	td = uhci_alloc_td(uhci);
td                882 drivers/usb/host/uhci-q.c 	if (!td)
td                884 drivers/usb/host/uhci-q.c 	*plink = LINK_TO_TD(uhci, td);
td                886 drivers/usb/host/uhci-q.c 	uhci_fill_td(uhci, td, 0, USB_PID_OUT | uhci_explen(0), 0);
td                889 drivers/usb/host/uhci-q.c 	qh->dummy_td = td;
td                918 drivers/usb/host/uhci-q.c 	struct uhci_td *td;
td                963 drivers/usb/host/uhci-q.c 	td = qh->dummy_td;
td                974 drivers/usb/host/uhci-q.c 			td = uhci_alloc_td(uhci);
td                975 drivers/usb/host/uhci-q.c 			if (!td)
td                977 drivers/usb/host/uhci-q.c 			*plink = LINK_TO_TD(uhci, td);
td                979 drivers/usb/host/uhci-q.c 		uhci_add_td_to_urbp(td, urbp);
td                980 drivers/usb/host/uhci-q.c 		uhci_fill_td(uhci, td, status,
td                984 drivers/usb/host/uhci-q.c 		plink = &td->link;
td               1010 drivers/usb/host/uhci-q.c 		td = uhci_alloc_td(uhci);
td               1011 drivers/usb/host/uhci-q.c 		if (!td)
td               1013 drivers/usb/host/uhci-q.c 		*plink = LINK_TO_TD(uhci, td);
td               1015 drivers/usb/host/uhci-q.c 		uhci_add_td_to_urbp(td, urbp);
td               1016 drivers/usb/host/uhci-q.c 		uhci_fill_td(uhci, td, status,
td               1020 drivers/usb/host/uhci-q.c 		plink = &td->link;
td               1031 drivers/usb/host/uhci-q.c 	td->status |= cpu_to_hc32(uhci, TD_CTRL_IOC);
td               1036 drivers/usb/host/uhci-q.c 	td = uhci_alloc_td(uhci);
td               1037 drivers/usb/host/uhci-q.c 	if (!td)
td               1039 drivers/usb/host/uhci-q.c 	*plink = LINK_TO_TD(uhci, td);
td               1041 drivers/usb/host/uhci-q.c 	uhci_fill_td(uhci, td, 0, USB_PID_OUT | uhci_explen(0), 0);
td               1044 drivers/usb/host/uhci-q.c 	qh->dummy_td = td;
td               1125 drivers/usb/host/uhci-q.c 	struct uhci_td *td;
td               1129 drivers/usb/host/uhci-q.c 	td = list_entry(urbp->td_list.prev, struct uhci_td, list);
td               1136 drivers/usb/host/uhci-q.c 		qh->element = LINK_TO_TD(uhci, td);
td               1137 drivers/usb/host/uhci-q.c 		tmp = td->list.prev;
td               1150 drivers/usb/host/uhci-q.c 			td = qh->post_td;
td               1151 drivers/usb/host/uhci-q.c 		qh->element = td->link;
td               1158 drivers/usb/host/uhci-q.c 		td = list_entry(tmp, struct uhci_td, list);
td               1161 drivers/usb/host/uhci-q.c 		uhci_remove_td_from_urbp(td);
td               1162 drivers/usb/host/uhci-q.c 		uhci_free_td(uhci, td);
td               1174 drivers/usb/host/uhci-q.c 	struct uhci_td *td, *tmp;
td               1178 drivers/usb/host/uhci-q.c 	list_for_each_entry_safe(td, tmp, &urbp->td_list, list) {
td               1182 drivers/usb/host/uhci-q.c 		ctrlstat = td_status(uhci, td);
td               1192 drivers/usb/host/uhci-q.c 					uhci_packetout(td_token(uhci, td)));
td               1208 drivers/usb/host/uhci-q.c 		} else if (len < uhci_expected_length(td_token(uhci, td))) {
td               1213 drivers/usb/host/uhci-q.c 				if (td->list.next != urbp->td_list.prev)
td               1222 drivers/usb/host/uhci-q.c 			else if (&td->list != urbp->td_list.prev)
td               1226 drivers/usb/host/uhci-q.c 		uhci_remove_td_from_urbp(td);
td               1229 drivers/usb/host/uhci-q.c 		qh->post_td = td;
td               1243 drivers/usb/host/uhci-q.c 		qh->initial_toggle = uhci_toggle(td_token(uhci, td)) ^
td               1257 drivers/usb/host/uhci-q.c 	struct uhci_td *td = NULL;	/* Since urb->number_of_packets > 0 */
td               1337 drivers/usb/host/uhci-q.c 		td = uhci_alloc_td(uhci);
td               1338 drivers/usb/host/uhci-q.c 		if (!td)
td               1341 drivers/usb/host/uhci-q.c 		uhci_add_td_to_urbp(td, urbp);
td               1342 drivers/usb/host/uhci-q.c 		uhci_fill_td(uhci, td, status, destination |
td               1349 drivers/usb/host/uhci-q.c 	td->status |= cpu_to_hc32(uhci, TD_CTRL_IOC);
td               1353 drivers/usb/host/uhci-q.c 	list_for_each_entry(td, &urbp->td_list, list) {
td               1354 drivers/usb/host/uhci-q.c 		uhci_insert_td_in_frame_list(uhci, td, frame);
td               1371 drivers/usb/host/uhci-q.c 	struct uhci_td *td, *tmp;
td               1375 drivers/usb/host/uhci-q.c 	list_for_each_entry_safe(td, tmp, &urbp->td_list, list) {
td               1385 drivers/usb/host/uhci-q.c 		ctrlstat = td_status(uhci, td);
td               1400 drivers/usb/host/uhci-q.c 		uhci_remove_td_from_urbp(td);
td               1401 drivers/usb/host/uhci-q.c 		uhci_free_td(uhci, td);
td               1643 drivers/usb/host/uhci-q.c 			struct uhci_td *td = list_entry(urbp->td_list.next,
td               1646 drivers/usb/host/uhci-q.c 			td->status |= cpu_to_hc32(uhci, TD_CTRL_IOC);
td               1671 drivers/usb/host/uhci-q.c 	struct uhci_td *td;
td               1692 drivers/usb/host/uhci-q.c 		td = list_entry(urbp->td_list.next, struct uhci_td, list);
td               1693 drivers/usb/host/uhci-q.c 		status = td_status(uhci, td);
td                106 drivers/usb/host/xhci-ring.c static bool last_td_in_urb(struct xhci_td *td)
td                108 drivers/usb/host/xhci-ring.c 	struct urb_priv *urb_priv = td->urb->hcpriv;
td                625 drivers/usb/host/xhci-ring.c 		       struct xhci_td *td, bool flip_cycle)
td                627 drivers/usb/host/xhci-ring.c 	struct xhci_segment *seg	= td->start_seg;
td                628 drivers/usb/host/xhci-ring.c 	union xhci_trb *trb		= td->first_trb;
td                634 drivers/usb/host/xhci-ring.c 		if (flip_cycle && trb != td->first_trb && trb != td->last_trb)
td                637 drivers/usb/host/xhci-ring.c 		if (trb == td->last_trb)
td                679 drivers/usb/host/xhci-ring.c 		struct xhci_ring *ring, struct xhci_td *td)
td                682 drivers/usb/host/xhci-ring.c 	struct xhci_segment *seg = td->bounce_seg;
td                683 drivers/usb/host/xhci-ring.c 	struct urb *urb = td->urb;
td               1827 drivers/usb/host/xhci-ring.c static void xhci_clear_hub_tt_buffer(struct xhci_hcd *xhci, struct xhci_td *td,
td               1834 drivers/usb/host/xhci-ring.c 	if (td->urb->dev->tt && !usb_pipeint(td->urb->pipe) &&
td               1835 drivers/usb/host/xhci-ring.c 	    (td->urb->dev->tt->hub != xhci_to_hcd(xhci)->self.root_hub) &&
td               1838 drivers/usb/host/xhci-ring.c 		td->urb->ep->hcpriv = td->urb->dev;
td               1839 drivers/usb/host/xhci-ring.c 		if (usb_hub_clear_tt_buffer(td->urb))
td               1846 drivers/usb/host/xhci-ring.c 		unsigned int stream_id, struct xhci_td *td,
td               1870 drivers/usb/host/xhci-ring.c 					  td);
td               1915 drivers/usb/host/xhci-ring.c static int xhci_td_cleanup(struct xhci_hcd *xhci, struct xhci_td *td,
td               1921 drivers/usb/host/xhci-ring.c 	urb = td->urb;
td               1924 drivers/usb/host/xhci-ring.c 	xhci_unmap_td_bounce_buffer(xhci, ep_ring, td);
td               1937 drivers/usb/host/xhci-ring.c 	list_del_init(&td->td_list);
td               1939 drivers/usb/host/xhci-ring.c 	if (!list_empty(&td->cancelled_td_list))
td               1940 drivers/usb/host/xhci-ring.c 		list_del_init(&td->cancelled_td_list);
td               1944 drivers/usb/host/xhci-ring.c 	if (last_td_in_urb(td)) {
td               1955 drivers/usb/host/xhci-ring.c 		xhci_giveback_urb_in_irq(xhci, td, *status);
td               1961 drivers/usb/host/xhci-ring.c static int finish_td(struct xhci_hcd *xhci, struct xhci_td *td,
td               2002 drivers/usb/host/xhci-ring.c 			xhci_clear_hub_tt_buffer(xhci, td, ep);
td               2004 drivers/usb/host/xhci-ring.c 					ep_ring->stream_id, td, EP_HARD_RESET);
td               2007 drivers/usb/host/xhci-ring.c 		while (ep_ring->dequeue != td->last_trb)
td               2012 drivers/usb/host/xhci-ring.c 	return xhci_td_cleanup(xhci, td, ep_ring, status);
td               2033 drivers/usb/host/xhci-ring.c static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,
td               2051 drivers/usb/host/xhci-ring.c 	requested = td->urb->transfer_buffer_length;
td               2069 drivers/usb/host/xhci-ring.c 			td->urb->actual_length = remaining;
td               2076 drivers/usb/host/xhci-ring.c 			td->urb->actual_length = 0;
td               2080 drivers/usb/host/xhci-ring.c 			td->urb->actual_length = requested - remaining;
td               2083 drivers/usb/host/xhci-ring.c 			td->urb->actual_length = requested;
td               2102 drivers/usb/host/xhci-ring.c 			td->urb->actual_length = requested - remaining;
td               2103 drivers/usb/host/xhci-ring.c 		else if (!td->urb_length_set)
td               2104 drivers/usb/host/xhci-ring.c 			td->urb->actual_length = 0;
td               2118 drivers/usb/host/xhci-ring.c 		td->urb_length_set = true;
td               2119 drivers/usb/host/xhci-ring.c 		td->urb->actual_length = requested - remaining;
td               2125 drivers/usb/host/xhci-ring.c 	if (!td->urb_length_set)
td               2126 drivers/usb/host/xhci-ring.c 		td->urb->actual_length = requested;
td               2129 drivers/usb/host/xhci-ring.c 	return finish_td(xhci, td, event, ep, status);
td               2135 drivers/usb/host/xhci-ring.c static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
td               2150 drivers/usb/host/xhci-ring.c 	urb_priv = td->urb->hcpriv;
td               2152 drivers/usb/host/xhci-ring.c 	frame = &td->urb->iso_frame_desc[idx];
td               2156 drivers/usb/host/xhci-ring.c 	short_framestatus = td->urb->transfer_flags & URB_SHORT_NOT_OK ?
td               2187 drivers/usb/host/xhci-ring.c 		if (ep_trb != td->last_trb)
td               2214 drivers/usb/host/xhci-ring.c 	td->urb->actual_length += frame->actual_length;
td               2216 drivers/usb/host/xhci-ring.c 	return finish_td(xhci, td, event, ep, status);
td               2219 drivers/usb/host/xhci-ring.c static int skip_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
td               2229 drivers/usb/host/xhci-ring.c 	urb_priv = td->urb->hcpriv;
td               2231 drivers/usb/host/xhci-ring.c 	frame = &td->urb->iso_frame_desc[idx];
td               2240 drivers/usb/host/xhci-ring.c 	while (ep_ring->dequeue != td->last_trb)
td               2244 drivers/usb/host/xhci-ring.c 	return xhci_td_cleanup(xhci, td, ep_ring, status);
td               2250 drivers/usb/host/xhci-ring.c static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td,
td               2268 drivers/usb/host/xhci-ring.c 	requested = td->urb->transfer_buffer_length;
td               2274 drivers/usb/host/xhci-ring.c 		if (ep_trb != td->last_trb || remaining) {
td               2277 drivers/usb/host/xhci-ring.c 				 td->urb->ep->desc.bEndpointAddress,
td               2284 drivers/usb/host/xhci-ring.c 			 td->urb->ep->desc.bEndpointAddress,
td               2289 drivers/usb/host/xhci-ring.c 		td->urb->actual_length = remaining;
td               2302 drivers/usb/host/xhci-ring.c 					ep_ring->stream_id, td, EP_SOFT_RESET);
td               2309 drivers/usb/host/xhci-ring.c 	if (ep_trb == td->last_trb)
td               2310 drivers/usb/host/xhci-ring.c 		td->urb->actual_length = requested - remaining;
td               2312 drivers/usb/host/xhci-ring.c 		td->urb->actual_length =
td               2319 drivers/usb/host/xhci-ring.c 		td->urb->actual_length = 0;
td               2321 drivers/usb/host/xhci-ring.c 	return finish_td(xhci, td, event, ep, status);
td               2337 drivers/usb/host/xhci-ring.c 	struct xhci_td *td = NULL;
td               2575 drivers/usb/host/xhci-ring.c 		td = list_first_entry(&ep_ring->td_list, struct xhci_td,
td               2582 drivers/usb/host/xhci-ring.c 				td->last_trb, ep_trb_dma, false);
td               2599 drivers/usb/host/xhci-ring.c 			    !usb_endpoint_xfer_isoc(&td->urb->ep->desc)) {
td               2616 drivers/usb/host/xhci-ring.c 					  ep_ring->dequeue, td->last_trb,
td               2621 drivers/usb/host/xhci-ring.c 			skip_isoc_td(xhci, td, event, ep, &status);
td               2656 drivers/usb/host/xhci-ring.c 							     td, EP_HARD_RESET);
td               2661 drivers/usb/host/xhci-ring.c 		if (usb_endpoint_xfer_control(&td->urb->ep->desc))
td               2662 drivers/usb/host/xhci-ring.c 			process_ctrl_td(xhci, td, ep_trb, event, ep, &status);
td               2663 drivers/usb/host/xhci-ring.c 		else if (usb_endpoint_xfer_isoc(&td->urb->ep->desc))
td               2664 drivers/usb/host/xhci-ring.c 			process_isoc_td(xhci, td, ep_trb, event, ep, &status);
td               2666 drivers/usb/host/xhci-ring.c 			process_bulk_intr_td(xhci, td, ep_trb, event, ep,
td               3021 drivers/usb/host/xhci-ring.c 	struct xhci_td	*td;
td               3038 drivers/usb/host/xhci-ring.c 	td = &urb_priv->td[td_index];
td               3040 drivers/usb/host/xhci-ring.c 	INIT_LIST_HEAD(&td->td_list);
td               3041 drivers/usb/host/xhci-ring.c 	INIT_LIST_HEAD(&td->cancelled_td_list);
td               3049 drivers/usb/host/xhci-ring.c 	td->urb = urb;
td               3051 drivers/usb/host/xhci-ring.c 	list_add_tail(&td->td_list, &ep_ring->td_list);
td               3052 drivers/usb/host/xhci-ring.c 	td->start_seg = ep_ring->enq_seg;
td               3053 drivers/usb/host/xhci-ring.c 	td->first_trb = ep_ring->enqueue;
td               3297 drivers/usb/host/xhci-ring.c 	struct xhci_td *td;
td               3339 drivers/usb/host/xhci-ring.c 	td = &urb_priv->td[0];
td               3381 drivers/usb/host/xhci-ring.c 					td->bounce_seg = ring->enq_seg;
td               3389 drivers/usb/host/xhci-ring.c 			td->last_trb = ring->enqueue;
td               3439 drivers/usb/host/xhci-ring.c 		urb_priv->td[1].last_trb = ring->enqueue;
td               3462 drivers/usb/host/xhci-ring.c 	struct xhci_td *td;
td               3491 drivers/usb/host/xhci-ring.c 	td = &urb_priv->td[0];
td               3563 drivers/usb/host/xhci-ring.c 	td->last_trb = ep_ring->enqueue;
td               3733 drivers/usb/host/xhci-ring.c 	struct xhci_td *td;
td               3789 drivers/usb/host/xhci-ring.c 		td = &urb_priv->td[i];
td               3832 drivers/usb/host/xhci-ring.c 				td->last_trb = ep_ring->enqueue;
td               3896 drivers/usb/host/xhci-ring.c 		list_del_init(&urb_priv->td[i].td_list);
td               3903 drivers/usb/host/xhci-ring.c 	urb_priv->td[0].last_trb = ep_ring->enqueue;
td               3905 drivers/usb/host/xhci-ring.c 	td_to_noop(xhci, ep_ring, &urb_priv->td[0], true);
td               3908 drivers/usb/host/xhci-ring.c 	ep_ring->enqueue = urb_priv->td[0].first_trb;
td               3909 drivers/usb/host/xhci-ring.c 	ep_ring->enq_seg = urb_priv->td[0].start_seg;
td                 41 drivers/usb/host/xhci.c static bool td_on_ring(struct xhci_td *td, struct xhci_ring *ring)
td                 45 drivers/usb/host/xhci.c 	if (!td || !td->start_seg)
td                 48 drivers/usb/host/xhci.c 		if (seg == td->start_seg)
td               1495 drivers/usb/host/xhci.c 	urb_priv = kzalloc(struct_size(urb_priv, td, num_tds), mem_flags);
td               1606 drivers/usb/host/xhci.c 	struct xhci_td *td;
td               1647 drivers/usb/host/xhci.c 	if (!td_on_ring(&urb_priv->td[0], ep_ring)) {
td               1650 drivers/usb/host/xhci.c 			td = &urb_priv->td[i];
td               1651 drivers/usb/host/xhci.c 			if (!list_empty(&td->cancelled_td_list))
td               1652 drivers/usb/host/xhci.c 				list_del_init(&td->cancelled_td_list);
td               1663 drivers/usb/host/xhci.c 			td = &urb_priv->td[i];
td               1664 drivers/usb/host/xhci.c 			if (!list_empty(&td->td_list))
td               1665 drivers/usb/host/xhci.c 				list_del_init(&td->td_list);
td               1666 drivers/usb/host/xhci.c 			if (!list_empty(&td->cancelled_td_list))
td               1667 drivers/usb/host/xhci.c 				list_del_init(&td->cancelled_td_list);
td               1680 drivers/usb/host/xhci.c 					urb_priv->td[i].start_seg,
td               1681 drivers/usb/host/xhci.c 					urb_priv->td[i].first_trb));
td               1684 drivers/usb/host/xhci.c 		td = &urb_priv->td[i];
td               1685 drivers/usb/host/xhci.c 		list_add_tail(&td->cancelled_td_list, &ep->cancelled_td_list);
td               3036 drivers/usb/host/xhci.c 			       struct xhci_td *td)
td               3045 drivers/usb/host/xhci.c 	xhci_find_new_dequeue_state(xhci, slot_id, ep_index, stream_id, td,
td               1645 drivers/usb/host/xhci.h 	struct	xhci_td	td[0];
td               2121 drivers/usb/host/xhci.h 			       struct xhci_td *td);
td                290 fs/ecryptfs/file.c static int ecryptfs_flush(struct file *file, fl_owner_t td)
td                296 fs/ecryptfs/file.c 		return lower_file->f_op->flush(lower_file, td);
td                564 include/linux/blkdev.h 	struct throtl_data *td;
td                624 include/linux/mlx5/driver.h 	struct mlx5_td             td;
td                179 include/linux/pm_domain.h 	struct gpd_timing_data td;
td                360 include/soc/fsl/qman.h 		__be16 td; /* "Taildrop": _res[13-15], mant[5-12], exp[0-4] */
td                431 include/soc/fsl/qman.h 	int td, oddbit = 0;
td                444 include/soc/fsl/qman.h 	td = (val << QM_FQD_TD_MANT_OFF) & QM_FQD_TD_MANT_MASK;
td                445 include/soc/fsl/qman.h 	td |= (e & QM_FQD_TD_EXP_MASK);
td                446 include/soc/fsl/qman.h 	fqd->td = cpu_to_be16(td);
td                452 include/soc/fsl/qman.h 	int td = be16_to_cpu(fqd->td);
td                454 include/soc/fsl/qman.h 	return ((td & QM_FQD_TD_MANT_MASK) >> QM_FQD_TD_MANT_OFF)
td                455 include/soc/fsl/qman.h 		<< (td & QM_FQD_TD_EXP_MASK);
td                109 kernel/smpboot.c 	struct smpboot_thread_data *td = data;
td                110 kernel/smpboot.c 	struct smp_hotplug_thread *ht = td->ht;
td                119 kernel/smpboot.c 			if (ht->cleanup && td->status != HP_THREAD_NONE)
td                120 kernel/smpboot.c 				ht->cleanup(td->cpu, cpu_online(td->cpu));
td                121 kernel/smpboot.c 			kfree(td);
td                128 kernel/smpboot.c 			if (ht->park && td->status == HP_THREAD_ACTIVE) {
td                129 kernel/smpboot.c 				BUG_ON(td->cpu != smp_processor_id());
td                130 kernel/smpboot.c 				ht->park(td->cpu);
td                131 kernel/smpboot.c 				td->status = HP_THREAD_PARKED;
td                138 kernel/smpboot.c 		BUG_ON(td->cpu != smp_processor_id());
td                141 kernel/smpboot.c 		switch (td->status) {
td                146 kernel/smpboot.c 				ht->setup(td->cpu);
td                147 kernel/smpboot.c 			td->status = HP_THREAD_ACTIVE;
td                154 kernel/smpboot.c 				ht->unpark(td->cpu);
td                155 kernel/smpboot.c 			td->status = HP_THREAD_ACTIVE;
td                159 kernel/smpboot.c 		if (!ht->thread_should_run(td->cpu)) {
td                165 kernel/smpboot.c 			ht->thread_fn(td->cpu);
td                174 kernel/smpboot.c 	struct smpboot_thread_data *td;
td                179 kernel/smpboot.c 	td = kzalloc_node(sizeof(*td), GFP_KERNEL, cpu_to_node(cpu));
td                180 kernel/smpboot.c 	if (!td)
td                182 kernel/smpboot.c 	td->cpu = cpu;
td                183 kernel/smpboot.c 	td->ht = ht;
td                185 kernel/smpboot.c 	tsk = kthread_create_on_cpu(smpboot_thread_fn, td, cpu,
td                188 kernel/smpboot.c 		kfree(td);
td                675 kernel/time/clockevents.c 	struct tick_device *td;
td                679 kernel/time/clockevents.c 	td = tick_get_tick_dev(dev);
td                680 kernel/time/clockevents.c 	if (td && td->evtdev)
td                681 kernel/time/clockevents.c 		count = snprintf(buf, PAGE_SIZE, "%s\n", td->evtdev->name);
td               1705 kernel/time/hrtimer.c 	struct tick_device *td;
td               1710 kernel/time/hrtimer.c 	td = this_cpu_ptr(&tick_cpu_device);
td               1711 kernel/time/hrtimer.c 	if (td && td->evtdev)
td               1712 kernel/time/hrtimer.c 		hrtimer_interrupt(td->evtdev);
td                247 kernel/time/tick-broadcast.c 	struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
td                248 kernel/time/tick-broadcast.c 	struct clock_event_device *evt = td->evtdev;
td                267 kernel/time/tick-broadcast.c 	struct tick_device *td;
td                299 kernel/time/tick-broadcast.c 		td = &per_cpu(tick_cpu_device, cpumask_first(mask));
td                300 kernel/time/tick-broadcast.c 		td->evtdev->broadcast(mask);
td                320 kernel/time/tick-broadcast.c 	struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
td                346 kernel/time/tick-broadcast.c 		td->evtdev->event_handler(td->evtdev);
td                359 kernel/time/tick-broadcast.c 	struct tick_device *td;
td                365 kernel/time/tick-broadcast.c 	td = this_cpu_ptr(&tick_cpu_device);
td                366 kernel/time/tick-broadcast.c 	dev = td->evtdev;
td                587 kernel/time/tick-broadcast.c 		struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
td                594 kernel/time/tick-broadcast.c 		if (td->mode == TICKDEV_MODE_ONESHOT) {
td                595 kernel/time/tick-broadcast.c 			clockevents_switch_state(td->evtdev,
td                606 kernel/time/tick-broadcast.c 	struct tick_device *td;
td                626 kernel/time/tick-broadcast.c 		td = &per_cpu(tick_cpu_device, cpu);
td                627 kernel/time/tick-broadcast.c 		if (td->evtdev->next_event <= now) {
td                635 kernel/time/tick-broadcast.c 		} else if (td->evtdev->next_event < next_event) {
td                636 kernel/time/tick-broadcast.c 			next_event = td->evtdev->next_event;
td                679 kernel/time/tick-broadcast.c 		td = this_cpu_ptr(&tick_cpu_device);
td                680 kernel/time/tick-broadcast.c 		td->evtdev->event_handler(td->evtdev);
td                870 kernel/time/tick-broadcast.c 	struct tick_device *td;
td                874 kernel/time/tick-broadcast.c 		td = &per_cpu(tick_cpu_device, cpu);
td                875 kernel/time/tick-broadcast.c 		if (td->evtdev)
td                876 kernel/time/tick-broadcast.c 			td->evtdev->next_event = expires;
td                201 kernel/time/tick-common.c static void tick_setup_device(struct tick_device *td,
td                211 kernel/time/tick-common.c 	if (!td->evtdev) {
td                242 kernel/time/tick-common.c 		td->mode = TICKDEV_MODE_PERIODIC;
td                244 kernel/time/tick-common.c 		handler = td->evtdev->event_handler;
td                245 kernel/time/tick-common.c 		next_event = td->evtdev->next_event;
td                246 kernel/time/tick-common.c 		td->evtdev->event_handler = clockevents_handle_noop;
td                249 kernel/time/tick-common.c 	td->evtdev = newdev;
td                268 kernel/time/tick-common.c 	if (td->mode == TICKDEV_MODE_PERIODIC)
td                276 kernel/time/tick-common.c 	struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
td                279 kernel/time/tick-common.c 	clockevents_exchange_device(td->evtdev, newdev);
td                280 kernel/time/tick-common.c 	tick_setup_device(td, newdev, cpu, cpumask_of(cpu));
td                341 kernel/time/tick-common.c 	struct tick_device *td;
td                345 kernel/time/tick-common.c 	td = &per_cpu(tick_cpu_device, cpu);
td                346 kernel/time/tick-common.c 	curdev = td->evtdev;
td                369 kernel/time/tick-common.c 	tick_setup_device(td, newdev, cpu, cpumask_of(cpu));
td                394 kernel/time/tick-common.c 	struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
td                396 kernel/time/tick-common.c 	if (!(td->evtdev->features & CLOCK_EVT_FEAT_C3STOP))
td                429 kernel/time/tick-common.c 	struct tick_device *td = &per_cpu(tick_cpu_device, cpu);
td                430 kernel/time/tick-common.c 	struct clock_event_device *dev = td->evtdev;
td                432 kernel/time/tick-common.c 	td->mode = TICKDEV_MODE_PERIODIC;
td                441 kernel/time/tick-common.c 		td->evtdev = NULL;
td                455 kernel/time/tick-common.c 	struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
td                457 kernel/time/tick-common.c 	clockevents_shutdown(td->evtdev);
td                469 kernel/time/tick-common.c 	struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
td                472 kernel/time/tick-common.c 	clockevents_tick_resume(td->evtdev);
td                474 kernel/time/tick-common.c 		if (td->mode == TICKDEV_MODE_PERIODIC)
td                475 kernel/time/tick-common.c 			tick_setup_periodic(td->evtdev, 0);
td                 75 kernel/time/tick-oneshot.c 	struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
td                 76 kernel/time/tick-oneshot.c 	struct clock_event_device *dev = td->evtdev;
td                 94 kernel/time/tick-oneshot.c 	td->mode = TICKDEV_MODE_ONESHOT;
td                193 kernel/time/timer_list.c print_tickdevice(struct seq_file *m, struct tick_device *td, int cpu)
td                195 kernel/time/timer_list.c 	struct clock_event_device *dev = td->evtdev;
td                199 kernel/time/timer_list.c 	SEQ_printf(m, "Tick Device: mode:     %d\n", td->mode);
td                591 lib/inflate.c  	struct huft *td,    /* distance decoder tables */
td                650 lib/inflate.c        if ((e = (t = td + ((unsigned)b & md))->e) > 16)
td                772 lib/inflate.c    struct huft *td;      /* distance code table */
td                802 lib/inflate.c    if ((i = huft_build(l, 30, 0, cpdist, cpdext, &td, &bd)) > 1)
td                813 lib/inflate.c    if (inflate_codes(tl, td, bl, bd)) {
td                821 lib/inflate.c    huft_free(td);
td                838 lib/inflate.c    struct huft *td;      /* distance code table */
td                918 lib/inflate.c      j = (td = tl + ((unsigned)b & m))->b;
td                920 lib/inflate.c      j = td->v.n;
td                990 lib/inflate.c    if ((i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &td, &bd)) != 0)
td                999 lib/inflate.c        huft_free(td);
td               1010 lib/inflate.c    if (inflate_codes(tl, td, bl, bd)) {
td               1019 lib/inflate.c    huft_free(td);
td                180 net/rxrpc/key.c static void rxrpc_free_krb5_tagged(struct krb5_tagged_data *td)
td                182 net/rxrpc/key.c 	kfree(td->data);
td                290 net/rxrpc/key.c static int rxrpc_krb5_decode_tagged_data(struct krb5_tagged_data *td,
td                305 net/rxrpc/key.c 	td->tag = ntohl(*xdr++);
td                313 net/rxrpc/key.c 	td->data_len = len;
td                316 net/rxrpc/key.c 		td->data = kmemdup(xdr, len, GFP_KERNEL);
td                317 net/rxrpc/key.c 		if (!td->data)
td                323 net/rxrpc/key.c 	_debug("tag %x len %x", td->tag, td->data_len);
td                341 net/rxrpc/key.c 	struct krb5_tagged_data *td;
td                364 net/rxrpc/key.c 		td = kcalloc(n_elem, sizeof(struct krb5_tagged_data),
td                366 net/rxrpc/key.c 		if (!td)
td                368 net/rxrpc/key.c 		*_td = td;
td                371 net/rxrpc/key.c 			ret = rxrpc_krb5_decode_tagged_data(&td[loop],
td                103 net/sched/act_ipt.c 	struct xt_entry_target *td, *t;
td                136 net/sched/act_ipt.c 	td = (struct xt_entry_target *)nla_data(tb[TCA_IPT_TARG]);
td                137 net/sched/act_ipt.c 	if (nla_len(tb[TCA_IPT_TARG]) != td->u.target_size) {
td                172 net/sched/act_ipt.c 	t = kmemdup(td, td->u.target_size, GFP_KERNEL);
td                467 security/integrity/ima/ima_crypto.c 					 struct ima_template_desc *td,
td                490 security/integrity/ima/ima_crypto.c 		if (strcmp(td->name, IMA_TEMPLATE_IMA_NAME) != 0) {
td                496 security/integrity/ima/ima_crypto.c 		} else if (strcmp(td->fields[i]->field_id, "n") == 0) {
td                475 security/keys/trusted.c 	struct tpm_digests *td;
td                487 security/keys/trusted.c 	td = kmalloc(sizeof *td, GFP_KERNEL);
td                488 security/keys/trusted.c 	if (!td)
td                498 security/keys/trusted.c 	memcpy(td->xorwork, sess.secret, SHA1_DIGEST_SIZE);
td                499 security/keys/trusted.c 	memcpy(td->xorwork + SHA1_DIGEST_SIZE, sess.enonce, SHA1_DIGEST_SIZE);
td                500 security/keys/trusted.c 	ret = TSS_sha1(td->xorwork, SHA1_DIGEST_SIZE * 2, td->xorhash);
td                504 security/keys/trusted.c 	ret = tpm_get_random(chip, td->nonceodd, TPM_NONCE_SIZE);
td                514 security/keys/trusted.c 		td->encauth[i] = td->xorhash[i] ^ blobauth[i];
td                519 security/keys/trusted.c 		ret = TSS_authhmac(td->pubauth, sess.secret, SHA1_DIGEST_SIZE,
td                520 security/keys/trusted.c 				   sess.enonce, td->nonceodd, cont,
td                522 security/keys/trusted.c 				   td->encauth, sizeof(uint32_t), &pcrsize,
td                527 security/keys/trusted.c 		ret = TSS_authhmac(td->pubauth, sess.secret, SHA1_DIGEST_SIZE,
td                528 security/keys/trusted.c 				   sess.enonce, td->nonceodd, cont,
td                530 security/keys/trusted.c 				   td->encauth, sizeof(uint32_t), &pcrsize,
td                543 security/keys/trusted.c 	storebytes(tb, td->encauth, SHA1_DIGEST_SIZE);
td                549 security/keys/trusted.c 	storebytes(tb, td->nonceodd, TPM_NONCE_SIZE);
td                551 security/keys/trusted.c 	storebytes(tb, td->pubauth, SHA1_DIGEST_SIZE);
td                565 security/keys/trusted.c 	ret = TSS_checkhmac1(tb->data, ordinal, td->nonceodd, sess.secret,
td                575 security/keys/trusted.c 	kzfree(td);
td               1784 sound/sparc/dbri.c 	int td = dbri->pipes[pipe].desc;
td               1787 sound/sparc/dbri.c 	while (td >= 0) {
td               1788 sound/sparc/dbri.c 		if (td >= DBRI_NO_DESCS) {
td               1793 sound/sparc/dbri.c 		status = DBRI_TD_STATUS(dbri->dma->desc[td].word4);
td               1797 sound/sparc/dbri.c 		dprintk(D_INT, "TD %d, status 0x%02x\n", td, status);
td               1799 sound/sparc/dbri.c 		dbri->dma->desc[td].word4 = 0;	/* Reset it for next time. */
td               1800 sound/sparc/dbri.c 		info->offset += DBRI_RD_CNT(dbri->dma->desc[td].word1);
td               1802 sound/sparc/dbri.c 		td = dbri->next_desc[td];
td               1803 sound/sparc/dbri.c 		dbri->pipes[pipe].desc = td;
td               1881 sound/sparc/dbri.c 			int td = dbri->pipes[pipe].desc;
td               1883 sound/sparc/dbri.c 			dbri->dma->desc[td].word4 = 0;
td               1888 sound/sparc/dbri.c 			*(cmd++) = dbri->dma_dvma + dbri_dma_off(desc, td);
td                 94 tools/perf/bench/futex-wake-parallel.c static void wakeup_threads(struct thread_data *td, pthread_attr_t thread_attr)
td                109 tools/perf/bench/futex-wake-parallel.c 		if (pthread_create(&td[i].worker, &thread_attr,
td                110 tools/perf/bench/futex-wake-parallel.c 				   waking_workerfn, (void *)&td[i]))
td                117 tools/perf/bench/futex-wake-parallel.c 		if (pthread_join(td[i].worker, NULL))
td                493 tools/perf/bench/numa.c 	struct thread_data *td;
td                580 tools/perf/bench/numa.c 				td = g->threads + t;
td                590 tools/perf/bench/numa.c 				CPU_ZERO(&td->bind_cpumask);
td                593 tools/perf/bench/numa.c 					CPU_SET(cpu, &td->bind_cpumask);
td                630 tools/perf/bench/numa.c 	struct thread_data *td;
td                702 tools/perf/bench/numa.c 				td = g->threads + t;
td                709 tools/perf/bench/numa.c 				td->bind_node = bind_node;
td                882 tools/perf/bench/numa.c 		struct thread_data *td;
td                887 tools/perf/bench/numa.c 		td = g->threads + task_nr;
td                889 tools/perf/bench/numa.c 		node = numa_node_of_cpu(td->curr_cpu);
td                918 tools/perf/bench/numa.c 			struct thread_data *td;
td                923 tools/perf/bench/numa.c 			td = g->threads + task_nr;
td                925 tools/perf/bench/numa.c 			n = numa_node_of_cpu(td->curr_cpu);
td                990 tools/perf/bench/numa.c 		struct thread_data *td = g->threads + t;
td                993 tools/perf/bench/numa.c 		cpu = td->curr_cpu;
td               1003 tools/perf/bench/numa.c 		loops_done = td->loops_done;
td               1092 tools/perf/bench/numa.c 	struct thread_data *td = __tdata;
td               1094 tools/perf/bench/numa.c 	int process_nr = td->process_nr;
td               1095 tools/perf/bench/numa.c 	int thread_nr = td->thread_nr;
td               1097 tools/perf/bench/numa.c 	int task_nr = td->task_nr;
td               1101 tools/perf/bench/numa.c 	u64 val = td->val;
td               1111 tools/perf/bench/numa.c 	bind_to_cpumask(td->bind_cpumask);
td               1112 tools/perf/bench/numa.c 	bind_to_memnode(td->bind_node);
td               1117 tools/perf/bench/numa.c 	process_data = td->process_data;
td               1167 tools/perf/bench/numa.c 			pthread_mutex_lock(td->process_lock);
td               1169 tools/perf/bench/numa.c 			pthread_mutex_unlock(td->process_lock);
td               1175 tools/perf/bench/numa.c 			pthread_mutex_lock(td->process_lock);
td               1177 tools/perf/bench/numa.c 			pthread_mutex_unlock(td->process_lock);
td               1189 tools/perf/bench/numa.c 		td->loops_done = l;
td               1260 tools/perf/bench/numa.c 	td->runtime_ns = diff.tv_sec * NSEC_PER_SEC;
td               1261 tools/perf/bench/numa.c 	td->runtime_ns += diff.tv_usec * NSEC_PER_USEC;
td               1262 tools/perf/bench/numa.c 	secs = td->runtime_ns / NSEC_PER_SEC;
td               1263 tools/perf/bench/numa.c 	td->speed_gbs = secs ? bytes_done / secs / 1e9 : 0;
td               1266 tools/perf/bench/numa.c 	td->system_time_ns = rusage.ru_stime.tv_sec * NSEC_PER_SEC;
td               1267 tools/perf/bench/numa.c 	td->system_time_ns += rusage.ru_stime.tv_usec * NSEC_PER_USEC;
td               1268 tools/perf/bench/numa.c 	td->user_time_ns = rusage.ru_utime.tv_sec * NSEC_PER_SEC;
td               1269 tools/perf/bench/numa.c 	td->user_time_ns += rusage.ru_utime.tv_usec * NSEC_PER_USEC;
td               1286 tools/perf/bench/numa.c 	struct thread_data *td;
td               1301 tools/perf/bench/numa.c 	td = g->threads + task_nr;
td               1303 tools/perf/bench/numa.c 	bind_to_memnode(td->bind_node);
td               1304 tools/perf/bench/numa.c 	bind_to_cpumask(td->bind_cpumask);
td               1316 tools/perf/bench/numa.c 		td = g->threads + task_nr;
td               1318 tools/perf/bench/numa.c 		td->process_data = process_data;
td               1319 tools/perf/bench/numa.c 		td->process_nr   = process_nr;
td               1320 tools/perf/bench/numa.c 		td->thread_nr    = t;
td               1321 tools/perf/bench/numa.c 		td->task_nr	 = task_nr;
td               1322 tools/perf/bench/numa.c 		td->val          = rand();
td               1323 tools/perf/bench/numa.c 		td->curr_cpu	 = -1;
td               1324 tools/perf/bench/numa.c 		td->process_lock = &process_lock;
td               1326 tools/perf/bench/numa.c 		ret = pthread_create(pthreads + t, NULL, worker_thread, td);
td               1367 tools/perf/bench/numa.c 		struct thread_data *td = g->threads + t;
td               1371 tools/perf/bench/numa.c 		td->bind_node = NUMA_NO_NODE;
td               1374 tools/perf/bench/numa.c 		CPU_ZERO(&td->bind_cpumask);
td               1376 tools/perf/bench/numa.c 			CPU_SET(cpu, &td->bind_cpumask);
td               1634 tools/perf/bench/numa.c 		struct thread_data *td;
td               1638 tools/perf/bench/numa.c 				td = g->threads + p*g->p.nr_threads + t;
td               1640 tools/perf/bench/numa.c 				print_res(tname, td->speed_gbs,
td               1642 tools/perf/bench/numa.c 				print_res(tname, td->system_time_ns / NSEC_PER_SEC,
td               1644 tools/perf/bench/numa.c 				print_res(tname, td->user_time_ns / NSEC_PER_SEC,
td                 56 tools/perf/bench/sched-pipe.c 	struct thread_data *td = __tdata;
td                 61 tools/perf/bench/sched-pipe.c 		if (!td->nr) {
td                 62 tools/perf/bench/sched-pipe.c 			ret = read(td->pipe_read, &m, sizeof(int));
td                 64 tools/perf/bench/sched-pipe.c 			ret = write(td->pipe_write, &m, sizeof(int));
td                 67 tools/perf/bench/sched-pipe.c 			ret = write(td->pipe_write, &m, sizeof(int));
td                 69 tools/perf/bench/sched-pipe.c 			ret = read(td->pipe_read, &m, sizeof(int));
td                 79 tools/perf/bench/sched-pipe.c 	struct thread_data threads[2], *td;
td                102 tools/perf/bench/sched-pipe.c 		td = threads + t;
td                104 tools/perf/bench/sched-pipe.c 		td->nr = t;
td                107 tools/perf/bench/sched-pipe.c 			td->pipe_read = pipe_1[0];
td                108 tools/perf/bench/sched-pipe.c 			td->pipe_write = pipe_2[1];
td                110 tools/perf/bench/sched-pipe.c 			td->pipe_write = pipe_1[1];
td                111 tools/perf/bench/sched-pipe.c 			td->pipe_read = pipe_2[0];
td                119 tools/perf/bench/sched-pipe.c 			td = threads + t;
td                121 tools/perf/bench/sched-pipe.c 			ret = pthread_create(&td->pthread, NULL, worker_thread, td);
td                126 tools/perf/bench/sched-pipe.c 			td = threads + t;
td                128 tools/perf/bench/sched-pipe.c 			ret = pthread_join(td->pthread, NULL);
td                 34 tools/perf/tests/mmap-thread-lookup.c static int thread_init(struct thread_data *td)
td                 47 tools/perf/tests/mmap-thread-lookup.c 	td->map = map;
td                 48 tools/perf/tests/mmap-thread-lookup.c 	td->tid = syscall(SYS_gettid);
td                 50 tools/perf/tests/mmap-thread-lookup.c 	pr_debug("tid = %d, map = %p\n", td->tid, map);
td                 56 tools/perf/tests/mmap-thread-lookup.c 	struct thread_data *td = arg;
td                 60 tools/perf/tests/mmap-thread-lookup.c 	if (thread_init(td))
td                 64 tools/perf/tests/mmap-thread-lookup.c 	ret = write(td->ready[1], &go, sizeof(int));
td                 75 tools/perf/tests/mmap-thread-lookup.c 	munmap(td->map, page_size);
td                 81 tools/perf/tests/mmap-thread-lookup.c 	struct thread_data *td = &threads[i];
td                 84 tools/perf/tests/mmap-thread-lookup.c 	if (pipe(td->ready))
td                 87 tools/perf/tests/mmap-thread-lookup.c 	err = pthread_create(&td->pt, NULL, thread_fn, td);
td                 90 tools/perf/tests/mmap-thread-lookup.c 		ssize_t ret = read(td->ready[0], &go, sizeof(int));
td                 94 tools/perf/tests/mmap-thread-lookup.c 	close(td->ready[0]);
td                 95 tools/perf/tests/mmap-thread-lookup.c 	close(td->ready[1]);
td                186 tools/perf/tests/mmap-thread-lookup.c 		struct thread_data *td = &threads[i];
td                190 tools/perf/tests/mmap-thread-lookup.c 		thread = machine__findnew_thread(machine, getpid(), td->tid);
td                192 tools/perf/tests/mmap-thread-lookup.c 		pr_debug("looking for map %p\n", td->map);
td                195 tools/perf/tests/mmap-thread-lookup.c 				 (unsigned long) (td->map + 1), &al);