diff options
Diffstat (limited to 'arch/arm/common')
-rw-r--r-- | arch/arm/common/mcpm_entry.c | 6 | ||||
-rw-r--r-- | arch/arm/common/sharpsl_param.c | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c index 370236dd1a03..990250965f2c 100644 --- a/arch/arm/common/mcpm_entry.c +++ b/arch/arm/common/mcpm_entry.c | |||
@@ -51,7 +51,8 @@ void mcpm_cpu_power_down(void) | |||
51 | { | 51 | { |
52 | phys_reset_t phys_reset; | 52 | phys_reset_t phys_reset; |
53 | 53 | ||
54 | BUG_ON(!platform_ops); | 54 | if (WARN_ON_ONCE(!platform_ops || !platform_ops->power_down)) |
55 | return; | ||
55 | BUG_ON(!irqs_disabled()); | 56 | BUG_ON(!irqs_disabled()); |
56 | 57 | ||
57 | /* | 58 | /* |
@@ -93,7 +94,8 @@ void mcpm_cpu_suspend(u64 expected_residency) | |||
93 | { | 94 | { |
94 | phys_reset_t phys_reset; | 95 | phys_reset_t phys_reset; |
95 | 96 | ||
96 | BUG_ON(!platform_ops); | 97 | if (WARN_ON_ONCE(!platform_ops || !platform_ops->suspend)) |
98 | return; | ||
97 | BUG_ON(!irqs_disabled()); | 99 | BUG_ON(!irqs_disabled()); |
98 | 100 | ||
99 | /* Very similar to mcpm_cpu_power_down() */ | 101 | /* Very similar to mcpm_cpu_power_down() */ |
diff --git a/arch/arm/common/sharpsl_param.c b/arch/arm/common/sharpsl_param.c index d56c932580eb..025f6ce38596 100644 --- a/arch/arm/common/sharpsl_param.c +++ b/arch/arm/common/sharpsl_param.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/string.h> | 16 | #include <linux/string.h> |
17 | #include <asm/mach/sharpsl_param.h> | 17 | #include <asm/mach/sharpsl_param.h> |
18 | #include <asm/memory.h> | ||
18 | 19 | ||
19 | /* | 20 | /* |
20 | * Certain hardware parameters determined at the time of device manufacture, | 21 | * Certain hardware parameters determined at the time of device manufacture, |
@@ -25,8 +26,10 @@ | |||
25 | */ | 26 | */ |
26 | #ifdef CONFIG_ARCH_SA1100 | 27 | #ifdef CONFIG_ARCH_SA1100 |
27 | #define PARAM_BASE 0xe8ffc000 | 28 | #define PARAM_BASE 0xe8ffc000 |
29 | #define param_start(x) (void *)(x) | ||
28 | #else | 30 | #else |
29 | #define PARAM_BASE 0xa0000a00 | 31 | #define PARAM_BASE 0xa0000a00 |
32 | #define param_start(x) __va(x) | ||
30 | #endif | 33 | #endif |
31 | #define MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 ) | ( b << 8 ) | a ) | 34 | #define MAGIC_CHG(a,b,c,d) ( ( d << 24 ) | ( c << 16 ) | ( b << 8 ) | a ) |
32 | 35 | ||
@@ -41,7 +44,7 @@ EXPORT_SYMBOL(sharpsl_param); | |||
41 | 44 | ||
42 | void sharpsl_save_param(void) | 45 | void sharpsl_save_param(void) |
43 | { | 46 | { |
44 | memcpy(&sharpsl_param, (void *)PARAM_BASE, sizeof(struct sharpsl_param_info)); | 47 | memcpy(&sharpsl_param, param_start(PARAM_BASE), sizeof(struct sharpsl_param_info)); |
45 | 48 | ||
46 | if (sharpsl_param.comadj_keyword != COMADJ_MAGIC) | 49 | if (sharpsl_param.comadj_keyword != COMADJ_MAGIC) |
47 | sharpsl_param.comadj=-1; | 50 | sharpsl_param.comadj=-1; |