cascardo/linux.git
11 years agoASoC: Samsung: Protect the dma pointer position access
Vikas C Sajjan [Fri, 14 Sep 2012 09:23:35 +0000 (18:23 +0900)]
ASoC: Samsung: Protect the dma pointer position access

Takes spin lock to protect prtd->dma_pos from
concurrent access by the driver and the tasklet

BUG=chrome-os-partner:12565
TEST=ran multimedia tests for audio, video and webgl

Change-Id: I29054e75d01eb7a10401dbc75a17fca13e24ea0e
Signed-off-by: Abhinav Kochhar <abhinav@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33298
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: Vikas Sajjan <vikas.sajjan@samsung.com>
11 years agousb: dwc3: exynos5: Power-off VBUS during suspend.
Todd Broch [Wed, 19 Sep 2012 22:14:18 +0000 (15:14 -0700)]
usb: dwc3: exynos5: Power-off VBUS during suspend.

Change de-asserts vbus_gpio on suspend and re-asserts on resume in
order to save power.  NOTE this change means no USB charging in
standby is supported.

BUG=chrome-os-partner:9156
TEST=manual
1. Boot device, login guest, ctrl-alt-t for shell
2. shell
3. sudo su
4. Measure USB3.0 VBUS is 5V
5. powerd_suspend
6. Measure USB3.0 VBUS is off
7. resume
8. Measure USB3.0 VBUS is 5V

~30mW of savings in suspend.

Change-Id: Iaeaadde8b041d731c5114ab7318e4b8d8caebef9
Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33642
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agodrm/exynos: allocate kds callback at driver init time
Mandeep Singh Baines [Mon, 17 Sep 2012 02:14:55 +0000 (19:14 -0700)]
drm/exynos: allocate kds callback at driver init time

We are currently allocating the kds callback on a per fb basis.

Note: this change is required as part of the kds parallelism patch set.

BUG=chrome-os-partner:12170
TEST=VT switch. Log in/out. Suspend/resume. Web GL. Youtube.

Change-Id: Ib5af8eb04a19287de811b8c827bcdf32a7f99737
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33464
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoKDS: make kds_resource_set_release callable from atomic context
Mandeep Singh Baines [Mon, 17 Sep 2012 02:14:55 +0000 (19:14 -0700)]
KDS: make kds_resource_set_release callable from atomic context

This allows calling kds_resource_set_release() from an atomic context.
In drm/exynos, we want to release the kds resource from the page_flip
interrupt handler. Without this change, we cannot call the release
method directly and would need to instead use a work item. To avoid
this, let's use a spinlock instead of a mutex.

This change also make kds consistent with the intended semantics
of the direct parameter of kds_callback_init. The direct parameter
requires that the callback be callable from an atomic context.
Having kds_resource_set_release() NOT callable from an atomic context
defeats the purpose of direct.

BUG=chrome-os-partner:12170
TEST=VT switch. Log in/out. Suspend/resume. Web GL. Youtube.

Change-Id: I3578e2324e1f04dc6a41b60055b3ac61d3e00a52
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33403
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoChromium: Config: Update for Mali Wk35 drop
Anush Elangovan [Thu, 20 Sep 2012 00:50:35 +0000 (17:50 -0700)]
Chromium: Config: Update for Mali Wk35 drop

Update the kernel configs for the Mali Wk35 drop.

BUG=none
TEST=build and run on snow

Change-Id: I93f76afa0412a7b1749c43c17360128d8555b4d0
Signed-off-by: Anush Elangovan <anush@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33656
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoARM MALI T6xx Graphic Driver
matpal01 [Wed, 5 Sep 2012 13:40:20 +0000 (15:40 +0200)]
ARM MALI T6xx Graphic Driver

Mali T6xx Driver updated based on OpenGL ES release (TX011-BU-00001-r1p2-00bet0)

BUG=none
TEST=Tested on Daisy. Mandatory WebGL sites tested.

Change-Id: Ie15340842b9b73a9e5eba88c022860320b98829f
Signed-off-by: Mathias Palmqvist <mathias.palmqvist@arm.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32230
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Anush Elangovan <anush@chromium.org>
Tested-by: Anush Elangovan <anush@chromium.org>
11 years agomfd: max77686: Fix section mismatch warning
Jonathan Kliegman [Fri, 14 Sep 2012 19:12:17 +0000 (15:12 -0400)]
mfd: max77686: Fix section mismatch warning

max77686_i2c_probe references devinit data but isn't marked __devinit.
As this is a device init function called via i2c_add_driver callbacks,
mark max77686_i2c_probe as __devinit

BUG=None
TEST=Warnings removed, no obvious regressions on device

Change-Id: I17bb2bc4559eb3d343808a7606f1158e7f112b3c
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33352
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agos5p: ehci: Turn vbus off/on across S2R
Vivek Gautam [Wed, 12 Sep 2012 17:21:51 +0000 (22:51 +0530)]
s5p: ehci: Turn vbus off/on across S2R

This patch pulls the 'vbus' line down for ehci while going into suspend
and pulls up again after resuming.  We don't want to keep the vbus tied
to voltage rail in suspend.

BUG=chrome-os-partner:9156
TEST=emerge-daisy chromeos-kernel; boot the kernel;
use 'powerd_suspend' to suspend the system and then
resume the system; check 'dmesg' for GPX1 in gpio dumps
across S2R; also test usb 2.0 working across S2R alongwith.
Measured ~10mW savings in standby.

Change-Id: I5c558c7dd98b59a460c23ccb93adb20ef3443f23
Signed-off-by: Jaehoon Kim <jh228.kim@samsung.com>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33079
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoARM: EXYNOS: Fix section mismatch for pen_release
Jonathan Kliegman [Fri, 14 Sep 2012 19:08:21 +0000 (15:08 -0400)]
ARM: EXYNOS: Fix section mismatch for pen_release

The variable is marked __cpuinitdata but accessed from functions
which aren't.  Remove the annotation

BUG=None
TEST=Compiled with no warnings, no obvious regressions on device
  including suspend/resume cycles
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Change-Id: I0a49c196006999aeb17387a2674aaa326272512a
Reviewed-on: https://gerrit.chromium.org/gerrit/33351
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
11 years agousb: dwc3: core: Fix section mismatch in dwc3_cache_hwparams
Jonathan Kliegman [Fri, 14 Sep 2012 18:33:46 +0000 (14:33 -0400)]
usb: dwc3: core: Fix section mismatch in dwc3_cache_hwparams

dwc3_cache_hwparams can be called on resume as well as probe so
remove __devinit annotation.

BUG=None
TEST=Compiled, no warnings for section mismatch. Kernel booted
  and system ran with no obvious regressions.
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Change-Id: I981ef18865f76259889d6d75af7ebf9f2401be0e
Reviewed-on: https://gerrit.chromium.org/gerrit/33349
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>

11 years agoUPSTREAM: usb: dwc3: core: make sure evt->lpos is correctly initialized
Paul Zimmerman [Fri, 27 Apr 2012 11:28:02 +0000 (14:28 +0300)]
UPSTREAM: usb: dwc3: core: make sure evt->lpos is correctly initialized

The same event buffers will be reused when coming
out of hibernation, so we must reinitialize them
properly to avoid any mistakes.

While at that, also take dwc3_event_buffers_setup()
out of __devinit section.

BUG=None
TEST=recompiled, no errors.  no obvious regressions after booting kernel

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
(cherry picked from commit 7acd85e0eb2ed300edf123178445237059b35fb9)

Change-Id: I4fb19db9c1f0f0c73e5bc6d78fb7fcf1eb738f5d
Reviewed-on: https://gerrit.chromium.org/gerrit/33348
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
11 years agoUPSTREAM: mmc: dw_mmc: fixed a section mismatch in dw_mci_init_slot
Jaehoon Chung [Thu, 23 Aug 2012 11:31:48 +0000 (20:31 +0900)]
UPSTREAM: mmc: dw_mmc: fixed a section mismatch in dw_mci_init_slot

Fixed the below message.

WARNING: drivers/mmc/host/built-in.o(.text+0x5ee8): Section mismatch in reference from the function dw_mci_probe() to the function .init.text:dw_mci_init_slot()
The function dw_mci_probe() references
the function __init dw_mci_init_slot().
This is often because dw_mci_probe lacks a __init
annotation or the annotation of dw_mci_init_slot is wrong

Conflicts:
        drivers/mmc/host/dw_mmc-pltfm.c
        drivers/mmc/host/dw_mmc.c

BUG=None
TEST=recompiled, no errors.  no obvious regressions after booting kernel

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Jon Kliegman <kliegs@chromium.org>
(cherry picked from commit 36c179a98a0755b98153e8f4ae08243fbfcd18ff)

Change-Id: I54f85cf0c634e0cd08c0580d0c94513ce0ee5f36
Reviewed-on: https://gerrit.chromium.org/gerrit/33347
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
11 years agoCHROMIUM: chromeos_arm: Fix section mismatch errors
Jonathan Kliegman [Fri, 14 Sep 2012 18:59:20 +0000 (14:59 -0400)]
CHROMIUM: chromeos_arm: Fix section mismatch errors

chromeos_arm_probe is called via platform_driver_registeri calling its probe
function, therefore it must be declared __devinit instead of __init.
Change its annotation and chromeos_arm_platform_gpio that it calls

BUG=None
TEST=warnings removed, no obvious regressions on boot

Change-Id: Ic208f26d0aa3ee3aab876e90fc2d0c642d80ad8e
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33350
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoexynos5: usb: fix warning in exynos_usb_mux_change
Jonathan Kliegman [Fri, 14 Sep 2012 17:45:59 +0000 (13:45 -0400)]
exynos5: usb: fix warning in exynos_usb_mux_change

is_host was only being set if soc_is_exynos5250() is true but checked
in all cases.  Exit the function early if soc_is_exynos5250 is false
to prevent this.

BUG=None
TEST=compiled and booted, no obvious regression.

Change-Id: Id1a95eefe5324f55a4d54422f84a29ca023ab6ef
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33325

11 years agoCHROMIUM: usb: option: take out Novatel Gobi 2000 VID/PID 1410:a010
Ben Chan [Wed, 19 Sep 2012 05:46:38 +0000 (22:46 -0700)]
CHROMIUM: usb: option: take out Novatel Gobi 2000 VID/PID 1410:a010

Both the 'qcserial' and 'option' USB serial driver claim support for the
Novatel Gobi 2000 modem (VID:PID = 1410:a010). This CL temporarily takes
out the VID/PID 1410:a010 to prevent the option driver from being
selected for that modem.

BUG=chromium-os:32819
TEST=Tested the following:
1. Build chromeos-kernel.
2. Verify that Gobi modems are supported by the qcserial / qcusbnet
   driver and work correctly.

Change-Id: I4a09a4b3753116d70538f676ba92f9be4413515d
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33592
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agomedia: gsc: modify functions for checking gscaler status
Shaik Ameer Basha [Wed, 12 Sep 2012 20:12:45 +0000 (01:42 +0530)]
media: gsc: modify functions for checking gscaler status

gscaler driver has some functions for checking gscaler status.
And these functions aren't allowed to use in atomic context.
But gscaler m2m driver uses a function for checking gscaler reset
in atomic context.
This patch modify those functions to use in atomic context.

BUG=chrome-os-partner:13971
TEST=verified playback on 5 tabs for 1 hour.

Change-Id: I95794a51c6c2df18ed8f25be3148066b35e898a7
Signed-off-by: Hyunwoong Kim <khw0178.kim@samsung.com>
Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/33082
Reviewed-by: Pawel Osciak <posciak@google.com>
Commit-Ready: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
11 years agoexynos5/dt: added external interrupt to hdmi device node
Rahul Sharma [Fri, 7 Sep 2012 08:50:45 +0000 (17:50 +0900)]
exynos5/dt: added external interrupt to hdmi device node

For supporting runtime power management, external interrupts needs to
be handled in the hdmi drm driver. This interrupt information is
added to the device tree.

BUG=chrome-os-partner:12958
TEST=verified runtime power
management by hdmi cable plug-unplug test.

Change-Id: Iccde594c435ddbed4c44733935438dd758c07a13
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31333
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Shirish S <shirish@chromium.org>
Reviewed-by: Shirish S <shirish@chromium.org>
Commit-Ready: Shirish S <shirish@chromium.org>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
11 years agoCHROMIUM: dm: bootcache communicate alignment
Paul Taysom [Wed, 12 Sep 2012 17:18:58 +0000 (10:18 -0700)]
CHROMIUM: dm: bootcache communicate alignment

The alignement of sections on the disk for the boot cache
was hard coded to be PAGE_SIZE. Changed it so it is communicated
up to the bootcache utility.

BUG=chromium-os:25441
TEST=booted the system with bootcache enabled

Change-Id: I67707a76c337095e3bfc123f34a2b149fc1ce52c
Signed-off-by: Paul Taysom <taysom@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33095
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoUPSTREAM:smsc75xx: let EEPROM determine GPIO/LED settings
Steve Glendinning [Tue, 18 Sep 2012 01:45:09 +0000 (18:45 -0700)]
UPSTREAM:smsc75xx: let EEPROM determine GPIO/LED settings

This patch allows the GPIO/LED settings to be configured by the
EEPROM if present, and only sets the default values (LED outputs
for link/activity) when an EEPROM is not detected.

BUG=chromium-os:31871
TEST=manually invoke "run_remote_tests.sh ... suspend"

Change-Id: I90a87792b131d8a67527ffb215fde281cc49e45e
Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33474
Reviewed-by: Gary Morain <gmorain@chromium.org>
11 years agoUPSTREAM:smsc75xx: eliminate unnecessary phy register read
Steve Glendinning [Fri, 4 May 2012 00:57:12 +0000 (00:57 +0000)]
UPSTREAM:smsc75xx: eliminate unnecessary phy register read

Only a write is necessary to clear the interrupt status, and we
don't use the value from the preceding read operation.  This
patch eliminates the unnecessary read.

BUG=chromium-os:31871
TEST=manually invoke "run_remote_tests.sh ... suspend"

Change-Id: I4b7b26a16704d383c7788d31fb0cd87e80ac7628
Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33473
Reviewed-by: Gary Morain <gmorain@chromium.org>
11 years agoUPSTREAM:smsc75xx: replace 0xffff with PHY_INT_SRC_CLEAR_ALL
Steve Glendinning [Fri, 4 May 2012 00:57:11 +0000 (00:57 +0000)]
UPSTREAM:smsc75xx: replace 0xffff with PHY_INT_SRC_CLEAR_ALL

This patch defines PHY_INT_SRC_CLEAR_ALL to replace the value 0xffff
in order to be more self-documenting.

This patch should make no functional change, it is purely cosmetic.

BUG=chromium-os:31871
TEST=manually invoke "run_remote_tests.sh ... suspend"

Change-Id: I35500f5c9a54ad1bfc9cbc6e45a112dd296bd022
Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33472
Reviewed-by: Gary Morain <gmorain@chromium.org>
11 years agoCHROMIUM: drm/i915: HDMI - Clear Audio Enable bit for Hot Plug
Wang Xingchao [Wed, 12 Sep 2012 19:21:30 +0000 (03:21 +0800)]
CHROMIUM: drm/i915: HDMI - Clear Audio Enable bit for Hot Plug

Clear Audio Enable bit to trigger unsolicated event to notify Audio
Driver part the HDMI hot plug change. The patch fixed the bug when
remove HDMI cable the bit was not cleared correctly.

In intel_hdmi_dpms(), if intel_hdmi->has_audio been true, the "Audio enable bit" will
be set to trigger unsolicated event to notify Alsa driver the change.

intel_hdmi->has_audio will be reset to false from intel_hdmi_detect() after
remove the hdmi cable, here's debug log:

[  187.494153] [drm:output_poll_execute], [CONNECTOR:17:HDMI-A-1] status updated from 1 to 2
[  187.525349] [drm:intel_hdmi_detect], HDMI: has_audio = 0

so when comes back to intel_hdmi_dpms(), the "Audio enable bit" will not be cleared. And this
cause the eld infomation and pin presence doesnot update accordingly in alsa driver side.

This patch will also trigger unsolicated event to alsa driver to notify the hot plug event:

[  187.853159] ALSA sound/pci/hda/patch_hdmi.c:772 HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=1
[  187.853268] ALSA sound/pci/hda/patch_hdmi.c:990 HDMI status: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=0

BUG=chromium-os:32760
TEST=plug/unplug HDMI cable while listening to youtube.

Change-Id: I8b31fb367ba2be6ef63098c3ca74f7b732eb4cdc
Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33089
Reviewed-by: Sameer Nanda <snanda@chromium.org>
11 years agoRevert "Add S2R functionality for HDMI and Mixer"
Jon Kliegman [Tue, 18 Sep 2012 17:25:38 +0000 (10:25 -0700)]
Revert "Add S2R functionality for HDMI and Mixer"

This reverts commit 6ca16eb0cd2ee10dfd7c66e26d42aa9fc923f6b8

Resume is panicking with this patch in.

BUG=chrome-os-partner:14185, chrome-os-partner:12958

Change-Id: I298d3465a779c35bf4829669b2002b42d0035a8f
Reviewed-on: https://gerrit.chromium.org/gerrit/33534
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
11 years agoAdd S2R functionality for HDMI and Mixer
Shirish S [Mon, 17 Sep 2012 12:35:52 +0000 (18:05 +0530)]
Add S2R functionality for HDMI and Mixer

This patch adds clock gating support for HDMI and
Mixer via runtime PM routines.

BUG=chrome-os-partner:12958
Test=On Snow,
DISPLAY=":0" xset dpms force off/on
HDMI hotplug in and out
rtcwake -m mem -s <X>
This system behaves as expected.

Change-Id: I19e1acedc7d732a9f3c6a35918bd67c2d867144a
Signed-off-by: Shirish S <s.shirish@samsung.com>
Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32216
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Shirish S <shirish@chromium.org>
Reviewed-by: Shirish S <shirish@chromium.org>
Commit-Ready: Shirish S <shirish@chromium.org>

11 years agoCHROMIUM: config: disable CONFIG_MMC_SDHCI_S3C config
Alim Akhtar [Sun, 16 Sep 2012 10:18:06 +0000 (19:18 +0900)]
CHROMIUM: config: disable CONFIG_MMC_SDHCI_S3C config

We dont use SDHCI-S3C controller on snow, lets disable this driver.

BUG=none
TEST=build ok booted on snow from SD card, did chromeos-install
     and then booted from eMMC. Connected WIFI and able to browse.
     run ./chromeos/script/kernelconfig oldconfig to normalize config.

Change-Id: Ide0eba1cdb41bed58ec4e14d6ff6bc83b5f78a4a
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/33397
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agommc: dw_mmc: Don't copy struct device; keep a pointer
Doug Anderson [Mon, 17 Sep 2012 22:47:59 +0000 (15:47 -0700)]
mmc: dw_mmc: Don't copy struct device; keep a pointer

It's not such a good idea to make a copy of your 'struct device'.
This was specifically causing a warning when you turn on list
debugging but was just generally bad voodoo:

  [    2.876227] ------------[ cut here ]------------
  [    2.880813] WARNING: at .../lib/list_debug.c:32 __list_add+0x64/0x88()
  [    2.891308] list_add corruption. prev->next should be next (eddded18), but was ef2ef5e0. (prev=ef2ef5e0).
  [    2.900855] Modules linked in:
  [    2.903904] [<80015960>] (unwind_backtrace+0x0/0xec) from [<804f5c94>] (dump_stack+0x20/0x24)
  [    2.912406] [<804f5c94>] (dump_stack+0x20/0x24) from [<8002a7ac>] (warn_slowpath_common+0x5c/0x74)
  [    2.921345] [<8002a7ac>] (warn_slowpath_common+0x5c/0x74) from [<8002a880>] (warn_slowpath_fmt+0x40/0x48)
  [    2.930893] [<8002a880>] (warn_slowpath_fmt+0x40/0x48) from [<80234f14>] (__list_add+0x64/0x88)
  [    2.939575] [<80234f14>] (__list_add+0x64/0x88) from [<802cae08>] (add_dr+0x78/0x90)
  [    2.947297] [<802cae08>] (add_dr+0x78/0x90) from [<802cb02c>] (devres_add+0x38/0x48)
  [    2.955021] [<802cb02c>] (devres_add+0x38/0x48) from [<802cb0b0>] (devm_kzalloc+0x74/0x84)
  [    2.963269] [<802cb0b0>] (devm_kzalloc+0x74/0x84) from [<803c85a4>] (dw_mci_probe+0x40/0xd74)
  [    2.971775] [<803c85a4>] (dw_mci_probe+0x40/0xd74) from [<803ca1cc>] (dw_mci_pltfm_probe+0xdc/0x11c)
  [    2.980889] [<803ca1cc>] (dw_mci_pltfm_probe+0xdc/0x11c) from [<802c9544>] (platform_drv_probe+0x24/0x28)
  [    2.990438] [<802c9544>] (platform_drv_probe+0x24/0x28) from [<802c8114>] (driver_probe_device+0xd8/0x210)
  [    3.000072] [<802c8114>] (driver_probe_device+0xd8/0x210) from [<802c82bc>] (__driver_attach+0x70/0x94)
  [    3.009446] [<802c82bc>] (__driver_attach+0x70/0x94) from [<802c6798>] (bus_for_each_dev+0x60/0x9c)
  [    3.018473] [<802c6798>] (bus_for_each_dev+0x60/0x9c) from [<802c7bf0>] (driver_attach+0x28/0x30)
  [    3.027327] [<802c7bf0>] (driver_attach+0x28/0x30) from [<802c7770>] (bus_add_driver+0xc0/0x23c)
  [    3.036094] [<802c7770>] (bus_add_driver+0xc0/0x23c) from [<802c8818>] (driver_register+0xac/0x138)
  [    3.045121] [<802c8818>] (driver_register+0xac/0x138) from [<802c9860>] (platform_driver_register+0x54/0x68)
  [    3.054930] [<802c9860>] (platform_driver_register+0x54/0x68) from [<802c989c>] (platform_driver_probe+0x28/0x9c)
  [    3.065174] [<802c989c>] (platform_driver_probe+0x28/0x9c) from [<8071eb14>] (dw_mci_init+0x18/0x24)
  [    3.074286] [<8071eb14>] (dw_mci_init+0x18/0x24) from [<8000869c>] (do_one_initcall+0xa0/0x170)
  [    3.082966] [<8000869c>] (do_one_initcall+0xa0/0x170) from [<80701a58>] (kernel_init+0xf8/0x1b4)
  [    3.091734] [<80701a58>] (kernel_init+0xf8/0x1b4) from [<8000f220>] (kernel_thread_exit+0x0/0x8)
  [    3.100505] ---[ end trace 21375439ea8d120e ]---

BUG=chrome-os-partner:13946
TEST=Booted; can use WiFi.

Change-Id: I4338bcf488096eb9fdcd395337fd60982a23d9c5
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33461
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoCHROMIUM: dts: add write protect gpio for SD card slot
Alim Akhtar [Mon, 17 Sep 2012 09:30:21 +0000 (18:30 +0900)]
CHROMIUM: dts: add write protect gpio for SD card slot

Add write protect gpio configuration for sd card slot.

BUG=chrome-os-partner:12467
TEST=build ok, booted on snow
     Insert SD card with write-protect lock ON and can see the gpio is
     high
     localhost ~ # grep -rn mci-wp /sys/kernel/debug/gpio
     50: gpio-61  (dw-mci-wp           ) in  hi
     Also
     localhost ~ # mount /dev/mmcblk1p3 /mnt/
     mount: block device /dev/mmcblk1p3 is write-protected, mounting
     read-only

     Now insert SD card with write-protect lock OFF and can see gpio is
     low
     grep -rn mci-wp /sys/kernel/debug/gpio
      50: gpio-61  (dw-mci-wp           ) in  lo
     Also
     mount /dev/mmcblk1p3 /mnt/ will mount it without any read-only
     warnning message.

Change-Id: I8c49412cb997b0f7bb84fe4377bdad5de284a79e
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/33425
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: usb: dwc3: Add delay of 10ms to allow phy clk to stabilise
Vikas C Sajjan [Fri, 14 Sep 2012 07:34:08 +0000 (16:34 +0900)]
CHROMIUM: usb: dwc3: Add delay of 10ms to allow phy clk to stabilise

Adds the delay of 10ms once the gpio line for phy clk is pulled high,
to allow the clock to stabilise.

BUG=chrome-os-partner:13972
TEST=1>booted kernel with USB 3.0 device connected on 3.0 port,
device detected and enumerated.
2>run 'powerd_suspend' while usb 3.0 device is connected on 3.0 port,
system resumes successfully, device detected and enumerated.

Change-Id: I9cc5ad96427b16ce0c7d6fb12b5ff802f27c5f2c
Signed-off-by: Jaehoon Kim <jh228.kim@samsung.com>
Signed-off-by: Vikas Sajjan <vikas.sajjan@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33299
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoexynos/drm: move setting DPCLKON before clk disable
Prathyush K [Sat, 15 Sep 2012 16:56:02 +0000 (22:26 +0530)]
exynos/drm: move setting DPCLKON before clk disable

Setting the register for DPCLKON is being done after clk_disable which
leads to a crash during S2R. This patch moves this before clk_disable.

BUG=chrome-os-partner:12832
TEST=None

Change-Id: If1f53089b09b141d21716aaf246a320abe024c94
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33392
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Anush Elangovan <anush@google.com>
Tested-by: Anush Elangovan <anush@google.com>
11 years agodrm/exynos: Clean-up IOMMU mapping creation order
Pawel Osciak [Thu, 30 Aug 2012 17:43:24 +0000 (10:43 -0700)]
drm/exynos: Clean-up IOMMU mapping creation order

The IOMMU mappings are shared across FIMD and HDMI. Due to the
ordering in the Makefile, the FIMD map call is executed first,
thus HDMI uses the parameters from there as well. The mapping size
passed in exynos_mixer.c is thus unused and misleading, so change
it to 0. Also, add sanity checks for that assumption in case
the ordering changes in the future.

BUG=None
TEST=None

Change-Id: Ib9c290ca4cdce72d7823fe3b4d584e0c2a7a9cd8
Signed-off-by: Pawel Osciak <posciak@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31898
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Pawel Osciak <posciak@google.com>
Tested-by: Pawel Osciak <posciak@google.com>
11 years agoCHROMIUM: ASoC: samsung i2s - Don't setup if already active.
Dylan Reid [Fri, 7 Sep 2012 02:10:13 +0000 (19:10 -0700)]
CHROMIUM: ASoC: samsung i2s - Don't setup if already active.

If the dai is already running when setup is called, skip setup.  Setting
up again caused set_sysclk to set rclk_srcrate to other->rclk_srcrate,
other would often be set to the default of 44.1.  Playing a 48k stream
then adding a 48k capture stream would lead to both streams set to 44.1
(The value of other->rclk_srcrate).

Similarly in shutdown, if either playback or capture are still active,
return instead of turning off the clocks.

BUG=chrome-os-partner:13769, 13749
TEST=aplay -Dhw:0 <any 48k wav file>, then arecord -Dhw:0 -f dat
/tmp/asdf.wav.  Make sure audio continues from aplay and is captured by
arecord, before this change aplay would stop and arecord would capture
silence.
Gmail settings, make sure microphone progress bar moves when you talk.

Change-Id: I1dd02854e234d23ac25ad686c7603e4bc9265b4e
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32477
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoRevert "EXYNOS: USB: Modify Common block power-down control for USB 2.0 PHY"
Doug Anderson [Sun, 16 Sep 2012 20:47:49 +0000 (13:47 -0700)]
Revert "EXYNOS: USB: Modify Common block power-down control for USB 2.0 PHY"

This reverts commit e62200853145dfa26d7614a0004b4a4912a901ae

The above commit allegedly causes problems with shutdown / suspend
on some systems, especially when running a recovery image and when
nothing is plugged into the USB 2.0 port.  It also has been known to
cause problems with no_console_suspend.  Although we don't
understand the connection between that CL and the problems,
it's wiser to revert while we investigate.

Nothing in this CL is so critical that a revert will really hurt.

This does the same thing as
<https://gerrit.chromium.org/gerrit/#/c/30814/>, but with a commit
message that indicates that it's a straight revert.

BUG=chrome-os-partner:10932, chrome-os-partner:13068
TEST=Automatic reboot after recovery works with this CL.

Change-Id: Ic01b4494b9e4414d22424c010280757d6e15e5a2
Reviewed-on: https://gerrit.chromium.org/gerrit/33400
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoCHROMIUM: spi: s3c64xx: fix compiler warning
Naveen Krishna Chatradhi [Tue, 11 Sep 2012 13:10:38 +0000 (18:40 +0530)]
CHROMIUM: spi: s3c64xx: fix compiler warning

Remove the following warnings:
drivers/spi/spi-s3c64xx.c: In function 's3c64xx_spi_dmacb':
drivers/spi/spi-s3c64xx.c:267:21: warning: comparison between 'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare]
drivers/spi/spi-s3c64xx.c:276:21: warning: comparison between 'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare]
drivers/spi/spi-s3c64xx.c: In function 'prepare_dma':
drivers/spi/spi-s3c64xx.c:295:21: warning: comparison between 'enum dma_data_direction' and 'enum dma_transfer_direction' [-Wenum-compare]

BUG=chromium-os:34287
TEST=emerge-daisy chromeos-kernel built without this warning.

Change-Id: I9b1079267b8c99ef8b2a6a6fe50599c9c5bd67f6
Signed-off-by: Naveen Krishna Chatradhi <naveen@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32920
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoRevert "drm/exynos: Implements proper disable of LCD clock"
Anush Elangovan [Sat, 15 Sep 2012 00:55:04 +0000 (17:55 -0700)]
Revert "drm/exynos: Implements proper disable of LCD clock"

This reverts commit 164bc3d5b187db2de34a87b4163dd5b83f610584

xrandr --output eDP-1 --off / --auto crashes with this change. Back it out for now.

Change-Id: I90bda4b7209f15e376fc386097fd43f84bc57121
Reviewed-on: https://gerrit.chromium.org/gerrit/33380
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Tested-by: Anush Elangovan <anush@google.com>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoexynos: cpuidle: Add arm down clock support
Abhilash Kesavan [Sun, 26 Aug 2012 13:58:42 +0000 (06:58 -0700)]
exynos: cpuidle: Add arm down clock support

In idle state down clocking the arm cores can result in power
savings. Program the power control registers to achieve this and
save these registers across a suspend/resume cycle. Also, modify
the target residency to improve the transition to idle state.

BUG=chrome-os-partner:12917
TEST=Ensure idle state transitions are occuring.

Change-Id: Iec8c00d0b7e54a199f4d770c4b4c3725af15c641
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31438
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Commit-Ready: Todd Broch <tbroch@chromium.org>

11 years agodrivers: mfs: tps65090: don't free IRQ of not initialized on probe
Jonathan Kliegman [Wed, 29 Aug 2012 15:10:19 +0000 (11:10 -0400)]
drivers: mfs: tps65090: don't free IRQ of not initialized on probe

Only free the irq if its been initalized during probe.

BUG=chromium-os:33995
TEST=None

Change-Id: I8905a4a7e777970037c953468f6fa976c07e12a0
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31709
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoasoc/exynos: dapm switch added for hdmi audio
Rahul Sharma [Wed, 29 Aug 2012 13:34:51 +0000 (19:04 +0530)]
asoc/exynos: dapm switch added for hdmi audio

i2s card is modified to add dapm switch for hdmi-audio. Without
this change in place audio will be heard from speakers as well as
hdmi output. This switch needs to be toggled from the user space
for enabling disabling hdmi audio.

BUG=none
TEST=verified various audio files using amixer
application.

Change-Id: I1e30ec316f1dbe2bf3d03ab7c42d0334b26ecfd7
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31696
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agoexynos5: dts: exynos5 hdmi-audio as child to hdmi node
Rahul Sharma [Fri, 24 Aug 2012 21:05:16 +0000 (02:35 +0530)]
exynos5: dts: exynos5 hdmi-audio as child to hdmi node

Hdmi audio is added as child node to hdmi device node.

BUG=none
TEST=verified various audio files using aplay
application.

Change-Id: Ie14b8959523aa56dd16405b30c520dd05ea8d026
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31365
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agoexynos5: dts: exynos5 hdmi-audio as plugin to i2s
Rahul Sharma [Fri, 24 Aug 2012 21:00:45 +0000 (02:30 +0530)]
exynos5: dts: exynos5 hdmi-audio as plugin to i2s

Hdmi audio is added as a plugin to i2s. This info is
passed as a property to i2s device node. Other plugins
can also be added to the same property.

BUG=none
TEST=verified various audio files using aplay
application.

Change-Id: Ie68d96d0777c1ceffdc473e62e53b64d14094c35
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31364
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agodrm/exynos5: hdmi-audio plf device is registered
Rahul Sharma [Fri, 24 Aug 2012 20:54:56 +0000 (02:24 +0530)]
drm/exynos5: hdmi-audio plf device is registered

For exynos5, hdmi-audio is registered as a platform device. hdmi-audio
driver is registerd from /sound/soc/samsung. This helps in configuring
the hdmi-audio though ALSA framework.

BUG=none
TEST=verified various audio files using aplay
application.

Change-Id: I19f563dec7ca5035e111f8bdbc18dd3bce0eeec0
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31363
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>

11 years agodrm/exynos5: hdmi-audio calls removed
Rahul Sharma [Fri, 24 Aug 2012 20:49:39 +0000 (02:19 +0530)]
drm/exynos5: hdmi-audio calls removed

For exynos5, hdmi-audio code is moved to /sound/soc. This helps in
reconfiguring the hdmi-audio whenever there is a change in audio
params.

BUG=none
TEST=verified various audio files using aplay
application.

Change-Id: I8f7a418b692c238d878fd7c0ad37a5aba8a75c52
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31362
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agoCHROMIUM: config: enable hdmi-audio
Rahul Sharma [Fri, 24 Aug 2012 20:41:48 +0000 (02:11 +0530)]
CHROMIUM: config: enable hdmi-audio

Enable hdmi-audio

BUG=none
TEST=verified various audio files using aplay
application.

Change-Id: Ibe227003d0d9a29e8a184cd99e21264466f6627e
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31361
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agoasoc/exynos: i2s dai modified to call plugin api
Rahul Sharma [Fri, 24 Aug 2012 21:24:50 +0000 (02:54 +0530)]
asoc/exynos: i2s dai modified to call plugin api

i2s dai is modified to accept the plugin connection from hdmi-audio
and similar plugins. These plugins will be passed from DT. With this
change, all format related calls will also be forwarded to the
attached plugin.

BUG=none
TEST=verified various audio files using aplay
application.

Change-Id: I8767ae72a9f8e1d55760185317bff6078aaa9b23
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31360
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agoasoc/exynos: add hdmi-audio as a plf driver and plugin
Rahul Sharma [Fri, 24 Aug 2012 21:18:56 +0000 (02:48 +0530)]
asoc/exynos: add hdmi-audio as a plf driver and plugin

hdmi-audio is added as a platform driver. exynos-hdmi-audio device will
instantiated by drm hdmi driver.With this change hdmi-audio is like
dummy codec driver attached to i2s and recieving calls for audio
format change.

BUG=none
TEST=verified various audio files using aplay
application.

Change-Id: I385c9443aa888d018ac852ca2e7b03966a12e4dc
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31359
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agodrm/exynos: mixer: Move layer update out of vsync
Sean Paul [Thu, 13 Sep 2012 23:18:47 +0000 (16:18 -0700)]
drm/exynos: mixer: Move layer update out of vsync

Move the mixer's layer update command out of the vsync interrupt and do
it only once per layer per vsync. We also don't want to finish a
pageflip if a layer update is in progress since it will still be
scanning out and X/userspace will start drawing to the front buffer.

BUG=chrome-os-partner:13692
TEST=Tested on snow, no corruption detected

Change-Id: I811da726daaf52117f9a42a299dbc98b43d7c3bd
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33252
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoUPSTREAM: mutex: Place lock in contended state after fastpath_lock failure
Will Deacon [Fri, 10 Aug 2012 14:22:09 +0000 (15:22 +0100)]
UPSTREAM: mutex: Place lock in contended state after fastpath_lock failure

ARM recently moved to asm-generic/mutex-xchg.h for its mutex
implementation after the previous implementation was found to be missing
some crucial memory barriers. However, this has revealed some problems
running hackbench on SMP platforms due to the way in which the
MUTEX_SPIN_ON_OWNER code operates.

The symptoms are that a bunch of hackbench tasks are left waiting on an
unlocked mutex and therefore never get woken up to claim it. This boils
down to the following sequence of events:

        Task A        Task B        Task C        Lock value
0                                                     1
1       lock()                                        0
2                     lock()                          0
3                     spin(A)                         0
4       unlock()                                      1
5                                   lock()            0
6                     cmpxchg(1,0)                    0
7                     contended()                    -1
8       lock()                                        0
9       spin(C)                                       0
10                                  unlock()          1
11      cmpxchg(1,0)                                  0
12      unlock()                                      1

At this point, the lock is unlocked, but Task B is in an uninterruptible
sleep with nobody to wake it up.

This patch fixes the problem by ensuring we put the lock into the
contended state if we fail to acquire it on the fastpath, ensuring that
any blocked waiters are woken up when the mutex is released.

BUG=chrome-os-partner:13943
TEST=Booted

Change-Id: If605d2ecb15562b2444928fe4d4ec35cc6dfdb21
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Chris Mason <chris.mason@fusionio.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: <stable@vger.kernel.org>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-6e9lrw2avczr0617fzl5vqb8@git.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 0bce9c46bf3b15f485d82d7e81dabed6ebcc24b1)
Reviewed-on: https://gerrit.chromium.org/gerrit/33327
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+
Will Deacon [Fri, 13 Jul 2012 18:15:40 +0000 (19:15 +0100)]
UPSTREAM: ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+

The open-coded mutex implementation for ARMv6+ cores suffers from a
severe lack of barriers, so in the uncontended case we don't actually
protect any accesses performed during the critical section.

Furthermore, the code is largely a duplication of the ARMv6+ atomic_dec
code but optimised to remove a branch instruction, as the mutex fastpath
was previously inlined. Now that this is executed out-of-line, we can
reuse the atomic access code for the locking (in fact, we use the xchg
code as this produces shorter critical sections).

This patch uses the generic xchg based implementation for mutexes on
ARMv6+, which introduces barriers to the lock/unlock operations and also
has the benefit of removing a fair amount of inline assembly code.

BUG=chrome-os-partner:13943
TEST=Booted

Change-Id: Idf504e4778be7cdc50c5f1a121fe24c53a9746b7
Cc: <stable@vger.kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Pitre <nico@linaro.org>
Reported-by: Shan Kang <kangshan0910@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit a76d7bd96d65fa5119adba97e1b58d95f2e78829)
Reviewed-on: https://gerrit.chromium.org/gerrit/33324
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoIncrease XHCI suspend timeout to 16ms
Michael Spang [Wed, 12 Sep 2012 22:52:25 +0000 (18:52 -0400)]
Increase XHCI suspend timeout to 16ms

The Intel XHCI specification says that after clearing the run/stop bit
the controller may take up to 16ms to halt. We've seen a device take
14ms, which with the current timeout of 10ms causes the kernel to
abort the suspend. Increasing the timeout to the recommended value
fixes the problem.

BUG=chrome-os-partner:13799
TEST=suspend, check for "WARN: xHC CMD_RUN timeout"

Change-Id: I1a8a1442a73e7778b91cd652f256cef447874fcd
Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33239
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Vikas Sajjan <vikas.sajjan@samsung.com>
11 years agoUPSTREAM: staging/gdm72xx: usb_boot: replace firmware upgrade API
Macpaul Lin [Thu, 13 Sep 2012 10:11:55 +0000 (18:11 +0800)]
UPSTREAM: staging/gdm72xx: usb_boot: replace firmware upgrade API

Replace file I/O of reading firmware usb_boot()
by request_firmware().

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1839c7ebd9363cc73b55ce48d4c3c6823c2fdd42)

Change-Id: I763502a1e40cb1131369b55ad339e00df922669d
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33282
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: usb_boot: coding style cleanup
Macpaul Lin [Thu, 13 Sep 2012 10:11:54 +0000 (18:11 +0800)]
UPSTREAM: staging/gdm72xx: usb_boot: coding style cleanup

1. Coding style re-formatting (tabs).
2. Remove unused MIN() marco.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Cc: Paul Stewart <pstew@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 443242d2feb68c90fbd96de212d76d7858ac0834)

Change-Id: I10ca026c666ed4a35b27e29f48151ad15904e5c6
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33281
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoUPSTREAM: staging: gdm72xx: simplify alloc_tx_struct and alloc_rx_struct
Ben Chan [Wed, 12 Sep 2012 18:43:41 +0000 (11:43 -0700)]
UPSTREAM: staging: gdm72xx: simplify alloc_tx_struct and alloc_rx_struct

This patch simplifies alloc_tx_struct and alloc_rx_struct in gdm_sdio.c
and gdm_usb.c by replacing kmalloc+memset with kzalloc and reorganizing
the code.

Signed-off-by: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 129575f2a8958a1e90780b0d5b80702bb45b5aac)

Change-Id: I59d1bfb0e5a525b9d3e5663a32e1f7f293d07037
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33280
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: gdm_usb coding style clean up
Macpaul Lin [Wed, 12 Sep 2012 09:49:24 +0000 (17:49 +0800)]
UPSTREAM: staging/gdm72xx: gdm_usb coding style clean up

gdm_usb.* coding style clean up.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Cc: Paul Stewart <pstew@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 0d660025564343e7c20c096d386f8ef8bacebdcd)

Change-Id: If45efca67169fdfc9ab3e95e57ce91bc21cb100c
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33279
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoUPSTREAM: drivers/staging/gdm72xx/gdm_sdio.c: Remove useless kfree
Peter Senna Tschudin [Wed, 12 Sep 2012 15:06:44 +0000 (17:06 +0200)]
UPSTREAM: drivers/staging/gdm72xx/gdm_sdio.c: Remove useless kfree

Remove useless kfree() and clean up code related to the removal.

The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
position p1,p2;
expression x;
@@

if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; }

@unchanged exists@
position r.p1,r.p2;
expression e <= r.x,x,e1;
iterator I;
statement S;
@@

if (x@p1 == NULL) { ... when != I(x,...) S
                        when != e = e1
                        when != e += e1
                        when != e -= e1
                        when != ++e
                        when != --e
                        when != e++
                        when != e--
                        when != &e
   kfree@p2(x); ... return ...; }

@ok depends on unchanged exists@
position any r.p1;
position r.p2;
expression x;
@@

... when != true x@p1 == NULL
kfree@p2(x);

@depends on !ok && unchanged@
position r.p2;
expression x;
@@

*kfree@p2(x);
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 47ad3428a1086af425447f763705e06b16ae905d)

Change-Id: I9736fbae327b73ec991a905397bcd0127c482ed3
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33278
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: remove camel-case vars in gdm_qos
Macpaul Lin [Tue, 11 Sep 2012 07:55:31 +0000 (15:55 +0800)]
UPSTREAM: staging/gdm72xx: remove camel-case vars in gdm_qos

Remove camel-case variables in gdm_qos.h and gdm_qos.c

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
Cc: Paul Stewart <pstew@chromium.org>
Cc: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 13b2663c95f6f30f835ef92ef51c9aff0b3f09d6)

Change-Id: I69de363ab13fc11a9c8cc707d354aebe3e58ba6c
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33277
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoUPSTREAM: slightly reduce lossage in gdm72xx
Al Viro [Sun, 22 Jul 2012 17:09:14 +0000 (21:09 +0400)]
UPSTREAM: slightly reduce lossage in gdm72xx

* filp_close() needs non-NULL second argument only if it'd been in descriptor
table
* opened files have non-NULL dentries, TYVM
* ... and those dentries are positive - it's kinda hard to open a file that
doesn't exist.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
(cherry picked from commit 09fada5b5f1f56502bb14f36a69a2c31cea262be)

Change-Id: I33defe5b2835430c81cfea9e5c8a3d53854cb8eb
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33276
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoMap standard F13 scancode 08/F0_08 to keycode 183 (KEY_F13)
agnescheng [Thu, 13 Sep 2012 07:31:36 +0000 (15:31 +0800)]
Map standard F13 scancode 08/F0_08 to keycode 183 (KEY_F13)

Map standard F13 scancode 08/F0_08 to keycode 183 (KEY_F13) to enable
screen lock using PS/2 ketboard on Butterfly.

Signed-off-by: agnescheng <agnescheng@chromium.org>
BUG=chrome-os-partner:13567
TEST=Test on butterfly. Press F13 on butterfly PS/2 keyboard to lock
screen.

Change-Id: Ice2c18bac5a1098d65a2c6fed8fc1f80ff141324
Reviewed-on: https://gerrit.chromium.org/gerrit/33186
Reviewed-by: Terry Lambert <tlambert@chromium.org>
Reviewed-by: Mark Hayter <mdhayter@chromium.org>
Commit-Ready: Agnes Cheng <agnescheng@google.com>
Tested-by: Agnes Cheng <agnescheng@google.com>
11 years agoCHROMIUM: dts: Add BUCK8 operating mode bindings
Abhilash Kesavan [Tue, 28 Aug 2012 15:57:33 +0000 (08:57 -0700)]
CHROMIUM: dts: Add BUCK8 operating mode bindings

BUCK8 can be turned off when the BUCK8EN bits of BUCK8CTRL register
are set to '01/10/00'. However, the register is set to '11' which
ignores the ENB8 signal. Set the operating mode for the BUCK to
obtain power savings by turning off the eMMC.

BUG=chrome-os-partner:12665
TEST=Verify BUCK8EN as "01". Mount, read and write the eMMC post resume.
Do a chromeos-install on the eMMC, boot from eMMC and check functioning
post resume. Suspend the system (rtcwake -m mem -s 25) and measure BUCK8
power. No significant change in power consumption.

Change-Id: I10768d46fd4fc6061e522fbcf570a5ddaa560114
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31597
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
11 years agoexynos/gsc: make m2m ctx null during resume
Prathyush K [Tue, 11 Sep 2012 17:55:17 +0000 (23:25 +0530)]
exynos/gsc: make m2m ctx null during resume

The gsc driver updates all its registers from the driver's internal context
whenever the m2m context is made NULL. Currently, this is happening
only if there is a job pending in resume. This should be done even if
there is no job pending during resume. This ensures that gsc runs
normally when there is a suspend to resume call during video playback.

BUG=chrome-os-partner:12326
TEST=suspend/resume during video playback on Snow. Video continues
playing normally after resume.

Change-Id: Ia353ff901081bdd9522d234a49363a3525cf308b
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32917
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
11 years agoARM: EXYNOS5: dts: Move mfc after sysmmu declarations
Jonathan Kliegman [Mon, 10 Sep 2012 21:23:18 +0000 (17:23 -0400)]
ARM: EXYNOS5: dts: Move mfc after sysmmu declarations

The mfc depends on sysmmu and gsc being restored so move it after them
in the exynos5250.dtsi file

BUG=chrome-os-partner:12326
TEST=suspend/resume with video playing, no panic.

Change-Id: I9220ca15b8598395dc7745b371ab04824bf878c7
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32802

11 years agoUPSTREAM: mwifiex: remove AMSDU_AGGR_CTRL command response handler
Bing Zhao [Wed, 12 Sep 2012 21:50:51 +0000 (14:50 -0700)]
UPSTREAM: mwifiex: remove AMSDU_AGGR_CTRL command response handler

HostCmd_CMD_AMSDU_AGGR_CTRL is never called with GET action.
So the code in mwifiex_ret_amsdu_aggr_ctrl() becomes redundant.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:13998
TEST=Build and run autotest suites

Change-Id: I92dff9846c954405a80af275cdfbff50fda6496d
Reviewed-on: https://gerrit.chromium.org/gerrit/33147
Reviewed-by: Gary Morain <gmorain@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agoUPSTREAM: mwifiex: remove 11N_CFG command response handler
Bing Zhao [Wed, 12 Sep 2012 21:49:11 +0000 (14:49 -0700)]
UPSTREAM: mwifiex: remove 11N_CFG command response handler

HostCmd_CMD_11N_CFG is never called with GET action. So the code in
mwifiex_ret_11n_cfg() becomes redundant.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:13998
TEST=Build and run autotest suites

Change-Id: I83acad8fd48b2cee99260ad6cb4d94bf8e25f4fa
Reviewed-on: https://gerrit.chromium.org/gerrit/33146
Reviewed-by: Gary Morain <gmorain@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agoUPSTREAM: mwifiex: remove get operation code for SUBSCRIBE EVENT command
Bing Zhao [Wed, 12 Sep 2012 21:46:05 +0000 (14:46 -0700)]
UPSTREAM: mwifiex: remove get operation code for SUBSCRIBE EVENT command

We don't send this command with GET action. Redundant code in
mwifiex_ret_subsc_evt() is removed in this patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:13998
TEST=Build and run autotest suites

Change-Id: I426e20adf7c509b253386694e4ae90c4b052a682
Reviewed-on: https://gerrit.chromium.org/gerrit/33145
Reviewed-by: Gary Morain <gmorain@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agos5p-mfc: Change scratch buffer size for VP8 decoder
Arun Kumar K [Tue, 11 Sep 2012 16:05:42 +0000 (21:35 +0530)]
s5p-mfc: Change scratch buffer size for VP8 decoder

Scratch buffer size of VP8 decoder is changed as per the
firmware v6.5. The earlier size was still using the v6.1
values.

BUG=none
TEST=Played VP8 test streams with secomx

Change-Id: Iefb71d0b520dc3922f1026ba795235b2961b8465
Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32916
Commit-Ready: kiran <kiran@chromium.org>
Reviewed-by: kiran <kiran@chromium.org>
11 years agoiommu/exynos: change dev_err to dev_dbg when failed to add to genpd
Prathyush K [Tue, 11 Sep 2012 10:41:26 +0000 (16:11 +0530)]
iommu/exynos: change dev_err to dev_dbg when failed to add to genpd

A device is added to its genpd by finding the of node property
'samsung,pd'. If such a property is not found, then the device is not
added to any genpd which is currently the case with fimd, g2d, hdmi.
When this fails, we log the information using dev_err which is now
changed to dev_dbg.

These error messages should not appear during bootup.
[    0.101028] s5p-sysmmu s5p-sysmmu.2: failed to add to genpd
[    0.101119] s5p-sysmmu s5p-sysmmu.27: failed to add to genpd
[    0.101152] s5p-sysmmu s5p-sysmmu.28: failed to add to genpd

BUG=chrome-os-partner:13884
TEST=Booted on snow and the above error message do not appear.

Change-Id: I5f384a244aefaee07daf387269d9478c58128197
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32908
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Reviewed-by: naveen krishna chatradhi <naveen@chromium.org>
Tested-by: naveen krishna chatradhi <naveen@chromium.org>
Commit-Ready: naveen krishna chatradhi <naveen@chromium.org>

11 years agoCHROMIUM: Input: atmel_mxt_ts - enable RPTEN if can wakeup from suspend
Yufeng Shen [Wed, 12 Sep 2012 16:42:16 +0000 (12:42 -0400)]
CHROMIUM: Input: atmel_mxt_ts - enable RPTEN if can wakeup from suspend

Currently when going into suspend and if wakeup is enabled,
the driver will check whether the T9_ctrl ENABLE bit is set and
if not, it will toggle the bit so that T9 object is enabled
to make wakeup possible during suspend.

With recent change to T9_ctrl's default value to be 0x81, it
is enabled (ENABLE bit set) but not reporting (RPTEN bit not
set) which prevents touches reported back during suspend.

To fix this, this patches adds checking that whether both ENABLE
and RPTEN bits are set, and if not, set both of them.

Signed-off-by: Yufeng Shen <miletus@chromium.org>
BUG=chrome-os-partner:9192
TEST=Use powerd_suspend to supend the device and then make sure
     touching the touch device wakes up the system.

Change-Id: I234531ae91627f7e1cccbef5810a18a5af6cbae9
Reviewed-on: https://gerrit.chromium.org/gerrit/33088
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
11 years agoUPSTREAM: mwifiex: support custom world regulatory domain
Bing Zhao [Tue, 11 Sep 2012 02:06:49 +0000 (19:06 -0700)]
UPSTREAM: mwifiex: support custom world regulatory domain

country 00 (world regulatory domain) doesn't define channels
52 - 64 and 100 - 140. Add these channels to our custom world
regulatory domain.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:12711
TEST=Enabled CONFIG_CFG80211_REG_DEBUG=y to confirm cfg80211 is
using our custom world regulatory domain as its default setting.
Also passed WiFiMatFunc.002Check11a test which checks channel 64.

Change-Id: I90069bff54cf63ee00bc5865269a0ebc7f66c7eb
Reviewed-on: https://gerrit.chromium.org/gerrit/33101
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
11 years agoUPSTREAM: mwifiex: do not hint regulatory domain with f/w country code
Bing Zhao [Tue, 11 Sep 2012 01:52:20 +0000 (18:52 -0700)]
UPSTREAM: mwifiex: do not hint regulatory domain with f/w country code

We will use world regulatory domain (country 00) as default
when driver is loaded. Later after a successful association
cfg80211 will change the regulatory domain to a specific country
if the AP has advertised country IE.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:12711
TEST=Checked dmesg to confirm that we do not hint cfg80211 with
US regulatory domain for SD8797 card with US region code 0x10.
Also checked that cfg80211 does use default world regulatory
domain while disconnected, and change to US regulatory domain
after associated to AP with US country IE in beacon/prob_resp.

Change-Id: Id82ec3df35f94985f0f8679e04f40749b4dd0164
Reviewed-on: https://gerrit.chromium.org/gerrit/33100
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
11 years agoUPSTREAM: mwifiex: use country ie of requested AP while associating
Bing Zhao [Tue, 11 Sep 2012 01:33:27 +0000 (18:33 -0700)]
UPSTREAM: mwifiex: use country ie of requested AP while associating

AP's country ie is parsed and 11d information is updated in firmware
while associating. Previous mwifiex_send_domain_info_cmd_fw() call in
association path is not necessary now. Hence it is removed in this
patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:12711
TEST=Enabled dynamic debug to dump the cmd 0x5b being sent to f/w
and verified the cmd body contains the country ie for the AP we are
associating.

Change-Id: Ia3d764433daf22bd8d3b90a3cfc49d2904189870
Reviewed-on: https://gerrit.chromium.org/gerrit/33099
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
11 years agodrm/i915: Expose adaptive backlight properties on LVDS connectors.
Stéphane Marchesin [Wed, 12 Sep 2012 17:36:32 +0000 (10:36 -0700)]
drm/i915: Expose adaptive backlight properties on LVDS connectors.

So far we only exposed it on eDP connectors. Let's also expose it on LVDS.

BUG=none
TEST=by hand, ran xrandr --verbose and checked the adaptive backlight
TEST=property is here

Change-Id: I70d836ff437ace10acf59c780aa5f06428ecef58
Reviewed-on: https://gerrit.chromium.org/gerrit/33098
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>

11 years agoCHROMIUM: ALSA: ASoC: max98095 0 Add built in EQ for 44.1k and 48k.
Dylan Reid [Tue, 7 Aug 2012 16:08:49 +0000 (09:08 -0700)]
CHROMIUM: ALSA: ASoC: max98095 0 Add built in EQ for 44.1k and 48k.

EQ setting supplied by Maxim after tuning a snow PVT device.
We need to move this to device tree eventually, but Samsung says it is
important for speaker protection to get it in right away.

BUG=chrome-os-partner:12039
TEST=listen to youtube with EQ enabled and disabled.

Change-Id: I269e70daa79c5c83834c801d3b0dd824da88607e
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33065

11 years agoCHROMIUM: iommu/exynos: Fix free now that we're using kmem_cache
Doug Anderson [Wed, 12 Sep 2012 17:18:11 +0000 (10:18 -0700)]
CHROMIUM: iommu/exynos: Fix free now that we're using kmem_cache

The previous CL ("CHROMIUM: iommu/exynos: Fix allocation to be safer
in terms of alignment") introduced a potential bug where kfree() was
being called still in one case.  It doesn't appear that we run this
codepath in normal usage (so we actually have a memory leak), but it's
good to fix just in case.

BUG=chrome-os-partner:13948
TEST=boot with slub debugging turn on; play youtube video

Change-Id: Ie9aff3e180c95c6f9f3643efe8f98cf5b5693320
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33094
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
11 years agoCHROMIUM: iommu/exynos: Fix allocation to be safer in terms of alignment
Sonny Rao [Wed, 12 Sep 2012 04:27:06 +0000 (21:27 -0700)]
CHROMIUM: iommu/exynos: Fix allocation to be safer in terms of alignment

The code was expecting kzalloc to align to the size of the allocation
even though that isn't guaranteed, and even had a BUG() to catch when it
happened.  This started triggering with SLUB debugging turned on.  Fix it
by using a slab which returns objects that are properly aligned.

BUG=chrome-os-partner:13948
TEST=boot with slub debugging turn on

Change-Id: Icdf9475233e8c80f090f624a4ca5497011d4aa33
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33053
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Prathyush Kalashwaram <prathyush@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
11 years agoUPSTREAM: kernel: panic: fix a possible deadlock in panic()
Vikram Mulukutla [Mon, 30 Jul 2012 21:39:58 +0000 (14:39 -0700)]
UPSTREAM: kernel: panic: fix a possible deadlock in panic()

panic_lock is meant to ensure that panic processing takes place only on
one cpu; if any of the other cpus encounter a panic, they will spin
waiting to be shut down.

However, this causes a regression in this scenario:

1. Cpu 0 encounters a panic and acquires the panic_lock
   and proceeds with the panic processing.
2. There is an interrupt on cpu 0 that also encounters
   an error condition and invokes panic.
3. This second invocation fails to acquire the panic_lock
   and enters the infinite while loop in panic_smp_self_stop.

Thus all panic processing is stopped, and the cpu is stuck for eternity
in the while(1) inside panic_smp_self_stop.

To address this, disable local interrupts with local_irq_disable before
acquiring the panic_lock.  This will prevent interrupt handlers from
executing during the panic processing, thus avoiding this particular
problem.

BUG=chrome-os-partner:13943
TEST=booted chrome and played back a Video file in the browser.

Change-Id: I156cd63ea18309ef59cbeb86f36282cbe79b4a4c
Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com>
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 190320c3b6640d4104650f55ff69611e050ea06b)
Reviewed-on: https://gerrit.chromium.org/gerrit/33067
Reviewed-by: Abhinav Kochhar <kochhar.abhinav@gmail.com>
Tested-by: Abhinav Kochhar <kochhar.abhinav@gmail.com>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: mm: dma-mapping: fix compiler warning
Naveen Krishna Chatradhi [Tue, 11 Sep 2012 13:03:55 +0000 (18:33 +0530)]
CHROMIUM: mm: dma-mapping: fix compiler warning

Remove the following warning:
arch/arm/mm/dma-mapping.c: In function 'arm_dma_alloc':
arch/arm/mm/dma-mapping.c:582:122: warning: 'page' may be used uninitialized in this function [-Wmaybe-uninitialized]
arch/arm/mm/dma-mapping.c:542:15: note: 'page' was declared here

BUG=chromium-os:34287
TEST=emerge-daisy chromeos-kernel built without this warning.

Change-Id: I8469cef3d88adaf8262e2447c993748d708c7c34
Signed-off-by: Naveen Krishna Chatradhi <naveen@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32918
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoCHROMIUM: Bluetooth: Add MD222 [0489:e04e], [04ca:700b]
Scott James Remnant [Tue, 11 Sep 2012 20:38:52 +0000 (13:38 -0700)]
CHROMIUM: Bluetooth: Add MD222 [0489:e04e], [04ca:700b]

BUG=none
TEST=hciconfig shows device and hcitool scan works

Change-Id: I3544f7bc2dd7809cc00fbcb6f260a46429da7620
Signed-off-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32968
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoARM: dma-mapping: Skip cache maint for invalid page
Hiroshi Doyu [Sun, 9 Sep 2012 14:27:20 +0000 (19:57 +0530)]
ARM: dma-mapping: Skip cache maint for invalid page

Skip cache maint for invalid page but warn it.

BUG=chrome-os-partner:13935
TEST=Play VIDEO on Snow

Change-Id: I4dfd4f7a7c5f5559a45d115b369c0b44ebdca5db
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32665
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: IOMMU allocates pages from atomic_pool with GFP_ATOMIC
Hiroshi Doyu [Tue, 28 Aug 2012 05:13:04 +0000 (08:13 +0300)]
UPSTREAM: ARM: dma-mapping: IOMMU allocates pages from atomic_pool with GFP_ATOMIC

Make use of the same atomic pool as DMA does, and skip a kernel page
mapping which can involve sleep'able operations at allocating a kernel
page table.

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: I9452deb7ad6c42d53d4db0656c74e8844e9ec092
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 479ed93a4b98eef03fd8260f7ddc00019221c450)
Reviewed-on: https://gerrit.chromium.org/gerrit/32664
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: Introduce __atomic_get_pages() for __iommu_get_pages()
Hiroshi Doyu [Tue, 28 Aug 2012 05:13:03 +0000 (08:13 +0300)]
UPSTREAM: ARM: dma-mapping: Introduce __atomic_get_pages() for __iommu_get_pages()

Support atomic allocation in __iommu_get_pages().

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: I2da41ab739f69e2a563365b7035ff8060b648401
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
[moved __atomic_get_pages() under #ifdef CONFIG_ARM_DMA_USE_IOMMU
 to avoid unused fuction warning for no-IOMMU case]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 665bad7bb911d392000fa69bc6b599c0df992504)
Reviewed-on: https://gerrit.chromium.org/gerrit/32663
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: Refactor out to introduce __in_atomic_pool
Hiroshi Doyu [Tue, 28 Aug 2012 05:13:02 +0000 (08:13 +0300)]
UPSTREAM: ARM: dma-mapping: Refactor out to introduce __in_atomic_pool

Check the given range("start", "size") is included in "atomic_pool" or not.

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: I03e461bf5a66656321813385333722ea4e30e25a
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 21d0a75951ccf71f671eb24b61a8ad2b497be4b4)
Reviewed-on: https://gerrit.chromium.org/gerrit/32662
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: atomic_pool with struct page **pages
Hiroshi Doyu [Tue, 28 Aug 2012 05:13:01 +0000 (08:13 +0300)]
UPSTREAM: ARM: dma-mapping: atomic_pool with struct page **pages

struct page **pages is necessary to align with non atomic path in
__iommu_get_pages(). atomic_pool() has the intialized **pages instead
of just *page.

BUG=chrome-os-partner:13935
TEST=Play VIDEO on Snow

Change-Id: Ia68cf6fc4530ff5fb6cd4f2b345c9b707a38bf55
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 6b3fe47264262fa082897ebe8ae01041eae65e14)
Reviewed-on: https://gerrit.chromium.org/gerrit/32661
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: DMA-Mapping: print warning when atomic coherent allocation fails
Marek Szyprowski [Wed, 22 Aug 2012 12:50:42 +0000 (14:50 +0200)]
UPSTREAM: ARM: DMA-Mapping: print warning when atomic coherent allocation fails

Print a loud warning when system runs out of memory from atomic DMA
coherent pool to let users notice the potential problem.

BUG=chrome-os-partner:13935
TEST=Compiled and booted

Change-Id: I80a82589ecf3da7fa5d6b8aa96130cf41a5ba3ea
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit fb71285f0c1633a85544784aae7577502274b77a)
Reviewed-on: https://gerrit.chromium.org/gerrit/32964
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: fix error path for memory allocation failure
Marek Szyprowski [Fri, 27 Jul 2012 15:12:50 +0000 (17:12 +0200)]
UPSTREAM: ARM: dma-mapping: fix error path for memory allocation failure

This patch fixes incorrect check in error path. When the allocation of
first page fails, the kernel ops appears due to accessing -1 element of
the pages array.

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: Ib59f0b01a3674b6b15c99785e66587cb09421f99
Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 9fa8af91f0679f2abbebe1382b937264f3a8b981)
Reviewed-on: https://gerrit.chromium.org/gerrit/32963
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: add more sanity checks in arm_dma_mmap()
Marek Szyprowski [Mon, 30 Jul 2012 07:35:26 +0000 (09:35 +0200)]
UPSTREAM: ARM: dma-mapping: add more sanity checks in arm_dma_mmap()

Add some sanity checks and forbid mmaping of buffers into vma areas larger
than allocated dma buffer.

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: Ie81e97810a105d271a6b386112e8ca5dc9176db4
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 50262a4bf38dd70486e9fce2b8235d5ae3e0f627)
Reviewed-on: https://gerrit.chromium.org/gerrit/32962
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoFIXUP: ARM: dma-mapping: remove custom consistent dma region
Doug Anderson [Tue, 11 Sep 2012 18:24:02 +0000 (11:24 -0700)]
FIXUP: ARM: dma-mapping: remove custom consistent dma region

This attempts to fix the above comment to match more closely
what landed upstream.  We originally had v3 of the patch but
it went up to v6.

There are still a few differences from upstream.  Most notably:
* I didn't take the VM_ARM_DMA_CONSISTENT stuff.  I wasn't sure
  how far reaching that was.
* We have a slightly different way for disabling CMA.  I didn't
  try to match upstream.

Note that part of the original patch moved to a separate
patch: "add more sanity checks in arm_dma_mmap()".  See the next
CL.

BUG=chrome-os-partner:13935
TEST=Bootup

Change-Id: I9a642884fbd3dcb17f68e687539a7772caf41f8c
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32961
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoUPSTREAM: ARM: dma-mapping: modify condition check while freeing pages
Prathyush K [Mon, 16 Jul 2012 06:59:55 +0000 (08:59 +0200)]
UPSTREAM: ARM: dma-mapping: modify condition check while freeing pages

WARNING: at mm/vmalloc.c:1471 __iommu_free_buffer+0xcc/0xd0()
Trying to vfree() nonexistent vm area (ef095000)
Modules linked in:
[<c0015a18>] (unwind_backtrace+0x0/0xfc) from [<c0025a94>] (warn_slowpath_common+0x54/0x64)
[<c0025a94>] (warn_slowpath_common+0x54/0x64) from [<c0025b38>] (warn_slowpath_fmt+0x30/0x40)
[<c0025b38>] (warn_slowpath_fmt+0x30/0x40) from [<c0016de0>] (__iommu_free_buffer+0xcc/0xd0)
[<c0016de0>] (__iommu_free_buffer+0xcc/0xd0) from [<c0229a5c>] (exynos_drm_free_buf+0xe4/0x138)
[<c0229a5c>] (exynos_drm_free_buf+0xe4/0x138) from [<c022b358>] (exynos_drm_gem_destroy+0x80/0xfc)
[<c022b358>] (exynos_drm_gem_destroy+0x80/0xfc) from [<c0211230>] (drm_gem_object_free+0x28/0x34)
[<c0211230>] (drm_gem_object_free+0x28/0x34) from [<c0211bd0>] (drm_gem_object_release_handle+0xcc/0xd8)
[<c0211bd0>] (drm_gem_object_release_handle+0xcc/0xd8) from [<c01abe10>] (idr_for_each+0x74/0xb8)
[<c01abe10>] (idr_for_each+0x74/0xb8) from [<c02114e4>] (drm_gem_release+0x1c/0x30)
[<c02114e4>] (drm_gem_release+0x1c/0x30) from [<c0210ae8>] (drm_release+0x608/0x694)
[<c0210ae8>] (drm_release+0x608/0x694) from [<c00b75a0>] (fput+0xb8/0x228)
[<c00b75a0>] (fput+0xb8/0x228) from [<c00b40c4>] (filp_close+0x64/0x84)
[<c00b40c4>] (filp_close+0x64/0x84) from [<c0029d54>] (put_files_struct+0xe8/0x104)
[<c0029d54>] (put_files_struct+0xe8/0x104) from [<c002b930>] (do_exit+0x608/0x774)
[<c002b930>] (do_exit+0x608/0x774) from [<c002bae4>] (do_group_exit+0x48/0xb4)
[<c002bae4>] (do_group_exit+0x48/0xb4) from [<c002bb60>] (sys_exit_group+0x10/0x18)
[<c002bb60>] (sys_exit_group+0x10/0x18) from [<c000ee80>] (ret_fast_syscall+0x0/0x30)

This patch modifies the condition while freeing to match the condition
used while allocation. This fixes the above warning which arises when
array size is equal to PAGE_SIZE where allocation is done using kzalloc
but free is done using vfree.

BUG=chrome-os-partner:13935
TEST=Booted

Change-Id: I6541ff3e5269f373b4feadfcb616db91e4dc96c4
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit 46c87852e99cf8ce97e207b11cde19085837e39c)
Reviewed-on: https://gerrit.chromium.org/gerrit/32936
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoBACKPORT: ASoC: samsung dma - Don't indicate support for pause/resume.
Dylan Reid [Sat, 1 Sep 2012 08:38:19 +0000 (01:38 -0700)]
BACKPORT: ASoC: samsung dma - Don't indicate support for pause/resume.

The pause and resume operations indicate that the stream can be
un-paused/resumed from the exact location they were paused/suspended.
This is not true for this driver, the pause and suspend triggers share
the same code path with stop, they flush all pending DMA transfers.
This drops all pending samples.  The pause_release/resume triggers are
the same as start, except that prepare won't be called beforehand,
nothing will be enqueued to the DMA engine and nothing will happen (no
audio).  Removing the pause flag will let apps know that it isn't
supported.  Removing the resume flag will cause user space to call
prepare and start instead of resume, so audio will continue playing when
the system wakes up.

Before removing the pause and resume flags, I tested this on an exynos
5250, using 'aplay -i'. Pause/un-pause leads to silence followed by a
write error.  Suspend/resume testing led to the same result.  Removing
the two flags fixes suspend/resume (since snd_pcm_prepare is called
again). And leads to a proper reporting of pause not supported.

BUG=chrome-os-partner:12258
TEST=suspend/resume while playing youtube.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
(cherry picked from commit 57b2d68863f281737d8596cb3d76d89d9cc54fd8)

Change-Id: I224deb6445be3464c064edd4e91641b6cd187b83
Reviewed-on: https://gerrit.chromium.org/gerrit/32866
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agoCHROMIUM: trace: remove warning
Olof Johansson [Mon, 10 Sep 2012 16:51:42 +0000 (09:51 -0700)]
CHROMIUM: trace: remove warning

fs/exec.c:790:2: warning: passing argument 1 of ‘trace_open_exec’ discards ‘const’ qualifier from pointer target type [enabled by default]

BUG=chromium-os:34287
TEST=build, make sure warning is gone

Change-Id: Ia81f05aa28bb28327e3be7b438df281a0166bcb8
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32829
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: dm: verity: fix warnings
Olof Johansson [Mon, 10 Sep 2012 16:45:06 +0000 (09:45 -0700)]
CHROMIUM: dm: verity: fix warnings

Fixes:

drivers/md/dm-verity.c:109:1: warning: return from incompatible pointer type [enabled by default]
drivers/md/dm-verity.c:81:1: warning: return from incompatible pointer type [enabled by default]
drivers/md/dm-verity.c:85:1: warning: return from incompatible pointer type [enabled by default]

BUG=chromium-os:34287
TEST=build, check lack of warnings.

Change-Id: Iaff319f774a152e179836cb765ce951d97dbca9f
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32828
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoRevert "CHROMIUM: config: enable RCU_FAST_NO_HZ"
Stéphane Marchesin [Tue, 11 Sep 2012 02:15:52 +0000 (19:15 -0700)]
Revert "CHROMIUM: config: enable RCU_FAST_NO_HZ"

This reverts commit add52cca2810b40fd13495ad8c091b96135982f7
This commit breaks the interrupts for i915 on boot sometimes.
i915 needs interrupts to work to operate properly, so let's revert to
unbreak the miscellaneous canaries.

The symptoms are similar to what's described in the following thread:
http://comments.gmane.org/gmane.linux.kernel/1270773

BUG=chromium:145312,chrome-os-partner:13617
TEST=by hand: the interrupts work again and graphics isn't stuck on boot.

Change-Id: I0d3f550dc374ca0c81ddee9ba7d0e2793b318e31
Reviewed-on: https://gerrit.chromium.org/gerrit/32887
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: drm: exynos: fix compiler warning
Olof Johansson [Mon, 10 Sep 2012 23:29:35 +0000 (16:29 -0700)]
CHROMIUM: drm: exynos: fix compiler warning

drivers/gpu/drm/exynos/exynos_drm_fb.c:94:16: warning: assignment makes integer from pointer without a cast [enabled by default]

BUG=chromium-os:34287
TEST=none

Change-Id: I9d4f22e683316cecdd49a245e1ba08a87e2f57d9
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32840
Reviewed-by: Anush Elangovan <anush@chromium.org>
11 years agoCHROMIUM: ARM: exynos: pm: add one __maybe_unused annotation
Olof Johansson [Mon, 10 Sep 2012 23:16:36 +0000 (16:16 -0700)]
CHROMIUM: ARM: exynos: pm: add one __maybe_unused annotation

It's hard to tell from the code flow (which is nasty in the first place) if the function will or will not be used, so
just mark it __maybe_unused for now.

Resolves:

arch/arm/mach-exynos/pm_domains.c:138:20: warning: 'exynos_pm_add_dev_to_genpd' defined but not used [-Wunused-function]

BUG=chromium-os:34287
TEST=none

Change-Id: Ieb8290edf595e33885b89eca29c83b460613a702
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32837
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: thermal: fix unused variable warning
Olof Johansson [Mon, 10 Sep 2012 16:56:06 +0000 (09:56 -0700)]
CHROMIUM: thermal: fix unused variable warning

drivers/thermal/thermal_sys.c:65:21: warning: ‘thermal_event_seqnum’ defined but not used [-Wunused-variable]

BUG=chromium-os:34287
TEST=none

Change-Id: Ie7610886e5235d80330848593d6e7e40db900128
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32831
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
11 years agoCHROMIUM: ARM: exynos: ifdef out some unused variables
Olof Johansson [Mon, 10 Sep 2012 23:19:31 +0000 (16:19 -0700)]
CHROMIUM: ARM: exynos: ifdef out some unused variables

arch/arm/mach-exynos/mach-exynos5-dt.c:107:29: warning: 'smdk5250_fb_win1' defined but not used [-Wunused-variable]
arch/arm/mach-exynos/mach-exynos5-dt.c:126:29: warning: 'smdk5250_fb_win2' defined but not used [-Wunused-variable]
arch/arm/mach-exynos/mach-exynos5-dt.c:88:29: warning: 'smdk5250_fb_win0' defined but not used [-Wunused-variable]

BUG=chromium-os:34287
TEST=none

Change-Id: I6f1d030c87b18abccad796794ea40bf245d643cf
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32838
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: libata: remove warning
Olof Johansson [Mon, 10 Sep 2012 17:10:30 +0000 (10:10 -0700)]
CHROMIUM: libata: remove warning

drivers/ata/libata-core.c:5376:2: warning: assignment from incompatible pointer type [enabled by default]
drivers/ata/libata-core.c:5577:2: warning: assignment from incompatible pointer type [enabled by default]

BUG=chromium-os:34287
TEST=none

Change-Id: Ic0af73ba8fbc4aefb5895d00ec0bc853fcbec192
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32834
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Derek Basehore <dbasehore@chromium.org>
11 years agodrm/exynos: Implements proper disable of LCD clock
Akshu Agrawal [Sat, 1 Sep 2012 01:40:35 +0000 (18:40 -0700)]
drm/exynos: Implements proper disable of LCD clock

Since fimd_power_on is called twice at bootup, fimd clock was
getting enabled twice and increasing its refcount to 2.
During the disable since the count was not equal to zero lcd clk
was not getting disabled.

BUG=chromeos-partner:13349
TEST= Tested display going off, poweroff command when display off.
Tested suspend/resume in display on and off state

Change-Id: Ifd49f25c8beecd78d35c009f2caceec50d8129c8
Signed-off-by: Akshu Agrawal <akshu.a@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/32083
Commit-Ready: Akshu Agrawal <akshu@chromium.org>
Reviewed-by: Akshu Agrawal <akshu@chromium.org>
Tested-by: Akshu Agrawal <akshu@chromium.org>
11 years agoCHROMIUM: drm: remove warning
Olof Johansson [Mon, 10 Sep 2012 17:09:05 +0000 (10:09 -0700)]
CHROMIUM: drm: remove warning

drivers/gpu/drm/drm_edid.c:1460:39: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]

BUG=chromium-os:34287
TEST=none

Change-Id: I0817b80bd22c126456e74343c9b8ef67fa3d1830
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32833
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: drm: constify drm_mode_equal args
Olof Johansson [Mon, 10 Sep 2012 17:16:09 +0000 (10:16 -0700)]
CHROMIUM: drm: constify drm_mode_equal args

Resolves:

drivers/gpu/drm/drm_edid.c:1462:3: warning: passing argument 2 of ‘drm_mode_equal’ discards ‘const’ qualifier from pointer target type [enabled by default]

BUG=chromium-os:34287
TEST=none

Change-Id: I1f4041b85bb3f2c40fd5654350e3a25423f9b8a1
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32835
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: power: tps65090: remove warning
Olof Johansson [Mon, 10 Sep 2012 22:49:28 +0000 (15:49 -0700)]
CHROMIUM: power: tps65090: remove warning

drivers/power/tps65090-charger.c:98:6: warning: unused variable 'irq' [-Wunused-variable]

BUG=chromium-os:34287
TEST=none

Change-Id: Ib4942a0f65b7f5a476686a53149007126140d253
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32836
Reviewed-by: Simon Que <sque@chromium.org>
11 years agoCHROMIUM: net: r8169: remove warning
Olof Johansson [Mon, 10 Sep 2012 17:06:10 +0000 (10:06 -0700)]
CHROMIUM: net: r8169: remove warning

drivers/net/ethernet/realtek/r8169.c:761:1: warning: return from incompatible pointer type [enabled by default]

BUG=chromium-os:34287
TEST=none

Change-Id: I3f58003a83739abebf5108eca4ca539dda186d1c
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32832
Reviewed-by: Todd Broch <tbroch@chromium.org>
11 years agoCHROMIUM: sd: Fix warning
Olof Johansson [Mon, 10 Sep 2012 16:54:38 +0000 (09:54 -0700)]
CHROMIUM: sd: Fix warning

drivers/scsi/sd.c:2676:2: warning: assignment from incompatible pointer type [enabled by default]
drivers/scsi/sd.c:2913:2: warning: assignment from incompatible pointer type [enabled by default]

Since there's no way to return an error, do a WARN_ON() in the error
case instead.

BUG=chromium-os:34287
TEST=none (we need an automated test for error injection here)

Change-Id: Idaf0c0184e81ef7bac63b1deeda1a7690aa48a42
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32830
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>