Lines Matching refs:drvdata

14 static int etm4_set_mode_exclude(struct etmv4_drvdata *drvdata, bool exclude)  in etm4_set_mode_exclude()  argument
17 struct etmv4_config *config = &drvdata->config; in etm4_set_mode_exclude()
62 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in nr_pe_cmp_show() local
64 val = drvdata->nr_pe_cmp; in nr_pe_cmp_show()
74 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in nr_addr_cmp_show() local
76 val = drvdata->nr_addr_cmp; in nr_addr_cmp_show()
86 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in nr_cntr_show() local
88 val = drvdata->nr_cntr; in nr_cntr_show()
98 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in nr_ext_inp_show() local
100 val = drvdata->nr_ext_inp; in nr_ext_inp_show()
110 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in numcidc_show() local
112 val = drvdata->numcidc; in numcidc_show()
122 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in numvmidc_show() local
124 val = drvdata->numvmidc; in numvmidc_show()
134 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in nrseqstate_show() local
136 val = drvdata->nrseqstate; in nrseqstate_show()
146 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in nr_resource_show() local
148 val = drvdata->nr_resource; in nr_resource_show()
158 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in nr_ss_cmp_show() local
160 val = drvdata->nr_ss_cmp; in nr_ss_cmp_show()
171 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in reset_store() local
172 struct etmv4_config *config = &drvdata->config; in reset_store()
177 spin_lock(&drvdata->spinlock); in reset_store()
201 if (drvdata->syncpr == false) in reset_store()
210 if (drvdata->nr_addr_cmp > 0) { in reset_store()
224 for (i = 0; i < drvdata->nrseqstate-1; i++) in reset_store()
233 for (i = 0; i < drvdata->nr_cntr; i++) { in reset_store()
240 for (i = 2; i < 2 * drvdata->nr_resource; i++) in reset_store()
244 for (i = 0; i < drvdata->nr_ss_cmp; i++) { in reset_store()
250 for (i = 0; i < drvdata->nr_addr_cmp * 2; i++) { in reset_store()
257 for (i = 0; i < drvdata->numcidc; i++) in reset_store()
264 for (i = 0; i < drvdata->numvmidc; i++) in reset_store()
269 drvdata->trcid = drvdata->cpu + 1; in reset_store()
271 spin_unlock(&drvdata->spinlock); in reset_store()
284 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in mode_show() local
285 struct etmv4_config *config = &drvdata->config; in mode_show()
296 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in mode_store() local
297 struct etmv4_config *config = &drvdata->config; in mode_store()
302 spin_lock(&drvdata->spinlock); in mode_store()
305 if (drvdata->instrp0 == true) { in mode_store()
323 if ((config->mode & ETM_MODE_BB) && (drvdata->trcbb == true)) in mode_store()
330 (drvdata->trccci == true)) in mode_store()
336 if ((config->mode & ETMv4_MODE_CTXID) && (drvdata->ctxid_size)) in mode_store()
341 if ((config->mode & ETM_MODE_VMID) && (drvdata->vmid_size)) in mode_store()
348 if (drvdata->trccond == true) { in mode_store()
354 if ((config->mode & ETMv4_MODE_TIMESTAMP) && (drvdata->ts_size)) in mode_store()
361 (drvdata->retstack == true)) in mode_store()
375 if (mode && drvdata->q_support) in mode_store()
381 if ((mode & BIT(1)) && (drvdata->q_support & BIT(1))) in mode_store()
386 (drvdata->atbtrig == true)) in mode_store()
393 (drvdata->lpoverride == true)) in mode_store()
399 if ((config->mode & ETM_MODE_ISTALL_EN) && (drvdata->stallctl == true)) in mode_store()
412 (drvdata->nooverflow == true)) in mode_store()
431 (drvdata->trc_error == true)) in mode_store()
439 spin_unlock(&drvdata->spinlock); in mode_store()
450 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in pe_show() local
451 struct etmv4_config *config = &drvdata->config; in pe_show()
462 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in pe_store() local
463 struct etmv4_config *config = &drvdata->config; in pe_store()
468 spin_lock(&drvdata->spinlock); in pe_store()
469 if (val > drvdata->nr_pe) { in pe_store()
470 spin_unlock(&drvdata->spinlock); in pe_store()
475 spin_unlock(&drvdata->spinlock); in pe_store()
485 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in event_show() local
486 struct etmv4_config *config = &drvdata->config; in event_show()
497 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in event_store() local
498 struct etmv4_config *config = &drvdata->config; in event_store()
503 spin_lock(&drvdata->spinlock); in event_store()
504 switch (drvdata->nr_event) { in event_store()
524 spin_unlock(&drvdata->spinlock); in event_store()
534 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in event_instren_show() local
535 struct etmv4_config *config = &drvdata->config; in event_instren_show()
546 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in event_instren_store() local
547 struct etmv4_config *config = &drvdata->config; in event_instren_store()
552 spin_lock(&drvdata->spinlock); in event_instren_store()
555 switch (drvdata->nr_event) { in event_instren_store()
580 spin_unlock(&drvdata->spinlock); in event_instren_store()
590 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in event_ts_show() local
591 struct etmv4_config *config = &drvdata->config; in event_ts_show()
602 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in event_ts_store() local
603 struct etmv4_config *config = &drvdata->config; in event_ts_store()
607 if (!drvdata->ts_size) in event_ts_store()
620 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in syncfreq_show() local
621 struct etmv4_config *config = &drvdata->config; in syncfreq_show()
632 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in syncfreq_store() local
633 struct etmv4_config *config = &drvdata->config; in syncfreq_store()
637 if (drvdata->syncpr == true) in syncfreq_store()
650 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in cyc_threshold_show() local
651 struct etmv4_config *config = &drvdata->config; in cyc_threshold_show()
662 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in cyc_threshold_store() local
663 struct etmv4_config *config = &drvdata->config; in cyc_threshold_store()
670 if (val < drvdata->ccitmin) in cyc_threshold_store()
683 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in bb_ctrl_show() local
684 struct etmv4_config *config = &drvdata->config; in bb_ctrl_show()
695 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in bb_ctrl_store() local
696 struct etmv4_config *config = &drvdata->config; in bb_ctrl_store()
700 if (drvdata->trcbb == false) in bb_ctrl_store()
702 if (!drvdata->nr_addr_cmp) in bb_ctrl_store()
723 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in event_vinst_show() local
724 struct etmv4_config *config = &drvdata->config; in event_vinst_show()
735 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in event_vinst_store() local
736 struct etmv4_config *config = &drvdata->config; in event_vinst_store()
741 spin_lock(&drvdata->spinlock); in event_vinst_store()
745 spin_unlock(&drvdata->spinlock); in event_vinst_store()
755 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in s_exlevel_vinst_show() local
756 struct etmv4_config *config = &drvdata->config; in s_exlevel_vinst_show()
767 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in s_exlevel_vinst_store() local
768 struct etmv4_config *config = &drvdata->config; in s_exlevel_vinst_store()
773 spin_lock(&drvdata->spinlock); in s_exlevel_vinst_store()
777 val &= drvdata->s_ex_level; in s_exlevel_vinst_store()
779 spin_unlock(&drvdata->spinlock); in s_exlevel_vinst_store()
789 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in ns_exlevel_vinst_show() local
790 struct etmv4_config *config = &drvdata->config; in ns_exlevel_vinst_show()
802 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in ns_exlevel_vinst_store() local
803 struct etmv4_config *config = &drvdata->config; in ns_exlevel_vinst_store()
808 spin_lock(&drvdata->spinlock); in ns_exlevel_vinst_store()
812 val &= drvdata->ns_ex_level; in ns_exlevel_vinst_store()
814 spin_unlock(&drvdata->spinlock); in ns_exlevel_vinst_store()
824 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_idx_show() local
825 struct etmv4_config *config = &drvdata->config; in addr_idx_show()
836 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_idx_store() local
837 struct etmv4_config *config = &drvdata->config; in addr_idx_store()
841 if (val >= drvdata->nr_addr_cmp * 2) in addr_idx_store()
848 spin_lock(&drvdata->spinlock); in addr_idx_store()
850 spin_unlock(&drvdata->spinlock); in addr_idx_store()
861 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_instdatatype_show() local
862 struct etmv4_config *config = &drvdata->config; in addr_instdatatype_show()
864 spin_lock(&drvdata->spinlock); in addr_instdatatype_show()
872 spin_unlock(&drvdata->spinlock); in addr_instdatatype_show()
882 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_instdatatype_store() local
883 struct etmv4_config *config = &drvdata->config; in addr_instdatatype_store()
890 spin_lock(&drvdata->spinlock); in addr_instdatatype_store()
896 spin_unlock(&drvdata->spinlock); in addr_instdatatype_store()
907 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_single_show() local
908 struct etmv4_config *config = &drvdata->config; in addr_single_show()
911 spin_lock(&drvdata->spinlock); in addr_single_show()
914 spin_unlock(&drvdata->spinlock); in addr_single_show()
918 spin_unlock(&drvdata->spinlock); in addr_single_show()
928 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_single_store() local
929 struct etmv4_config *config = &drvdata->config; in addr_single_store()
934 spin_lock(&drvdata->spinlock); in addr_single_store()
938 spin_unlock(&drvdata->spinlock); in addr_single_store()
944 spin_unlock(&drvdata->spinlock); in addr_single_store()
955 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_range_show() local
956 struct etmv4_config *config = &drvdata->config; in addr_range_show()
958 spin_lock(&drvdata->spinlock); in addr_range_show()
961 spin_unlock(&drvdata->spinlock); in addr_range_show()
968 spin_unlock(&drvdata->spinlock); in addr_range_show()
974 spin_unlock(&drvdata->spinlock); in addr_range_show()
984 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_range_store() local
985 struct etmv4_config *config = &drvdata->config; in addr_range_store()
997 spin_lock(&drvdata->spinlock); in addr_range_store()
1000 spin_unlock(&drvdata->spinlock); in addr_range_store()
1008 spin_unlock(&drvdata->spinlock); in addr_range_store()
1023 etm4_set_mode_exclude(drvdata, exclude ? true : false); in addr_range_store()
1025 spin_unlock(&drvdata->spinlock); in addr_range_store()
1036 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_start_show() local
1037 struct etmv4_config *config = &drvdata->config; in addr_start_show()
1039 spin_lock(&drvdata->spinlock); in addr_start_show()
1044 spin_unlock(&drvdata->spinlock); in addr_start_show()
1049 spin_unlock(&drvdata->spinlock); in addr_start_show()
1059 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_start_store() local
1060 struct etmv4_config *config = &drvdata->config; in addr_start_store()
1065 spin_lock(&drvdata->spinlock); in addr_start_store()
1067 if (!drvdata->nr_addr_cmp) { in addr_start_store()
1068 spin_unlock(&drvdata->spinlock); in addr_start_store()
1073 spin_unlock(&drvdata->spinlock); in addr_start_store()
1080 spin_unlock(&drvdata->spinlock); in addr_start_store()
1091 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_stop_show() local
1092 struct etmv4_config *config = &drvdata->config; in addr_stop_show()
1094 spin_lock(&drvdata->spinlock); in addr_stop_show()
1099 spin_unlock(&drvdata->spinlock); in addr_stop_show()
1104 spin_unlock(&drvdata->spinlock); in addr_stop_show()
1114 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_stop_store() local
1115 struct etmv4_config *config = &drvdata->config; in addr_stop_store()
1120 spin_lock(&drvdata->spinlock); in addr_stop_store()
1122 if (!drvdata->nr_addr_cmp) { in addr_stop_store()
1123 spin_unlock(&drvdata->spinlock); in addr_stop_store()
1128 spin_unlock(&drvdata->spinlock); in addr_stop_store()
1135 spin_unlock(&drvdata->spinlock); in addr_stop_store()
1146 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_ctxtype_show() local
1147 struct etmv4_config *config = &drvdata->config; in addr_ctxtype_show()
1149 spin_lock(&drvdata->spinlock); in addr_ctxtype_show()
1156 spin_unlock(&drvdata->spinlock); in addr_ctxtype_show()
1166 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_ctxtype_store() local
1167 struct etmv4_config *config = &drvdata->config; in addr_ctxtype_store()
1174 spin_lock(&drvdata->spinlock); in addr_ctxtype_store()
1181 if (drvdata->numcidc) { in addr_ctxtype_store()
1187 if (drvdata->numvmidc) { in addr_ctxtype_store()
1196 if (drvdata->numcidc) in addr_ctxtype_store()
1198 if (drvdata->numvmidc) in addr_ctxtype_store()
1201 spin_unlock(&drvdata->spinlock); in addr_ctxtype_store()
1212 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_context_show() local
1213 struct etmv4_config *config = &drvdata->config; in addr_context_show()
1215 spin_lock(&drvdata->spinlock); in addr_context_show()
1219 spin_unlock(&drvdata->spinlock); in addr_context_show()
1229 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_context_store() local
1230 struct etmv4_config *config = &drvdata->config; in addr_context_store()
1234 if ((drvdata->numcidc <= 1) && (drvdata->numvmidc <= 1)) in addr_context_store()
1236 if (val >= (drvdata->numcidc >= drvdata->numvmidc ? in addr_context_store()
1237 drvdata->numcidc : drvdata->numvmidc)) in addr_context_store()
1240 spin_lock(&drvdata->spinlock); in addr_context_store()
1245 spin_unlock(&drvdata->spinlock); in addr_context_store()
1256 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_exlevel_s_ns_show() local
1257 struct etmv4_config *config = &drvdata->config; in addr_exlevel_s_ns_show()
1259 spin_lock(&drvdata->spinlock); in addr_exlevel_s_ns_show()
1262 spin_unlock(&drvdata->spinlock); in addr_exlevel_s_ns_show()
1272 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_exlevel_s_ns_store() local
1273 struct etmv4_config *config = &drvdata->config; in addr_exlevel_s_ns_store()
1281 spin_lock(&drvdata->spinlock); in addr_exlevel_s_ns_store()
1286 spin_unlock(&drvdata->spinlock); in addr_exlevel_s_ns_store()
1304 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in addr_cmp_view_show() local
1305 struct etmv4_config *config = &drvdata->config; in addr_cmp_view_show()
1309 spin_lock(&drvdata->spinlock); in addr_cmp_view_show()
1324 spin_unlock(&drvdata->spinlock); in addr_cmp_view_show()
1347 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in vinst_pe_cmp_start_stop_show() local
1348 struct etmv4_config *config = &drvdata->config; in vinst_pe_cmp_start_stop_show()
1350 if (!drvdata->nr_pe_cmp) in vinst_pe_cmp_start_stop_show()
1360 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in vinst_pe_cmp_start_stop_store() local
1361 struct etmv4_config *config = &drvdata->config; in vinst_pe_cmp_start_stop_store()
1365 if (!drvdata->nr_pe_cmp) in vinst_pe_cmp_start_stop_store()
1368 spin_lock(&drvdata->spinlock); in vinst_pe_cmp_start_stop_store()
1370 spin_unlock(&drvdata->spinlock); in vinst_pe_cmp_start_stop_store()
1380 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in seq_idx_show() local
1381 struct etmv4_config *config = &drvdata->config; in seq_idx_show()
1392 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in seq_idx_store() local
1393 struct etmv4_config *config = &drvdata->config; in seq_idx_store()
1397 if (val >= drvdata->nrseqstate - 1) in seq_idx_store()
1404 spin_lock(&drvdata->spinlock); in seq_idx_store()
1406 spin_unlock(&drvdata->spinlock); in seq_idx_store()
1416 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in seq_state_show() local
1417 struct etmv4_config *config = &drvdata->config; in seq_state_show()
1428 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in seq_state_store() local
1429 struct etmv4_config *config = &drvdata->config; in seq_state_store()
1433 if (val >= drvdata->nrseqstate) in seq_state_store()
1447 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in seq_event_show() local
1448 struct etmv4_config *config = &drvdata->config; in seq_event_show()
1450 spin_lock(&drvdata->spinlock); in seq_event_show()
1453 spin_unlock(&drvdata->spinlock); in seq_event_show()
1463 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in seq_event_store() local
1464 struct etmv4_config *config = &drvdata->config; in seq_event_store()
1469 spin_lock(&drvdata->spinlock); in seq_event_store()
1473 spin_unlock(&drvdata->spinlock); in seq_event_store()
1483 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in seq_reset_event_show() local
1484 struct etmv4_config *config = &drvdata->config; in seq_reset_event_show()
1495 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in seq_reset_event_store() local
1496 struct etmv4_config *config = &drvdata->config; in seq_reset_event_store()
1500 if (!(drvdata->nrseqstate)) in seq_reset_event_store()
1513 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in cntr_idx_show() local
1514 struct etmv4_config *config = &drvdata->config; in cntr_idx_show()
1525 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in cntr_idx_store() local
1526 struct etmv4_config *config = &drvdata->config; in cntr_idx_store()
1530 if (val >= drvdata->nr_cntr) in cntr_idx_store()
1537 spin_lock(&drvdata->spinlock); in cntr_idx_store()
1539 spin_unlock(&drvdata->spinlock); in cntr_idx_store()
1550 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in cntrldvr_show() local
1551 struct etmv4_config *config = &drvdata->config; in cntrldvr_show()
1553 spin_lock(&drvdata->spinlock); in cntrldvr_show()
1556 spin_unlock(&drvdata->spinlock); in cntrldvr_show()
1566 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in cntrldvr_store() local
1567 struct etmv4_config *config = &drvdata->config; in cntrldvr_store()
1574 spin_lock(&drvdata->spinlock); in cntrldvr_store()
1577 spin_unlock(&drvdata->spinlock); in cntrldvr_store()
1588 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in cntr_val_show() local
1589 struct etmv4_config *config = &drvdata->config; in cntr_val_show()
1591 spin_lock(&drvdata->spinlock); in cntr_val_show()
1594 spin_unlock(&drvdata->spinlock); in cntr_val_show()
1604 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in cntr_val_store() local
1605 struct etmv4_config *config = &drvdata->config; in cntr_val_store()
1612 spin_lock(&drvdata->spinlock); in cntr_val_store()
1615 spin_unlock(&drvdata->spinlock); in cntr_val_store()
1626 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in cntr_ctrl_show() local
1627 struct etmv4_config *config = &drvdata->config; in cntr_ctrl_show()
1629 spin_lock(&drvdata->spinlock); in cntr_ctrl_show()
1632 spin_unlock(&drvdata->spinlock); in cntr_ctrl_show()
1642 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in cntr_ctrl_store() local
1643 struct etmv4_config *config = &drvdata->config; in cntr_ctrl_store()
1648 spin_lock(&drvdata->spinlock); in cntr_ctrl_store()
1651 spin_unlock(&drvdata->spinlock); in cntr_ctrl_store()
1661 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in res_idx_show() local
1662 struct etmv4_config *config = &drvdata->config; in res_idx_show()
1673 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in res_idx_store() local
1674 struct etmv4_config *config = &drvdata->config; in res_idx_store()
1682 if ((val < 2) || (val >= 2 * drvdata->nr_resource)) in res_idx_store()
1689 spin_lock(&drvdata->spinlock); in res_idx_store()
1691 spin_unlock(&drvdata->spinlock); in res_idx_store()
1702 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in res_ctrl_show() local
1703 struct etmv4_config *config = &drvdata->config; in res_ctrl_show()
1705 spin_lock(&drvdata->spinlock); in res_ctrl_show()
1708 spin_unlock(&drvdata->spinlock); in res_ctrl_show()
1718 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in res_ctrl_store() local
1719 struct etmv4_config *config = &drvdata->config; in res_ctrl_store()
1724 spin_lock(&drvdata->spinlock); in res_ctrl_store()
1734 spin_unlock(&drvdata->spinlock); in res_ctrl_store()
1743 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in sshot_idx_show() local
1744 struct etmv4_config *config = &drvdata->config; in sshot_idx_show()
1755 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in sshot_idx_store() local
1756 struct etmv4_config *config = &drvdata->config; in sshot_idx_store()
1760 if (val >= drvdata->nr_ss_cmp) in sshot_idx_store()
1763 spin_lock(&drvdata->spinlock); in sshot_idx_store()
1765 spin_unlock(&drvdata->spinlock); in sshot_idx_store()
1775 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in sshot_ctrl_show() local
1776 struct etmv4_config *config = &drvdata->config; in sshot_ctrl_show()
1778 spin_lock(&drvdata->spinlock); in sshot_ctrl_show()
1780 spin_unlock(&drvdata->spinlock); in sshot_ctrl_show()
1790 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in sshot_ctrl_store() local
1791 struct etmv4_config *config = &drvdata->config; in sshot_ctrl_store()
1796 spin_lock(&drvdata->spinlock); in sshot_ctrl_store()
1801 spin_unlock(&drvdata->spinlock); in sshot_ctrl_store()
1810 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in sshot_status_show() local
1811 struct etmv4_config *config = &drvdata->config; in sshot_status_show()
1813 spin_lock(&drvdata->spinlock); in sshot_status_show()
1815 spin_unlock(&drvdata->spinlock); in sshot_status_show()
1825 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in sshot_pe_ctrl_show() local
1826 struct etmv4_config *config = &drvdata->config; in sshot_pe_ctrl_show()
1828 spin_lock(&drvdata->spinlock); in sshot_pe_ctrl_show()
1830 spin_unlock(&drvdata->spinlock); in sshot_pe_ctrl_show()
1840 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in sshot_pe_ctrl_store() local
1841 struct etmv4_config *config = &drvdata->config; in sshot_pe_ctrl_store()
1846 spin_lock(&drvdata->spinlock); in sshot_pe_ctrl_store()
1851 spin_unlock(&drvdata->spinlock); in sshot_pe_ctrl_store()
1861 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in ctxid_idx_show() local
1862 struct etmv4_config *config = &drvdata->config; in ctxid_idx_show()
1873 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in ctxid_idx_store() local
1874 struct etmv4_config *config = &drvdata->config; in ctxid_idx_store()
1878 if (val >= drvdata->numcidc) in ctxid_idx_store()
1885 spin_lock(&drvdata->spinlock); in ctxid_idx_store()
1887 spin_unlock(&drvdata->spinlock); in ctxid_idx_store()
1898 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in ctxid_pid_show() local
1899 struct etmv4_config *config = &drvdata->config; in ctxid_pid_show()
1908 spin_lock(&drvdata->spinlock); in ctxid_pid_show()
1911 spin_unlock(&drvdata->spinlock); in ctxid_pid_show()
1921 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in ctxid_pid_store() local
1922 struct etmv4_config *config = &drvdata->config; in ctxid_pid_store()
1941 if (!drvdata->ctxid_size || !drvdata->numcidc) in ctxid_pid_store()
1946 spin_lock(&drvdata->spinlock); in ctxid_pid_store()
1949 spin_unlock(&drvdata->spinlock); in ctxid_pid_store()
1959 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in ctxid_masks_show() local
1960 struct etmv4_config *config = &drvdata->config; in ctxid_masks_show()
1969 spin_lock(&drvdata->spinlock); in ctxid_masks_show()
1972 spin_unlock(&drvdata->spinlock); in ctxid_masks_show()
1982 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in ctxid_masks_store() local
1983 struct etmv4_config *config = &drvdata->config; in ctxid_masks_store()
1998 if (!drvdata->ctxid_size || !drvdata->numcidc) in ctxid_masks_store()
2002 if ((drvdata->numcidc > 4) && (nr_inputs != 2)) in ctxid_masks_store()
2005 spin_lock(&drvdata->spinlock); in ctxid_masks_store()
2010 switch (drvdata->numcidc) { in ctxid_masks_store()
2057 for (i = 0; i < drvdata->numcidc; i++) { in ctxid_masks_store()
2077 spin_unlock(&drvdata->spinlock); in ctxid_masks_store()
2087 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in vmid_idx_show() local
2088 struct etmv4_config *config = &drvdata->config; in vmid_idx_show()
2099 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in vmid_idx_store() local
2100 struct etmv4_config *config = &drvdata->config; in vmid_idx_store()
2104 if (val >= drvdata->numvmidc) in vmid_idx_store()
2111 spin_lock(&drvdata->spinlock); in vmid_idx_store()
2113 spin_unlock(&drvdata->spinlock); in vmid_idx_store()
2123 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in vmid_val_show() local
2124 struct etmv4_config *config = &drvdata->config; in vmid_val_show()
2133 spin_lock(&drvdata->spinlock); in vmid_val_show()
2135 spin_unlock(&drvdata->spinlock); in vmid_val_show()
2144 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in vmid_val_store() local
2145 struct etmv4_config *config = &drvdata->config; in vmid_val_store()
2158 if (!drvdata->vmid_size || !drvdata->numvmidc) in vmid_val_store()
2163 spin_lock(&drvdata->spinlock); in vmid_val_store()
2165 spin_unlock(&drvdata->spinlock); in vmid_val_store()
2174 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in vmid_masks_show() local
2175 struct etmv4_config *config = &drvdata->config; in vmid_masks_show()
2184 spin_lock(&drvdata->spinlock); in vmid_masks_show()
2187 spin_unlock(&drvdata->spinlock); in vmid_masks_show()
2197 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in vmid_masks_store() local
2198 struct etmv4_config *config = &drvdata->config; in vmid_masks_store()
2212 if (!drvdata->vmid_size || !drvdata->numvmidc) in vmid_masks_store()
2216 if ((drvdata->numvmidc > 4) && (nr_inputs != 2)) in vmid_masks_store()
2219 spin_lock(&drvdata->spinlock); in vmid_masks_store()
2225 switch (drvdata->numvmidc) { in vmid_masks_store()
2273 for (i = 0; i < drvdata->numvmidc; i++) { in vmid_masks_store()
2292 spin_unlock(&drvdata->spinlock); in vmid_masks_store()
2301 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in cpu_show() local
2303 val = drvdata->cpu; in cpu_show()
2314 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in ts_source_show() local
2316 if (!drvdata->trfcr) { in ts_source_show()
2321 switch (drvdata->trfcr & TRFCR_ELx_TS_MASK) { in ts_source_show()
2325 val = FIELD_GET(TRFCR_ELx_TS_MASK, drvdata->trfcr); in ts_source_show()
2408 static u32 etmv4_cross_read(const struct etmv4_drvdata *drvdata, u32 offset) in etmv4_cross_read() argument
2413 reg.csdev = drvdata->csdev; in etmv4_cross_read()
2419 smp_call_function_single(drvdata->cpu, do_smp_cross_read, &reg, 1); in etmv4_cross_read()
2436 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in coresight_etm4x_reg_show() local
2441 val = etmv4_cross_read(drvdata, offset); in coresight_etm4x_reg_show()
2448 etm4x_register_implemented(struct etmv4_drvdata *drvdata, u32 offset) in etm4x_register_implemented() argument
2463 return !etm4x_is_ete(drvdata); in etm4x_register_implemented()
2477 return !!drvdata->base; in etm4x_register_implemented()
2480 return etm4x_is_ete(drvdata); in etm4x_register_implemented()
2498 struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); in coresight_etm4x_attr_reg_implemented() local
2505 if (etm4x_register_implemented(drvdata, offset)) in coresight_etm4x_attr_reg_implemented()