diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/common/bL_switcher.c | 6 | ||||
-rw-r--r-- | arch/arm/common/mcpm_entry.c | 5 | ||||
-rw-r--r-- | arch/arm/include/asm/mcpm.h | 7 |
3 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c index 5774b6ea7ad5..f01c0ee0c87e 100644 --- a/arch/arm/common/bL_switcher.c +++ b/arch/arm/common/bL_switcher.c | |||
@@ -797,10 +797,8 @@ static int __init bL_switcher_init(void) | |||
797 | { | 797 | { |
798 | int ret; | 798 | int ret; |
799 | 799 | ||
800 | if (MAX_NR_CLUSTERS != 2) { | 800 | if (!mcpm_is_available()) |
801 | pr_err("%s: only dual cluster systems are supported\n", __func__); | 801 | return -ENODEV; |
802 | return -EINVAL; | ||
803 | } | ||
804 | 802 | ||
805 | cpu_notifier(bL_switcher_hotplug_callback, 0); | 803 | cpu_notifier(bL_switcher_hotplug_callback, 0); |
806 | 804 | ||
diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c index 1e361abc29eb..86fd60fefbc9 100644 --- a/arch/arm/common/mcpm_entry.c +++ b/arch/arm/common/mcpm_entry.c | |||
@@ -48,6 +48,11 @@ int __init mcpm_platform_register(const struct mcpm_platform_ops *ops) | |||
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
50 | 50 | ||
51 | bool mcpm_is_available(void) | ||
52 | { | ||
53 | return (platform_ops) ? true : false; | ||
54 | } | ||
55 | |||
51 | int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster) | 56 | int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster) |
52 | { | 57 | { |
53 | if (!platform_ops) | 58 | if (!platform_ops) |
diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h index 608516ebabfe..a5ff410dcdb6 100644 --- a/arch/arm/include/asm/mcpm.h +++ b/arch/arm/include/asm/mcpm.h | |||
@@ -54,6 +54,13 @@ void mcpm_set_early_poke(unsigned cpu, unsigned cluster, | |||
54 | */ | 54 | */ |
55 | 55 | ||
56 | /** | 56 | /** |
57 | * mcpm_is_available - returns whether MCPM is initialized and available | ||
58 | * | ||
59 | * This returns true or false accordingly. | ||
60 | */ | ||
61 | bool mcpm_is_available(void); | ||
62 | |||
63 | /** | ||
57 | * mcpm_cpu_power_up - make given CPU in given cluster runable | 64 | * mcpm_cpu_power_up - make given CPU in given cluster runable |
58 | * | 65 | * |
59 | * @cpu: CPU number within given cluster | 66 | * @cpu: CPU number within given cluster |