cascardo/linux.git
11 years agos5p-mfc: Fix a bug in open and close instance cmd
Naveen krishna Chatradhi [Thu, 21 Jun 2012 04:35:37 +0000 (21:35 -0700)]
s5p-mfc: Fix a bug in open and close instance cmd

The open_instance_cmd and close_instance_cmd are working on the wrong
context number. This patch fixes the bug.

BUG=Playing bigger streams fails at gsc_m2m_try
TEST=Tested Multi instance with google test app

Change-Id: I6f216a872213ae7485939904ec14f509c427914b
Signed-off-by: Arun Kumar <arun.kk@samsung.com>
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26515
Tested-by: naveen krishna chatradhi <naveen@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
Commit-Ready: naveen krishna chatradhi <naveen@chromium.org>

11 years agoRevert "TEMP: s5p-mfc: Set display delay to 0x8"
Naveen krishna Chatradhi [Fri, 29 Jun 2012 19:11:33 +0000 (12:11 -0700)]
Revert "TEMP: s5p-mfc: Set display delay to 0x8"

Proper fix has been preposed and merged already

This reverts commit 2b06222227681b13b3c25b25fbf3fa21997e64af.

BUG=None
TEST=Verified with OMX application

Change-Id: I3fe35fdb243730a33f5f53b530424adf4f9a3da5
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26514
Tested-by: naveen krishna chatradhi <naveen@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
Commit-Ready: naveen krishna chatradhi <naveen@chromium.org>

11 years agoCHROMIUM: chromeos_laptop - Add cyapa on Parrot
Benson Leung [Tue, 26 Jun 2012 19:39:09 +0000 (12:39 -0700)]
CHROMIUM: chromeos_laptop - Add cyapa on Parrot

Add cyapa touchpad for Parrot board.

BUG=chrome-os-partner:10369
TEST=Check that cyapa comes up correctly on Parrot
with Coreboot system firmware.

Change-Id: Ie9d0560da5d8dcbfa092db41f5e80d328bc69989
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26130
Reviewed-by: Jay Kim <yongjaek@chromium.org>
11 years agoARM: exynos: Remove __initdata from smdk5250_dp_data structure
Jonathan Kliegman [Tue, 3 Jul 2012 19:12:19 +0000 (15:12 -0400)]
ARM: exynos: Remove __initdata from smdk5250_dp_data structure

platform_data structures are assumed by the exynos_dp driver to be
valid after initialization.  Remove the __initdata tag to keep
the data valid.

BUG=chrome-os-partner:11063
TEST=power_Resume test @10 iterations with no panics

Change-Id: Ifc8d38cd0150ec1116ee37310df399508c5624e1
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26696
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
11 years agomac80211: don't forget to wake queues
Ashok Nagarajan [Thu, 28 Jun 2012 07:52:30 +0000 (00:52 -0700)]
mac80211: don't forget to wake queues

This patch is written by Johannes that helps to wake tx
queues when there is a change in channel type. This could
be found from "http://p.sipsolutions.net/3e89ee42463d6cc9.txt".

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:10361
TEST=Run with new kernel on 5GHz net with invalid HT40

Change-Id: Ic730583ebd6ca65871072a9025b74574368d0280
Reviewed-on: https://gerrit.chromium.org/gerrit/26623
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agovideo: exynos: Add function to aux failures
Sean Paul [Tue, 3 Jul 2012 17:18:17 +0000 (10:18 -0700)]
video: exynos: Add function to aux failures

Add the function name to the aux transaction failure messages so we can
tell which transaction is failing.

BUG=None
TEST=Tested on snow, saw function in error.

Change-Id: Ib395c474785f06d281f23c45f27129497ec00bfb
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26687
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoath9k: fix interrupt storm due to watchdog hw reset
Rajkumar Manoharan [Mon, 2 Jul 2012 08:53:00 +0000 (14:23 +0530)]
ath9k: fix interrupt storm due to watchdog hw reset

Return IRQ_HANDLED when the hw reset is in progress
due to fatal or watchdog interrupt. Not doing so, leads to
interrupt storm.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:11037
TEST=Boot kernel with this change, observe no disconnects over
a 1 hour run.

Change-Id: Ib08cd3a3e460355336b300da46b1a820e171dab1
Reviewed-on: https://gerrit.chromium.org/gerrit/26621
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoCHROMIUM: ARM: exynos: Use 200Hz Exynos 4 and 5
Jeff Disher [Fri, 29 Jun 2012 15:15:04 +0000 (11:15 -0400)]
CHROMIUM: ARM: exynos: Use 200Hz Exynos 4 and 5

The special-case for the 200 Hz Exynos4 clock should apply for Exynos5,
as well.

TEST=checked change in tracing resolution in chrome://tracing after a
successful boot.
BUG=chrome-os-partner:10818

Change-Id: I456999135428d4aebda07eaaf46cd14527befa1d
Signed-off-by: Jeff Disher <disher@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26446
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Jeff Disher <disher@chromium.org>
Tested-by: Jeff Disher <disher@chromium.org>
11 years agoCHROMIUM: drm/i915: Adjust the down threshold.
Stéphane Marchesin [Tue, 3 Jul 2012 03:05:39 +0000 (20:05 -0700)]
CHROMIUM: drm/i915: Adjust the down threshold.

The thresholds for GPU reclocking are highly asymetrical. This creates an
interesting phenomenon on Chrome startup where the clock ramps up very
quickly, and then the blinking cursor is enough to keep it up. Obviously
having the max GPU clock on the login screen is very bad for thermals.

With this change, the clock goes back to its minimum frequency after a couple
of seconds.

BUG=chrome-os-partner:11009
TEST=checked that a blinking cursor lets the GPU clock go back to 350Mhz

Change-Id: I3b8de74864907abdb3c7c4aeb0ab4fcf2eaf0b2c
Reviewed-on: https://gerrit.chromium.org/gerrit/26641
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>

11 years agoCHROMIUM: config: exynos5 uses 200Hz scheduler
Jeff Disher [Tue, 3 Jul 2012 16:54:39 +0000 (12:54 -0400)]
CHROMIUM: config: exynos5 uses 200Hz scheduler

The special-case for the 200 Hz Exynos4 clock should apply for Exynos5,
as well.  This change corresponds to one made in Kconfig.

TEST=checked change in tracing resolution in chrome://tracing after a
successful boot.
BUG=chrome-os-partner:10818

Change-Id: Icb126ba9daf09a249099b3ca4533a108553d5d7e
Signed-off-by: Jeff Disher <disher@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26682
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Jeff Disher <disher@chromium.org>
Tested-by: Jeff Disher <disher@chromium.org>
11 years agoCHROMIUM: config: remove chromiumos-exynos5
Olof Johansson [Tue, 3 Jul 2012 03:43:26 +0000 (20:43 -0700)]
CHROMIUM: config: remove chromiumos-exynos5

Removing the Chromium OS kernel config for exynos. It's causing confusion
at this time to have two of them, we can split them later again if needed.

BUG=none
TEST=none

Change-Id: Ic640eaab773f600a75fe9654c32db36526227bcf
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26644
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: ALSA: hda - Update ca0132 driver.
Dylan Reid [Thu, 7 Jun 2012 18:19:47 +0000 (11:19 -0700)]
CHROMIUM: ALSA: hda - Update ca0132 driver.

Updated driver supports loading code to the DSP and an EQ for the
speaker.  Code provided by Creative.

BUG=chrome-os-partner:10985
TEST=build and run kernel on link.  Test audio with youtube and gtalk.

Change-Id: I7222bb577c340b27cae34238775c78a07806912b
CQ-DEPEND: Iff6805b02319cb36b9c256110c78b3b48911fb7e
CQ-DEPEND: Iae8742f8add1b4b846663dc06aba1f61005c3914
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24522
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: config - Disable CA0132.
Dylan Reid [Mon, 2 Jul 2012 03:12:24 +0000 (20:12 -0700)]
CHROMIUM: config - Disable CA0132.

Disable the ca0132 driver before merging the newer version of the
driver.  A subsequent change to chromiumos-base will add a config
fragment to turn it on based on a use flag.

Change-Id: Iff6805b02319cb36b9c256110c78b3b48911fb7e
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26548
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: zsmalloc: add MODULE_LICENSE
Luigi Semenzato [Tue, 3 Jul 2012 00:35:16 +0000 (17:35 -0700)]
CHROMIUM: zsmalloc: add MODULE_LICENSE

It won't load as a module without MODULE_LICENSE.

BUG=chromium-os:32328
TEST=modprobe zsmalloc works with this change

Change-Id: Ic62fe20816e5079d92ce1da6a9d8a9cdbc7a5074
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26627
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ARM: cros5250: Turn off pullups for i2c2
Doug Anderson [Mon, 2 Jul 2012 22:09:42 +0000 (15:09 -0700)]
CHROMIUM: ARM: cros5250: Turn off pullups for i2c2

Disabled pullups since external part has its own pullups and
double-pulling gets us out of spec in some cases.

BUG=chrome-os-partner:11039
TEST=Boot kernel and was able to still read EDID using:
 i2cdump -y -f -r 0-0xff 2 0x50

Change-Id: Iec4fb07d127658092bac33a3471c0a06b00e2872
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26607
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoexynos5: dt: Increase the speed of i2c channel 0
Abhilash Kesavan [Sun, 1 Jul 2012 05:48:21 +0000 (22:48 -0700)]
exynos5: dt: Increase the speed of i2c channel 0

The MAX77686 PMIC chip is connected to i2c0 and was running at 65KHz.
Better its performance by increasing the maximum bus speed on i2c0 to
378KHz (which is the closest possible speed to the maximum 400KHz
supported by the legacy i2c controller).

BUG=chrome-os-partner:10995
TEST=Boot Snow and see the following bootup messages:
"s3c-i2c s3c2440-i2c.0: bus frequency set to 378 KHz"
Also, ensure the MAX77686 regulator driver has completed its initial
configuration without failure.

Change-Id: I7d031ad25c6f458ebc41417f882f36b2f8b4d83a
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26540
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoexynos5: dt: Fix gpio for bluetooth on Snow/Daisy
Abhilash Kesavan [Sun, 1 Jul 2012 05:12:12 +0000 (22:12 -0700)]
exynos5: dt: Fix gpio for bluetooth on Snow/Daisy

Fix incorrect gpio line for Bluetooth in Snow/Daisy device tree.

BUG=None
TEST=Build and boot Snow

Change-Id: I0ef1718a32a29506d92b97bfc0727d8709c0a33a
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26535
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoCHROMIUM: config: Renormalize splitconfig
Doug Anderson [Mon, 2 Jul 2012 16:29:36 +0000 (09:29 -0700)]
CHROMIUM: config: Renormalize splitconfig

Just ran: ./chromeos/scripts/kernelconfig oldconfig
...and hit return for everything.  AKA: no functional change
here, this just tells us where we are.

BUG=None
TEST=Compiled and booted on one device.

Change-Id: Ibfba477842e52652c10e427a2ef56147ad326de2
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26574
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
11 years agoBACKPORT: drm/i915: add min freq control to debugfs
Stéphane Marchesin [Sat, 30 Jun 2012 01:38:38 +0000 (18:38 -0700)]
BACKPORT: drm/i915: add min freq control to debugfs

This makes for easier benchmarking and testing.  One can set a fixed
frequency by setting min and max to the same value.

v2: fix whitespace & comment (Eugeni)

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
TEST=compiled, tried setting the min frequency.
BUG=none

Change-Id: Ic3c65ea2f9853baa305f598321619e66e5a0019b
Reviewed-on: https://gerrit.chromium.org/gerrit/26521
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>

12 years agoCHROMIUM: ARM: cros5250: Turn on video_mid regulator
Anush Elangovan [Sat, 30 Jun 2012 01:08:46 +0000 (18:08 -0700)]
CHROMIUM: ARM: cros5250: Turn on video_mid regulator

Required for enabling/reading the HDMI EDID
and for HDMI hot plug

BUG=chrome-os-partner:11013
TEST=verify with new kernel image

localhost ~ # grep "video_mid" /sys/class/regulator/*/name
/sys/class/regulator/regulator.19/name:video_mid
localhost ~ # grep "" /sys/class/regulator/regulator.19/*
/sys/class/regulator/regulator.19/max_microvolts:5000000
/sys/class/regulator/regulator.19/min_microvolts:5000000
/sys/class/regulator/regulator.19/name:video_mid
/sys/class/regulator/regulator.19/num_users:0
/sys/class/regulator/regulator.19/state:enabled
/sys/class/regulator/regulator.19/type:voltage
/sys/class/regulator/regulator.19/uevent:OF_NAME=VFET2
/sys/class/regulator/regulator.19/uevent:OF_FULLNAME=/i2c@12CA0000/power-regulator/voltage-regulators/VFET2
/sys/class/regulator/regulator.19/uevent:OF_COMPATIBLE_N=0

Change-Id: I0e8fce30c74f764573806ac9b7e531ed4ef8b0a9
Signed-off-by: Anush Elangovan <anush@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26519
Commit-Ready: Anush Elangovan <anush@google.com>
Reviewed-by: Anush Elangovan <anush@google.com>
Tested-by: Anush Elangovan <anush@google.com>
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHROMIUM: config: enable interactive governor
Sam Leffler [Thu, 21 Jun 2012 17:00:56 +0000 (10:00 -0700)]
CHROMIUM: config: enable interactive governor

Include the interactive governor for testing.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=chromium-os:17379 chromium:118032
TEST=build+boot on alex+lumpy; smoke suite (had been failing due to hung task timeout issue)

Change-Id: I0031a74ac6d829410de5e1768f3c92f19677fa8f
Reviewed-on: https://gerrit.chromium.org/gerrit/25845
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
12 years agoCHROMIUM: chromeos_laptop - Add missing __init annotations
Benson Leung [Tue, 26 Jun 2012 23:08:14 +0000 (16:08 -0700)]
CHROMIUM: chromeos_laptop - Add missing __init annotations

Now that we no longer have exported functions in this driver,
we can annotate most of the other structures and functions
as __initdata or __init.

BUG=chromium-os:31877
TEST=build with CONFIG_DEBUG_SECTION_MISMATCH=y
Check no warnings in building chromeos_laptop.
Verify that touchpad and light sensors keep working on various platforms.

Change-Id: Ib412ee7f5b04de7e09194d4d26550c11acd56900
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26154
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHROMIUM: arm: config: disable CMA for exynos5 SoC
Subash Patel [Fri, 29 Jun 2012 17:31:28 +0000 (10:31 -0700)]
CHROMIUM: arm: config: disable CMA for exynos5 SoC

CMA is not needed for the chrome-daisy platform as all the IP's have
their own IOMMU's. Also, it was found that leaving CMA enabled by
default, it will affect the kernel to do the routine free page
maintainenance due to a known issue.

BUG=chrome-os-partner:10745
TEST=kernel builds, boots, and doesn't have memory-allocation
failures during chromeos-install

Signed-off-by: Subash Patel <subash.rp@samsung.com>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Change-Id: I4019aa6ebee9442f42fe4408d8788eb00dd570b2
Reviewed-on: https://gerrit.chromium.org/gerrit/26413
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Subash Patel <subash@chromium.org>
Tested-by: Subash Patel <subash@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
12 years agoCHROMIUM: ARM: dma-mapping: remove unconditional dependency on CMA
Marek Szyprowski [Wed, 30 May 2012 08:59:51 +0000 (10:59 +0200)]
CHROMIUM: ARM: dma-mapping: remove unconditional dependency on CMA

CMA has been enabled unconditionally on all ARMv6+ systems to solve the
long standing issue of double kernel mappings for all dma coherent
buffers. This however created a dependency on CONFIG_EXPERIMENTAL for
the whole ARM architecture what should be really avoided. This patch
removes this dependency and lets one use old, well-tested dma-mapping
implementation also on ARMv6+ systems without the need to use
EXPERIMENTAL stuff.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Subash Patel <subash.rp@samsung.com>
(sonnyrao: this is based on an upstream patch, but our tree has additional
patches which cause the upstream to no apply anymore, so this
is a CHROMIUM patch now)
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
BUG=chrome-os-partner:10745
TEST=kernel still builds on arm

Change-Id: I2a16e5a97796066d840c37745d67abb0f1c7a542
Reviewed-on: https://gerrit.chromium.org/gerrit/26412
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Subash Patel <subash@chromium.org>
Tested-by: Subash Patel <subash@chromium.org>
12 years agoCHROMIUM: ARM: add idle notifications
Sam Leffler [Thu, 28 Jun 2012 19:36:10 +0000 (12:36 -0700)]
CHROMIUM: ARM: add idle notifications

Add idle_notifier callbacks to cpu_idle.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=none
TEST=run with ondemand and interactive governors

Change-Id: Iff408362c753aabf731fa9f5de1622377dc29779
Reviewed-on: https://gerrit.chromium.org/gerrit/26334
Tested-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>

12 years agoCHROMIUM: cpu: add idle notifiers
Sam Leffler [Thu, 28 Jun 2012 19:29:24 +0000 (12:29 -0700)]
CHROMIUM: cpu: add idle notifiers

Promote idle_notifier_register/unregister support from x86.
Add idle_notifier_call_chain to complete encapsulation.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=none
TEST=build+boot on lumpy with ondemand and interactive governors

Change-Id: Id134d2bf5371a9f281b2f916fef861b08d8233bd
Reviewed-on: https://gerrit.chromium.org/gerrit/26333
Tested-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>

12 years agoUPSTREAM: ARM: dma-mapping: fix buffer chunk allocation order
Marek Szyprowski [Thu, 21 Jun 2012 10:50:44 +0000 (12:50 +0200)]
UPSTREAM: ARM: dma-mapping: fix buffer chunk allocation order

IOMMU-aware dma_alloc_attrs() implementation allocates buffers in
power-of-two chunks to improve performance and take advantage of large
page mappings provided by some IOMMU hardware. However current code, due
to a subtle bug, allocated those chunks in the smallest-to-largest
order, what completely killed all the advantages of using larger than
page chunks. If a 4KiB chunk has been mapped as a first chunk, the
consecutive chunks are not aligned correctly to the power-of-two which
match their size and IOMMU drivers were not able to use internal
mappings of size other than the 4KiB (largest common denominator of
alignment and chunk size).

This patch fixes this issue by changing to the correct largest-to-smallest
chunk size allocation sequence.

BUG=none (upstream fix)
TEST=none

Change-Id: Ide5256ea52f925c347fcd1a5397f5d76dc5f1e4a
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26484
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

12 years agoCHROMIUM: gsmi: enable CONFIG_GOOGLE_GSMI for x86 devices
Duncan Laurie [Fri, 29 Jun 2012 21:28:28 +0000 (14:28 -0700)]
CHROMIUM: gsmi: enable CONFIG_GOOGLE_GSMI for x86 devices

This enables kernel shutdown messages in the event log on supported
platforms.  The driver will not get loaded on unsupported platforms
as it is guarded by a SMBIOS board or BIOS vendor whitelist.

The driver no longer depends on EFI_VARS so it does not cause an
unrelated panic on systems with 64bit EFI and 32bit kernel.

Configs were re-generated with kernelconfig to ensure that no
additional dependencies are added.

BUG=chrome-os-partner:9195
TEST=manual test on link/x86_64 and alex/i686

1) Boot kernel on 64bit link and 32bit alex devices
2) Look for GSMI messages on supported link device:
localhost kernel: [    3.283713] gsmi version 1.0 loaded
3) Add an event and see that it shows up in the log:
> xxd -g 1 test-event-kernel_panic
0000000: 01 00 00 00 ad de 02 00 00 00
> cat test-event-kernel_panic > /sys/firmware/gsmi/append_to_eventlog
> mosys eventlog list | tail -1
55 | 2012-06-29 14:33:07 | Kernel Event | Panic

Change-Id: Ia66490cf46a405e9aa2cc81dadc421cd6d47c778
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26490
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHROMIUMOS: DAISY: Move lid switch DT entry to be snow-specific
Taylor Hutt [Fri, 29 Jun 2012 18:23:04 +0000 (11:23 -0700)]
CHROMIUMOS: DAISY: Move lid switch DT entry to be snow-specific

Daisy does not currently have a functional lid switch.  Without this
change, Daisy will boot up and then quickly suspend.

  [   24.540000] PM: Preparing system for mem sleep
  [   24.620000] Freezing user space processes ... (elapsed 0.00 seconds) done.
  [   24.640000] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
  [   24.660000] PM: Entering mem sleep

This change moves the lid to be only available in the snow DT.

BUG=none
TEST=Boot Daisy, and it doesn't sleep.
Signed-off-by: Taylor Hutt <thutt@chromium.org>
Change-Id: I81793f32c09c03ecf5ba079b802aac92df9231a9
Reviewed-on: https://gerrit.chromium.org/gerrit/26462
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Taylor Hutt <thutt@chromium.org>
Commit-Ready: Taylor Hutt <thutt@chromium.org>
Tested-by: naveen krishna chatradhi <naveen@chromium.org>
12 years agoCHROMIUM: ARM: exynos: add sched_clock to mct
Colin Cross [Thu, 16 Feb 2012 21:30:11 +0000 (13:30 -0800)]
CHROMIUM: ARM: exynos: add sched_clock to mct

Add a more accurate sched_clock than the default one when MCT
is used.

Signed-off-by: Colin Cross <ccross@android.com>
BUG=chrome-os-partner:10818
TEST=collect trace data and verify start+duration times are sub-10ms

Change-Id: I473e2f16a6d6bebc7df86dee32114cda23e6d553
Reviewed-on: https://gerrit.chromium.org/gerrit/26455
Tested-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Jeff Disher <disher@chromium.org>
Tested-by: Jeff Disher <disher@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Sam Leffler <sleffler@chromium.org>
12 years agodrm/exynos: wait for vsync before removing FB
Prathyush K [Tue, 26 Jun 2012 14:36:51 +0000 (20:06 +0530)]
drm/exynos: wait for vsync before removing FB

While removing a framebuffer, we wait for a vsync interrupt. This is
required if a new framebuffer has been just set and has not yet been
updated to the actual registers. In this case, if we remove the older
buffer, we get a page fault, since the older buffer is still being used.
A framebuffer can be safely removed only after receiving a vsync.

This is also required when we try to remove the current framebuffer.
FIMD gets disabled but has to wait for a vsync interrupt before the
disabling takes effect.

BUG=chrome-os-partner:10728, chrome-os-partner:10813
TEST='stop ui/pkill -9 X' and no page fault. Tested on Daisy/Snow.

Change-Id: Ib779526b7d116a8f546178e4fbd1a7d036be2771
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26382
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Commit-Ready: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
12 years agodrm/Exynos: Added disable function in exynos drm crtc
Prathyush [Fri, 6 Apr 2012 07:04:48 +0000 (16:04 +0900)]
drm/Exynos: Added disable function in exynos drm crtc

When a framebuffer which is being used by fimd is freed, the driver
tries to disable fimd first. If there is no disable function, it
suspends fimd by disabling its clocks.
This causes an issue during drm release. When the last framebuffer is
freed, fimd gets suspended. After this, fbdev mode is restored by the
driver which resumes fimd by setting the root framebuffer (created during
drm probe). When fimd's clocks are enabled, it tries to read
from the last framebuffer which was already freed. This causes a page
fault.
By adding a disable function, fimd's window is cleared during disable.
This ensures that upon being enabled again, fimd does not throw a
page fault.

BUG=chrome-os-partner:10813
TEST=Killed X manually and saw that fimd is getting disabled instead of
suspended. But there is still a page fault sometimes. Tested on snow/daisy.

Change-Id: Ief6a88d8066c58c33543801546c87f4198a57848
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26381
Reviewed-by: Anush Elangovan <anush@google.com>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
Commit-Ready: Doug Anderson <dianders@chromium.org>

12 years agoCHROMIUM: config: exynos5: enable CONFIG_MMC_DW_IDMAC
Alim Akhtar [Fri, 29 Jun 2012 11:12:53 +0000 (16:42 +0530)]
CHROMIUM: config: exynos5: enable CONFIG_MMC_DW_IDMAC

enable CONFIG_MMC_DW_IDMAC to make use of internal DMA controller of
dw_mmc controller.

BUG=chrome-os-partner:10306
TEST=builded ok, booted on snow, did a web browsing and cannt see wifi
crash.

Change-Id: I7bce46001698cc3a2252d0caaaf6cb2b144223e4
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26427
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
12 years agomwifiex: change multi-port aggregation buffer size to 4K
Alim Akhtar [Fri, 29 Jun 2012 07:20:38 +0000 (12:50 +0530)]
mwifiex: change multi-port aggregation buffer size to 4K

we were having problems with SDIO, SDIO was crashing when IDMAC of sdio
host controller (dw_mmc) is enabled. The dw_mmc driver is limited to 4K
DMA segments. Current Linux SDIO code cannot transfer more than a single
DMA segment at a time (since it only uses a single sg entry). And
mwifiex driver is using a buffer size of 8K (tx) and 16K (rx), which was
causing the SDIO over dw_mmc to crash. So now changing multi-port
aggregation buffer size to 4K, which seems to be fixing the crash with
wifi browsing.

BUG=chrome-os-partner:10306
TEST=build ok, booted on snow.
saw wifi browsing does not crash.

Change-Id: I79a3deec114c9ff544f958da18ae2aae03f40ea9
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Doug Anderson <dianders@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26426
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
12 years agoexynos: tv: hdmi: Initialize HDMI spinlock
Jeff Disher [Fri, 15 Jun 2012 17:22:27 +0000 (13:22 -0400)]
exynos: tv: hdmi: Initialize HDMI spinlock

The spinlock used by the HDMI driver was never being initialized so the
first attempt to unlock it would produce an error message and backtrace
due to "bad magic" in the lock.  The problem was actually due to the
magic field being uninitialized.

BUG=None
TEST=Booted snow to serial login and observed no backtrace or message
about bad magic (usually occurred before "hdmiphy i2c bus number = 8")

Change-Id: Ie126a1678fe1a2daaa375b01c60d4183a93b86be
Reviewed-by: Sean Paul <seanpaul@google.com>
Tested-by: Jeff Disher <disher@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jeff Disher <disher@chromium.org>
(cherry picked from commit 18d04c73e66ee7fd027f00d38f0209412a75acd0)
Reviewed-on: https://gerrit.chromium.org/gerrit/26448

12 years agogsmi: Remove autoselected dependency on EFI and EFI_VARS
Duncan Laurie [Wed, 27 Jun 2012 22:00:25 +0000 (15:00 -0700)]
gsmi: Remove autoselected dependency on EFI and EFI_VARS

Instead of selecting EFI and EFI_VARS automatically when GSMI is
enabled let that portion of the driver be conditionally compiled
if EFI and EFI_VARS are enabled.

This allows the rest of the driver (specifically event log) to
be used if EFI_VARS is not enabled.

BUG=chromium-os:32188
TEST=manual: compile and run kernel on multiple devices

1) verify that EFI_VARS is not automatically selected when
CONFIG_GOOGLE_GSMI is enabled
2) verify that the kernel boots on Link and that GSMI event log
is still available and functional
3) specifically boot the kernel on Alex to ensure it does not
try to load efivars and that gsmi also does not load because it
is not in the supported DMI table

Change-Id: I6f9149b575976316dd1d4d8ac20f2688d2208767
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26273
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agos5p-mfc: Fix the memory leak issue
Naveen krishna Chatradhi [Thu, 14 Jun 2012 01:30:04 +0000 (18:30 -0700)]
s5p-mfc: Fix the memory leak issue

The deinit hardware functions will free the ctx_buffers.
this needs to be called in release and remove.

BUG=None
TEST=Enabled memleak detection in the kernel.

Change-Id: I65f1872d9502f6a052854a2296f39d7a58ce7478
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/20610
Reviewed-by: Arun Kumar K <arun.kk@samsung.com>
Tested-by: Arun Kumar K <arun.kk@samsung.com>
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
12 years agoCHROMIUM: ARM: exynos: snow: add lid switch to dts
Olof Johansson [Tue, 26 Jun 2012 04:05:56 +0000 (21:05 -0700)]
CHROMIUM: ARM: exynos: snow: add lid switch to dts

BUG=chrome-os-partner:10861
TEST=boot, make sure system stays awake, close lid, make sure system suspends

Change-Id: I357ed42b82d428fb078cf6175ace89e343d95ff2
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20818
Reviewed-by: Doug Anderson <dianders@google.com>
Reviewed-by: <thomas.ab@samsung.com>
Tested-by: Olof Johansson <olofj@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>

12 years agogpio: samsung: add flags specifier to device-tree binding
Olof Johansson [Tue, 26 Jun 2012 03:51:36 +0000 (20:51 -0700)]
gpio: samsung: add flags specifier to device-tree binding

This adds a flags field to the gpio specifier for Samsung. I didn't
want to add yet another field in the already quite long specifier, so
I decided to compress it together with the Pull Up/Down settings instead.

This is needed to, for example, have a gpio-keys input that is active low.

BUG=chrome-os-partner:10861
TEST=boot, make sure system stays awake, close lid, make sure system suspends

Change-Id: Ia3ad27c13ab773da6d584370ac585d7c982590a5
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20819
Reviewed-by: Doug Anderson <dianders@google.com>
Reviewed-by: <thomas.ab@samsung.com>
Tested-by: Olof Johansson <olofj@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>

12 years agoCHROMIUMOS: thermal:exynos: enable HW overtemp poweroff on exynos5
Grant Grundler [Tue, 19 Jun 2012 21:52:49 +0000 (21:52 +0000)]
CHROMIUMOS: thermal:exynos: enable HW overtemp poweroff on exynos5

Based on Doug Anderson's proposal for u-boot/exynos5 support:
    https://gerrit.chromium.org/gerrit/#change,25164

The new code checks if FW enables the HW overtemp poweroff.
If so, new code verifies the kernel shutdown threshold is a
lower temp than HW thermal poweroff temp and may set the kernel
shutdown to a lower temp.

If FW did not set the HW overtemp, we now set the poweroff threshhold
to 110C (previously was the kernel shutdown threshold).

Just to be painfully clear: "Shutdown" means kernel issues "shutdown"
request which may take several seconds to poweroff gracefully.
"Poweroff" means HW will "abruptly" kill power to the system.

BUG=chrome-os-partner:9945
TEST=manual testing with heat gun and running:
while true; do md5sum /boot/* ; done

Change-Id: I93e0a3e6e301cccd9ddd939d20d632b0e01e393f
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20668
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
Reviewed-by: Grant Grundler <grundler@google.com>
Tested-by: Grant Grundler <grundler@google.com>
Commit-Ready: Grant Grundler <grundler@google.com>

12 years agos5p-mfc: Fix setting controls
Naveen krishna Chatradhi [Tue, 26 Jun 2012 18:25:51 +0000 (11:25 -0700)]
s5p-mfc: Fix setting controls

Fixed s_ctrl function when setting the following controls:
- V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER
- V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY

Change-Id: Ic8010ca925fd594df39127e69400cdd0aac8a44b
Signed-off-by: Kamil Debski <k.deb...@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.p...@samsung.com>
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/20869
Tested-by: Naveen Krishna Chatradhi <naveen@chromium.org>
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
12 years agos5p-mfc: Fixed setup of custom controls in decoder and encoder
Naveen krishna Chatradhi [Tue, 26 Jun 2012 18:22:16 +0000 (11:22 -0700)]
s5p-mfc: Fixed setup of custom controls in decoder and encoder

Fixed bugs in functions that initialize custom controls.

Change-Id: I660f07b217161434848d5e4caf2b0bcaf1b0ccdd
Signed-off-by: Kamil Debski <k.debski@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/20868
Tested-by: Naveen Krishna Chatradhi <naveen@chromium.org>
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
12 years agoCHROMIUM: cpufreq: keep freezer happy when not current governor
Sam Leffler [Wed, 27 Jun 2012 19:55:56 +0000 (12:55 -0700)]
CHROMIUM: cpufreq: keep freezer happy when not current governor

Fix a problem where the hung task mechanism was deeming the interactive
clock boost thread as hung.  This was because the thread is created at
module init but never run/woken up until needed.  If the governor is not
being used this can be forever.  To workaround this explicitly wake up
the thread once all the necessary data structures are initialized.  The
latter required some minor code shuffle.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=none
TEST=boot with default governor ondemand; leave the system idle for >120 secs (hung_timeout_task_secs)

Change-Id: Ie2c058dd75dcb6460ea10e7ac997e46baf66b1fe
Reviewed-on: https://gerrit.chromium.org/gerrit/26262
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>

12 years agoCHROMIUM: cpufreq: take idle notifications only when active
Sam Leffler [Wed, 27 Jun 2012 17:12:04 +0000 (10:12 -0700)]
CHROMIUM: cpufreq: take idle notifications only when active

Register an idle notifier only when the governor is active.  Also
short-circuit work of idle end if the governor is not enabled.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=none
TEST=add printk's to the code

Change-Id: I4cae36dd2e7389540d337d74745ffbaa0131870f
Reviewed-on: https://gerrit.chromium.org/gerrit/26261
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
12 years agoCHROMIUM: config: Switch exynos media back to static build
Olof Johansson [Thu, 28 Jun 2012 17:58:20 +0000 (10:58 -0700)]
CHROMIUM: config: Switch exynos media back to static build

Turns out builds break for modules; we have to fix that but revert back
until fixes are in.

BUG=none
TEST=build chromeos-kernel for exynos

Change-Id: Ie46bce8d0e956b80860f6bcebb5049f6396548d3
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26321
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
12 years agoCHROMIUM: Input: synaptics - add sysfs access to firmware ID & board ID
Daniel Kurtz [Tue, 19 Jun 2012 02:04:44 +0000 (10:04 +0800)]
CHROMIUM: Input: synaptics - add sysfs access to firmware ID & board ID

Allow userspace to query firmware ID and board ID, which are read and
cached during device initialization.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chrome-os-partner:7410
TEST=cat /sys/bus/serio/drivers/psmouse/serio<N>/firmware_id
TEST=cat /sys/bus/serio/drivers/psmouse/serio<N>/board_id

Change-Id: Ida67e4ac3df6c884c89b8a52be6defcf99e6a8ad
Reviewed-on: https://gerrit.chromium.org/gerrit/25595
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>

12 years agoCHROMIUM: Input: synaptics - print firmware ID and board number at init
Daniel Kurtz [Thu, 28 Jun 2012 03:37:57 +0000 (11:37 +0800)]
CHROMIUM: Input: synaptics - print firmware ID and board number at init

Read the Firmware ID and Board Number from a synaptics device at init
and display them in the system log.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chrome-os-partner:7410
TEST=grep "Touchpad model" /var/log/messages
    => look for "board Id: ###, fw Id: ###"

Change-Id: I4e191c85d11ad98266c4853232f9bd5624c4638d
Reviewed-on: https://gerrit.chromium.org/gerrit/25594
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>

12 years agoCHROMIUM: config: renormalize splitconfig
Olof Johansson [Thu, 28 Jun 2012 00:21:27 +0000 (17:21 -0700)]
CHROMIUM: config: renormalize splitconfig

Normalizing splitconfig and turning off USB_GADGET, MTD and switching some of the
v4l options to modules.

This also switches CONFIG_MEDIA_CONTROLLER to =m on exynos to keep it common with
other platforms.

Finally, it also copies over the chromeos-exynos5 config to
chromiumos-exynos5. The old tegra placeholder is no longer needed,
we can do the real thing.

BUG=chrome-os-partner:10937
TEST=none

Change-Id: Ic4bf0e27cb8291ee5b88cd27af7851aaf98855ce
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26288
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
12 years agoCHROMIUM: config: add a fully populated exynos5 config
Olof Johansson [Thu, 28 Jun 2012 00:19:37 +0000 (17:19 -0700)]
CHROMIUM: config: add a fully populated exynos5 config

This adds a fully populated (not yet split-configged) exynos5
config from the previously private tree. I'm importing this
as a separate commit to make it easier to review actual contents.

Note that this is imported as a chromeos config, not chromiumos config.
The chromiumos counterpart will be removed once the public builder has been
moved over to the other config.

BUG=chrome-os-partner:10937
TEST=none

Change-Id: I35c8b00d5242400471ce0114598f11ed614b475c
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26287
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
12 years agoCHROMIUM: config: renormalize splitconfig after exynos merge
Olof Johansson [Thu, 28 Jun 2012 00:17:49 +0000 (17:17 -0700)]
CHROMIUM: config: renormalize splitconfig after exynos merge

This just goes with defaults everywhere, exynos config will be brought in
separately.

BUG=chrome-os-partner:10937
TEST=none

Change-Id: I63699942b626cc81e6c34ca6f904b21313123cb4
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26286
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
12 years agoCHROMIUM: v4l: add compat struct members that were missing
Olof Johansson [Wed, 27 Jun 2012 23:07:23 +0000 (16:07 -0700)]
CHROMIUM: v4l: add compat struct members that were missing

v4l: add buffer exporting via dmabuf
and
v4l: Add DMABUF as a memory type

add new members to some of the v4l structs, but don't add them for
the 32-bit compat cases.  This adds the missing members to not break
compilation on 64-bit kernels.

BUG=none
TEST=build for lumpy

Change-Id: Ie4549a3be30226d276ff3898651f504f8f29a46a
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26282

12 years agoMerge branch 'chromeos-exynos-3.4' into chromeos-3.4
Olof Johansson [Wed, 27 Jun 2012 20:13:09 +0000 (13:13 -0700)]
Merge branch 'chromeos-exynos-3.4' into chromeos-3.4

* chromeos-exynos-3.4: (390 commits)
  spi: s3c64xx: Add fix for crash in spi suspend/resume
  exynos5: lcd: Free gpio in machine specific set_power callback
  gpu: vithar: To build in non debug mode
  CHROMIUM: spi: Unlock a spinlock before calling into the controller driver.
  lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table
  CHROMIUM: ARM: exynos: handle setaffinity on combined interrupts
  CHROMIUM: ARM: exynos: arm-pmu configuration through dts
  ARM: exynos: add pmu nodes to exynos5250 dts
  ARM: exynos: add cpu nodes to 5250 device tree
  arm: exynos5: dts: add TMU device node
  ARM: exynos5: add tmu clock support
  DRM: exynos: return NULL if exynos_pages_to_sg fails
  media: exynos: fix permissions on files
  drm: vithar: fix permissions on Makefiles
  CHROMIUM: ARM: Exynos5: Manually configure the chip select gpio for spidev.
  CHROMIUM: ASoC: samsung: don't configure smdk audio everywhere
  CHROMIUM: ARM: exynos: add max98095 dt entries
  CHROMIUM: ARM: enable xclkout for audio on daisy/snow
  CHROMIUM: ASoC: samsung: add daisy_max98095.c board
  CHROMIUM: ARM: exynos: Add audio clocks needed for snow(?)
  ...

Conflicts:
drivers/platform/Makefile

Change-Id: I31ce43ad7b68adb8af91e8d8a747c438b0c9afc1

12 years agoCHROMIUM: daisy: tpm: fail TPM probe if TPM is not started
Luigi Semenzato [Wed, 30 May 2012 22:09:06 +0000 (15:09 -0700)]
CHROMIUM: daisy: tpm: fail TPM probe if TPM is not started

Some versions of u-boot don't start the TPM.  We want
the probe to fail in this case.  We could start the TPM
here, but then we would have to set it up compatibly
with what vboot does (including one-time initializations),
or we would hit more confusing errors along the way.

Note: this is tested with non-vboot firmware.  I will try
to test it with vboot firmware as well, but I might hit
snags at this point and might give up.

BUG=chrome-os-partner:8921
TEST=booted with non-vboot u-boot and noted that /dev/tpm0 does not exist

Change-Id: Iea04be737891eb67f428e4627f669301b936cb9e
Reviewed-on: https://gerrit-int.chromium.org/18683
Tested-by: Luigi Semenzato <semenzato@google.com>
Reviewed-by: Jonathan Kliegman <kliegs@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
Commit-Ready: Luigi Semenzato <semenzato@google.com>

12 years agoCHROMIUM: tpm: i2c tpm for 3.4
Luigi Semenzato [Fri, 18 May 2012 21:32:58 +0000 (14:32 -0700)]
CHROMIUM: tpm: i2c tpm for 3.4

This makes the TPM a proper I2C device, to ensure it works
correctly with the device tree.

BUG=chrome-os-partner:8919
TEST=tpmc startup; tpmc test

Change-Id: Ib2b490eb734bf6cc6c0c4ac6080d46409590c062
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/17877
Tested-by: Luigi Semenzato <semenzato@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
Commit-Ready: Luigi Semenzato <semenzato@google.com>

12 years agoCHROMIUM: tpm: add more specific name "slb9635tt" for I2C TPM
Luigi Semenzato [Fri, 25 May 2012 19:32:15 +0000 (12:32 -0700)]
CHROMIUM: tpm: add more specific name "slb9635tt" for I2C TPM

BUG=chromium-os-partner:8919
TEST=none

Change-Id: Ifb8c9e69d3ca3dafe15bc2419513f08f9fb504a8
Reviewed-on: https://gerrit-int.chromium.org/18424
Reviewed-by: Olof Johansson <olofj@google.com>
Commit-Ready: Luigi Semenzato <semenzato@google.com>
Tested-by: Luigi Semenzato <semenzato@google.com>
12 years agoCHROMIUM: Input: cyapa - Add power_mode and register comments
Benson Leung [Wed, 27 Jun 2012 01:42:51 +0000 (18:42 -0700)]
CHROMIUM: Input: cyapa - Add power_mode and register comments

Add informative comments for cyapa_set_power_mode,
cyapa_sleep_time_to_pwr_cmd and cyapa_pwr_cmd_to_sleep_time,
and register fields.

BUG=chromium-os:21047
TEST=builds clean.

Change-Id: I5a25b1c94bae75bd4ad9f99894b2b87196acb334
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26193

12 years agoCHROMIUM: Input: cyapa - Descriptive input->phys field
Benson Leung [Mon, 25 Jun 2012 22:56:43 +0000 (15:56 -0700)]
CHROMIUM: Input: cyapa - Descriptive input->phys field

Populate the input->phys field with a string that uniquely
identifies the device based on device type (i2c), adapter number,
and address.

BUG=chromium-os:21047
TEST=builds clean.
cat /proc/bus/input/devices | grep -A1 cyapa
Check that the output is something like this (middle number will vary
based on adapter number on particular platform and kernel):
N: Name="cyapa"
P: Phys=i2c-1-0067/input0

Change-Id: Ia9ccab8054c1d8e86a0ec5ec0e260d30fd14782e
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26065

12 years agoRevert "gsmi: Enable CONFIG_GOOGLE_GSMI for x86 devices"
Richard Barnette [Wed, 27 Jun 2012 18:46:56 +0000 (11:46 -0700)]
Revert "gsmi: Enable CONFIG_GOOGLE_GSMI for x86 devices"

This change is suspected in http://crosbug.com/32188

This reverts commit 05e1643e2c1145ab85ba43c1f991fcda1c7035c0

Change-Id: Ie5a516c63c23b4bf99f86a83dd1efc3a87a432a4
Reviewed-on: https://gerrit.chromium.org/gerrit/26250
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
12 years agoUPSTREAM: staging: gdm72xx: fix an skb memory leak
Javier Martinez Canillas [Tue, 26 Jun 2012 22:22:20 +0000 (00:22 +0200)]
UPSTREAM: staging: gdm72xx: fix an skb memory leak

The NLMSG_PUT() macro contains a hidden goto that jumps to the
nlmsg_failure label. Since the sk_buff was allocated before the macro,
jumping to the nlmsg_failure label leaks the memory allocated for it.

Calling kfree() before returning would fix it, but is better to avoid
using this error prone macro and use nlmsg_put() instead.

Also, use nlmsg_data() instead of NLMSG_DATA() to check type.

Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2da049bd5f9b0dbd688519fdb6688a4895fe8395)

Change-Id: I539bbdfd79d4b58c65a5330e182249a9e8d69c81
Reviewed-on: https://gerrit.chromium.org/gerrit/26213
Reviewed-by: Grant Grundler <grundler@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>

12 years agoCHROMIUM: Input: atmel_mxt_ts - fix compiler warning
Daniel Kurtz [Tue, 26 Jun 2012 09:48:28 +0000 (17:48 +0800)]
CHROMIUM: Input: atmel_mxt_ts - fix compiler warning

In function 'mxt_input_dev_create':
warning: comparison of distinct pointer types lacks a cast

Since max_area_channels is unsigned, make the constant unsigned too.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:32156
TEST=builds w/out warning

Change-Id: I2678ba3302e2c62461ec3bf17b40dae7a54b46d1
Reviewed-on: https://gerrit.chromium.org/gerrit/26099
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
12 years agogsmi: Enable CONFIG_GOOGLE_GSMI for x86 devices
Duncan Laurie [Mon, 25 Jun 2012 17:21:31 +0000 (10:21 -0700)]
gsmi: Enable CONFIG_GOOGLE_GSMI for x86 devices

This enables kernel messages in the firmware event log
on supported plaforms.

BUG=chrome-os-partner:9195
TEST=manual

Check for GSMI loaded message in dmesg:
localhost kernel: [    3.332717] gsmi version 1.0 loaded

And look for gsmi directory in /sys/firmware
> ls -ld /sys/firmware/gsmi
drwxr-xr-x 2 root root 0 Jun 25 10:19 /sys/firmware/gsmi

Change-Id: I29001ffd993897932740a70edeac7109a391a642
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26030
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHROMIUM: chromeos_laptop : remove exported functions
Benson Leung [Mon, 25 Jun 2012 23:49:28 +0000 (16:49 -0700)]
CHROMIUM: chromeos_laptop : remove exported functions

Exported functions no longer needed as we no longer build
a version of this driver as a separate module.

BUG=chromium-os:31877
TEST=builds clean.
Verify that touch devices work.

Change-Id: I2904096ef6762763b9726e306651433ca35fd9e6
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26068
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agospi: s3c64xx: Add fix for crash in spi suspend/resume
Abhilash Kesavan [Mon, 25 Jun 2012 20:08:33 +0000 (13:08 -0700)]
spi: s3c64xx: Add fix for crash in spi suspend/resume

The SPI driver makes a gpio_request during initialization. The requested
gpios need to be populated as part of the s3c64xx_spi_driver_data so that
they can be released during suspend and requested again during resume.
Add the missing code to save the requested gpios as part of the driver
data. This fixes a SPI driver suspend crash.

BUG=chrome-os-partner:8921
TEST=Test S2R on Daisy and ensure that the SPI suspend crash has gone
away.

Change-Id: I623934f084b8d7d4070f70e7878585ece0e6fd85
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/20776
Reviewed-by: Bryan Freed <bfreed@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>

12 years agoexynos5: lcd: Free gpio in machine specific set_power callback
Abhilash Kesavan [Mon, 25 Jun 2012 21:28:51 +0000 (14:28 -0700)]
exynos5: lcd: Free gpio in machine specific set_power callback

The platform_lcd driver suspend/resume functions call the machine
specific set_power function. This function requests a gpio without
freeing it resulting in the following error message during suspend/
resume:
"gpio_request: gpio-180 (GPX3) status -16"
Free the requested gpio to fix the above error.

BUG=chrome-os-partner:8921
TEST=Test S2R on Daisy and ensure that the gpio request error goes away.

Change-Id: If124e94a6ae4a72a14d9ff95927074c4f84dd3d6
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/20784
Commit-Ready: Olof Johansson <olofj@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
12 years agogpu: vithar: To build in non debug mode
Akshu Agrawal [Mon, 25 Jun 2012 22:13:48 +0000 (15:13 -0700)]
gpu: vithar: To build in non debug mode

Made MALI_DEBUG flag 0 to build vithar driver base code in
release mode

BUG=None
TEST=Tested on Lucas

Change-Id: I76d0a8b40edbf297f7649668f907691f358aabcd
Signed-off-by: Akshu Agrawal <akshu.a@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/20794
Reviewed-by: Anush Elangovan <anush@google.com>
Tested-by: Abhinav Kochhar <abhinav.k@samsung.com>
Reviewed-by: Abhinav Kochhar <abhinav.k@samsung.com>
Commit-Ready: Abhinav Kochhar <abhinav.k@samsung.com>

12 years agoCHROMIUM: spi: Unlock a spinlock before calling into the controller driver.
Bryan Freed [Fri, 22 Jun 2012 23:04:38 +0000 (16:04 -0700)]
CHROMIUM: spi: Unlock a spinlock before calling into the controller driver.

spi_pump_messages() calls into a controller driver with
unprepare_transfer_hardware() which is documented as "This may sleep".
As in the prepare_transfer_hardware() call below, we should release the
queue_lock spinlock before making the call.
Rework the logic a bit to hold queue_lock to protect the 'busy' flag,
then release it to call unprepare_transfer_hardware().

BUG=chrome-os-partner:10756
TEST=while :; do flashrom -r /tmp/foo; done

Change-Id: I9d49d6060bdfd1b090414286b54e20ce5f182ecd
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20665
Tested-by: Bryan Freed <bfreed@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Commit-Ready: Bryan Freed <bfreed@google.com>

12 years agolib/scatterlist: do not re-write gfp_flags in __sg_alloc_table
Mandeep Singh Baines [Fri, 22 Jun 2012 23:22:29 +0000 (16:22 -0700)]
lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table

We are seeing a lot of sg_alloc_table allocation failures using the
new drm prime infrastructure. We isolated the cause to code in
__sg_alloc_table that was re-writing the gfp_flags.

There is a comment in the code that suggest that there is an
assumption about the allocation coming from a memory pool. This was
likely true when sg lists were primarily used for disk I/O.

LKML-Reference: https://lkml.org/lkml/2012/6/22/494

BUG=chrome-os-partner:10745
TEST=none

Change-Id: Id8dac90f15c14aa5bf68a81df3a2e5103dd32251
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20672
Reviewed-by: Sonny Rao <sonnyrao@google.com>
Tested-by: Subash Patel <subash@chromium.org>
12 years agoCHROMIUM: ARM: exynos: handle setaffinity on combined interrupts
Olof Johansson [Sat, 23 Jun 2012 00:34:28 +0000 (17:34 -0700)]
CHROMIUM: ARM: exynos: handle setaffinity on combined interrupts

This is needed to set affinity of the PMU interrupts for perf. Note that
the whole group of combined interrupts will be moved to whatever the last
affinity was set to. This might or might not cause problems, but it's no worse
than now.

BUG=none
TEST=run perf under taskset -c 0/1 and see it still work

Change-Id: I76b0aa00e040c5f0490be3e4c885dfd2d20e1d79
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20680
Reviewed-by: Sonny Rao <sonnyrao@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
12 years agoCHROMIUM: ARM: exynos: arm-pmu configuration through dts
Olof Johansson [Sat, 23 Jun 2012 00:33:42 +0000 (17:33 -0700)]
CHROMIUM: ARM: exynos: arm-pmu configuration through dts

This means we can specify proper interrupts per platform on multiplatform kernels.
Besides, exynos5 is all device-tree now so it doesn't make sense to use PMU from
platform_data there.

BUG=none
TEST=perf report /bin/ls

Change-Id: I52bc4b1f70f7d6d76d36cabcf25e2ee92f3bd472
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20679
Reviewed-by: Sonny Rao <sonnyrao@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
12 years agoARM: exynos: add pmu nodes to exynos5250 dts
Olof Johansson [Fri, 22 Jun 2012 22:11:50 +0000 (15:11 -0700)]
ARM: exynos: add pmu nodes to exynos5250 dts

This plumbs up the PMU on the A15s so that we can run perf.

BUG=none
TEST=run perf top

Change-Id: I64638b87e24f8dd7664063d0d5b672993dd1763e
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20678
Reviewed-by: Sonny Rao <sonnyrao@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
12 years agoARM: exynos: add cpu nodes to 5250 device tree
Olof Johansson [Fri, 22 Jun 2012 22:05:04 +0000 (15:05 -0700)]
ARM: exynos: add cpu nodes to 5250 device tree

Not technically used for anything, but it's still common to describe
them.

BUG=none
TEST=none

Change-Id: I0c864c08025e5e84816520c917c803782a90e642
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20677
Reviewed-by: Sonny Rao <sonnyrao@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
12 years agoarm: exynos5: dts: add TMU device node
Alim Akhtar [Wed, 23 May 2012 23:46:49 +0000 (16:46 -0700)]
arm: exynos5: dts: add TMU device node

Adds Thermal Management Unit device node in the device tree list

BUG=chrome-os-partner:8926
TEST=build ok, booted on snow and saw system is tripping when
      reached tripping temp.

Change-Id: I0b000cdc44f84f218e1c290740cff63347ddecda
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/18260
Reviewed-by: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>
Reviewed-on: https://gerrit-int.chromium.org/20484
Reviewed-by: Doug Anderson <dianders@google.com>
Reviewed-by: Grant Grundler <grundler@google.com>
Tested-by: Grant Grundler <grundler@google.com>
12 years agoARM: exynos5: add tmu clock support
Alim Akhtar [Fri, 22 Jun 2012 14:16:46 +0000 (19:46 +0530)]
ARM: exynos5: add tmu clock support

Add support for clock instance for TMU controller

BUG=none
TEST=booted kernel, cat /sys/class/thermal/thermal_zone0/temp
     show current temp.

Change-Id: If2d83abeb437b287cab475f102942ea566cf6ab5
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org>
Reviewed-on: https://gerrit-int.chromium.org/20489
Reviewed-by: Doug Anderson <dianders@google.com>
Reviewed-by: Grant Grundler <grundler@google.com>
Tested-by: Grant Grundler <grundler@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>

12 years agoDRM: exynos: return NULL if exynos_pages_to_sg fails
Subash Patel [Thu, 21 Jun 2012 23:36:57 +0000 (16:36 -0700)]
DRM: exynos: return NULL if exynos_pages_to_sg fails

exynos_pages_to_sg() internally calls sg_kmalloc() which can return
no pages when the system is under high memory crunch. One such instance
is chromeos-install in the chromeos. This patch adds check for the return
value of the function in subject to return NULL on failure.

BUG=chrome-os-partner:9481
TEST=built, ran on snow and tried chromeos-install without a crash

Change-Id: I0abda74beaedae002a17de9962d7a462a2a7c2fb
Signed-off-by: Subash Patel <subash.rp@samsung.com>
Reviewed-on: https://gerrit-int.chromium.org/20572
Reviewed-by: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
Commit-Ready: Subash Patel <subash@chromium.org>

12 years agomedia: exynos: fix permissions on files
Olof Johansson [Fri, 22 Jun 2012 19:51:33 +0000 (12:51 -0700)]
media: exynos: fix permissions on files

BUG=none
TEST=visual inspection

Change-Id: I86e35c5d24a8b9083a5278da304df21ff11776d4
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20637
Reviewed-by: Doug Anderson <dianders@google.com>
Reviewed-by: Anush Elangovan <anush@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
Reviewed-by: Subash Patel <subash@chromium.org>
12 years agodrm: vithar: fix permissions on Makefiles
Olof Johansson [Fri, 22 Jun 2012 19:50:05 +0000 (12:50 -0700)]
drm: vithar: fix permissions on Makefiles

BUG=none
TEST=visual inspection

Change-Id: I65bb901188bee114a8feb86b5fb12f4516594795
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20636
Reviewed-by: Anush Elangovan <anush@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
12 years agoCHROMIUM: ARM: Exynos5: Manually configure the chip select gpio for spidev.
Bryan Freed [Fri, 22 Jun 2012 17:34:11 +0000 (10:34 -0700)]
CHROMIUM: ARM: Exynos5: Manually configure the chip select gpio for spidev.

The kernel should not depend on firmware to configure the chip select pin
with function 1 (gpio) for us.

BUG=chrome-os-partner:10755
TEST=Confirm flashrom -p linux_spi:dev=/dev/spidev1.0 --get-size works.

Change-Id: I77c7e5134fa323a82e6f5308566ff05493e493cd
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(dianders resolved trivial merge conflicts)
Reviewed-on: https://gerrit-int.chromium.org/20625
Tested-by: Doug Anderson <dianders@google.com>
Commit-Ready: Doug Anderson <dianders@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
12 years agoCHROMIUM: ASoC: samsung: don't configure smdk audio everywhere
Olof Johansson [Thu, 21 Jun 2012 18:29:27 +0000 (11:29 -0700)]
CHROMIUM: ASoC: samsung: don't configure smdk audio everywhere

We want both drivers enabled so the same kernel can boot SMDK and
Daisy/Snow, but we can't have the SMDK driver registering itself on
hardware it doesn't exist on.

Change-Id: I5a446c1a840f539200b26e2f5aadf6b28d7fcb45
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20547
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
12 years agoCHROMIUM: ARM: exynos: add max98095 dt entries
Olof Johansson [Thu, 21 Jun 2012 17:54:29 +0000 (10:54 -0700)]
CHROMIUM: ARM: exynos: add max98095 dt entries

Add device tree entries for the codec used on daisy/snow and
the regulator used to power up the codec.

Change-Id: I04d40f6ffa5c0b1e9c78247b9b3c5d8998d31a7f
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20546
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
12 years agoCHROMIUM: ARM: enable xclkout for audio on daisy/snow
Olof Johansson [Tue, 12 Jun 2012 16:07:24 +0000 (09:07 -0700)]
CHROMIUM: ARM: enable xclkout for audio on daisy/snow

Daisy/snow need xclkout to be enabled since it's their reference clock
for the audio codec. Enabling the output on smdk shouldn't be
harmful so just do it globally for now.

Note that this should be moved over to be a regular system clock instead
of just being forced on like this.

Change-Id: Ia4f612ff56c6715aa99e9b50e51b5e03874feb8a
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20545
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
12 years agoCHROMIUM: ASoC: samsung: add daisy_max98095.c board
Taylor Hutt [Mon, 11 Jun 2012 19:32:37 +0000 (12:32 -0700)]
CHROMIUM: ASoC: samsung: add daisy_max98095.c board

Add the ASoC board plumbing for max98095 on daisy/snow.

Change-Id: I34d390d808574dafc9dd463aaf21a6c7886d97a0
BUG=chrome-os-partner:8920
TEST=Kernel builds.
Signed-off-by: Taylor Hutt <thutt@chromium.org>
[olofj: Changed to device tree and some misc cleanup]
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/19831
Commit-Ready: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
12 years agoCHROMIUM: ARM: exynos: Add audio clocks needed for snow(?)
Taylor Hutt [Tue, 12 Jun 2012 15:55:08 +0000 (08:55 -0700)]
CHROMIUM: ARM: exynos: Add audio clocks needed for snow(?)

Adds missing clock definitions needed for audio

This needs to be cleaned up, it's not clear to me why the existing clock
definitions in arch/arm/mach-exynos/clock-audss.c are insufficient. There
are differences, but I don't know how they are expected to be reconciled
between EXYNOS4 and EXYNOS5 at this time.

BUG=chrome-os-partner:8920
TEST=Validated audio output works w/ follow on changes.
Change-Id: I2b082b1e3a132ec6731f8c4faf7108cfe90880de
Signed-off-by: Taylor Hutt <thutt@chromium.org>
[olofj: pruned out some clocks, rewrote the commit description and a
few other things]
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/19830
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Olof Johansson <olofj@google.com>
Tested-by: Olof Johansson <olofj@google.com>
12 years agoARM: exynos: dt: turn on wwan-en
Doug Anderson [Wed, 20 Jun 2012 23:55:56 +0000 (16:55 -0700)]
ARM: exynos: dt: turn on wwan-en

This turns on wwan all the time which is fine at the moment.
When we want to optimize for power, we'll need to figure out how
to hook things in such that:
* We turn off 3G when the user has disabled it in the UI (that
  would mean we couldn't tell if we're on a 3G sku).
* We turn off 3G during suspend (assuming that we don't want to
  keep it on for some reason).
See the bug for more details.

BUG=chrome-os-partner:10528
TEST=Before this change, 'grep "wwan-en" /sys/class/regulator/*/name'
returned nothing.  After this change, it showed a match.
TEST=Before this change, saw no 3G module in 'lsusb'.  After this
change I saw a 3G module in lsusb.

Change-Id: I34b12cf0ad5d30d246c31aa707f32a16c5351ca8
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20508
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Olof Johansson <olofj@google.com>
Commit-Ready: Doug Anderson <dianders@google.com>
Reviewed-by: Terry Lambert <tlambert@google.com>
12 years agoARM: Exynos5: Add spi clock support
Thomas Abraham [Fri, 1 Jun 2012 09:29:19 +0000 (17:29 +0800)]
ARM: Exynos5: Add spi clock support

Add support for clock instances for each spi controller.

BUG=None
TEST=None

Change-Id: Iddfd68dea4b81d0282744dabb79dbdc587dc830d
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Jaswinder Singh <jaswinder.singh@linaro.org>
Reviewed-on: https://gerrit-int.chromium.org/17934
Reviewed-by: Olof Johansson <olofj@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Commit-Ready: Doug Anderson <dianders@google.com>
Reviewed-on: https://gerrit-int.chromium.org/20488
Tested-by: Olof Johansson <olofj@google.com>
Commit-Ready: Olof Johansson <olofj@google.com>

12 years agoARM: exynos: Don't toggle GPIO_X1(5) on snow
Sean Paul [Thu, 21 Jun 2012 15:56:58 +0000 (11:56 -0400)]
ARM: exynos: Don't toggle GPIO_X1(5) on snow

Don't toggle GPIO_X1(5) on snow since it maps to PD_N on the bridge
chip, and not reset. Also remove the switch on power since both branches
do the same thing.

BUG=None
TEST=Tested on snow

Change-Id: I53789108300eb165caf71bfb302c99ab3ceebb28
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/20509
Tested-by: Sean Paul <seanpaul@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
12 years agoCHROMIUM: mkbp: add missing key for UK keyboard
Luigi Semenzato [Wed, 20 Jun 2012 00:43:21 +0000 (17:43 -0700)]
CHROMIUM: mkbp: add missing key for UK keyboard

This adds KEY_BACKSLASH at (row,column) 4,10 for the UK keyboard, for
which key 3,11 is not wired.

It also replaces the hex code for KEY_102ND with the correct symbol
(don't know why I didn't use that in the first place).

BUG=chrome-os-partner:10534
TEST=manually tested with UK keyboard

Change-Id: I59b0f6dbf8924e10a5cf358b73b59c7cb387e64f
Reviewed-on: https://gerrit-int.chromium.org/20374
Tested-by: Luigi Semenzato <semenzato@google.com>
Commit-Ready: Luigi Semenzato <semenzato@google.com>
Reviewed-by: Luigi Semenzato <semenzato@google.com>
Reviewed-by: Sonny Rao <sonnyrao@google.com>
12 years agoCHROMIUM: platform: chromeos_ec: export firmware information
Vincent Palatin [Tue, 15 May 2012 18:29:34 +0000 (11:29 -0700)]
CHROMIUM: platform: chromeos_ec: export firmware information

Add sysfs nodes to get firmware version and other EC info.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8865
TEST=on Daisy, read the new sysfs nodes

Change-Id: I12528fb9c5dcb59578eaaf75481a5227083fe3d4
Reviewed-on: https://gerrit-int.chromium.org/18002
Reviewed-by: Olof Johansson <olofj@google.com>
Commit-Ready: Vincent Palatin <vpalatin@google.com>
Tested-by: Vincent Palatin <vpalatin@google.com>
12 years agogsmi: Add coreboot to list of matching BIOS vendors
Duncan Laurie [Mon, 25 Jun 2012 17:17:50 +0000 (10:17 -0700)]
gsmi: Add coreboot to list of matching BIOS vendors

In order to use this coreboot needs board support for:
CONFIG_ELOG=y
CONFIG_ELOG_GSMI=y

And the kernel driver needs enabled:
CONFIG_GOOGLE_GSMI=y

BUG=chrome-os-partner:9195
TEST=manual

Verify that clean shutdown event is added to the log:

> mosys eventlog list | grep 'Clean Shutdown'
11 | 2012-06-25 09:49:24 | Kernl Event | Clean Shutdown

Change-Id: I01d5aae415207538bf46166c04a874685213386f
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26029
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
12 years agogsmi: Fix bug in append_to_eventlog sysfs handler
Duncan Laurie [Mon, 25 Jun 2012 17:15:11 +0000 (10:15 -0700)]
gsmi: Fix bug in append_to_eventlog sysfs handler

The sysfs handler should return the number of bytes
consumed, which in the case of a successful write is
the entire buffer.

BUG=chrome-os-partner:9195
TEST=manual

Successfully append an event to the log with gsmi sysfs.
This sample event is for a "Kernel Software Watchdog"

> xxd -g 1 event.kernel_software_watchdog
0000000: 01 00 00 00 ad de 06 00 00 00

> cat event.kernel_software_watchdog > /sys/firmware/gsmi/append_to_eventlog

> mosys eventlog list | tail -1
14 | 2012-06-25 10:14:14 | Kernl Event | Software Watchdog

Change-Id: I7e238a83d6a4f04a998a384d96422c08f4768dcc
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26028
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
12 years agox86, mm: only wait for flushes from online cpus
Mandeep Singh Baines [Thu, 21 Jun 2012 22:03:43 +0000 (15:03 -0700)]
x86, mm: only wait for flushes from online cpus

A cpu in the mm_cpumask could go offline before we send the invalidate
IPI causing us to wait forever. Avoid this by only waiting for online
cpus.

We are seeing a softlockup reporting during shutdown. The stack
trace shows us that we are inside default_send_IPI_mask_logical:

<3>[10234.880183] BUG: soft lockup - CPU#0 stuck for 11s! [lmt-udev:23605]
<5>[10234.880323] Pid: 23605, comm: lmt-udev Tainted: G        WC   3.2.7 #1
<5>[10234.880331] EIP: 0060:[<8101eec6>] EFLAGS: 00000202 CPU: 0
<5>[10234.880341] EIP is at flush_tlb_others_ipi+0x8a/0xba
<0>[10234.880631] Call Trace:
<5>[10234.880687]  [<8101f0bb>] flush_tlb_mm+0x5e/0x62
<5>[10234.880696]  [<8101e36c>] pud_populate+0x2c/0x31
<5>[10234.880703]  [<8101e409>] pgd_alloc+0x98/0xc7
<5>[10234.880713]  [<8102c881>] mm_init.isra.38+0xcc/0xf3
<5>[10234.880721]  [<8102cbc2>] dup_mm+0x68/0x34e
<5>[10234.880730]  [<8139bbae>] ? _cond_resched+0xd/0x21
<5>[10234.880739]  [<810a5b7c>] ? kmem_cache_alloc+0x26/0xe2
<5>[10234.880747]  [<8102d421>] ? copy_process+0x556/0xda6
<5>[10234.880756]  [<8102d641>] copy_process+0x776/0xda6
<5>[10234.880765]  [<8102dd5e>] do_fork+0xcb/0x1d4
<5>[10234.880774]  [<810a8c96>] ? do_sync_write+0xd3/0xd3
<5>[10234.880782]  [<810a94ab>] ? vfs_read+0x95/0xa2
<5>[10234.880791]  [<81008850>] sys_clone+0x20/0x25
<5>[10234.880799]  [<8139d8c5>] ptregs_clone+0x15/0x30
<5>[10234.880807]  [<8139d7f7>] ? sysenter_do_call+0x12/0x26

Before the softlock, we see the following kernel warning:

<4>[10222.234548] WARNING: at ../../arch/x86/kernel/apic/ipi.c:113 default_send_IPI_mask_logical+0x58/0x73()
<5>[10222.234633] Pid: 23605, comm: lmt-udev Tainted: G         C   3.2.7 #1
<5>[10222.234639] Call Trace:
<5>[10222.234651]  [<8102e666>] warn_slowpath_common+0x68/0x7d
<5>[10222.234661]  [<81016c36>] ? default_send_IPI_mask_logical+0x58/0x73
<5>[10222.234670]  [<8102e68f>] warn_slowpath_null+0x14/0x18
<5>[10222.234678]  [<81016c36>] default_send_IPI_mask_logical+0x58/0x73
<5>[10222.234687]  [<8101eec2>] flush_tlb_others_ipi+0x86/0xba
<5>[10222.234696]  [<8101f0bb>] flush_tlb_mm+0x5e/0x62
<5>[10222.234703]  [<8101e36c>] pud_populate+0x2c/0x31
<5>[10222.234711]  [<8101e409>] pgd_alloc+0x98/0xc7
<5>[10222.234719]  [<8102c881>] mm_init.isra.38+0xcc/0xf3
<5>[10222.234727]  [<8102cbc2>] dup_mm+0x68/0x34e
<5>[10222.234736]  [<8139bbae>] ? _cond_resched+0xd/0x21
<5>[10222.234745]  [<810a5b7c>] ? kmem_cache_alloc+0x26/0xe2
<5>[10222.234753]  [<8102d421>] ? copy_process+0x556/0xda6
<5>[10222.234761]  [<8102d641>] copy_process+0x776/0xda6
<5>[10222.234770]  [<8102dd5e>] do_fork+0xcb/0x1d4
<5>[10222.234778]  [<810a8c96>] ? do_sync_write+0xd3/0xd3
<5>[10222.234786]  [<810a94ab>] ? vfs_read+0x95/0xa2
<5>[10222.234795]  [<81008850>] sys_clone+0x20/0x25
<5>[10222.234804]  [<8139d8c5>] ptregs_clone+0x15/0x30
<5>[10222.234812]  [<8139d7f7>] ? sysenter_do_call+0x12/0x26

So we are sending an IPI to a cpu which is now offline. Once a cpu is offline,
it will no longer respond to IPIs. This explains the softlockup.

Addresses http://crosbug.com/31737

Changes in V2:
  * bitmap_and is not atomic so use a temporary bitmask

LKML-Reference: https://lkml.org/lkml/2012/6/22/443

BUG=chromium-os:31737
TEST=Cannot reproduce the bug. But ran a few power cycles.

Change-Id: I29fe5fa120bafdc1de6a1e7979473baa7ecd4c30
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/25970
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHROMIUM: Revert "Input: i8042 - also perform controller reset when suspending"
Benson Leung [Wed, 20 Jun 2012 23:02:44 +0000 (16:02 -0700)]
CHROMIUM: Revert "Input: i8042 - also perform controller reset when suspending"

This reverts commit 1729ad1f4f9e167ade84ca8b5269695c42351160.

The above commit adds a forced i8042_controller_selftest at suspend time.
This has the result of disabling the touchpad wake from S3.

BUG=chromium-os:31556
TEST=on CR-48:
powerd_suspend
touch the touchpad to wake the system
Verify that the system wakes up

Change-Id: I7ac865e82a07e20076d33353acb21b3720f97fce
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/25820
Reviewed-by: Olof Johansson <olofj@chromium.org>
12 years agoCHROMIUM: cpu_callback can't be __cpuinit
Olof Johansson [Fri, 22 Jun 2012 01:08:08 +0000 (18:08 -0700)]
CHROMIUM: cpu_callback can't be __cpuinit

This is because lockup_detector_bootcpu_resume() now uses it, so
it's used after runtime init of cpus.

BUG=none
TEST=build with CONFIG_DEBUG_SECTION_MISMATCH=y, watch the warnings go away

Change-Id: I1506e351b9ddeae699245a31f4e45805ac2fd52e
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/25898
Reviewed-by: Benson Leung <bleung@chromium.org>
12 years agoCHROMIUM: add missing inline to static function in sched.h
Olof Johansson [Fri, 22 Jun 2012 01:03:08 +0000 (18:03 -0700)]
CHROMIUM: add missing inline to static function in sched.h

Found by visual inspection

BUG=none
TEST=none

Change-Id: Iae22882a90041af9b992735317328da2d0df2bfc
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/25897
Reviewed-by: Benson Leung <bleung@chromium.org>
12 years agoCHROMIUM: chromeos_laptop: remove section warnings
Olof Johansson [Fri, 22 Jun 2012 01:00:02 +0000 (18:00 -0700)]
CHROMIUM: chromeos_laptop: remove section warnings

Missing __init annotations causing section mismatch warnings

BUG=none
TEST=build with CONFIG_DEBUG_SECTION_MISMATCH=y, see chromeos_laptop warnings go away

Change-Id: I405ff6da56f84aa97e6546b4529f35f97e47a83f
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/25894
Reviewed-by: Benson Leung <bleung@chromium.org>
12 years agoCHROMIUM: ALSA: hda - Optimize power_up before power_down starts.
Dylan Reid [Fri, 22 Jun 2012 02:13:09 +0000 (19:13 -0700)]
CHROMIUM: ALSA: hda - Optimize power_up before power_down starts.

After cancel_delayed_work_sync returns, the power down work either never
started (power_on == 1) or finished (power_on == 0).  In the former case
there is no need to power up again.

BUG=chromium-os:32037
TEST=Ensure key repeat is smooth on alex while a gmail tab is open.

Change-Id: I66c36f406ff515db16fa9a5fe24f053bf20f3dfd
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/25905
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>

12 years agoCHROMIUM: config: Increase hda power save timeout.
Dylan Reid [Thu, 21 Jun 2012 23:45:54 +0000 (16:45 -0700)]
CHROMIUM: config: Increase hda power save timeout.

Increase the HDA power saving timeout to 15 seconds.  Pepper flash polls
the sound interface every 5 seconds.  Having the power-down timeout the
same as this interval causes the polls to have to wait for the power
down to complete.  While Chrome waits for this it can't send messages to
the GPU process, causing a lot of UI lag.

This change is temporary, bug 32055 filed to track undoing this.

BUG=chromium-ow:32037
TEST=Open gmail tab and a scratchpad and make sure that the rendering of
keys isn't interrupted for long periods of time.

Change-Id: I9ac533c5a4aecf020c2f794d1fc8d67ac6e74f75
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/25904
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>

12 years agoCHROMIUM: x86: enable idle_notifier's
Sam Leffler [Thu, 14 Jun 2012 23:44:00 +0000 (16:44 -0700)]
CHROMIUM: x86: enable idle_notifier's

Enable idle notifier support on all x86 builds; not just X86_64.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=chromium-os:17379 chromium:118032
TEST=build for alex; use interactive governor that depends on idle notification

Change-Id: I4d2c22753854b01675819070fae79a73d20a8d7c
Reviewed-on: https://gerrit.chromium.org/gerrit/25345
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Sam Leffler <sleffler@chromium.org>
12 years agoCHROMIUM: import Android interactive governor
Sam Leffler [Tue, 12 Jun 2012 16:13:49 +0000 (09:13 -0700)]
CHROMIUM: import Android interactive governor

Bring in the interactive cpu governor from the Android 3.4 branch.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=chromium-os:17379 chromium:118032
TEST=build+boot on alex+lumpy

Change-Id: Id8cecdff1380d90e66a7b63208cd77cb5047ff78
Reviewed-on: https://gerrit.chromium.org/gerrit/25344
Tested-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Sam Leffler <sleffler@chromium.org>
12 years agoHID: magicmouse: Correct report range of major / minor axes
Yufeng Shen [Thu, 21 Jun 2012 16:40:06 +0000 (12:40 -0400)]
HID: magicmouse: Correct report range of major / minor axes

In patch "HID: magicmouse: Adjust major / minor axes to scale",
touch_major and touch_minor axes are scaled by a factor of
four when reported but the max touch_major/minor is not scaled
accordingly. This patch scales the max touch_major/minor to
be consistent with the reported value.

BUG=chromium-os:29435
TEST=Use evtest to test Apple Magic Trackpad and check that the
     range for touch_major/minor is [0 1020] and the reported
     touch_major/minor value is within the range.

Change-Id: Id1d54e1881025c734e908f90ddcb8e0f12c29d88
Signed-off-by: Yufeng Shen <miletus@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/25844
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
12 years agoCHROMIUM: PM: Prevent waiting forever on asynchronous suspend after abort
Mandeep Singh Baines [Wed, 20 Jun 2012 01:17:55 +0000 (18:17 -0700)]
CHROMIUM: PM: Prevent waiting forever on asynchronous suspend after abort

__device_suspend() must always send a completion. Otherwise, parent
devices will wait forever.

Commit 1e2ef05b, "PM: Limit race conditions between runtime PM and
system sleep (v2)", introduced a regression by short-circuiting the
complete_all() for certain error cases.

This patch fixes the bug by always signalling a completion.

LKML-Reference: http://lkml.org/lkml/2012/6/20/386

BUG=chromium-os:31972
TEST=Tested by injecting an abort.

Change-Id: Id5ece5e2134d8ae74fbd2a333ddd10c09b015dd4
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Reviewed-on: https://gerrit.chromium.org/gerrit/25774
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>