ARM: bL_switcher: add kernel cmdline param to disable the switcher on boot
authorNicolas Pitre <nicolas.pitre@linaro.org>
Thu, 22 Nov 2012 18:33:35 +0000 (13:33 -0500)
committerNicolas Pitre <nicolas.pitre@linaro.org>
Wed, 19 Jun 2013 20:54:23 +0000 (16:54 -0400)
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>
arch/arm/common/bL_switcher.c

index 31ca04c0ab4994599785d2d02cbef39441a190c8..f9b6b4607ba5fd8e59bcc5d80f592f483777e18c 100644 (file)
@@ -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();