aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2012-11-22 13:33:35 -0500
committerNicolas Pitre <nicolas.pitre@linaro.org>2013-05-13 19:03:33 -0400
commit7ce9825b9e6fbc9654a473398d254fab0f1ecf85 (patch)
treee44fbedc3f5f513afdd501f3e2649bf2cf9c5bad
parentd817391afff22c9686bcad31ad13fdde2b134773 (diff)
ARM: bL_switcher: add kernel cmdline param to disable the switcher on boot
By adding no_bL_switcher to the kernel cmdline string, the switcher won't be activated automatically at boot time. It is still possible to activate it later with: echo 1 > /sys/kernel/bL_switcher/active Signed-off-by: Nicolas Pitre <nico@linaro.org>
-rw-r--r--arch/arm/common/bL_switcher.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/common/bL_switcher.c b/arch/arm/common/bL_switcher.c
index efff948eecb..00a4ce23d91 100644
--- a/arch/arm/common/bL_switcher.c
+++ b/arch/arm/common/bL_switcher.c
@@ -26,6 +26,7 @@
#include <linux/string.h>
#include <linux/sysfs.h>
#include <linux/irqchip/arm-gic.h>
+#include <linux/moduleparam.h>
#include <asm/smp_plat.h>
#include <asm/cacheflush.h>
@@ -529,6 +530,9 @@ static int __init bL_switcher_sysfs_init(void)
#endif /* CONFIG_SYSFS */
+static bool no_bL_switcher;
+core_param(no_bL_switcher, no_bL_switcher, bool, 0644);
+
static int __init bL_switcher_init(void)
{
int ret;
@@ -538,9 +542,11 @@ static int __init bL_switcher_init(void)
return -EINVAL;
}
- ret = bL_switcher_enable();
- if (ret)
- return ret;
+ if (!no_bL_switcher) {
+ ret = bL_switcher_enable();
+ if (ret)
+ return ret;
+ }
#ifdef CONFIG_SYSFS
ret = bL_switcher_sysfs_init();