diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2012-07-13 15:45:58 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2013-04-29 09:43:11 +0100 |
commit | 7fb3e6503a5a7f79c703db69d928d502ce28bd5b (patch) | |
tree | 2c58ecd92fd500dc918e0bf3f711368898af0a8e /include | |
parent | 9823c7f5861b4101aaf068ebdb062ed4c6899bb6 (diff) |
drivers: misc: vexpress: add SPC support
The TC2 core tile integrates a logic block that provides the interface
between the dual cluster test-chip and the M3 microcontroller that carries
out power management. The logic block, called SPC, contains several
memory mapped registers to control among other things low-power states,
operating points and reset control.
This patch provides a driver that enables run-time control of features
implemented by the SPC control logic.
Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/vexpress.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h index 75818744ab5..df276d25fcf 100644 --- a/include/linux/vexpress.h +++ b/include/linux/vexpress.h @@ -126,4 +126,45 @@ void vexpress_osc_of_setup(struct device_node *node); void vexpress_clk_init(void __iomem *sp810_base); void vexpress_clk_of_init(void); +/* SPC */ + +#define VEXPRESS_SPC_WAKE_INTR_IRQ(cluster, cpu) \ + (1 << (4 * (cluster) + (cpu))) +#define VEXPRESS_SPC_WAKE_INTR_FIQ(cluster, cpu) \ + (1 << (7 * (cluster) + (cpu))) +#define VEXPRESS_SPC_WAKE_INTR_SWDOG (1 << 10) +#define VEXPRESS_SPC_WAKE_INTR_GTIMER (1 << 11) +#define VEXPRESS_SPC_WAKE_INTR_MASK 0xFFF + +#ifdef CONFIG_ARM_SPC +extern int vexpress_spc_get_performance(int cluster, int *perf); +extern int vexpress_spc_set_performance(int cluster, int perf); +extern void vexpress_spc_set_wake_intr(u32 mask); +extern u32 vexpress_spc_get_wake_intr(int raw); +extern void vexpress_spc_powerdown_enable(int cluster, int enable); +extern void vexpress_spc_adb400_pd_enable(int cluster, int enable); +extern void vexpress_spc_wfi_cpureset(int cluster, int cpu, int enable); +extern int vexpress_spc_wfi_cpustat(int cluster); +extern void vexpress_spc_wfi_cluster_reset(int cluster, int enable); +extern void vexpress_scc_ctl_snoops(int cluster, int enable); +#else +static inline int vexpress_spc_get_performance(int cluster, int *perf) +{ + return -EINVAL; +} +static inline int vexpress_spc_set_performance(int cluster, int perf) +{ + return -EINVAL; +} +static inline void vexpress_spc_set_wake_intr(u32 mask) { } +static inline u32 vexpress_spc_get_wake_intr(int raw) { return 0; } +static inline void vexpress_spc_powerdown_enable(int cluster, int enable) { } +static inline void vexpress_spc_adb400_pd_enable(int cluster, int enable) { } +static inline void vexpress_spc_wfi_cpureset(int cluster, int cpu, int enable) +{ } +static inline int vexpress_spc_wfi_cpustat(int cluster) { return 0; } +static inline void vexpress_spc_wfi_cluster_reset(int cluster, int enable) { } +static inline void vexpress_scc_ctl_snoops(int cluster, int enable) { } +#endif + #endif |