Lines Matching +full:0 +full:x70c
17 #define SPMU_EVENT_TYPES_OFFSET 0x400
382 "Timeout while waiting for coresight, addr: 0x%llx, position: %d, up: %d\n", in gaudi_coresight_timeout()
387 return 0; in gaudi_coresight_timeout()
405 WREG32(base_reg + 0xFB0, CORESIGHT_UNLOCK); in gaudi_config_stm()
413 WREG32(base_reg + 0xE80, 0x80004); in gaudi_config_stm()
414 WREG32(base_reg + 0xD64, 7); in gaudi_config_stm()
415 WREG32(base_reg + 0xD60, 0); in gaudi_config_stm()
416 WREG32(base_reg + 0xD00, lower_32_bits(input->he_mask)); in gaudi_config_stm()
417 WREG32(base_reg + 0xD60, 1); in gaudi_config_stm()
418 WREG32(base_reg + 0xD00, upper_32_bits(input->he_mask)); in gaudi_config_stm()
419 WREG32(base_reg + 0xE70, 0x10); in gaudi_config_stm()
420 WREG32(base_reg + 0xE60, 0); in gaudi_config_stm()
421 WREG32(base_reg + 0xE00, lower_32_bits(input->sp_mask)); in gaudi_config_stm()
422 WREG32(base_reg + 0xEF4, input->id); in gaudi_config_stm()
423 WREG32(base_reg + 0xDF4, 0x80); in gaudi_config_stm()
425 if (frequency == 0) in gaudi_config_stm()
427 WREG32(base_reg + 0xE8C, frequency); in gaudi_config_stm()
428 WREG32(base_reg + 0xE90, 0x1F00); in gaudi_config_stm()
434 WREG32(base_reg + 0xE68, 0xffff8005); in gaudi_config_stm()
435 WREG32(base_reg + 0xE6C, 0x0); in gaudi_config_stm()
438 WREG32(base_reg + 0xE80, 0x23 | (input->id << 16)); in gaudi_config_stm()
440 WREG32(base_reg + 0xE80, 4); in gaudi_config_stm()
441 WREG32(base_reg + 0xD64, 0); in gaudi_config_stm()
442 WREG32(base_reg + 0xD60, 1); in gaudi_config_stm()
443 WREG32(base_reg + 0xD00, 0); in gaudi_config_stm()
444 WREG32(base_reg + 0xD20, 0); in gaudi_config_stm()
445 WREG32(base_reg + 0xD60, 0); in gaudi_config_stm()
446 WREG32(base_reg + 0xE20, 0); in gaudi_config_stm()
447 WREG32(base_reg + 0xE00, 0); in gaudi_config_stm()
448 WREG32(base_reg + 0xDF4, 0x80); in gaudi_config_stm()
449 WREG32(base_reg + 0xE70, 0); in gaudi_config_stm()
450 WREG32(base_reg + 0xE60, 0); in gaudi_config_stm()
451 WREG32(base_reg + 0xE64, 0); in gaudi_config_stm()
452 WREG32(base_reg + 0xE8C, 0); in gaudi_config_stm()
454 rc = gaudi_coresight_timeout(hdev, base_reg + 0xE80, 23, false); in gaudi_config_stm()
462 WREG32(base_reg + 0xE80, 4); in gaudi_config_stm()
465 return 0; in gaudi_config_stm()
483 WREG32(base_reg + 0xFB0, CORESIGHT_UNLOCK); in gaudi_config_etf()
485 val = RREG32(base_reg + 0x20); in gaudi_config_etf()
487 if ((!params->enable && val == 0x0) || (params->enable && val != 0x0)) in gaudi_config_etf()
488 return 0; in gaudi_config_etf()
490 val = RREG32(base_reg + 0x304); in gaudi_config_etf()
491 val |= 0x1000; in gaudi_config_etf()
492 WREG32(base_reg + 0x304, val); in gaudi_config_etf()
493 val |= 0x40; in gaudi_config_etf()
494 WREG32(base_reg + 0x304, val); in gaudi_config_etf()
496 rc = gaudi_coresight_timeout(hdev, base_reg + 0x304, 6, false); in gaudi_config_etf()
504 rc = gaudi_coresight_timeout(hdev, base_reg + 0xC, 2, true); in gaudi_config_etf()
512 WREG32(base_reg + 0x20, 0); in gaudi_config_etf()
520 WREG32(base_reg + 0x34, 0x3FFC); in gaudi_config_etf()
521 WREG32(base_reg + 0x28, input->sink_mode); in gaudi_config_etf()
522 WREG32(base_reg + 0x304, 0x4001); in gaudi_config_etf()
523 WREG32(base_reg + 0x308, 0xA); in gaudi_config_etf()
524 WREG32(base_reg + 0x20, 1); in gaudi_config_etf()
526 WREG32(base_reg + 0x34, 0); in gaudi_config_etf()
527 WREG32(base_reg + 0x28, 0); in gaudi_config_etf()
528 WREG32(base_reg + 0x304, 0); in gaudi_config_etf()
531 return 0; in gaudi_config_etf()
590 if ((!params->enable && val == 0x0) || (params->enable && val != 0x0)) in gaudi_config_etr()
591 return 0; in gaudi_config_etr()
596 val |= 0x1000; in gaudi_config_etr()
598 val |= 0x40; in gaudi_config_etr()
615 WREG32(mmPSOC_ETR_CTL, 0); in gaudi_config_etr()
625 if (input->buffer_size == 0) { in gaudi_config_etr()
627 "ETR buffer size should be bigger than 0\n"); in gaudi_config_etr()
642 WREG32(mmPSOC_ETR_BUFWM, 0x3FFC); in gaudi_config_etr()
648 PSOC_ETR_AXICTL_PROTCTRLBIT0_MASK, 0); in gaudi_config_etr()
657 is_host ? 0 : 7); in gaudi_config_etr()
665 WREG32(mmPSOC_ETR_PSCR, 0xA); in gaudi_config_etr()
668 WREG32(mmPSOC_ETR_BUFWM, 0); in gaudi_config_etr()
669 WREG32(mmPSOC_ETR_RSZ, 0x400); in gaudi_config_etr()
670 WREG32(mmPSOC_ETR_DBALO, 0); in gaudi_config_etr()
671 WREG32(mmPSOC_ETR_DBAHI, 0); in gaudi_config_etr()
672 WREG32(mmPSOC_ETR_PSCR, 0); in gaudi_config_etr()
673 WREG32(mmPSOC_ETR_MODE, 0); in gaudi_config_etr()
674 WREG32(mmPSOC_ETR_FFCR, 0); in gaudi_config_etr()
687 rwphi = RREG32(mmPSOC_ETR_RWPHI) & 0xff; in gaudi_config_etr()
695 return 0; in gaudi_config_etr()
710 WREG32(base_reg + 0xFB0, CORESIGHT_UNLOCK); in gaudi_config_funnel()
712 WREG32(base_reg, params->enable ? 0x33F : 0); in gaudi_config_funnel()
714 return 0; in gaudi_config_funnel()
730 WREG32(base_reg + 0x104, 1); in gaudi_config_bmon()
738 WREG32(base_reg + 0x200, lower_32_bits(input->start_addr0)); in gaudi_config_bmon()
739 WREG32(base_reg + 0x204, upper_32_bits(input->start_addr0)); in gaudi_config_bmon()
740 WREG32(base_reg + 0x208, lower_32_bits(input->addr_mask0)); in gaudi_config_bmon()
741 WREG32(base_reg + 0x20C, upper_32_bits(input->addr_mask0)); in gaudi_config_bmon()
742 WREG32(base_reg + 0x240, lower_32_bits(input->start_addr1)); in gaudi_config_bmon()
743 WREG32(base_reg + 0x244, upper_32_bits(input->start_addr1)); in gaudi_config_bmon()
744 WREG32(base_reg + 0x248, lower_32_bits(input->addr_mask1)); in gaudi_config_bmon()
745 WREG32(base_reg + 0x24C, upper_32_bits(input->addr_mask1)); in gaudi_config_bmon()
746 WREG32(base_reg + 0x224, 0); in gaudi_config_bmon()
747 WREG32(base_reg + 0x234, 0); in gaudi_config_bmon()
748 WREG32(base_reg + 0x30C, input->bw_win); in gaudi_config_bmon()
749 WREG32(base_reg + 0x308, input->win_capture); in gaudi_config_bmon()
750 WREG32(base_reg + 0x700, 0xA000B00 | (input->id << 12)); in gaudi_config_bmon()
751 WREG32(base_reg + 0x708, 0xA000A00 | (input->id << 12)); in gaudi_config_bmon()
752 WREG32(base_reg + 0x70C, 0xA000C00 | (input->id << 12)); in gaudi_config_bmon()
753 WREG32(base_reg + 0x100, 0x11); in gaudi_config_bmon()
754 WREG32(base_reg + 0x304, 0x1); in gaudi_config_bmon()
756 WREG32(base_reg + 0x200, 0); in gaudi_config_bmon()
757 WREG32(base_reg + 0x204, 0); in gaudi_config_bmon()
758 WREG32(base_reg + 0x208, 0xFFFFFFFF); in gaudi_config_bmon()
759 WREG32(base_reg + 0x20C, 0xFFFFFFFF); in gaudi_config_bmon()
760 WREG32(base_reg + 0x240, 0); in gaudi_config_bmon()
761 WREG32(base_reg + 0x244, 0); in gaudi_config_bmon()
762 WREG32(base_reg + 0x248, 0xFFFFFFFF); in gaudi_config_bmon()
763 WREG32(base_reg + 0x24C, 0xFFFFFFFF); in gaudi_config_bmon()
764 WREG32(base_reg + 0x224, 0xFFFFFFFF); in gaudi_config_bmon()
765 WREG32(base_reg + 0x234, 0x1070F); in gaudi_config_bmon()
766 WREG32(base_reg + 0x30C, 0); in gaudi_config_bmon()
767 WREG32(base_reg + 0x308, 0xFFFF); in gaudi_config_bmon()
768 WREG32(base_reg + 0x700, 0xA000B00); in gaudi_config_bmon()
769 WREG32(base_reg + 0x708, 0xA000A00); in gaudi_config_bmon()
770 WREG32(base_reg + 0x70C, 0xA000C00); in gaudi_config_bmon()
771 WREG32(base_reg + 0x100, 1); in gaudi_config_bmon()
772 WREG32(base_reg + 0x304, 0); in gaudi_config_bmon()
773 WREG32(base_reg + 0x104, 0); in gaudi_config_bmon()
776 return 0; in gaudi_config_bmon()
816 WREG32(base_reg + 0xE04, 0x41013046); in gaudi_config_spmu()
817 WREG32(base_reg + 0xE04, 0x41013040); in gaudi_config_spmu()
819 for (i = 0 ; i < input->event_types_num ; i++) in gaudi_config_spmu()
823 WREG32(base_reg + 0xE04, 0x41013041); in gaudi_config_spmu()
824 WREG32(base_reg + 0xC00, 0x8000003F); in gaudi_config_spmu()
847 WREG32(base_reg + 0xE04, 0x41013040); in gaudi_config_spmu()
849 for (i = 0 ; i < events_num ; i++) in gaudi_config_spmu()
852 output[overflow_idx] = RREG32(base_reg + 0xCC0); in gaudi_config_spmu()
854 output[cycle_cnt_idx] = RREG32(base_reg + 0xFC); in gaudi_config_spmu()
856 output[cycle_cnt_idx] |= RREG32(base_reg + 0xF8); in gaudi_config_spmu()
858 WREG32(base_reg + 0xCC0, 0); in gaudi_config_spmu()
861 return 0; in gaudi_config_spmu()
867 int rc = 0; in gaudi_debug_coresight()