77 lines
2.2 KiB
C
77 lines
2.2 KiB
C
/* Copyright (c) 2010, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* only version 2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
/*
|
|
*per-axi
|
|
*DESCRIPTION
|
|
*Header File for Functions related to AXI bus performance counter manipulations.
|
|
*/
|
|
|
|
#ifndef __PER_AXI_H__
|
|
#define __PER_AXI_H__
|
|
unsigned long pm_get_axi_cycle_count(void);
|
|
unsigned long pm_get_axi_evt0_count(void);
|
|
unsigned long pm_get_axi_evt1_count(void);
|
|
unsigned long pm_get_axi_evt2_count(void);
|
|
unsigned long pm_get_axi_ten_min_count(void);
|
|
unsigned long pm_get_axi_ten_max_count(void);
|
|
unsigned long pm_get_axi_ten_total_count(void);
|
|
unsigned long pm_get_axi_ten_last_count(void);
|
|
|
|
unsigned long get_axi_sel_reg0(void);
|
|
unsigned long get_axi_sel_seg1(void);
|
|
unsigned long get_axi_ten_sel_reg(void);
|
|
unsigned long get_axi_valid(void);
|
|
unsigned long get_axi_enable(void);
|
|
unsigned long get_axi_clear(void);
|
|
|
|
void pm_axi_clear_cnts(void);
|
|
void pm_axi_update_cnts(void);
|
|
|
|
void pm_axi_init(void);
|
|
void pm_axi_start(void);
|
|
void pm_axi_update(void);
|
|
void pm_axi_disable(void);
|
|
void pm_axi_enable(void);
|
|
|
|
struct perf_mon_axi_cnts{
|
|
unsigned long long cycles;
|
|
unsigned long long cnt0;
|
|
unsigned long long cnt1;
|
|
unsigned long long tenure_total;
|
|
unsigned long long tenure_min;
|
|
unsigned long long tenure_max;
|
|
unsigned long long tenure_last;
|
|
};
|
|
|
|
struct perf_mon_axi_data{
|
|
struct proc_dir_entry *proc;
|
|
unsigned long enable;
|
|
unsigned long clear;
|
|
unsigned long valid;
|
|
unsigned long sel_reg0;
|
|
unsigned long sel_reg1;
|
|
unsigned long ten_sel_reg;
|
|
unsigned long refresh;
|
|
};
|
|
|
|
extern struct perf_mon_axi_data pm_axi_info;
|
|
extern struct perf_mon_axi_cnts axi_cnts;
|
|
|
|
void pm_axi_set_proc_entry(char *name, unsigned long *var,
|
|
struct proc_dir_entry *d, int hex);
|
|
void pm_axi_get_cnt_proc_entry(char *name, struct perf_mon_axi_cnts *var,
|
|
struct proc_dir_entry *d, int hex);
|
|
|
|
#endif
|