mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
irqchip/apple-aic: Move PMU-specific registers to their own include file
As we are about to have a PMU driver, move the PMU bits from the AIC driver into a common include file. Reviewed-by: Hector Martin <marcan@marcan.st> Signed-off-by: Marc Zyngier <maz@kernel.org>
This commit is contained in:
parent
0f522efcd7
commit
11db7410cf
2 changed files with 20 additions and 10 deletions
19
arch/arm64/include/asm/apple_m1_pmu.h
Normal file
19
arch/arm64/include/asm/apple_m1_pmu.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#ifndef __ASM_APPLE_M1_PMU_h
|
||||
#define __ASM_APPLE_M1_PMU_h
|
||||
|
||||
#include <linux/bits.h>
|
||||
#include <asm/sysreg.h>
|
||||
|
||||
/* Core PMC control register */
|
||||
#define SYS_IMP_APL_PMCR0_EL1 sys_reg(3, 1, 15, 0, 0)
|
||||
#define PMCR0_IMODE GENMASK(10, 8)
|
||||
#define PMCR0_IMODE_OFF 0
|
||||
#define PMCR0_IMODE_PMI 1
|
||||
#define PMCR0_IMODE_AIC 2
|
||||
#define PMCR0_IMODE_HALT 3
|
||||
#define PMCR0_IMODE_FIQ 4
|
||||
#define PMCR0_IACT BIT(11)
|
||||
|
||||
#endif /* __ASM_APPLE_M1_PMU_h */
|
|
@ -55,6 +55,7 @@
|
|||
#include <linux/limits.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/slab.h>
|
||||
#include <asm/apple_m1_pmu.h>
|
||||
#include <asm/exception.h>
|
||||
#include <asm/sysreg.h>
|
||||
#include <asm/virt.h>
|
||||
|
@ -109,16 +110,6 @@
|
|||
* Note: sysreg-based IPIs are not supported yet.
|
||||
*/
|
||||
|
||||
/* Core PMC control register */
|
||||
#define SYS_IMP_APL_PMCR0_EL1 sys_reg(3, 1, 15, 0, 0)
|
||||
#define PMCR0_IMODE GENMASK(10, 8)
|
||||
#define PMCR0_IMODE_OFF 0
|
||||
#define PMCR0_IMODE_PMI 1
|
||||
#define PMCR0_IMODE_AIC 2
|
||||
#define PMCR0_IMODE_HALT 3
|
||||
#define PMCR0_IMODE_FIQ 4
|
||||
#define PMCR0_IACT BIT(11)
|
||||
|
||||
/* IPI request registers */
|
||||
#define SYS_IMP_APL_IPI_RR_LOCAL_EL1 sys_reg(3, 5, 15, 0, 0)
|
||||
#define SYS_IMP_APL_IPI_RR_GLOBAL_EL1 sys_reg(3, 5, 15, 0, 1)
|
||||
|
|
Loading…
Reference in a new issue