From b36ab9754efbd7429d214b3b03dc9843882571bd Mon Sep 17 00:00:00 2001 From: Peter De Schrijver Date: Fri, 10 Feb 2012 01:47:45 +0200 Subject: ARM: tegra: rework Tegra secondary CPU core bringup Prepare the Tegra secondary CPU core bringup code for other Tegra variants. The reset handler is also generalized to allow for future introduction of powersaving modes which turn off the CPU cores. Based on work by: Scott Williams Chris Johnson Colin Cross Signed-off-by: Peter De Schrijver Acked-by: Stephen Warren Tested-by: Stephen Warren Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/include/mach/iomap.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/mach-tegra/include') diff --git a/arch/arm/mach-tegra/include/mach/iomap.h b/arch/arm/mach-tegra/include/mach/iomap.h index 67644c905d8e..cff672a344f4 100644 --- a/arch/arm/mach-tegra/include/mach/iomap.h +++ b/arch/arm/mach-tegra/include/mach/iomap.h @@ -113,6 +113,9 @@ #define TEGRA_AHB_GIZMO_BASE 0x6000C004 #define TEGRA_AHB_GIZMO_SIZE 0x10C +#define TEGRA_SB_BASE 0x6000C200 +#define TEGRA_SB_SIZE 256 + #define TEGRA_STATMON_BASE 0x6000C400 #define TEGRA_STATMON_SIZE SZ_1K -- cgit v1.2.2 From 8f5d6f1b46df37ad3eea8f4e09bbe4bbe1bfc6c3 Mon Sep 17 00:00:00 2001 From: Peter De Schrijver Date: Fri, 10 Feb 2012 01:47:46 +0200 Subject: ARM: tegra: prepare powergate.c for multiple variants Prepare the powergating code for other Tegra variants which have a different number of powerdomains. Signed-off-by: Peter De Schrijver Acked-by: Stephen Warren Tested-by: Stephen Warren Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/include/mach/powergate.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-tegra/include') diff --git a/arch/arm/mach-tegra/include/mach/powergate.h b/arch/arm/mach-tegra/include/mach/powergate.h index 39c396d2ddb0..36846dc6e8ef 100644 --- a/arch/arm/mach-tegra/include/mach/powergate.h +++ b/arch/arm/mach-tegra/include/mach/powergate.h @@ -27,7 +27,6 @@ #define TEGRA_POWERGATE_VDEC 4 #define TEGRA_POWERGATE_L2 5 #define TEGRA_POWERGATE_MPE 6 -#define TEGRA_NUM_POWERGATE 7 int tegra_powergate_power_on(int id); int tegra_powergate_power_off(int id); -- cgit v1.2.2 From 6ac8cb5c213a3f3cfc243ef2f635794bd4b55c60 Mon Sep 17 00:00:00 2001 From: Peter De Schrijver Date: Fri, 10 Feb 2012 01:47:47 +0200 Subject: ARM: tegra: export tegra_powergate_is_powered() Export tegra_powergate_is_powered(). This function will be used by the Tegra30 code to bringup secondary CPU cores. Signed-off-by: Peter De Schrijver Acked-by: Stephen Warren Tested-by: Stephen Warren Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/include/mach/powergate.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-tegra/include') diff --git a/arch/arm/mach-tegra/include/mach/powergate.h b/arch/arm/mach-tegra/include/mach/powergate.h index 36846dc6e8ef..0ec8ce1cbd22 100644 --- a/arch/arm/mach-tegra/include/mach/powergate.h +++ b/arch/arm/mach-tegra/include/mach/powergate.h @@ -28,6 +28,7 @@ #define TEGRA_POWERGATE_L2 5 #define TEGRA_POWERGATE_MPE 6 +int tegra_powergate_is_powered(int id); int tegra_powergate_power_on(int id); int tegra_powergate_power_off(int id); int tegra_powergate_remove_clamping(int id); -- cgit v1.2.2 From 6cafa97d3ca6a480dc39e20bb2d12ec2c5ca025e Mon Sep 17 00:00:00 2001 From: Peter De Schrijver Date: Fri, 10 Feb 2012 01:47:48 +0200 Subject: ARM: tegra: add support for Tegra30 powerdomains Add support for the new powerdomains in Tegra30 such as extra CPU cores and the SATA domain. Signed-off-by: Peter De Schrijver Acked-by: Stephen Warren Tested-by: Stephen Warren Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/include/mach/powergate.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/mach-tegra/include') diff --git a/arch/arm/mach-tegra/include/mach/powergate.h b/arch/arm/mach-tegra/include/mach/powergate.h index 0ec8ce1cbd22..ca41186a545f 100644 --- a/arch/arm/mach-tegra/include/mach/powergate.h +++ b/arch/arm/mach-tegra/include/mach/powergate.h @@ -27,6 +27,16 @@ #define TEGRA_POWERGATE_VDEC 4 #define TEGRA_POWERGATE_L2 5 #define TEGRA_POWERGATE_MPE 6 +#define TEGRA_POWERGATE_HEG 7 +#define TEGRA_POWERGATE_SATA 8 +#define TEGRA_POWERGATE_CPU1 9 +#define TEGRA_POWERGATE_CPU2 10 +#define TEGRA_POWERGATE_CPU3 11 +#define TEGRA_POWERGATE_CELP 12 +#define TEGRA_POWERGATE_3D1 13 + +#define TEGRA_POWERGATE_CPU0 TEGRA_POWERGATE_CPU +#define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D int tegra_powergate_is_powered(int id); int tegra_powergate_power_on(int id); -- cgit v1.2.2 From 65fe31da5cede3597938b0f3bba99f604369018d Mon Sep 17 00:00:00 2001 From: Peter De Schrijver Date: Fri, 10 Feb 2012 01:47:49 +0200 Subject: ARM: tegra: support for Tegra30 CPU powerdomains Secondary CPU powerdomains can be powergated on Tegra30. Add the necessary functions to do this. This will be used to boot the secondary CPUs later on. Signed-off-by: Peter De Schrijver Acked-by: Stephen Warren Tested-by: Stephen Warren Signed-off-by: Olof Johansson --- arch/arm/mach-tegra/include/mach/powergate.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/arm/mach-tegra/include') diff --git a/arch/arm/mach-tegra/include/mach/powergate.h b/arch/arm/mach-tegra/include/mach/powergate.h index ca41186a545f..4752b1a68f35 100644 --- a/arch/arm/mach-tegra/include/mach/powergate.h +++ b/arch/arm/mach-tegra/include/mach/powergate.h @@ -38,6 +38,9 @@ #define TEGRA_POWERGATE_CPU0 TEGRA_POWERGATE_CPU #define TEGRA_POWERGATE_3D0 TEGRA_POWERGATE_3D +int __init tegra_powergate_init(void); + +int tegra_cpu_powergate_id(int cpuid); int tegra_powergate_is_powered(int id); int tegra_powergate_power_on(int id); int tegra_powergate_power_off(int id); -- cgit v1.2.2