aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/include
diff options
context:
space:
mode:
authorMartin Persson <martin.persson@stericsson.com>2010-12-08 09:13:28 -0500
committerLinus Walleij <linus.walleij@stericsson.com>2010-12-09 04:06:01 -0500
commite0befb23dfed4d4d0de9d97dac936ccc0bbec093 (patch)
tree269484cb63d3449de74f18a21a1b72bcb182c431 /arch/arm/mach-ux500/include
parent20e218a77fc0b0576817b6b204fe5b9391a5b209 (diff)
ux500: Add prcmu support for operating points
Adds support in PRCMU driver to handle CPU and APE operating points. Signed-off-by: Martin Persson <martin.persson@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/include')
-rw-r--r--arch/arm/mach-ux500/include/mach/prcmu-defs.h30
-rw-r--r--arch/arm/mach-ux500/include/mach/prcmu-regs.h15
-rw-r--r--arch/arm/mach-ux500/include/mach/prcmu.h14
3 files changed, 53 insertions, 6 deletions
diff --git a/arch/arm/mach-ux500/include/mach/prcmu-defs.h b/arch/arm/mach-ux500/include/mach/prcmu-defs.h
new file mode 100644
index 000000000000..848ba64b561f
--- /dev/null
+++ b/arch/arm/mach-ux500/include/mach/prcmu-defs.h
@@ -0,0 +1,30 @@
1/*
2 * Copyright (C) STMicroelectronics 2009
3 * Copyright (C) ST-Ericsson SA 2010
4 *
5 * Author: Sundar Iyer <sundar.iyer@stericsson.com>
6 * Author: Martin Persson <martin.persson@stericsson.com>
7 *
8 * License Terms: GNU General Public License v2
9 *
10 * PRCM Unit definitions
11 */
12
13#ifndef __MACH_PRCMU_DEFS_H
14#define __MACH_PRCMU_DEFS_H
15
16enum prcmu_cpu_opp {
17 CPU_OPP_INIT = 0x00,
18 CPU_OPP_NO_CHANGE = 0x01,
19 CPU_OPP_100 = 0x02,
20 CPU_OPP_50 = 0x03,
21 CPU_OPP_MAX = 0x04,
22 CPU_OPP_EXT_CLK = 0x07
23};
24enum prcmu_ape_opp {
25 APE_OPP_NO_CHANGE = 0x00,
26 APE_OPP_100 = 0x02,
27 APE_OPP_50 = 0x03,
28};
29
30#endif /* __MACH_PRCMU_DEFS_H */
diff --git a/arch/arm/mach-ux500/include/mach/prcmu-regs.h b/arch/arm/mach-ux500/include/mach/prcmu-regs.h
index 8885f39a6421..455467e88791 100644
--- a/arch/arm/mach-ux500/include/mach/prcmu-regs.h
+++ b/arch/arm/mach-ux500/include/mach/prcmu-regs.h
@@ -1,10 +1,15 @@
1/* 1/*
2 * Copyright (c) 2009 ST-Ericsson SA 2 * Copyright (C) STMicroelectronics 2009
3 * Copyright (C) ST-Ericsson SA 2010
3 * 4 *
4 * This program is free software; you can redistribute it and/or modify 5 * Author: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
5 * it under the terms of the GNU General Public License version 2 6 * Author: Sundar Iyer <sundar.iyer@stericsson.com>
6 * as published by the Free Software Foundation. 7 *
8 * License Terms: GNU General Public License v2
9 *
10 * PRCM Unit registers
7 */ 11 */
12
8#ifndef __MACH_PRCMU_REGS_H 13#ifndef __MACH_PRCMU_REGS_H
9#define __MACH_PRCMU_REGS_H 14#define __MACH_PRCMU_REGS_H
10 15
@@ -88,4 +93,4 @@
88/* Miscellaneous unit registers */ 93/* Miscellaneous unit registers */
89#define PRCM_DSI_SW_RESET (_PRCMU_BASE + 0x324) 94#define PRCM_DSI_SW_RESET (_PRCMU_BASE + 0x324)
90 95
91#endif /* __MACH_PRCMU__REGS_H */ 96#endif /* __MACH_PRCMU_REGS_H */
diff --git a/arch/arm/mach-ux500/include/mach/prcmu.h b/arch/arm/mach-ux500/include/mach/prcmu.h
index daa9d3ab7e0c..c49e456162ef 100644
--- a/arch/arm/mach-ux500/include/mach/prcmu.h
+++ b/arch/arm/mach-ux500/include/mach/prcmu.h
@@ -2,15 +2,27 @@
2 * Copyright (C) STMicroelectronics 2009 2 * Copyright (C) STMicroelectronics 2009
3 * Copyright (C) ST-Ericsson SA 2010 3 * Copyright (C) ST-Ericsson SA 2010
4 * 4 *
5 * Author: Kumar Sanghvi <kumar.sanghvi@stericsson.com>
6 * Author: Sundar Iyer <sundar.iyer@stericsson.com>
7 * Author: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
8 *
5 * License Terms: GNU General Public License v2 9 * License Terms: GNU General Public License v2
6 * 10 *
7 * PRCMU f/w APIs 11 * PRCM Unit f/w API
8 */ 12 */
9#ifndef __MACH_PRCMU_H 13#ifndef __MACH_PRCMU_H
10#define __MACH_PRCMU_H 14#define __MACH_PRCMU_H
15#include <mach/prcmu-defs.h>
11 16
12void __init prcmu_early_init(void); 17void __init prcmu_early_init(void);
13int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size); 18int prcmu_abb_read(u8 slave, u8 reg, u8 *value, u8 size);
14int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size); 19int prcmu_abb_write(u8 slave, u8 reg, u8 *value, u8 size);
20int prcmu_set_ape_opp(enum prcmu_ape_opp opp);
21int prcmu_set_cpu_opp(enum prcmu_cpu_opp opp);
22int prcmu_set_ape_cpu_opps(enum prcmu_ape_opp ape_opp,
23 enum prcmu_cpu_opp cpu_opp);
24int prcmu_get_ape_opp(void);
25int prcmu_get_cpu_opp(void);
26bool prcmu_has_arm_maxopp(void);
15 27
16#endif /* __MACH_PRCMU_H */ 28#endif /* __MACH_PRCMU_H */