/openbmc/linux/drivers/clk/tegra/ |
H A D | clk-dfll.c | 331 static inline u32 dfll_readl(struct tegra_dfll *td, u32 offs) in dfll_readl() argument 333 return __raw_readl(td->base + offs); in dfll_readl() 336 static inline void dfll_writel(struct tegra_dfll *td, u32 val, u32 offs) in dfll_writel() argument 339 __raw_writel(val, td->base + offs); in dfll_writel() 342 static inline void dfll_wmb(struct tegra_dfll *td) in dfll_wmb() argument 344 dfll_readl(td, DFLL_CTRL); in dfll_wmb() 349 static inline u32 dfll_i2c_readl(struct tegra_dfll *td, u32 offs) in dfll_i2c_readl() argument 351 return __raw_readl(td->i2c_base + offs); in dfll_i2c_readl() 354 static inline void dfll_i2c_writel(struct tegra_dfll *td, u32 val, u32 offs) in dfll_i2c_writel() argument 356 __raw_writel(val, td->i2c_base + offs); in dfll_i2c_writel() [all …]
|
/openbmc/qemu/tests/qtest/ |
H A D | npcm7xx_timer-test.c | 119 static int tim_timer_irq(const TestData *td) in tim_timer_irq() argument 121 return td->tim->irq_base + timer_index(td->timer); in tim_timer_irq() 126 static void tim_write(const TestData *td, in tim_write() argument 129 writel(td->tim->base_addr + offset, value); in tim_write() 132 static uint32_t tim_read(const TestData *td, unsigned int offset) in tim_read() argument 134 return readl(td->tim->base_addr + offset); in tim_read() 137 static void tim_write_tcsr(const TestData *td, uint32_t value) in tim_write_tcsr() argument 139 tim_write(td, td->timer->tcsr_offset, value); in tim_write_tcsr() 142 static uint32_t tim_read_tcsr(const TestData *td) in tim_read_tcsr() argument 144 return tim_read(td, td->timer->tcsr_offset); in tim_read_tcsr() [all …]
|
H A D | npcm7xx_pwm-test.c | 363 static uint32_t pwm_read(QTestState *qts, const TestData *td, unsigned offset) in pwm_read() argument 365 return qtest_readl(qts, td->module->base_addr + offset); in pwm_read() 368 static void pwm_write(QTestState *qts, const TestData *td, unsigned offset, in pwm_write() argument 371 qtest_writel(qts, td->module->base_addr + offset, value); in pwm_write() 396 static uint32_t pwm_read_ppr(QTestState *qts, const TestData *td) in pwm_read_ppr() argument 398 return extract32(pwm_read(qts, td, PPR), ppr_base[pwm_index(td->pwm)], 8); in pwm_read_ppr() 401 static void pwm_write_ppr(QTestState *qts, const TestData *td, uint32_t value) in pwm_write_ppr() argument 403 pwm_write(qts, td, PPR, value << ppr_base[pwm_index(td->pwm)]); in pwm_write_ppr() 406 static uint32_t pwm_read_csr(QTestState *qts, const TestData *td) in pwm_read_csr() argument 408 return extract32(pwm_read(qts, td, CSR), csr_base[pwm_index(td->pwm)], 3); in pwm_read_csr() [all …]
|
H A D | tco-test.c | 119 static void reset_on_second_timeout(const TestData *td, bool enable) in reset_on_second_timeout() argument 123 val = qtest_readl(td->qts, RCBA_BASE_ADDR + ICH9_CC_GCS); in reset_on_second_timeout() 129 qtest_writel(td->qts, RCBA_BASE_ADDR + ICH9_CC_GCS, val); in reset_on_second_timeout() 239 static QDict *get_watchdog_action(const TestData *td) in get_watchdog_action() argument 241 QDict *ev = qtest_qmp_eventwait_ref(td->qts, "WATCHDOG"); in get_watchdog_action() 252 TestData td; in test_tco_second_timeout_pause() local 256 td.args = "-watchdog-action pause"; in test_tco_second_timeout_pause() 257 td.noreboot = false; in test_tco_second_timeout_pause() 258 test_init(&td); in test_tco_second_timeout_pause() 260 stop_tco(&td); in test_tco_second_timeout_pause() [all …]
|
/openbmc/linux/tools/testing/selftests/arm64/signal/ |
H A D | test_signals_utils.c | 66 static void default_result(struct tdescr *td, bool force_exit) in default_result() argument 68 if (td->result == KSFT_SKIP) { in default_result() 70 } else if (td->pass) { in default_result() 72 td->result = KSFT_PASS; in default_result() 75 td->result = KSFT_FAIL; in default_result() 79 exit(td->result); in default_result() 90 static bool handle_signal_unsupported(struct tdescr *td, in handle_signal_unsupported() argument 93 if (feats_ok(td)) in handle_signal_unsupported() 99 if (!td->initialized) { in handle_signal_unsupported() 105 td->pass = 1; in handle_signal_unsupported() [all …]
|
H A D | test_signals_utils.h | 15 int test_init(struct tdescr *td); 16 int test_setup(struct tdescr *td); 17 void test_cleanup(struct tdescr *td); 18 int test_run(struct tdescr *td); 19 void test_result(struct tdescr *td); 21 static inline bool feats_ok(struct tdescr *td) in feats_ok() argument 23 if (td->feats_incompatible & td->feats_supported) in feats_ok() 25 return (td->feats_required & td->feats_supported) == td->feats_required; in feats_ok() 60 static __always_inline bool get_current_context(struct tdescr *td, in get_current_context() argument 68 assert(td && dest_uc); in get_current_context() [all …]
|
/openbmc/linux/drivers/usb/host/ |
H A D | fhci-q.c | 53 void fhci_add_td_to_frame(struct fhci_time_frame *frame, struct td *td) in fhci_add_td_to_frame() argument 55 list_add_tail(&td->frame_lh, &frame->tds_list); in fhci_add_td_to_frame() 58 void fhci_add_tds_to_ed(struct ed *ed, struct td **td_list, int number) in fhci_add_tds_to_ed() 63 struct td *td = td_list[i]; in fhci_add_tds_to_ed() local 64 list_add_tail(&td->node, &ed->td_list); in fhci_add_tds_to_ed() 70 static struct td *peek_td_from_ed(struct ed *ed) in peek_td_from_ed() 72 struct td *td; in peek_td_from_ed() local 75 td = list_entry(ed->td_list.next, struct td, node); in peek_td_from_ed() 77 td = NULL; in peek_td_from_ed() 79 return td; in peek_td_from_ed() [all …]
|
H A D | fhci-mem.c | 23 static void init_td(struct td *td) in init_td() argument 25 memset(td, 0, sizeof(*td)); in init_td() 26 INIT_LIST_HEAD(&td->node); in init_td() 27 INIT_LIST_HEAD(&td->frame_lh); in init_td() 37 static struct td *get_empty_td(struct fhci_hcd *fhci) in get_empty_td() 39 struct td *td; in get_empty_td() local 42 td = list_entry(fhci->empty_tds.next, struct td, node); in get_empty_td() 45 td = kmalloc(sizeof(*td), GFP_ATOMIC); in get_empty_td() 46 if (!td) in get_empty_td() 49 init_td(td); in get_empty_td() [all …]
|
H A D | ohci-mem.c | 48 sizeof (struct td), in ohci_mem_init() 76 static inline struct td * 79 struct td *td; in dma_to_td() local 82 td = hc->td_hash [TD_HASH_FUNC(td_dma)]; in dma_to_td() 83 while (td && td->td_dma != td_dma) in dma_to_td() 84 td = td->td_hash; in dma_to_td() 85 return td; in dma_to_td() 89 static struct td * 93 struct td *td; in td_alloc() local 97 td = gen_pool_dma_zalloc_align(hcd->localmem_pool, in td_alloc() [all …]
|
H A D | fhci-tds.c | 73 struct usb_td __iomem *td, in next_bd() argument 79 return ++td; in next_bd() 152 struct usb_td __iomem *td; in fhci_create_ep() local 168 ep_mem_size = ring_len * sizeof(*td) + sizeof(struct fhci_ep_pram); in fhci_create_ep() 203 ep->ep_pram_ptr = (void __iomem *)ep->td_base + sizeof(*td) * ring_len; in fhci_create_ep() 211 td = ep->td_base; in fhci_create_ep() 213 out_be32(&td->buf_ptr, 0); in fhci_create_ep() 214 out_be16(&td->status, 0); in fhci_create_ep() 215 out_be16(&td->length, 0); in fhci_create_ep() 216 out_be16(&td->extra, 0); in fhci_create_ep() [all …]
|
H A D | fhci-sched.c | 42 struct td *td; in fhci_transaction_confirm() local 48 td = fhci_remove_td_from_frame(usb->actual_frame); in fhci_transaction_confirm() 49 td_pkt = td->pkt; in fhci_transaction_confirm() 51 td->status = pkt->status; in fhci_transaction_confirm() 52 if (td->type == FHCI_TA_IN && td_pkt->info & PKT_DUMMY_PACKET) { in fhci_transaction_confirm() 53 if ((td->data + td->actual_len) && trans_len) in fhci_transaction_confirm() 54 memcpy(td->data + td->actual_len, pkt->data, in fhci_transaction_confirm() 61 ed = td->ed; in fhci_transaction_confirm() 64 struct td *td_next = in fhci_transaction_confirm() 65 list_entry(ed->td_list.next->next, struct td, in fhci_transaction_confirm() [all …]
|
H A D | ohci-q.c | 20 struct td *td; in urb_free_priv() local 23 td = urb_priv->td [i]; in urb_free_priv() 24 if (td) in urb_free_priv() 25 td_free (hc, td); in urb_free_priv() 414 struct td *td; in ed_get() local 425 td = td_alloc (ohci, GFP_ATOMIC); in ed_get() 426 if (!td) { in ed_get() 432 ed->dummy = td; in ed_get() 433 ed->hwTailP = cpu_to_hc32 (ohci, td->td_dma); in ed_get() 520 struct td *td, *td_pt; in td_fill() local [all …]
|
H A D | uhci-q.c | 109 struct uhci_td *td; in uhci_alloc_td() local 111 td = dma_pool_alloc(uhci->td_pool, GFP_ATOMIC, &dma_handle); in uhci_alloc_td() 112 if (!td) in uhci_alloc_td() 115 td->dma_handle = dma_handle; in uhci_alloc_td() 116 td->frame = -1; in uhci_alloc_td() 118 INIT_LIST_HEAD(&td->list); in uhci_alloc_td() 119 INIT_LIST_HEAD(&td->fl_list); in uhci_alloc_td() 121 return td; in uhci_alloc_td() 124 static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td) in uhci_free_td() argument 126 if (!list_empty(&td->list)) in uhci_free_td() [all …]
|
H A D | r8a66597-hcd.c | 628 static void pipe_setting(struct r8a66597 *r8a66597, struct r8a66597_td *td) in pipe_setting() argument 631 struct urb *urb = td->urb; in pipe_setting() 633 if (td->pipenum > 0) { in pipe_setting() 634 info = &td->pipe->info; in pipe_setting() 641 r8a66597_pipe_toggle(r8a66597, td->pipe, 0); in pipe_setting() 642 pipe_toggle_set(r8a66597, td->pipe, urb, 0); in pipe_setting() 643 clear_all_buffer(r8a66597, td->pipe); in pipe_setting() 647 pipe_toggle_restore(r8a66597, td->pipe, urb); in pipe_setting() 835 struct r8a66597_td *td, *next; in force_dequeue() local 842 list_for_each_entry_safe(td, next, list, queue) { in force_dequeue() [all …]
|
/openbmc/linux/arch/um/drivers/ |
H A D | vector_transports.c | 69 struct uml_l2tpv3_data *td = vp->transport_data; in l2tpv3_form_header() local 72 if (td->udp) in l2tpv3_form_header() 74 (*(uint32_t *) (header + td->session_offset)) = td->tx_session; in l2tpv3_form_header() 76 if (td->cookie) { in l2tpv3_form_header() 77 if (td->cookie_is_64) in l2tpv3_form_header() 78 (*(uint64_t *)(header + td->cookie_offset)) = in l2tpv3_form_header() 79 td->tx_cookie; in l2tpv3_form_header() 81 (*(uint32_t *)(header + td->cookie_offset)) = in l2tpv3_form_header() 82 td->tx_cookie; in l2tpv3_form_header() 84 if (td->has_counter) { in l2tpv3_form_header() [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/ |
H A D | testmode.c | 33 struct mt76_testmode_data *td = &phy->test; in mt76_testmode_tx_pending() local 36 struct sk_buff *skb = td->tx_skb; in mt76_testmode_tx_pending() 41 if (!skb || !td->tx_pending) in mt76_testmode_tx_pending() 47 tx_queued_limit = td->tx_queued_limit ? td->tx_queued_limit : 1000; in mt76_testmode_tx_pending() 51 while (td->tx_pending > 0 && in mt76_testmode_tx_pending() 52 td->tx_queued - td->tx_done < tx_queued_limit && in mt76_testmode_tx_pending() 61 td->tx_pending--; in mt76_testmode_tx_pending() 62 td->tx_queued++; in mt76_testmode_tx_pending() 95 struct mt76_testmode_data *td = &phy->test; in mt76_testmode_free_skb() local 97 dev_kfree_skb(td->tx_skb); in mt76_testmode_free_skb() [all …]
|
/openbmc/linux/tools/perf/tests/ |
H A D | dlfilter-test.c | 69 struct test_data *td = container_of(tool, struct test_data, tool); in process() local 70 int fd = td->fd; in process() 112 static int write_attr(struct test_data *td, u64 sample_type, u64 *id) in write_attr() argument 122 return perf_event__synthesize_attr(&td->tool, &attr, 1, id, process); in write_attr() 173 static int write_sample(struct test_data *td, u64 sample_type, u64 id, pid_t pid, pid_t tid) in write_sample() argument 178 .ip = td->ip, in write_sample() 179 .addr = td->addr, in write_sample() 197 err = process(&td->tool, event, &sample, td->machine); in write_sample() 245 static int check_filter_desc(struct test_data *td) in check_filter_desc() argument 251 if (get_filter_desc(td->dlfilters, td->name, &desc, &long_desc) && in check_filter_desc() [all …]
|
/openbmc/linux/drivers/usb/c67x00/ |
H A D | c67x00-sched.c | 82 #define td_udev(td) ((td)->ep_data->dev) argument 115 #define td_residue(td) ((__s8)(td->residue)) argument 116 #define td_ly_base_addr(td) (__le16_to_cpu((td)->ly_base_addr)) argument 117 #define td_port_length(td) (__le16_to_cpu((td)->port_length)) argument 118 #define td_next_td_addr(td) (__le16_to_cpu((td)->next_td_addr)) argument 120 #define td_active(td) ((td)->retry_cnt & TD_RETRYCNTMASK_ACT_FLG) argument 121 #define td_length(td) (td_port_length(td) & TD_PORTLENMASK_DL) argument 123 #define td_sequence_ok(td) (!td->status || \ argument 124 (!(td->status & TD_STATUSMASK_SEQ) == \ 125 !(td->ctrl_reg & SEQ_SEL))) [all …]
|
/openbmc/qemu/tests/unit/ |
H A D | test-nested-aio-poll.c | 48 TestData *td = container_of(notifier, TestData, poll_notifier); in io_poll_ready() local 50 g_assert(!td->nested); in io_poll_ready() 51 td->nested = true; in io_poll_ready() 54 event_notifier_set(&td->dummy_notifier); in io_poll_ready() 57 g_assert(aio_poll(td->ctx, true)); in io_poll_ready() 59 td->nested = false; in io_poll_ready() 70 TestData td = { in test() local 74 qemu_set_current_aio_context(td.ctx); in test() 77 aio_context_set_poll_params(td.ctx, 1000000, 2, 2, &error_abort); in test() 83 aio_get_g_source(td.ctx); in test() [all …]
|
/openbmc/linux/drivers/mtd/nand/raw/ |
H A D | nand_bbt.c | 90 static int check_pattern_no_oob(uint8_t *buf, struct nand_bbt_descr *td) in check_pattern_no_oob() argument 92 if (memcmp(buf, td->pattern, td->len)) in check_pattern_no_oob() 107 static int check_pattern(uint8_t *buf, int len, int paglen, struct nand_bbt_descr *td) in check_pattern() argument 109 if (td->options & NAND_BBT_NO_OOB) in check_pattern() 110 return check_pattern_no_oob(buf, td); in check_pattern() 113 if (memcmp(buf + paglen + td->offs, td->pattern, td->len)) in check_pattern() 128 static int check_short_pattern(uint8_t *buf, struct nand_bbt_descr *td) in check_short_pattern() argument 131 if (memcmp(buf + td->offs, td->pattern, td->len)) in check_short_pattern() 142 static u32 add_marker_len(struct nand_bbt_descr *td) in add_marker_len() argument 146 if (!(td->options & NAND_BBT_NO_OOB)) in add_marker_len() [all …]
|
/openbmc/u-boot/drivers/mtd/nand/raw/ |
H A D | nand_bbt.c | 93 static int check_pattern_no_oob(uint8_t *buf, struct nand_bbt_descr *td) in check_pattern_no_oob() argument 95 if (memcmp(buf, td->pattern, td->len)) in check_pattern_no_oob() 110 static int check_pattern(uint8_t *buf, int len, int paglen, struct nand_bbt_descr *td) in check_pattern() argument 112 if (td->options & NAND_BBT_NO_OOB) in check_pattern() 113 return check_pattern_no_oob(buf, td); in check_pattern() 116 if (memcmp(buf + paglen + td->offs, td->pattern, td->len)) in check_pattern() 131 static int check_short_pattern(uint8_t *buf, struct nand_bbt_descr *td) in check_short_pattern() argument 134 if (memcmp(buf + td->offs, td->pattern, td->len)) in check_short_pattern() 145 static u32 add_marker_len(struct nand_bbt_descr *td) in add_marker_len() argument 149 if (!(td->options & NAND_BBT_NO_OOB)) in add_marker_len() [all …]
|
/openbmc/linux/drivers/media/platform/st/sti/hva/ |
H A D | hva-h264.c | 396 struct hva_h264_td td; member 598 struct hva_h264_td *td = &task->td; in hva_h264_prepare_task() local 626 memset(td, 0, sizeof(struct hva_h264_td)); in hva_h264_prepare_task() 628 td->frame_width = frame_width; in hva_h264_prepare_task() 629 td->frame_height = frame_height; in hva_h264_prepare_task() 632 td->window_width = frame_width; in hva_h264_prepare_task() 633 td->window_height = frame_height; in hva_h264_prepare_task() 634 td->window_horizontal_offset = 0; in hva_h264_prepare_task() 635 td->window_vertical_offset = 0; in hva_h264_prepare_task() 637 td->first_picture_in_sequence = (!frame_num) ? 1 : 0; in hva_h264_prepare_task() [all …]
|
/openbmc/linux/block/ |
H A D | blk-throttle.c | 124 return tg->td; in sq_to_td() 137 static uint64_t throtl_adjusted_limit(uint64_t low, struct throtl_data *td) in throtl_adjusted_limit() argument 140 if (td->scale < 4096 && time_after_eq(jiffies, in throtl_adjusted_limit() 141 td->low_upgrade_time + td->scale * td->throtl_slice)) in throtl_adjusted_limit() 142 td->scale = (jiffies - td->low_upgrade_time) / td->throtl_slice; in throtl_adjusted_limit() 144 return low + (low >> 1) * td->scale; in throtl_adjusted_limit() 150 struct throtl_data *td; in tg_bps_limit() local 156 td = tg->td; in tg_bps_limit() 157 ret = tg->bps[rw][td->limit_index]; in tg_bps_limit() 158 if (ret == 0 && td->limit_index == LIMIT_LOW) { in tg_bps_limit() [all …]
|
/openbmc/linux/kernel/ |
H A D | smpboot.c | 108 struct smpboot_thread_data *td = data; in smpboot_thread_fn() local 109 struct smp_hotplug_thread *ht = td->ht; in smpboot_thread_fn() 118 if (ht->cleanup && td->status != HP_THREAD_NONE) in smpboot_thread_fn() 119 ht->cleanup(td->cpu, cpu_online(td->cpu)); in smpboot_thread_fn() 120 kfree(td); in smpboot_thread_fn() 127 if (ht->park && td->status == HP_THREAD_ACTIVE) { in smpboot_thread_fn() 128 BUG_ON(td->cpu != smp_processor_id()); in smpboot_thread_fn() 129 ht->park(td->cpu); in smpboot_thread_fn() 130 td->status = HP_THREAD_PARKED; in smpboot_thread_fn() 137 BUG_ON(td->cpu != smp_processor_id()); in smpboot_thread_fn() [all …]
|
/openbmc/qemu/hw/s390x/ |
H A D | tod-kvm.c | 33 static void kvm_s390_tod_get(const S390TODState *td, S390TOD *tod, Error **errp) in kvm_s390_tod_get() argument 35 if (td->stopped) { in kvm_s390_tod_get() 36 *tod = td->base; in kvm_s390_tod_get() 57 static void kvm_s390_tod_set(S390TODState *td, const S390TOD *tod, Error **errp) in kvm_s390_tod_set() argument 75 td->stopped = false; in kvm_s390_tod_set() 77 td->stopped = true; in kvm_s390_tod_set() 78 td->base = *tod; in kvm_s390_tod_set() 85 S390TODState *td = opaque; in kvm_s390_tod_vm_state_change() local 96 if (running && td->stopped) { in kvm_s390_tod_vm_state_change() 98 kvm_s390_set_tod_raw(&td->base, &local_err); in kvm_s390_tod_vm_state_change() [all …]
|