/* SPDX-License-Identifier: GPL-2.0-only */
/*
* exynos_ppmu.h - Exynos PPMU header file
*
* Copyright (c) 2015 Samsung Electronics Co., Ltd.
* Author : Chanwoo Choi <cw00.choi@samsung.com>
*/
#ifndef __EXYNOS_PPMU_H__
#define __EXYNOS_PPMU_H__
enum ppmu_state {
PPMU_DISABLE = 0 ,
PPMU_ENABLE,
};
enum ppmu_counter {
PPMU_PMNCNT0 = 0 ,
PPMU_PMNCNT1,
PPMU_PMNCNT2,
PPMU_PMNCNT3,
PPMU_PMNCNT_MAX,
};
/***
* PPMUv1.1 Definitions
*/
enum ppmu_event_type {
PPMU_RO_BUSY_CYCLE_CNT = 0 x0,
PPMU_WO_BUSY_CYCLE_CNT = 0 x1,
PPMU_RW_BUSY_CYCLE_CNT = 0 x2,
PPMU_RO_REQUEST_CNT = 0 x3,
PPMU_WO_REQUEST_CNT = 0 x4,
PPMU_RO_DATA_CNT = 0 x5,
PPMU_WO_DATA_CNT = 0 x6,
PPMU_RO_LATENCY = 0 x12,
PPMU_WO_LATENCY = 0 x16,
};
enum ppmu_reg {
/* PPC control register */
PPMU_PMNC = 0 x00,
PPMU_CNTENS = 0 x10,
PPMU_CNTENC = 0 x20,
PPMU_INTENS = 0 x30,
PPMU_INTENC = 0 x40,
PPMU_FLAG = 0 x50,
/* Cycle Counter and Performance Event Counter Register */
PPMU_CCNT = 0 x100,
PPMU_PMCNT0 = 0 x110,
PPMU_PMCNT1 = 0 x120,
PPMU_PMCNT2 = 0 x130,
PPMU_PMCNT3_HIGH = 0 x140,
PPMU_PMCNT3_LOW = 0 x150,
/* Bus Event Generator */
PPMU_BEVT0SEL = 0 x1000,
PPMU_BEVT1SEL = 0 x1100,
PPMU_BEVT2SEL = 0 x1200,
PPMU_BEVT3SEL = 0 x1300,
PPMU_COUNTER_RESET = 0 x1810,
PPMU_READ_OVERFLOW_CNT = 0 x1810,
PPMU_READ_UNDERFLOW_CNT = 0 x1814,
PPMU_WRITE_OVERFLOW_CNT = 0 x1850,
PPMU_WRITE_UNDERFLOW_CNT = 0 x1854,
PPMU_READ_PENDING_CNT = 0 x1880,
PPMU_WRITE_PENDING_CNT = 0 x1884
};
/* PMNC register */
#define PPMU_PMNC_CC_RESET_SHIFT 2
#define PPMU_PMNC_COUNTER_RESET_SHIFT 1
#define PPMU_PMNC_ENABLE_SHIFT 0
#define PPMU_PMNC_START_MODE_MASK BIT(16 )
#define PPMU_PMNC_CC_DIVIDER_MASK BIT(3 )
#define PPMU_PMNC_CC_RESET_MASK BIT(2 )
#define PPMU_PMNC_COUNTER_RESET_MASK BIT(1 )
#define PPMU_PMNC_ENABLE_MASK BIT(0 )
/* CNTENS/CNTENC/INTENS/INTENC/FLAG register */
#define PPMU_CCNT_MASK BIT(31 )
#define PPMU_PMCNT3_MASK BIT(3 )
#define PPMU_PMCNT2_MASK BIT(2 )
#define PPMU_PMCNT1_MASK BIT(1 )
#define PPMU_PMCNT0_MASK BIT(0 )
/* PPMU_PMNCTx/PPMU_BETxSEL registers */
#define PPMU_PMNCT(x) (PPMU_PMCNT0 + (0 x10 * x))
#define PPMU_BEVTxSEL(x) (PPMU_BEVT0SEL + (0 x100 * x))
/***
* PPMU_V2.0 definitions
*/
enum ppmu_v2_mode {
PPMU_V2_MODE_MANUAL = 0 ,
PPMU_V2_MODE_AUTO = 1 ,
PPMU_V2_MODE_CIG = 2 , /* CIG (Conditional Interrupt Generation) */
};
enum ppmu_v2_event_type {
PPMU_V2_RO_DATA_CNT = 0 x4,
PPMU_V2_WO_DATA_CNT = 0 x5,
PPMU_V2_EVT3_RW_DATA_CNT = 0 x22, /* Only for Event3 */
};
enum ppmu_V2_reg {
/* PPC control register */
PPMU_V2_PMNC = 0 x04,
PPMU_V2_CNTENS = 0 x08,
PPMU_V2_CNTENC = 0 x0c,
PPMU_V2_INTENS = 0 x10,
PPMU_V2_INTENC = 0 x14,
PPMU_V2_FLAG = 0 x18,
/* Cycle Counter and Performance Event Counter Register */
PPMU_V2_CCNT = 0 x48,
PPMU_V2_PMCNT0 = 0 x34,
PPMU_V2_PMCNT1 = 0 x38,
PPMU_V2_PMCNT2 = 0 x3c,
PPMU_V2_PMCNT3_LOW = 0 x40,
PPMU_V2_PMCNT3_HIGH = 0 x44,
/* Bus Event Generator */
PPMU_V2_CIG_CFG0 = 0 x1c,
PPMU_V2_CIG_CFG1 = 0 x20,
PPMU_V2_CIG_CFG2 = 0 x24,
PPMU_V2_CIG_RESULT = 0 x28,
PPMU_V2_CNT_RESET = 0 x2c,
PPMU_V2_CNT_AUTO = 0 x30,
PPMU_V2_CH_EV0_TYPE = 0 x200,
PPMU_V2_CH_EV1_TYPE = 0 x204,
PPMU_V2_CH_EV2_TYPE = 0 x208,
PPMU_V2_CH_EV3_TYPE = 0 x20c,
PPMU_V2_SM_ID_V = 0 x220,
PPMU_V2_SM_ID_A = 0 x224,
PPMU_V2_SM_OTHERS_V = 0 x228,
PPMU_V2_SM_OTHERS_A = 0 x22c,
PPMU_V2_INTERRUPT_RESET = 0 x260,
};
/* PMNC register */
#define PPMU_V2_PMNC_START_MODE_SHIFT 20
#define PPMU_V2_PMNC_START_MODE_MASK (0 x3 << PPMU_V2_PMNC_START_MODE_SHIFT)
#define PPMU_PMNC_CC_RESET_SHIFT 2
#define PPMU_PMNC_COUNTER_RESET_SHIFT 1
#define PPMU_PMNC_ENABLE_SHIFT 0
#define PPMU_PMNC_START_MODE_MASK BIT(16 )
#define PPMU_PMNC_CC_DIVIDER_MASK BIT(3 )
#define PPMU_PMNC_CC_RESET_MASK BIT(2 )
#define PPMU_PMNC_COUNTER_RESET_MASK BIT(1 )
#define PPMU_PMNC_ENABLE_MASK BIT(0 )
#define PPMU_V2_PMNCT(x) (PPMU_V2_PMCNT0 + (0 x4 * x))
#define PPMU_V2_CH_EVx_TYPE(x) (PPMU_V2_CH_EV0_TYPE + (0 x4 * x))
#endif /* __EXYNOS_PPMU_H__ */
Messung V0.5 in Prozent C=96 H=93 G=94
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-07)
¤
*© Formatika GbR, Deutschland