mach-exynos: stand-hotplug:  Don't ever hotplug out cpu 0

Temporary workaround for oddball "faint of death" behavior

This behavior occurs when screen-off SetCPU profiles are used
and causes:
"cpu0 turnning off" in dmesg, followed by a device
that is on (sound plays, ADB works, answers pings)
but is not usable (screen will not turn on), and is wakelocked

Signed-off-by: Andrew Dodd <atd7@cornell.edu>
cm3663: fix proximity initial value
exynos4: Disable SW downclock in cpuidle

The Samsung 3.0.x source includes a new exynos4 feature:
reducing CPU clock when in idle.  However, this seems
pointless as the CPU clock gets gated in this state anyway.

Also, the logic for doing this seems to sometimes hang,
as there are occasional cases of the RCU stall detector
going off due to CPU1 getting stuck in exynos4_enter_idle()

This issue seems to go away when disabling the SW downclock
feature with not much negative effect on battery, so disable
it for now until it can be revisited.

Signed-off-by: Andrew Dodd <atd7@cornell.edu>
Revert "exynos4: Disable SW downclock in cpuidle"

This reverts commit 23f4663367ae9bdb746500703cbaeaf3bd2a0093.

I FAIL.  It turns out that I had accidentally disabled SetCPU
profile support when I implemented this patch.  After reenabling
it, I still see RCU stalls.

It turns out this is a known issue in mainline, so implementing a
proper fix.

Signed-off-by: Andrew Dodd <atd7@cornell.edu>
arm: SMP: Fix RCU stalls due to mis-backported upstream patch

Original commit message by gokhanmoral:
missing irq_enter/irq_exit wrap around ipi_timer() after backporting of
"ARM: fix rcu stalls on SMP platforms" from Russell King.

Notes from Andrew Dodd:
Samsung backported the aforementioned patch, available here:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=7deabca0acfe02b8e18f59a4c95676012f49a304

However, 3.0.x has an additional ipi_timer() that needs to be wrapped
with irq_enter()/irq_exit(), this patch adds these.

Signed-off-by: Andrew Dodd <atd7@cornell.edu>
Merge branch 'master' into entropy_kernel_main
mali: 3-step GPU DVFS control

Based on gokhanmoral's patch at:
https://github.com/gokhanmoral/siyahkernel3/commit/ad613cfea890fd52b3b7cd174bbe06463f6a1f39

With the following changes:
The second step in mali_dvfs (freq) should always be 1000000 for 1 MHz.  It is
not a voltage
Setup down threshold logic to be a target threshold - instead of being percentage
of current load, it is the desired percentage of load at the lower frequency.
This eliminates needing to think about whether your down_threshold will
be greater than 100% load at the new frequency.

Signed-off-by: Andrew Dodd <atd7@cornell.edu>
gpu voltage, clock and stepcount interfaces
exynos4: hotplug: Gingerbread legacy hotplug

It seems like the existing hotplug algorithms in the ICS kernel
are not quite mature enough for production yet.  See all the hackery
needed to not get stand-hotplug to turn off the boot CPU...

This forward-ports a tuned version of the Gingerbread legacy
hotplug algorithm (includes support for screen-off profiles and
minimum hotplug frequency).

Change-Id: I22a999202e752308446244c272b23960a7b108ee
Signed-off-by: Andrew Dodd <atd7@cornell.edu>
smb136: Remove mach/gpio-p2.h include

Mach-specific includes are handled by the build system - this
conflicts with mach-q1.h

Change-Id: I04889e874720d5642991a85b6d0433fd9cba634f
wacom: Fix build error

This was most likely bombing due to a more strict compiler,
claiming that the value ret may be used uninitialized.  (In
this context, it can't be for the line number in question -
but let's initialize it to default to error anyway.)

Change-Id: Id9f6631bd1dd52d59371ea54776943149567dde9
Signed-off-by: Andrew Dodd <atd7@cornell.edu>
config: Enable GPU clock control and legacy hotplug