]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00180930 [MX6]Fix low bus mode bug when there is no CPUFreq change
authorAnson Huang <b20788@freescale.com>
Tue, 12 Jun 2012 10:50:42 +0000 (18:50 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:12:05 +0000 (14:12 +0200)
If the CPUFreq change is done before enabling low bus freq driver,
the bus freq will be staying at high freq until there is new request
of entering low bus freq. So we need to put the bus freq into low
point if all the conditions are met when we enable bus freq.

Signed-off-by: Anson Huang <b20788@freescale.com>
arch/arm/mach-mx6/bus_freq.c

index 36a8190dd812ee77356c2623605648f5af579bef..c7f8fef30923de8c549b18197f3025112429e1b1 100644 (file)
@@ -322,6 +322,10 @@ static ssize_t bus_freq_scaling_enable_store(struct device *dev,
        if (strncmp(buf, "1", 1) == 0) {
                bus_freq_scaling_is_active = 1;
                set_high_bus_freq(0);
+               /* Make sure system can enter low bus mode if it should be in
+               low bus mode */
+               if (low_freq_bus_used() && !low_bus_freq_mode)
+                       set_low_bus_freq();
        } else if (strncmp(buf, "0", 1) == 0) {
                if (bus_freq_scaling_is_active)
                        set_high_bus_freq(1);