CPU hotplug, writeback: Don't call writeback_set_ratelimit() too often during hotplug

The CPU hotplug callback related to writeback calls writeback_set_ratelimit()
during every state change in the hotplug sequence. This is unnecessary
since num_online_cpus() changes only once during the entire hotplug operation.

So invoke the function only once per hotplug, thereby avoiding the
unnecessary repetition of those costly calculations.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: flar2 <asegaert@gmail.com>
GCC 4.7 fixes
cpufreq: remove cpuboost for test
SELinux: include definition of new capabilities

The kernel has added CAP_WAKE_ALARM and CAP_EPOLLWAKEUP.  We need to
define these in SELinux so they can be mediated by policy.

Change-Id: I8a3e0db15ec5f4eb05d455a57e8446a8c2b484c2
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
[sds: rename epollwakeup to block_suspend to match upstream merge]
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: flar2 <asegaert@gmail.com>
USB: msm_otg: Fix host mode suspend bug

Capturing BSV bit before ID test msm_otg_set_vbus_state()
is leading to return suspend call without entering
USB into LPM. In host mode since there is no need for
BSV check, clear the BSV bit so that USB suspend can
go through.

This happens when a target enters host mode with no devices
attached, USB OTG will never enter LPM, as the BSV bit will
always be set.

CRs-Fixed: 493539
Change-Id: I491b7ec058e799ca4e9aa6b34c44ea1908e8dbf0
Signed-off-by: Sujeet Kumar <ksujeet@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
USB: msm_otg: Correct USB PHY Reset sequence on newer platform

On few legacy platforms, USB PHY is having dedicated reset clk.
It is used to reset USB PHY after putting USB PHY into low power
mode and for calibration of USB PHY. Putting USB PHY into low
power mode is causing ulpi read/write timeout as expected USB PHY
reset clk is not available on newer platform. Hence remove USB PHY
reset clk usage and related reset code.

For 28nm PHY, Reset USB PHY after resestting USB LINK. Also reset
USB PHY using USB_PHY_PON bit with USB_OTG_HS_PHY_CTRL register
after programming USB PHY Override registers as suggested with
hardware programming guidelines. Also debug out important USB
register when ulpi read/write timeout is seen with USB PHY.

CRs-Fixed: 511102
CRs-Fixed: 511397
Change-Id: I8f0f49211a64aa6eac7643cd91a652aed40132e3
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
usb: gadget: ci13xxx_udc: pass platform data from msm_otg driver

This change fixes the way ci13xxx_msm driver is probed. The
driver will not be created by device tree, but will be created
by the msm_otg.

Change-Id: I82f9b0ccb601f12364c3b6e3c681dc607d3f9af5
Signed-off-by: Amit Blay <ablay@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Revert "USB: gadget: Add support to enable streaming mode with required function"

This reverts commit 48b7705f1afb99233bb0f30712f31404294f2549.
usb: gadget: Add link power management support

Link Power Management (a.k.a. L1) is similar to the existing usb bus
suspend/resume/remote-wakeup, but has transitional latencies of tens
of microseconds between power states (instead of three to greater than
20 millisecond latencies of the USB 2.0 suspend/resume).

Change-Id: I8ae493534702e658c24f384a6b705b08e9ea9d05
Signed-off-by: Shimrit Malichi <smalichi@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
USB: gadget: Add support to enable streaming mode with required function

Supported different usb functions' has different throughput requirement.
USB controller supports streaming mode feature which enables double
buffering scheme on both IN and OUT endpoint, and reduces number of
NAKs for IN transfer. Hence noticeble throughput is increased with it.
Currently streaming mode is disable with USB controller. As supported
usb functions'like mtp, rndis are required to have higher throughput.
Add support which allows to enable streaming mode with usb controller
in device mode when particular function based composition is being enabled.

CRs-Fixed: 550553
Change-Id: Ibf6f3dc3f3b821647ba9beb15ed735a85c8ed586
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>