diff options
| author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2014-07-18 15:45:02 -0400 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2014-07-19 17:59:24 -0400 |
| commit | 7310d99ffcd15abe6c4168c36bb63a8e7dee617a (patch) | |
| tree | e01ceaf4f418c808001741951c09cf7f4b89eaf8 | |
| parent | 4e9816d012dbc28dc89559261c6ffbf8ffc440dd (diff) | |
ARM: EXYNOS: Fix build breakge with PM_SLEEP=n
Fix building of exynos_defconfig with disabled PM_SLEEP:
CONFIG_PM_SLEEP=n
CONFIG_PM_SLEEP_SMP=n
CONFIG_SUSPEND=n
by moving functions for power up/down of CPU and cluster to platsmp.c
The build error messages:
arch/arm/mach-exynos/built-in.o: In function `exynos_boot_secondary':
arch/arm/mach-exynos/platsmp.c:111: undefined reference to `exynos_cpu_power_state'
arch/arm/mach-exynos/platsmp.c:112: undefined reference to `exynos_cpu_power_up'
arch/arm/mach-exynos/platsmp.c:116: undefined reference to `exynos_cpu_power_state'
make: *** [vmlinux] Error 1
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>,
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
| -rw-r--r-- | arch/arm/mach-exynos/platsmp.c | 66 | ||||
| -rw-r--r-- | arch/arm/mach-exynos/pm.c | 66 |
2 files changed, 66 insertions, 66 deletions
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 1c8d31e39520..29500da24dd5 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c | |||
| @@ -32,6 +32,72 @@ | |||
| 32 | 32 | ||
| 33 | extern void exynos4_secondary_startup(void); | 33 | extern void exynos4_secondary_startup(void); |
| 34 | 34 | ||
| 35 | /** | ||
| 36 | * exynos_core_power_down : power down the specified cpu | ||
| 37 | * @cpu : the cpu to power down | ||
| 38 | * | ||
| 39 | * Power down the specified cpu. The sequence must be finished by a | ||
| 40 | * call to cpu_do_idle() | ||
| 41 | * | ||
| 42 | */ | ||
| 43 | void exynos_cpu_power_down(int cpu) | ||
| 44 | { | ||
| 45 | __raw_writel(0, EXYNOS_ARM_CORE_CONFIGURATION(cpu)); | ||
| 46 | } | ||
| 47 | |||
| 48 | /** | ||
| 49 | * exynos_cpu_power_up : power up the specified cpu | ||
| 50 | * @cpu : the cpu to power up | ||
| 51 | * | ||
| 52 | * Power up the specified cpu | ||
| 53 | */ | ||
| 54 | void exynos_cpu_power_up(int cpu) | ||
| 55 | { | ||
| 56 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, | ||
| 57 | EXYNOS_ARM_CORE_CONFIGURATION(cpu)); | ||
| 58 | } | ||
| 59 | |||
| 60 | /** | ||
| 61 | * exynos_cpu_power_state : returns the power state of the cpu | ||
| 62 | * @cpu : the cpu to retrieve the power state from | ||
| 63 | * | ||
| 64 | */ | ||
| 65 | int exynos_cpu_power_state(int cpu) | ||
| 66 | { | ||
| 67 | return (__raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) & | ||
| 68 | S5P_CORE_LOCAL_PWR_EN); | ||
| 69 | } | ||
| 70 | |||
| 71 | /** | ||
| 72 | * exynos_cluster_power_down : power down the specified cluster | ||
| 73 | * @cluster : the cluster to power down | ||
| 74 | */ | ||
| 75 | void exynos_cluster_power_down(int cluster) | ||
| 76 | { | ||
| 77 | __raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster)); | ||
| 78 | } | ||
| 79 | |||
| 80 | /** | ||
| 81 | * exynos_cluster_power_up : power up the specified cluster | ||
| 82 | * @cluster : the cluster to power up | ||
| 83 | */ | ||
| 84 | void exynos_cluster_power_up(int cluster) | ||
| 85 | { | ||
| 86 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, | ||
| 87 | EXYNOS_COMMON_CONFIGURATION(cluster)); | ||
| 88 | } | ||
| 89 | |||
| 90 | /** | ||
| 91 | * exynos_cluster_power_state : returns the power state of the cluster | ||
| 92 | * @cluster : the cluster to retrieve the power state from | ||
| 93 | * | ||
| 94 | */ | ||
| 95 | int exynos_cluster_power_state(int cluster) | ||
| 96 | { | ||
| 97 | return (__raw_readl(EXYNOS_COMMON_STATUS(cluster)) & | ||
| 98 | S5P_CORE_LOCAL_PWR_EN); | ||
| 99 | } | ||
| 100 | |||
| 35 | static inline void __iomem *cpu_boot_reg_base(void) | 101 | static inline void __iomem *cpu_boot_reg_base(void) |
| 36 | { | 102 | { |
| 37 | if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) | 103 | if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_1_1) |
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 202ca73e49c4..20a8e0efd5db 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c | |||
| @@ -100,72 +100,6 @@ static int exynos_irq_set_wake(struct irq_data *data, unsigned int state) | |||
| 100 | return -ENOENT; | 100 | return -ENOENT; |
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | /** | ||
| 104 | * exynos_core_power_down : power down the specified cpu | ||
| 105 | * @cpu : the cpu to power down | ||
| 106 | * | ||
| 107 | * Power down the specified cpu. The sequence must be finished by a | ||
| 108 | * call to cpu_do_idle() | ||
| 109 | * | ||
| 110 | */ | ||
| 111 | void exynos_cpu_power_down(int cpu) | ||
| 112 | { | ||
| 113 | __raw_writel(0, EXYNOS_ARM_CORE_CONFIGURATION(cpu)); | ||
| 114 | } | ||
| 115 | |||
| 116 | /** | ||
| 117 | * exynos_cpu_power_up : power up the specified cpu | ||
| 118 | * @cpu : the cpu to power up | ||
| 119 | * | ||
| 120 | * Power up the specified cpu | ||
| 121 | */ | ||
| 122 | void exynos_cpu_power_up(int cpu) | ||
| 123 | { | ||
| 124 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, | ||
| 125 | EXYNOS_ARM_CORE_CONFIGURATION(cpu)); | ||
| 126 | } | ||
| 127 | |||
| 128 | /** | ||
| 129 | * exynos_cpu_power_state : returns the power state of the cpu | ||
| 130 | * @cpu : the cpu to retrieve the power state from | ||
| 131 | * | ||
| 132 | */ | ||
| 133 | int exynos_cpu_power_state(int cpu) | ||
| 134 | { | ||
| 135 | return (__raw_readl(EXYNOS_ARM_CORE_STATUS(cpu)) & | ||
| 136 | S5P_CORE_LOCAL_PWR_EN); | ||
| 137 | } | ||
| 138 | |||
| 139 | /** | ||
| 140 | * exynos_cluster_power_down : power down the specified cluster | ||
| 141 | * @cluster : the cluster to power down | ||
| 142 | */ | ||
| 143 | void exynos_cluster_power_down(int cluster) | ||
| 144 | { | ||
| 145 | __raw_writel(0, EXYNOS_COMMON_CONFIGURATION(cluster)); | ||
| 146 | } | ||
| 147 | |||
| 148 | /** | ||
| 149 | * exynos_cluster_power_up : power up the specified cluster | ||
| 150 | * @cluster : the cluster to power up | ||
| 151 | */ | ||
| 152 | void exynos_cluster_power_up(int cluster) | ||
| 153 | { | ||
| 154 | __raw_writel(S5P_CORE_LOCAL_PWR_EN, | ||
| 155 | EXYNOS_COMMON_CONFIGURATION(cluster)); | ||
| 156 | } | ||
| 157 | |||
| 158 | /** | ||
| 159 | * exynos_cluster_power_state : returns the power state of the cluster | ||
| 160 | * @cluster : the cluster to retrieve the power state from | ||
| 161 | * | ||
| 162 | */ | ||
| 163 | int exynos_cluster_power_state(int cluster) | ||
| 164 | { | ||
| 165 | return (__raw_readl(EXYNOS_COMMON_STATUS(cluster)) & | ||
| 166 | S5P_CORE_LOCAL_PWR_EN); | ||
| 167 | } | ||
| 168 | |||
| 169 | #define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ | 103 | #define EXYNOS_BOOT_VECTOR_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ |
| 170 | S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ | 104 | S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ |
| 171 | (sysram_base_addr + 0x24) : S5P_INFORM0)) | 105 | (sysram_base_addr + 0x24) : S5P_INFORM0)) |
