diff options
Diffstat (limited to 'arch/arm')
| -rw-r--r-- | arch/arm/mach-tegra/platsmp.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c index 1a208dbf682f..96ed1718eef0 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include "fuse.h" | 31 | #include "fuse.h" |
| 32 | #include "flowctrl.h" | 32 | #include "flowctrl.h" |
| 33 | #include "reset.h" | 33 | #include "reset.h" |
| 34 | #include "tegra_cpu_car.h" | ||
| 34 | 35 | ||
| 35 | extern void tegra_secondary_startup(void); | 36 | extern void tegra_secondary_startup(void); |
| 36 | 37 | ||
| @@ -38,17 +39,6 @@ static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE); | |||
| 38 | 39 | ||
| 39 | #define EVP_CPU_RESET_VECTOR \ | 40 | #define EVP_CPU_RESET_VECTOR \ |
| 40 | (IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100) | 41 | (IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100) |
| 41 | #define CLK_RST_CONTROLLER_CLK_CPU_CMPLX \ | ||
| 42 | (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x4c) | ||
| 43 | #define CLK_RST_CONTROLLER_RST_CPU_CMPLX_SET \ | ||
| 44 | (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x340) | ||
| 45 | #define CLK_RST_CONTROLLER_RST_CPU_CMPLX_CLR \ | ||
| 46 | (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x344) | ||
| 47 | #define CLK_RST_CONTROLLER_CLK_CPU_CMPLX_CLR \ | ||
| 48 | (IO_ADDRESS(TEGRA_CLK_RESET_BASE) + 0x34c) | ||
| 49 | |||
| 50 | #define CPU_CLOCK(cpu) (0x1<<(8+cpu)) | ||
| 51 | #define CPU_RESET(cpu) (0x1111ul<<(cpu)) | ||
| 52 | 42 | ||
| 53 | void __cpuinit platform_secondary_init(unsigned int cpu) | 43 | void __cpuinit platform_secondary_init(unsigned int cpu) |
| 54 | { | 44 | { |
| @@ -63,13 +53,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
| 63 | 53 | ||
| 64 | static int tegra20_power_up_cpu(unsigned int cpu) | 54 | static int tegra20_power_up_cpu(unsigned int cpu) |
| 65 | { | 55 | { |
| 66 | u32 reg; | ||
| 67 | |||
| 68 | /* Enable the CPU clock. */ | 56 | /* Enable the CPU clock. */ |
| 69 | reg = readl(CLK_RST_CONTROLLER_CLK_CPU_CMPLX); | 57 | tegra_enable_cpu_clock(cpu); |
| 70 | writel(reg & ~CPU_CLOCK(cpu), CLK_RST_CONTROLLER_CLK_CPU_CMPLX); | ||
| 71 | barrier(); | ||
| 72 | reg = readl(CLK_RST_CONTROLLER_CLK_CPU_CMPLX); | ||
| 73 | 58 | ||
| 74 | /* Clear flow controller CSR. */ | 59 | /* Clear flow controller CSR. */ |
| 75 | flowctrl_write_cpu_csr(cpu, 0); | 60 | flowctrl_write_cpu_csr(cpu, 0); |
| @@ -79,7 +64,6 @@ static int tegra20_power_up_cpu(unsigned int cpu) | |||
| 79 | 64 | ||
| 80 | static int tegra30_power_up_cpu(unsigned int cpu) | 65 | static int tegra30_power_up_cpu(unsigned int cpu) |
| 81 | { | 66 | { |
| 82 | u32 reg; | ||
| 83 | int ret, pwrgateid; | 67 | int ret, pwrgateid; |
| 84 | unsigned long timeout; | 68 | unsigned long timeout; |
| 85 | 69 | ||
| @@ -103,8 +87,7 @@ static int tegra30_power_up_cpu(unsigned int cpu) | |||
| 103 | } | 87 | } |
| 104 | 88 | ||
| 105 | /* CPU partition is powered. Enable the CPU clock. */ | 89 | /* CPU partition is powered. Enable the CPU clock. */ |
| 106 | writel(CPU_CLOCK(cpu), CLK_RST_CONTROLLER_CLK_CPU_CMPLX_CLR); | 90 | tegra_enable_cpu_clock(cpu); |
| 107 | reg = readl(CLK_RST_CONTROLLER_CLK_CPU_CMPLX_CLR); | ||
| 108 | udelay(10); | 91 | udelay(10); |
| 109 | 92 | ||
| 110 | /* Remove I/O clamps. */ | 93 | /* Remove I/O clamps. */ |
| @@ -128,8 +111,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
| 128 | * via the flow controller). This will have no effect on first boot | 111 | * via the flow controller). This will have no effect on first boot |
| 129 | * of the CPU since it should already be in reset. | 112 | * of the CPU since it should already be in reset. |
| 130 | */ | 113 | */ |
| 131 | writel(CPU_RESET(cpu), CLK_RST_CONTROLLER_RST_CPU_CMPLX_SET); | 114 | tegra_put_cpu_in_reset(cpu); |
| 132 | dmb(); | ||
| 133 | 115 | ||
| 134 | /* | 116 | /* |
| 135 | * Unhalt the CPU. If the flow controller was used to power-gate the | 117 | * Unhalt the CPU. If the flow controller was used to power-gate the |
| @@ -155,8 +137,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
| 155 | goto done; | 137 | goto done; |
| 156 | 138 | ||
| 157 | /* Take the CPU out of reset. */ | 139 | /* Take the CPU out of reset. */ |
| 158 | writel(CPU_RESET(cpu), CLK_RST_CONTROLLER_RST_CPU_CMPLX_CLR); | 140 | tegra_cpu_out_of_reset(cpu); |
| 159 | wmb(); | ||
| 160 | done: | 141 | done: |
| 161 | return status; | 142 | return status; |
| 162 | } | 143 | } |
