Lines Matching full:dsb

38 			drvdata->dsb->edge_ctrl[tpdm_attr->idx]);  in tpdm_simple_dataset_show()
43 drvdata->dsb->edge_ctrl_mask[tpdm_attr->idx]); in tpdm_simple_dataset_show()
48 drvdata->dsb->trig_patt[tpdm_attr->idx]); in tpdm_simple_dataset_show()
53 drvdata->dsb->trig_patt_mask[tpdm_attr->idx]); in tpdm_simple_dataset_show()
58 drvdata->dsb->patt_val[tpdm_attr->idx]); in tpdm_simple_dataset_show()
63 drvdata->dsb->patt_mask[tpdm_attr->idx]); in tpdm_simple_dataset_show()
68 drvdata->dsb->msr[tpdm_attr->idx]); in tpdm_simple_dataset_show()
118 drvdata->dsb->trig_patt[tpdm_attr->idx] = val; in tpdm_simple_dataset_store()
124 drvdata->dsb->trig_patt_mask[tpdm_attr->idx] = val; in tpdm_simple_dataset_store()
130 drvdata->dsb->patt_val[tpdm_attr->idx] = val; in tpdm_simple_dataset_store()
136 drvdata->dsb->patt_mask[tpdm_attr->idx] = val; in tpdm_simple_dataset_store()
142 drvdata->dsb->msr[tpdm_attr->idx] = val; in tpdm_simple_dataset_store()
243 memset(drvdata->dsb, 0, sizeof(struct dsb_dataset)); in tpdm_reset_datasets()
245 drvdata->dsb->trig_ts = true; in tpdm_reset_datasets()
246 drvdata->dsb->trig_type = false; in tpdm_reset_datasets()
258 mode = TPDM_DSB_MODE_TEST(drvdata->dsb->mode); in set_dsb_mode()
263 mode = TPDM_DSB_MODE_HPBYTESEL(drvdata->dsb->mode); in set_dsb_mode()
268 if (drvdata->dsb->mode & TPDM_DSB_MODE_PERF) in set_dsb_mode()
285 if (drvdata->dsb->patt_ts) { in set_dsb_tier()
287 if (drvdata->dsb->patt_type) in set_dsb_tier()
296 if (drvdata->dsb->trig_ts) in set_dsb_tier()
309 writel_relaxed(drvdata->dsb->msr[i], in set_dsb_msr()
321 writel_relaxed(drvdata->dsb->edge_ctrl[i], in tpdm_enable_dsb()
324 writel_relaxed(drvdata->dsb->edge_ctrl_mask[i], in tpdm_enable_dsb()
327 writel_relaxed(drvdata->dsb->patt_val[i], in tpdm_enable_dsb()
329 writel_relaxed(drvdata->dsb->patt_mask[i], in tpdm_enable_dsb()
331 writel_relaxed(drvdata->dsb->trig_patt[i], in tpdm_enable_dsb()
333 writel_relaxed(drvdata->dsb->trig_patt_mask[i], in tpdm_enable_dsb()
341 /* Set the mode of DSB dataset */ in tpdm_enable_dsb()
344 if (drvdata->dsb->trig_type) in tpdm_enable_dsb()
348 /* Set the enable bit of DSB control register to 1 */ in tpdm_enable_dsb()
428 * Bit(DSB). This function will initialize the configuration according
473 /* Set the enable bit of DSB control register to 0 */ in tpdm_disable_dsb()
539 if (tpdm_has_dsb_dataset(drvdata) && (!drvdata->dsb)) { in tpdm_datasets_setup()
540 drvdata->dsb = devm_kzalloc(drvdata->dev, in tpdm_datasets_setup()
541 sizeof(*drvdata->dsb), GFP_KERNEL); in tpdm_datasets_setup()
542 if (!drvdata->dsb) in tpdm_datasets_setup()
632 return sysfs_emit(buf, "%x\n", drvdata->dsb->mode); in dsb_mode_show()
648 drvdata->dsb->mode = val & TPDM_DSB_MODE_MASK; in dsb_mode_store()
661 (unsigned int)drvdata->dsb->edge_ctrl_idx); in ctrl_idx_show()
683 drvdata->dsb->edge_ctrl_idx = val; in ctrl_idx_store()
712 * There are 2 bit per DSB Edge Control line. in ctrl_val_store()
715 reg = EDCR_TO_WORD_IDX(drvdata->dsb->edge_ctrl_idx); in ctrl_val_store()
716 val = drvdata->dsb->edge_ctrl[reg]; in ctrl_val_store()
717 val &= ~EDCR_TO_WORD_MASK(drvdata->dsb->edge_ctrl_idx); in ctrl_val_store()
718 val |= EDCR_TO_WORD_VAL(edge_ctrl, drvdata->dsb->edge_ctrl_idx); in ctrl_val_store()
719 drvdata->dsb->edge_ctrl[reg] = val; in ctrl_val_store()
741 * There is 1 bit per DSB Edge Control Mark line. in ctrl_mask_store()
744 reg = EDCMR_TO_WORD_IDX(drvdata->dsb->edge_ctrl_idx); in ctrl_mask_store()
745 set = drvdata->dsb->edge_ctrl_mask[reg]; in ctrl_mask_store()
747 set |= BIT(EDCMR_TO_WORD_SHIFT(drvdata->dsb->edge_ctrl_idx)); in ctrl_mask_store()
749 set &= ~BIT(EDCMR_TO_WORD_SHIFT(drvdata->dsb->edge_ctrl_idx)); in ctrl_mask_store()
750 drvdata->dsb->edge_ctrl_mask[reg] = set; in ctrl_mask_store()
768 (unsigned int)drvdata->dsb->patt_ts); in enable_ts_show()
777 * value 1: Enable/Disable DSB pattern timestamp
794 drvdata->dsb->patt_ts = !!val; in enable_ts_store()
810 (unsigned int)drvdata->dsb->patt_type); in set_type_show()
814 * value 1: Set DSB pattern type
827 drvdata->dsb->patt_type = val; in set_type_store()
839 (unsigned int)drvdata->dsb->trig_type); in dsb_trig_type_show()
860 drvdata->dsb->trig_type = true; in dsb_trig_type_store()
862 drvdata->dsb->trig_type = false; in dsb_trig_type_store()
875 (unsigned int)drvdata->dsb->trig_ts); in dsb_trig_ts_show()
896 drvdata->dsb->trig_ts = true; in dsb_trig_ts_store()
898 drvdata->dsb->trig_ts = false; in dsb_trig_ts_store()
1269 "qcom,dsb-msrs-num", &drvdata->dsb_msr_num); in tpdm_probe()