cascardo/linux.git
11 years agoCHROMIUM: gpu: i915: Make RP down timeout shorter
Sameer Nanda [Mon, 13 Aug 2012 21:33:02 +0000 (14:33 -0700)]
CHROMIUM: gpu: i915: Make RP down timeout shorter

Make the GEN6_RP_DOWN_TIMEOUT significantly shorter -- from 1000000 to
10000. This helps save about 1W of power by keeping the GPU running at
lower frequency for longer.

BUG=none
TEST=playback a youtube video at 1080p and ensure there are no dropped
frames.

Change-Id: Id201a8eabdccad9e79fcc6383fdfc53e039300da
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30036
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agodrm/exynos: Fix HDMI for smaller resolutions
Sean Paul [Tue, 14 Aug 2012 23:57:43 +0000 (16:57 -0700)]
drm/exynos: Fix HDMI for smaller resolutions

This patch fixes HDMI output for resolutions smaller than the LCD. The
problem is that the pitch is slightly larger than the LCD width, which
results in the HDMI scanout being slighlty too large. This shifts each
line right by the difference between pitch and width resulting in a
corrupted screen.

BUG=chrome-os-partner:12606
TEST=Tested on snow with 720p/480p

Change-Id: I1764b0c3d4c699a9a87f083ce74331f99f0bc387
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30351
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: config: enable RCU_FAST_NO_HZ
Sameer Nanda [Tue, 14 Aug 2012 19:06:37 +0000 (12:06 -0700)]
CHROMIUM: config: enable RCU_FAST_NO_HZ

Enable RCU_FAST_NO_HZ kernel config option. This allows the CPU to get to
idle state quicker and saves about 100-200mW of power on x86 systems
under medium load conditions.

BUG=none
TEST=build kernel and ensure that CONFIG_RCU_FAST_NO_HZ is to y in the
kernel config file.

Change-Id: I85a0ca5f8cebb55c83582cbc43fffd49984185a3
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30271
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: ARM: dma-mapping: fix incorrect freeing of atomic allocations
Aaro Koskinen [Tue, 7 Aug 2012 12:44:05 +0000 (14:44 +0200)]
UPSTREAM: ARM: dma-mapping: fix incorrect freeing of atomic allocations

Commit e9da6e9905e639b0f842a244bc770b48ad0523e9 (ARM: dma-mapping:
remove custom consistent dma region) changed the way atomic allocations
are handled. However, arm_dma_free() was not modified accordingly, and
as a result freeing of atomic allocations does not work correctly when
CMA is disabled. Memory is leaked and following WARNINGs are seen:

[   57.698911] ------------[ cut here ]------------
[   57.753518] WARNING: at arch/arm/mm/dma-mapping.c:263 arm_dma_free+0x88/0xe4()
[   57.811473] trying to free invalid coherent area: e0848000
[   57.867398] Modules linked in: sata_mv(-)
[   57.921373] [<c000d270>] (unwind_backtrace+0x0/0xf0) from [<c0015430>] (warn_slowpath_common+0x50/0x68)
[   58.033924] [<c0015430>] (warn_slowpath_common+0x50/0x68) from [<c00154dc>] (warn_slowpath_fmt+0x30/0x40)
[   58.152024] [<c00154dc>] (warn_slowpath_fmt+0x30/0x40) from [<c000dc18>] (arm_dma_free+0x88/0xe4)
[   58.219592] [<c000dc18>] (arm_dma_free+0x88/0xe4) from [<c008fa30>] (dma_pool_destroy+0x100/0x148)
[   58.345526] [<c008fa30>] (dma_pool_destroy+0x100/0x148) from [<c019a64c>] (release_nodes+0x144/0x218)
[   58.475782] [<c019a64c>] (release_nodes+0x144/0x218) from [<c0197e10>] (__device_release_driver+0x60/0xb8)
[   58.614260] [<c0197e10>] (__device_release_driver+0x60/0xb8) from [<c0198608>] (driver_detach+0xd8/0xec)
[   58.756527] [<c0198608>] (driver_detach+0xd8/0xec) from [<c0197c54>] (bus_remove_driver+0x7c/0xc4)
[   58.901648] [<c0197c54>] (bus_remove_driver+0x7c/0xc4) from [<c004bfac>] (sys_delete_module+0x19c/0x220)
[   59.051447] [<c004bfac>] (sys_delete_module+0x19c/0x220) from [<c0009140>] (ret_fast_syscall+0x0/0x2c)
[   59.207996] ---[ end trace 0745420412c0325a ]---
[   59.287110] ------------[ cut here ]------------
[   59.366324] WARNING: at arch/arm/mm/dma-mapping.c:263 arm_dma_free+0x88/0xe4()
[   59.450511] trying to free invalid coherent area: e0847000
[   59.534357] Modules linked in: sata_mv(-)
[   59.616785] [<c000d270>] (unwind_backtrace+0x0/0xf0) from [<c0015430>] (warn_slowpath_common+0x50/0x68)
[   59.790030] [<c0015430>] (warn_slowpath_common+0x50/0x68) from [<c00154dc>] (warn_slowpath_fmt+0x30/0x40)
[   59.972322] [<c00154dc>] (warn_slowpath_fmt+0x30/0x40) from [<c000dc18>] (arm_dma_free+0x88/0xe4)
[   60.070701] [<c000dc18>] (arm_dma_free+0x88/0xe4) from [<c008fa30>] (dma_pool_destroy+0x100/0x148)
[   60.256817] [<c008fa30>] (dma_pool_destroy+0x100/0x148) from [<c019a64c>] (release_nodes+0x144/0x218)
[   60.445201] [<c019a64c>] (release_nodes+0x144/0x218) from [<c0197e10>] (__device_release_driver+0x60/0xb8)
[   60.634148] [<c0197e10>] (__device_release_driver+0x60/0xb8) from [<c0198608>] (driver_detach+0xd8/0xec)
[   60.823623] [<c0198608>] (driver_detach+0xd8/0xec) from [<c0197c54>] (bus_remove_driver+0x7c/0xc4)
[   61.013268] [<c0197c54>] (bus_remove_driver+0x7c/0xc4) from [<c004bfac>] (sys_delete_module+0x19c/0x220)
[   61.203472] [<c004bfac>] (sys_delete_module+0x19c/0x220) from [<c0009140>] (ret_fast_syscall+0x0/0x2c)
[   61.393390] ---[ end trace 0745420412c0325b ]---

The patch fixes this.

BUG=chrome-os-partner:12602
TEST=Boot.  Test USB 3.0 across suspend/resume.

Change-Id: I6631d8be7389b397ac533ed0be52aae673b91a2c
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
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 d9e0d149b5dcc2ef4688afc572b9906bcda941ef)
Reviewed-on: https://gerrit.chromium.org/gerrit/29993
Tested-by: Vikas Sajjan <vikas.sajjan@samsung.com>
11 years agoUPSTREAM: ARM: dma-mapping: fix atomic allocation alignment
Aaro Koskinen [Tue, 7 Aug 2012 12:39:25 +0000 (14:39 +0200)]
UPSTREAM: ARM: dma-mapping: fix atomic allocation alignment

The alignment mask is calculated incorrectly. Fixing the calculation
makes strange hangs/lockups disappear during the boot with Amstrad E3
and 3.6-rc1 kernel.

BUG=chrome-os-partner:12602
TEST=Boot.  Test USB 3.0 across suspend/resume.

Change-Id: Ic801c21c23c6dec1fd0ccf32a50312d6f486ed34
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
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 e4ea6918c93b9f59d34e8ca2124b2b64b1afe73b)
Reviewed-on: https://gerrit.chromium.org/gerrit/29992
Tested-by: Vikas Sajjan <vikas.sajjan@samsung.com>
11 years agoCHROMIUM: ASoC: max98095 - Export switches for MIC3 route.
Dylan Reid [Mon, 13 Aug 2012 22:31:28 +0000 (15:31 -0700)]
CHROMIUM: ASoC: max98095 - Export switches for MIC3 route.

MIC3 can route to either the MIC1 or MIC2 input.  Add a switch that
selects MIC3 as the source for each.

BUG=chrome-os-partner:10849
TEST=Set control with amixer check value with i2cdump.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Change-Id: I7095202d272f6d61bbf004426b3ce7cd2b710b5e
Reviewed-on: https://gerrit.chromium.org/gerrit/30166
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agoCHROMIUM: ASoC: max98095 - Add control for DMIC1 enable.
Dylan Reid [Mon, 13 Aug 2012 22:28:44 +0000 (15:28 -0700)]
CHROMIUM: ASoC: max98095 - Add control for DMIC1 enable.

Add ability to switch the digital mic path on and off.  Daisy needs to
change this when an external mic is attached.  Just setting DMIC on/off
in device tree isn't sufficient.

BUG=chrome-os-partner:10849
TEST=Set control with amixer and check value with i2cdump.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Change-Id: Ied02eccb060a06742208ec7f8c3ef08e5f361964
Reviewed-on: https://gerrit.chromium.org/gerrit/30165
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
11 years agogpio: samsung: Add 'maintain powerup settings' option to powerdown-settings
Jonathan Kliegman [Tue, 14 Aug 2012 14:42:46 +0000 (10:42 -0400)]
gpio: samsung: Add 'maintain powerup settings' option to powerdown-settings

Allow a gpio to be configured to maintain the current active setting when
powered down.  This will preserve the GPIO in its current powered
configuration while suspended.

BUG=None
TEST=Change GPA1(2,3) (an i2c bus) to use the maintain option.
  Observed that the bus remained high during suspend and that
  the GPIO save/restore state messages showed the new value.
  Tested that devices on the i2c bus functioned properly on
  resume.
  Set GPA1(2,3) to default values (active low).  Observed
  devices on the bus did not function on resume due to the bad
  GPIO values confusing it.
  Set GPA2(0,1), GPF0(3) and GPE0(4) to preserve values. (EC i2c bus,
  and arbitration GPIOs).  Battery command from ec console worked during
  suspend and dmesg output confirmed values.

Change-Id: I83965830b6c2b247d2cffbf09884144df039219b
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30199
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agovideo/exynos: dp: Add reporter to log dp errors
Sean Paul [Mon, 13 Aug 2012 18:19:17 +0000 (11:19 -0700)]
video/exynos: dp: Add reporter to log dp errors

This patch adds an error reporter work function to check the error count
from DPCD every 60 seconds and report any errors that have occurred in
the last minute. This will hopefully give us an indication about how
frequently we're getting screen glitches.

BUG=chrome-os-partner:12498
TEST=Tested on flickery snow, saw the errors being printed to logs

Change-Id: Idba96f63f0829c55f3c6378c399403c9de7dc123
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30012
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: sysrq: fix Chrome OS specific 'x' key handler to work on ARM
Mandeep Singh Baines [Mon, 13 Aug 2012 20:33:08 +0000 (13:33 -0700)]
CHROMIUM: sysrq: fix Chrome OS specific 'x' key handler to work on ARM

The current handler generates a NULL pointer derefence so you are relying
on a side-effect for the panic. Instead, just call panic directly.

BUG=chromium-os:33505
TEST=alt-F10-x now works on ARM

Change-Id: Ie980a68be4be38b2d80c01b808ccdbc9aaf9bd76
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30025
Reviewed-by: Sameer Nanda <snanda@chromium.org>
11 years agoCHROMIUM: config: enable pstore console
Mandeep Singh Baines [Sat, 11 Aug 2012 04:10:03 +0000 (21:10 -0700)]
CHROMIUM: config: enable pstore console

Enable pstore console so that we can examine dmesg even when the
machine is hard hung.

BUG=chromium-os:33273
TEST=none

Change-Id: Ieff786cdfee41b5be76a9f4a96bd9981b6cdbe86
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29961
Reviewed-by: Kees Cook <keescook@chromium.org>
11 years agoHACK: UPSTREAM: add pstore console support
Mandeep Singh Baines [Sat, 11 Aug 2012 04:01:16 +0000 (21:01 -0700)]
HACK: UPSTREAM: add pstore console support

Pstore console keeps a console in ram that is available next boot via:

/dev/pstore/console-ramoops

PSTORE_CONSOLE is upstream but there has been a lot of churn in the
pstore code that preceded PSTORE_CONSOLE. So rather than backport
a dozen or so patches, I've added support from scratch and made the
user-space interface consistent with what is upstream.

BUG=chromium-os:33273
TEST=See below.

$ reboot
$ cat /dev/pstore/console-ramoops
$ echo bug > /proc/breakme

Crash

$ cat /dev/pstore/console-ramoops
$ cat /dev/pstore/dmesg-ramoops-0

EC reset

$ cat /dev/pstore/console-ramoops
$ rm /dev/pstore/dmesg-ramoops-0
$ reboot
$ cat /dev/pstore/console-ramoops
$ cat /dev/pstore/dmesg-ramoops-0
$ echo panic > /proc/breakme

Crash

$ cat /dev/pstore/console-ramoops
$ cat /dev/pstore/dmesg-ramoops-0

Change-Id: I1069d974679577c980276f822f7835f9d221d12b
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29960
Reviewed-by: Kees Cook <keescook@chromium.org>
11 years agoUPSTREAM: pstore: Add console log messages support
Anton Vorontsov [Sat, 26 May 2012 13:20:19 +0000 (06:20 -0700)]
UPSTREAM: pstore: Add console log messages support

Pstore doesn't support logging kernel messages in run-time, it only
dumps dmesg when kernel oopses/panics. This makes pstore useless for
debugging hangs caused by HW issues or improper use of HW (e.g.
weird device inserted -> driver tried to write a reserved bits ->
SoC hanged. In that case we don't get any messages in the pstore.

Therefore, let's add a runtime logging support: PSTORE_TYPE_CONSOLE.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f29e5956aebafe63f81e80f972c44c4a666e5c7f)

BUG=chromium-os:33273
TEST=none

Change-Id: Ie171bdc67bc24b0f47adfd014e21743f0975d941
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29959
Reviewed-by: Kees Cook <keescook@chromium.org>
11 years agoUPSTREAM: mwifiex: notify cfg80211 about MIC failures
Bing Zhao [Sat, 11 Aug 2012 03:49:07 +0000 (20:49 -0700)]
UPSTREAM: mwifiex: notify cfg80211 about MIC failures

Call cfg80211_michael_mic_failure() handler when there is a MIC error
event from firmware.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
wireless-testing.git commit 9c7ff73

BUG=chrome-os-partner:12591
TEST=Build and run autotest WiFiMatFunc, WiFiSecMat, WiFiManager

Change-Id: Ifdb80abe98b8f38ccd16c70fd84718799d22930d
Reviewed-on: https://gerrit.chromium.org/gerrit/29958
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
11 years agodrm/exynos: hdmi: Use drm_display_mode to set registers
Sean Paul [Sat, 11 Aug 2012 02:29:22 +0000 (19:29 -0700)]
drm/exynos: hdmi: Use drm_display_mode to set registers

Program the core and timing generator registers using the timing data
provided in drm_display_mode instead of using hardcoded configurations.
This allows us to support more than just 4 video modes.

Due to lack of definition in the datasheet, this patch removes
interlaced mode support for the timing being.

BUG=chrome-os-partner:11790
TEST=Tested on snow using a Samsung panel

Change-Id: I1d8c27c837a38a4b095993c7f029c5374631995c
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29956

11 years agoCHROMIUM: arm: exynos: Only support one LCD mode
Sean Paul [Fri, 10 Aug 2012 23:32:55 +0000 (16:32 -0700)]
CHROMIUM: arm: exynos: Only support one LCD mode

Remove the 1280x720 mode for the internal LCD. The panel doesn't support
it, so it doesn't make sense.

BUG=chrome-os-partner:11790
TEST=Booted snow, switched back and forth between displays

Change-Id: Ifb50080e2f1793c986a8ea5102ddd7f8f9f9ee5c
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29955
Reviewed-by: Mark Hayter <mdhayter@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agov4l: s5p-mfc: Clean the driver from build macros
Naveen Krishna Chatradhi [Wed, 8 Aug 2012 09:37:41 +0000 (18:37 +0900)]
v4l: s5p-mfc: Clean the driver from build macros

The s5p-mfc uses SAMSUNG_S5P_MFC_V6 to conditionally compile
a part of code specific to MFC_v6, As we are only supporting
MFC_V6 hardware for Chrome. We can remove the conditional
compilation.

The Upstream patches at
http://comments.gmane.org/gmane.linux.drivers.video-input-infrastructure/51225
Will fix it in mainline linux.

BUG=chrome-os-partner:10954
TEST=Build and booted on one device, the MFC probes successfully

Change-Id: If409071ce806bd590d170231b94dd744f8fc0510
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29601
Commit-Ready: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
11 years agov4l: s5p-mfc: use mclk name as drvdata instead of a macro
Naveen Krishna Chatradhi [Wed, 8 Aug 2012 07:21:10 +0000 (16:21 +0900)]
v4l: s5p-mfc: use mclk name as drvdata instead of a macro

The mclk_name is different in the clock-exynos*.c for
Exynos4 and 5. Instead of using macros to distinguish the clock
name. Pass it through the drvdata available in the driver.

BUG=chrome-os-partner:10954
TEST=build and booted on one board, MFC probes fine

Change-Id: I0dee10b96c8f1df7e28403029bc9016046ccdea3
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29598
Commit-Ready: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
11 years agoHACK: ARM: exynos: revamp WiFi power-on sequence
Sam Leffler [Tue, 17 Jul 2012 19:37:02 +0000 (12:37 -0700)]
HACK: ARM: exynos: revamp WiFi power-on sequence

Manually sequence the PDn and RESETn lines to match the mlw8797 spec.
The sequence now waits for SLP_CLK to settle before raising RESETn,
waiting 1.5ms (min time specified is 1ms), and then raising PDn.
Remove the explicit BT reset as the BT and WiFi reset lines are tied.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=chrome-os-partner:11366
TEST=manual:repeated boot of various boards

Change-Id: Id2b02641c6966c6c353ba420c2716df1f8e1da97
Reviewed-on: https://gerrit.chromium.org/gerrit/29441
Reviewed-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
11 years agoCHROMIUM: ALSA: hda - Don't resume unless needed.
Dylan Reid [Wed, 8 Aug 2012 00:10:27 +0000 (17:10 -0700)]
CHROMIUM: ALSA: hda - Don't resume unless needed.

When snd_hda_resume is called during system resume, don't resume the
codec unless it is needed.  If power_count is zero then the resume path
will be executed when it increments if the device is later opened.

BUG=chrome-os-partner:11780
TEST=power_Resume run with and without audio playing, also just after audio
stops playing.  Manually test on Lumpy with youtube audio and opening and
closing the lid.

Change-Id: I306e921c1ccbb1ce012a527bb9acbeba0b5ae5a8
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29537
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: Add gpio-charger to cros5250 device tree
Simon Que [Thu, 9 Aug 2012 02:01:16 +0000 (19:01 -0700)]
CHROMIUM: Add gpio-charger to cros5250 device tree

Use the gpio-charger driver to support AC in Exynos 5250.

BUG=chrome-os-partner:11739
TEST=/sys/class/power_supply contains gpio-charger sysfs

Change-Id: I04cb41240a175e7212e5b149fa0245faec333c0a
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29564
Reviewed-by: Benson Leung <bleung@chromium.org>
11 years agoCHROMIUM: chromeos_laptop : Remove Atmel 224s platform data
Yufeng Shen [Thu, 9 Aug 2012 23:37:00 +0000 (19:37 -0400)]
CHROMIUM: chromeos_laptop : Remove Atmel 224s platform data

Loading config data from file now so remove the platform
data for atmel 224s trackpad.

Signed-off-by: Yufeng Shen <miletus@chromium.org>
BUG=chrome-os-partner:11181
TEST=build and test that the trackpad is still working.

Change-Id: Ic2141fd3ab88f96270d17589355b117d036e3596
Reviewed-on: https://gerrit.chromium.org/gerrit/29840
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
11 years agoCHROMIUM: drivers: device tree support for gpio-charger
Simon Que [Thu, 9 Aug 2012 01:58:59 +0000 (18:58 -0700)]
CHROMIUM: drivers: device tree support for gpio-charger

This allows the gpio-charger driver to be added to a kernel via a device
tree specification.

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

Change-Id: I80389151755fb0bad8a8a5e042a95e8cde938026
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29711
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
11 years agoregulator: tps65090: Check power good after enable
Sean Paul [Thu, 9 Aug 2012 21:43:36 +0000 (14:43 -0700)]
regulator: tps65090: Check power good after enable

Check the power good bit in the control register after enabling a
regulator. If the power good bit fails, print and return an error.

BUG=chrome-os-partner:12360
TEST=Multiple suspend/resume cycles with no issues

Change-Id: I8793e1083ebc304cb9b08209a8af17eca8cafded
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29813
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: ARM: exynos: cros5250: Add overcurrent wait
Sean Paul [Thu, 9 Aug 2012 21:23:25 +0000 (14:23 -0700)]
CHROMIUM: ARM: exynos: cros5250: Add overcurrent wait

Add overcurrent wait delays to the VFET regulator entries. These are all
maxed out for the moment until we figure out why we see sporadic delays
when we're ramping up voltage.

BUG=chrome-os-partner:12360
TEST=Multiple suspend/resume cycles with no issues

Change-Id: I2d93efdd910b4bb67fd085ce39fcd15653d2d3d2
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29812
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoregulator: tps65090: Set overcurrent wait time
Sean Paul [Thu, 9 Aug 2012 21:20:14 +0000 (14:20 -0700)]
regulator: tps65090: Set overcurrent wait time

Get the overcurrent wait time for regulators out of the device tree and
set it when enabling the regulator. This fixes some errors observed
where the rail wasn't always recovering from suspend. The scope trace
showed a 500us plateau in the voltage when it was ramping up to full.

BUG=chrome-os-partner:12360
TEST=Multiple suspend/resume cycles with no issues

Change-Id: Ice37298a435e0b5f25cf307b0620319f6dbc75f7
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29659
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: ath9k: stop btcoex on device suspend
Rajkumar Manoharan [Thu, 9 Aug 2012 06:37:28 +0000 (12:07 +0530)]
CHROMIUM: ath9k: stop btcoex on device suspend

When the device is moving to suspend state, it will be powered
off and move into FULLSLEEP state. As btcoex is never be stopped,
the timer is running and try to access hw on fullsleep state.
Fix that.

Cc: stable@vger.kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:12426
TEST=Suspend while downloading a kernel from kernel.org, resume
from suspend, confirm wifi still working, and disable and re-enable
WiFi.

Change-Id: I436127b39ac4cba9a4c056b4bb37189b8dad0c6a
Reviewed-on: https://gerrit.chromium.org/gerrit/29800
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoARM MALI: use standard GFP_FLAGS for allocations to prevent failures
Mandeep Singh Baines [Wed, 8 Aug 2012 21:50:31 +0000 (14:50 -0700)]
ARM MALI: use standard GFP_FLAGS for allocations to prevent failures

We would prefer if mali allocations did not fail. When mali allocations
fail, we get random failures in gl calls which are really HARD to debug
since the stack trace and failure mode in chrome is always different. So
multiple bugs get opened.

We'd much prefer to OOM when running out of memory. We get a nice stack
trace and detailed state information for the vm system. We also know
immediately that there is an out of memory issue.

The previous GFP_FLAGS are available via a Kconfig option.

BUG=chrome-os-partner:12316
TEST=Verified that bug 12316 now causes an OOM

[  518.884239] chrome invoked oom-killer: gfp_mask=0xd2, order=0, oom_adj=3, oom_
score_adj=200
[  518.884269] [<80015f54>] (unwind_backtrace+0x0/0x128) from [<804f09d4>] (dump_
stack+0x20/0x24)
[  518.884287] [<804f09d4>] (dump_stack+0x20/0x24) from [<800b51bc>] (dump_header
.isra.10+0x7c/0x174)
[  518.884301] [<800b51bc>] (dump_header.isra.10+0x7c/0x174) from [<800b53f8>] (o
om_kill_process.part.13.constprop.14+0x4c/0x20c)
[  518.884314] [<800b53f8>] (oom_kill_process.part.13.constprop.14+0x4c/0x20c) fr
om [<800b5a08>] (out_of_memory+0x2dc/0x39c)
[  518.884328] [<800b5a08>] (out_of_memory+0x2dc/0x39c) from [<800b89f0>] (__allo
c_pages_nodemask+0x524/0x66c)
[  518.884343] [<800b89f0>] (__alloc_pages_nodemask+0x524/0x66c) from [<8029bfd4>
] (kbase_phy_pages_alloc+0x80/0x33c)
[  518.884356] [<8029bfd4>] (kbase_phy_pages_alloc+0x80/0x33c) from [<8029c590>]
(kbase_alloc_phy_pages_helper+0x108/0x230)
[  518.884370] [<8029c590>] (kbase_alloc_phy_pages_helper+0x108/0x230) from [<802
9d000>] (kbase_alloc_phy_pages+0x58/0x78)
[  518.884382] [<8029d000>] (kbase_alloc_phy_pages+0x58/0x78) from [<8029d1d8>] (
kbase_tmem_alloc+0x140/0x1b8)
[  518.884398] [<8029d1d8>] (kbase_tmem_alloc+0x140/0x1b8) from [<802aba80>] (kba
se_dispatch+0xbc/0x3e8)
[  518.884412] [<802aba80>] (kbase_dispatch+0xbc/0x3e8) from [<802a91bc>] (ukk_di
spatch+0x44/0x84)
[  518.884425] [<802a91bc>] (ukk_dispatch+0x44/0x84) from [<802aa880>] (kbase_ioc
tl+0xa8/0x10c)
[  518.884440] [<802aa880>] (kbase_ioctl+0xa8/0x10c) from [<800fbf2c>] (do_vfs_io
ctl+0x4f4/0x568)
[  518.884451] [<800fbf2c>] (do_vfs_ioctl+0x4f4/0x568) from [<800fc000>] (sys_ioc
tl+0x60/0x84)
[  518.884464] [<800fc000>] (sys_ioctl+0x60/0x84) from [<8000e7c0>] (ret_fast_sys
call+0x0/0x30)

Change-Id: If670941123ca8151219a6f4751af3bf3d87f77e2
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29662
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: Input: atkbd - Add KEY_WLAN
Benson Leung [Thu, 9 Aug 2012 07:54:30 +0000 (00:54 -0700)]
CHROMIUM:  Input: atkbd - Add KEY_WLAN

Allocate KEY_WLAN to Set2 keymap.
Make:E0 36
Break: E0 F0 36

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:11831
TEST=Test on parrot system.
$ evtest
Select the event number for AT Translated Set 2 keyboard
Press and release the WLAN disable button.
Verify that this is the result :
Event: time 1344499320.746678, type 4 (EV_MSC), code 4 (MSC_SCAN), value 87
Event: time 1344499320.746689, type 1 (EV_KEY), code 238 (KEY_WLAN), value 1
Event: time 1344499320.746692, -------------- SYN_REPORT ------------
Event: time 1344499320.827134, type 4 (EV_MSC), code 4 (MSC_SCAN), value 87
Event: time 1344499320.827140, type 1 (EV_KEY), code 238 (KEY_WLAN), value 0
Event: time 1344499320.827141, -------------- SYN_REPORT ------------

Change-Id: I1beea92103f37c421a1d8b122b93459fb1c269de
Reviewed-on: https://gerrit.chromium.org/gerrit/29739
Reviewed-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Terry Lambert <tlambert@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoarm: use EXPORT_SYMBOL to export sysmmu functions
Naveen Krishna Chatradhi [Thu, 9 Aug 2012 02:59:53 +0000 (11:59 +0900)]
arm: use EXPORT_SYMBOL to export sysmmu functions

The functions for iommu_mapping are used in drivers.
For the drivers to be build as modules, these functions needs
to be export_symbols.

BUG=None
TEST= build for chromeos-kernel and booted on one device

Change-Id: I682a1faa64550f7f45ddeeef35eb9dc649d1c702
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29733
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: config: Renormalize splitconfig
Naveen Krishna Chatradhi [Thu, 9 Aug 2012 03:04:36 +0000 (12:04 +0900)]
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: I4c2be3dedc436058c21b2e32949cc7f62a36dd91
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29732
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ALSA: ASoC: Get snow hp/mic detect GPIOs from device tree.
Dylan Reid [Wed, 8 Aug 2012 17:42:24 +0000 (10:42 -0700)]
CHROMIUM: ALSA: ASoC: Get snow hp/mic detect GPIOs from device tree.

Get the GPIOs used for hp and mic detect from the device tree.  Getting
them from device tree allows for the pull up/pull down to be properly
configured (it is disabled) and for mic detect to be inverted.

BUG=chrome-os-partner:10849
TEST=aplay/arecord on snow work.  evtest shows events for hp and mic
detection.

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

11 years agoCHROMIUM: ASoC: samsung: daisy_max98095 is a platform driver.
Dylan Reid [Fri, 3 Aug 2012 18:48:41 +0000 (11:48 -0700)]
CHROMIUM: ASoC: samsung: daisy_max98095 is a platform driver.

Convert daisy_max98095 to a platform driver that is compatible with
'google,daisy-audio-max98095'.  This brings it more in line with other
machine drivers from the soc tree and provides the ability to add GPIO
specifiers to device tree in subsequent commits.

BUG=chrome-os-partner;12112
TEST=aplay <wav file>, arecord, youtube audio works.

Change-Id: I5624686178d89afaef911c9a3eb067b7fb4902a0
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29625
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: exynos: dts: Start sound section for daisy/snow.
Dylan Reid [Fri, 3 Aug 2012 18:36:46 +0000 (11:36 -0700)]
CHROMIUM: exynos: dts: Start sound section for daisy/snow.

Daisy and Snow both use the MAX98095 audio codec.  Specify that here so
that the correct machine driver will be chosen.  Specify the GPIOs used
on snow to detect mic and headphone configure both as inputs and disable
internal pull up/down.

BUG=chrome-os-partner:12112
TEST=Still compiles, not used yet.

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

11 years agoCHROMIUM: sbs-battery: export manufacturer and model name to sysfs
cychiang [Tue, 31 Jul 2012 09:07:27 +0000 (17:07 +0800)]
CHROMIUM: sbs-battery: export manufacturer and model name to sysfs

This CL supports two power_supply_property items for smart battery:
POWER_SUPPLY_PROP_MANUFACTURER and POWER_SUPPLY_PROP_MODEL_NAME such
that battery information 'manufacturer' and 'model_name' can be exported
to sysfs.

BUG=chrome-os-partner:11160
TEST=build and run on system with smart battery.
     cat /sys/class/power_supply/sbs-*/model_name
     cat /sys/class/power_supply/sbs-*/manufacturer

Change-Id: Ic24ec9337eb2a753444ffbd654c0bcbb23f7f800
Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28933
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: arm: Enable Low-mem notifier on all platforms
Sonny Rao [Thu, 9 Aug 2012 02:42:59 +0000 (19:42 -0700)]
CHROMIUM: arm: Enable Low-mem notifier on all platforms

Previously, we had enabled it on 32 and 64-bit x86 platforms but not
on ARM, and we should enable it across all platforms to be consistent.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
BUG=chrome-os-partner:12432
TEST=/dev/chromeos-low-mem is present on arm platform

Change-Id: I0d311bb0bc78800833da072998d561aa561ad808
Reviewed-on: https://gerrit.chromium.org/gerrit/29716
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>

11 years agoCHROMIUM: Input: atmel_mxt_ts - move backup_nv to handle_pdata
Benson Leung [Wed, 8 Aug 2012 02:48:12 +0000 (19:48 -0700)]
CHROMIUM: Input: atmel_mxt_ts - move backup_nv to handle_pdata

Now that we conditionally load configs from pdata only if pdata exists,
we no longer need to backup_nv in mxt_initialize.
Backup nv should only be done if config data
was provided as a part of platform data. This will save 270ms for
backup to nv wait.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chromium-os:33370
TEST=Boot on a system with a touch device instantiated without
pdata. Ensure that device is still functional, but that
270ms has been saved until the input device is created.

Change-Id: I44ecf9237db2f866787c72e03e8962ca285db865
Reviewed-on: https://gerrit.chromium.org/gerrit/29571
Commit-Ready: Benson Leung <bleung@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoEXYNOS: USB: Modify Common block power-down control for USB 2.0 PHY
Vivek Gautam [Thu, 2 Aug 2012 02:55:53 +0000 (22:55 -0400)]
EXYNOS: USB: Modify Common block power-down control for USB 2.0 PHY

Controlling COMMOM_ON_N bits for host and otg in USB 2.0 PHY
to enable powering down of the XO, Bias, and PLL in suspend
mode.

BUG=chrome-os-partner:12385
TEST=emerge-daisy chromeos-kernel; Booted kernel and
tested with USB MSD and HID.

Change-Id: I125381b54a157435c6dcad4bf260d19fafd8e180
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29019
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoEXYNOS: USB: Add USB 3.0 PHY code to prevent leakage current
Vivek Gautam [Wed, 1 Aug 2012 08:34:58 +0000 (04:34 -0400)]
EXYNOS: USB: Add USB 3.0 PHY code to prevent leakage current

This patch adds PHYTEST powerdown control and resets the
PHYCLKRST bits to remove prevent current of 3.0 PHY.

BUG=chrome-os-partner:12386
TEST=emerge-daisy chromeos-kernel; Booted kernel and
tested with USB MSD and HID.

Change-Id: I403e5a2e206f8424a6f9bc94eaf652c602f09369
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29018
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoexynos5: usb: Updating usb phy settings for usb 3.0
vikas sajjan [Fri, 13 Jul 2012 13:48:00 +0000 (19:18 +0530)]
exynos5: usb: Updating usb phy settings for usb 3.0

This patch updates Phy settings for USB 3.0.
Alongwith, it also changes the PHY clk from ref_pad_clk to
EXTREFCLK (which comes internally from XXTI).
This also solves our issue for detecting usb 2.0 device
in usb 3.0 hub.

BUG=chrome-os-partner:8634
TEST=emerge-daisy chromeos-kernel; tested on target;
Booted kernel and tested with usb2.0 usb stick
and usb2.0 cardreader plugged into usb 3.0 hub

Change-Id: Ie8dc728173d0fa1fa1e966431c6251aa8e930364
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27363
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: config: Enable CONFIG_CFS_BANDWIDTH
Terry Lambert [Mon, 6 Aug 2012 22:21:14 +0000 (15:21 -0700)]
CHROMIUM: config: Enable CONFIG_CFS_BANDWIDTH

Enable CONFIG_CFS_BANDWIDTH to allow use of CPU bandwidth limitation in
cgroups.

BUG=chromium-os:29195
TEST=emerge-x86-alex chromeos-kernel

Change-Id: Ib1c7168a9c2fc2cfa4c4e51169f7647a15b7a66e
Signed-off-by: Terry Lambert <tlambert@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29336
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: tpm: move resume to workqueue
Olof Johansson [Wed, 8 Aug 2012 03:13:21 +0000 (20:13 -0700)]
CHROMIUM: tpm: move resume to workqueue

This takes TPM off of critical path on system resume, allowing for a better
user experience.

Note that this work is only needed on some of the current versions of hardware
since the TPM loses power in suspend; that will be fixed later on so this
extra delay will no longer be needed at all.

BUG=chrome-os-partner:12065
TEST=power_Resume followed by kernel_TPMPing to make sure it came back as expected.

Change-Id: I338a214007b8f9df7414ca0f8246f50f9b3de746
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29576
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
11 years agoregulator: tps65090: Hardcode regulator enable bit
Sean Paul [Wed, 8 Aug 2012 00:00:16 +0000 (17:00 -0700)]
regulator: tps65090: Hardcode regulator enable bit

Hardcode the enable bit in the regulator control register instead of
using the offset in tps65090_regulator (since the bit is always the
same).

BUG=None
TEST=Tested on snow, verified regulator enable/disable worked

Change-Id: I2899019f02aae37a5ec03849db588e0839f6eeec
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29534
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: iio: isl29018: make read delay depend on resolution
Olof Johansson [Tue, 7 Aug 2012 22:34:32 +0000 (15:34 -0700)]
CHROMIUM: iio: isl29018: make read delay depend on resolution

Currently the driver sleeps for 100ms on any read, but it's really
dependent on the configured resolution, and O(2^n). So for devices that
are configured with lower resolution, we can have a much shorter delay.

BUG=chrome-os-partner:12369
TEST=regular backlight test suite

Change-Id: Id54c127512ab1aa40d83b7bfca5a6675761349e3
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29487
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
11 years agovideo/exynos: dp: Disable/enable irqs on suspend
Sean Paul [Tue, 7 Aug 2012 20:51:20 +0000 (13:51 -0700)]
video/exynos: dp: Disable/enable irqs on suspend

Disable the irq on suspend, and enable it on resume to avoid handling
interrupts before the driver is ready.

BUG=chrome-os-partner:12359
TEST=Tested on snow, multiple suspend/resume cycles were Ok

Change-Id: Ibc6618ff5e7939df02f89713f6b771c08c9fa287
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29442
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: cpufreq: ondemand: io_is_busy should be 1 for ARM
Olof Johansson [Tue, 7 Aug 2012 19:29:46 +0000 (12:29 -0700)]
CHROMIUM: cpufreq: ondemand: io_is_busy should be 1 for ARM

Be conservative for now and only set it for V7 and newer versions.

BUG=chrome-os-partner:11403
TEST=build, boot, check boot time.

Change-Id: Ia4460efadf106c75608aac85a1f90d773af46cf2
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29435
Reviewed-by: Sameer Nanda <snanda@chromium.org>
11 years agoCHROMIUM: backlight: ACPI interface for chromeos_keyboard_bl
Duncan Laurie [Mon, 30 Jul 2012 21:33:19 +0000 (14:33 -0700)]
CHROMIUM: backlight: ACPI interface for chromeos_keyboard_bl

In order to shield the kernel from EC interface changes we added
an ACPI abstraction to the keyboard backlight.  The firmware defines
a new top-level ACPI device called "KBLT" which has methods to
get (KBQC) and set (KBCM) the backlight value.

This driver is changed to use the ACPI interface instead of
talking to the EC directly.

When the firmware does not support this interface the backlight
driver will not load.  When the firmware does support this
interface but the EC does not then the ACPI methods will fail
but nothing else.

I also added a KConfig dependency on ACPI since it is now required
for this driver to operate.

BUG=chromium-os:33054
TEST=manual

1) install EC with support for EC RAM and that exports the
keyboard backlight via EC RAM byte 3
2) install coreboot with this change to add keyboard backlight
interface via acpi
3) install kernel with keyboard backlight driver that uses
the new acpi interface
4) ensure the kernel driver loads
5) ensure the backlight can be read in sysfs:
> cat /sys/class/backlight/keyboard_backlight/actual_brightness
100
6) ensure the backlight can be set via sysfs:
> echo 50 > /sys/class/backlight/keyboard_backlight/brightness
> cat /sys/class/backlight/keyboard_backlight/actual_brightness
50
7) test with firmware that does not have this device to ensure
that the driver notices this and does not load
8) test with EC that does not support this interface to ensure
that the driver can cope with the ACPI methods failing to talk
to the EC properly.  In this setup the EC state machine can get
unhappy as it does not support the ACPI protocol fully and the
device power sequencing can get confused.  The EC and BIOS update
will be released together so this should not be an issue.

Change-Id: I6bfa58563dc1da5ade458e90929cd5c2985548e6
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28723
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ALSA: hda/ca0132 - update to latest from Creative.
Dylan Reid [Wed, 1 Aug 2012 17:11:50 +0000 (10:11 -0700)]
CHROMIUM: ALSA: hda/ca0132 - update to latest from Creative.

This is the most recent version of the patch from Creative.  It has been
modified due to upstream review cycles and has allowed for the overall
system latency to be reduced when effects are disabled.

The big changes here are loading the DSP through request firmware.  The
highest volume changes are converting from #defined error codes to ints
and code style cleanups.

BUG=none
TEST=youtube, youtube.com/my_webcam, gtalk.

Change-Id: Ie12a98cf0f49dda7f7603c895389f21fb5832f48
Reviewed-on: https://gerrit.chromium.org/gerrit/28954
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Dylan Reid <dgreid@chromium.org>

11 years agoCHROMIUM: timer: add debug_msleep warnings for long sleeps
Olof Johansson [Tue, 7 Aug 2012 18:31:32 +0000 (11:31 -0700)]
CHROMIUM: timer: add debug_msleep warnings for long sleeps

I've carried a local patch to WARN_ON() long sleeps in the past, but
I think it makes sense to just check in a slightly cleaned up version
(i.e. this) that allows boot-time selection of the level to warn for.

BUG=none
TEST=edit config.txt, add timer.debug_msleep=100, boot, watch it pop a
 few times in dmesg.

Change-Id: Ibb79dfc1dd7a08b12a14af314c593a985603f5a6
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29424
Reviewed-by: Sameer Nanda <snanda@chromium.org>
11 years agoCHROMIUM: Bluetooth: Add support for AR3012 [0489:e057], [04ca:3006]
Scott James Remnant [Tue, 7 Aug 2012 00:18:08 +0000 (17:18 -0700)]
CHROMIUM: Bluetooth: Add support for AR3012 [0489:e057], [04ca:3006]

BUG=chromium-os:29845
TEST=hciconfig shows device and hcitool scan works

Change-Id: If3c2d3c7c744c1c24e00cdfe17a41d8087d95314
Signed-off-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29368
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: coding style fixes gdm_qos.c
Devendra Naga [Thu, 12 Jul 2012 06:14:22 +0000 (11:59 +0545)]
UPSTREAM: staging/gdm72xx: coding style fixes gdm_qos.c

following warnings were fixed

drivers/staging/gdm72xx/gdm_qos.c:198: ERROR: "foo* bar" should be "foo *bar"
drivers/staging/gdm72xx/gdm_qos.c:198: ERROR: "foo* bar" should be "foo *bar"
drivers/staging/gdm72xx/gdm_qos.c:244: WARNING: quoted string split across lines

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 9b90b712c9504d36e60eaefce0baf66d64b3c901)

Change-Id: I76ab57e06e3773c2d595bac5ed468e72fac26838
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28220
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: use kzalloc for phydev and sdev
Devendra Naga [Thu, 12 Jul 2012 06:13:37 +0000 (11:58 +0545)]
UPSTREAM: staging/gdm72xx: use kzalloc for phydev and sdev

in sdio probe function we are doing kmalloc which can be done using kzalloc.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c2a1793d1b2dedd3dfc33af00c6b1d4f050c040c)

Change-Id: I1cb958de85e1b249ec56af55cc05e9729d9e9388
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28219
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: use kzalloc for phydev and udev
Devendra Naga [Thu, 12 Jul 2012 06:11:54 +0000 (11:56 +0545)]
UPSTREAM: staging/gdm72xx: use kzalloc for phydev and udev

we are doing kmalloc and memset, can be done using kzalloc itself.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 7fc03add26e1e1f0b375e905547e01da6cdc1599)

Change-Id: I0afe8284b524dd28bd03fe26f24bccdb678fcfd3
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28218
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: return PTR_ERR rather -ENOENT
Devendra Naga [Thu, 12 Jul 2012 06:11:11 +0000 (11:56 +0545)]
UPSTREAM: staging/gdm72xx: return PTR_ERR rather -ENOENT

return the error of filp_open rather returning -ENOENT.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d67030d215ac1ec13cab16467904c2a7265e1fbd)

Change-Id: I69f07846a453539bf5505083cc0ae66f801c6db9
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28217
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ath9k_btcoex: Enable bluetooth coexistence by default
Paul Stewart [Tue, 7 Aug 2012 00:30:26 +0000 (17:30 -0700)]
CHROMIUM: ath9k_btcoex: Enable bluetooth coexistence by default

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:11082
TEST=Reboot, test available of bluetooth coexistence.

Change-Id: I407e4ca5a581d437d18b2813f0ca0ad8ea87772c
Reviewed-on: https://gerrit.chromium.org/gerrit/29383
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoCHROMIUM: Config: Enable ath9k_btcoex in intel builds
Paul Stewart [Tue, 31 Jul 2012 19:53:51 +0000 (12:53 -0700)]
CHROMIUM: Config: Enable ath9k_btcoex in intel builds

BUG=chrome-os-partner:11082
TEST=Boot device, join WiFi (minimal Bluetooth testing done)
CQ-DEPENDS=28420
Signed-off-by: Paul Stewart <pstew@chromium.org>
Change-Id: I4259f8953c4ee7ac543c150fd3922f6371071fdb
Reviewed-on: https://gerrit.chromium.org/gerrit/28848

11 years agoCHROMIUM: ath9k: Merges for BTCOEX on 9462
Paul Stewart [Wed, 25 Jul 2012 20:21:59 +0000 (13:21 -0700)]
CHROMIUM: ath9k: Merges for BTCOEX on 9462

This commit has the suggested upstream merge list for Bluetooth
coexistence for the Atheros AR9462.  There are a lot of untested
changes here, so we leave the current ath9k driver alone for the
most part and create a new "ath9k_btcoex" driver and apply the
merge list to that.  This way, we can carry the original driver
in parallel (modified only to remove support for ar9462).

The symbols in the ath9k_btcoex driver tree are modified so they
do not match those from ath9k, and modprobe dependencies work
correctly.  Also, the rate control algorithm has been renamed to
"ath9k_btcoex_rate_control" so ath9k and ath9k_btcoex modules
can be loaded simultaneously.

This driver is accessible using the following configuration
options:

   ATH9K_BTCOEX (ATH9K)
   ATH9K_BTCOEX_COMMON (ATH9K_COMMON)
   ATH9K_BTCOEX_HW (ATH9K_HW)

Committed changes follow below:

ath9k: Use atomic operations
   (cherry picked with fixup from 781b14a3153a722fec820374271316537881076e)
ath9k: Reconfigure VIF state properly
   (cherry picked from commit 6dcc344469d60a1f0d72cc638967e8c83c6e166e)
ath9k: Cleanup the beacon tasklet
   (cherry picked from commit fb6e252f8d262d05da3ae023b4a6f83d0eec17d9)
ath9k: Set the TSF adjust value properly
   (cherry picked from commit 2f8e82e8ab4629e648925c566cc26bdcf25f0aec)
ath9k: Cleanup beacon queue configuration
   (cherry picked from commit 7e52c8aa35c987236a80b7063c418a3d29b51052)
ath9k: Remove is_bslot_active
   (cherry picked from commit aa45fe9683ba861bf49d51479b11b3d482b57416)
ath9k: Cleanup beacon logic
   (cherry picked with fixup from ef4ad63368e6162fb0b18861748fac49edfcbd03)
ath9k: Simplify ASSOC handling
   (cherry picked with fixup from 6c43c090a92938c3e89ce3b7459f91c5159535e2)
ath9k: Cleanup interface handling
   (cherry picked with fixup from df35d29e171ef043976b339812276ff96d1f4c21)
ath9k_hw: Cleanup ath9k_hw_set_tsfadjust
   (cherry picked with fixup from 60ca9f8744d29b8fdfd33d3dec8fc2cfc9ec381a)
ath9k: Fix beacon setup
   (cherry picked with fixup from 130ef6e9dc76f821caf98fa9ed6e2dafe15f3b1f)
ath9k_hw: remove debugging masks from AR_MCI_INTERRUPT_RX_MSG_DEFAULT
   (cherry picked from commit d081257c78ace442db2a59f0aa4c52c69b252663)
ath9k: Stop the BTCOEX timers before disabling BTCOEX
   (cherry picked from commit 6454bf2921c73b47dde9f989bd99aeff25171110)
ath9k: Fix MCI cleanup
   (cherry picked from commit df171637109b8760dd28dc15eb06eb0901689117)
ath9k_hw: fix AR9462 2g5g switch on full reset
   (cherry picked from commit 2250fe4a94863a647683e09b0b798772e01e062c)
ath9k: fix power consumption on network sleep when BTCOEX is enabled
   (cherry picked from commit 8a795aec91c98b6e5a734b32e0e37205ba2c95d2)
ath9k: fix fullsleep power consumption when BTCOEX is enabled
   (cherry picked from commit 84db9667b177cb4ba01b117297a89b0a34d8c45a)
ath9k_hw: start noisefloor calibration after MCI reset
   (cherry picked with fixup from 678dffdcb7e53c11e93ac5beb4ca8ac710720f93)
ath9k: fixing register bit shift values of control packets to support TPC
   (cherry picked from commit 912f81412f9362737deae9dd4f9472e0b73fc4b5)
ath9k: Fix clearing of BTCOEX flags
   (cherry picked from commit e790eab9ef203ff2843b5f9c80efb1339e1d867b)
ath9k: de-duplicate initvals
   (cherry picked with fixup from 469979173ecda9c472c495608d6d540ec33ab85d)
ath9k: update AR934x initvals to latest version
   (cherry picked from commit 589ebd85268293e64ff6b7e0dd4ed8fb26811aa7)
ath9k: Fix signedness in a MCI debug message
   (cherry picked from commit d8fffb4a9e13d1130b4fd0e577973704cad79f40)
ath9k_hw: make use of the wrapper to check for MCI init
   (cherry picked from commit 812944891c598300afcc5628905d775019f25310)
ath9k: Fix compilation breakage
   (cherry picked from commit bf52592fe4901f486a5266fd73e4ee80205b18b4)
ath9k: Fix lockdep splat
   (cherry picked from commit fad29cd2f59949581050a937786c2c9bc78b2f04)
ath9k: raise aggregation limit to 64k for HT IBSS
   (cherry picked from commit 313eb87f1e2f93d83836de7f5c1947b75d7752c8)
ath9k_hw: fix smatch warning in ar9003_hw_spur_mitigate_mrc_cck
   (cherry picked from commit 4b5237cc86872319a321ca1a694dee8866f7d9a3)
ath9k_hw: rename mrcCCKOff to fix smatch warning
   (cherry picked from commit 81b67fd60a75cac36092aa37cd0728aab3a7a938)
ath9k: do not sampling on ani timer when chip is in sleep
   (cherry picked with fixup from 5039f38e16695a0a5c72b08c6a6cc66844a657b1)
ath9k_hw: fix LNA control on WLAN sleep
   (cherry picked from commit 4ff6a9d200c66f192da61822c36ad14424e218d6)
ath9k_hw: update ar9462 dac_async_fifo initval
   (cherry picked from commit 0967d862315366e2ef2401301ff2b1756928b4c1)
ath9k: fix mci_is_enabled utility
   (cherry picked from commit e1ecad78e5c5c32f331925f340141a38aaa64cef)
ath9k_hw: fix BT mute at hw init
   (cherry picked from commit a68807e9177a083dc09c24b141158539d71db21c)
ath9k: fix incorrect profile type manupulation
   (cherry picked from commit 305dd09f8ce05cc8a8cce4e790a6d3d02e5c4f1d)
ath9k_hw: clean up ANI OFDM trigger handling
   (cherry picked from commit 058a6385cb876d4b1b97610ee4e73a845e7bea71)
ath9k: remove MIB interrupt support
   (cherry picked from commit 198823fd002a7f9784648c24c72b7e8c9e73fd14)
ath9k_hw: clean up defines and variables from the ANI implementation split
   (cherry picked from commit 465dce62cdb35f49bc0e859fb23787e1229b62a3)
ath9k_hw: remove the old ANI implementation
   (cherry picked with fixup from 6790ae7a1383db07842b3fd03208dd86f55da57e)
ath9k_hw: clean up / fix ANI mode checks related to beacon RSSI
   (cherry picked from commit 5330df7b178f4f050c67451413020bdd4ec75262)
ath9k_hw: remove confusing logic inversion in an ANI variable
   (cherry picked with fixup from 7067e7014d7013645f7e866b74814f1e59e6a7cd)
ath9k_hw: fix OFDM weak signal detection handling
   (cherry picked with fixup from 0b81cc3922bce79d0f21189648bf4f9992e9a533)
ath9k_hw: remove aniState->noiseFloor
   (cherry picked from commit 35e808b7e4e9ddac1086716867fe686f52fb78ff)
ath9k_hw: remove MCI_STATE_SET_BT_SLEEP
   (cherry picked from commit 9330969b8fd1304fdcb7c1825f1528eea38d321c)
ath9k_hw: remove MCI_STATE_CONT_* state
   (cherry picked from commit 26e942b790eddc757b5be179ef67907e025ff87b)
ath9k_hw: remove MCI_STATE_BT
   (cherry picked from commit 6d97be48e27603f99743fc0e94e57dce2edb9cbf)
ath9k_hw: remove p_data argument from ar9003_mci_state
   (cherry picked from commit b98ccec0a497a9f08d705f1a7d63d5690bb48e70)
ath9k_hw: remove MCI_STATE_NEED_FLUSH_BT_INFO
   (cherry picked from commit d02ca07e6fdf89ed6f453fe1c9229c71a0358886)
ath9k_hw: remove MCI_STATE_SEND_WLAN_CHANNELS
   (cherry picked from commit 2d340ac81e7474535db7a14f35c80b45b02b63a1)
ath9k_hw: add utility function to set BT version
   (cherry picked from commit e1763d3f3388968d622a340fed711ae16fc1bc11)
ath9k_hw: cleanup MCI gpm offset state
   (cherry picked from commit 506847ad34c08fe4f766ffe1b955713628acf6bd)
ath9k: fix btcoex duty cycle
   (cherry picked from commit a197b76c230725962dc8e13102b24468e8621bfb)
ath9k: defer btcoex scheme update
   (cherry picked from commit 3c7992e33ab8d0c625a45ded11cc10d5b622bcd4)
ath9k: keep btcoex period in milliseconds
   (cherry picked from commit dfd0587a7d99d42cc2d608324991169494d2dbba)
ath9k: simplify btcoex profile management
   (cherry picked from commit 9e2e0c84699ce7adeddb5cd5763956493ca7d331)
ath9k_hw: process MCI interrupts only when btcoex is enabled
   (cherry picked from commit 92a33298e9a329d4bed9f723811c5bedc7d92b9c)
ath9k_hw: program OBS register only when MCI is disabled
   (cherry picked from commit ed6ebd8bc852845e34e8160eed43b29236b1892f)
ath9k_hw: fix incorrect LNA register settings
   (cherry picked from commit 1bde95fa7ed84094d0606d9e79356a9dd8d0e01b)
ath9k_hw: check GPM HW write pointer before chip reset
   (cherry picked from commit 3863495b86d8ee8e7e70a328de5b88d555d7305a)
ath9k_hw: Fix AR9462 power consumption on idle associated
   (cherry picked from commit 9dd9b0dc1de8031a31b3eaebc6a9c0ab60612026)
ath9k: restore power state on set channel failure
   (cherry picked from commit 8389fb3fd7c0bbe3289578f698917f594e0b6fc9)
ath9k: choose legacy rate as last rate of MRR series
   (cherry picked from commit cec429dd65ef1ccc693e5fa1468b0a12982b4283)
ath9k_hw: Update initvals for AR9462
   (cherry picked from commit 6304c20167337e21699bb3f7d25fcf099263416e)
ath9k: Move LNA code to antenna.c
   (cherry picked with fixup from 8da07830e10a91cbe7badf9767230aafdd520b9c)
ath9k: improve BT FTP/PAN performance
   (cherry picked from commit 6995fb805ed5de852a7d49413730980bc7173e82)
ath9k_hw: fix power state for MCI
   (cherry picked from commit 153dccd467b818b1dd3a6801b14e94a7a48ef859)
ath9k: BT coex performance tuning for AR9462
   (cherry picked from commit 0603143e47a34d0485a13fd7f46e56a97e687e34)
ath9k_hw: fix BT RF performance
   (cherry picked from commit 99922a45e96b22df387823ad5ecfe4dc26a96c9e)
ath9k_hw: program BT to control SPDT
   (cherry picked from commit 9dc08eceb7491331e81acde625e0d9c82aa86a16)
ath9k: cleanup MCI indentation
   (cherry picked from commit 4f6bd1a8dfcc649912310777a44c49849ae2a63d)
ath9k: Use separate operational flags for BTCOEX
   (cherry picked from commit e6930c4b32aaa30fb9510984509afcc9f61fa39c)
ath9k: Remove SC_OP_OFFCHANNEL
   (cherry picked with fixup from 4cb54fa3a2456e66d8e3bae663d66f00cbb9e483)
ath9k_hw: Fix variable usage
   (cherry picked from commit 2fd5d35bc87a301d5c10397c5b38a4ec8532a975)
ath9k: Add MCI interrupt to debugfs statistics
   (cherry picked with fixup from 97ba515a201bc61c7d36c41ad728b0a7debd5d88)
ath9k_hw: Cleanup power mode API
   (cherry picked from commit 31604cf0a73ffd63929f3a646d5402d5901c6e4b)
ath9k: Ensure a fair beacon distribution in IBSS mode
   (cherry picked from commit d202caff28d69f4ec6cf56568f79b0916294cade)
ath9k: fix beacon descriptor
   (cherry picked from commit cd484aeb4976899a4c6efbed951ac2fc8c51e097)
ath9k: skip beaconing when reset work is pending
   (cherry picked from commit 4e7fb7187d69132cf8223d4f8a49f86a6aba529d)
ath9k: add possible wiphy interface combinations
   (cherry picked from commit 20c8e8dc4e9baf0c1b7c77c860726788896f2d9c)
ath9k_hw: remove ATH_BTCOEX_CFG_MCI
   (cherry picked from commit 0466e2547d05a9ae8d49afc67a3851d034a528f8)
ath9k: stop rx dma before stopping tx
   (cherry picked from commit ceea2a51969f8b578777c99ec2718021427770c3)
ath9k: fix a tx rate duration calculation bug
   (cherry picked from commit 76591bea9714a58d8924154068c78d702eb2cb17)
ath9k: fix invalid pointer access in the tx path
   (cherry picked from commit 80b08a8d8829a58b5db14b1417151094cc28face)

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:11082
TEST=Boot device, join WiFi (no Bluetooth testing done yet)

Change-Id: I114ad8a5a1068da0dc2c3c84dd89738d2116401b
Reviewed-on: https://gerrit.chromium.org/gerrit/28420
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoEnhanced do_mounts_dm to handle multiple devices
Paul Taysom [Thu, 12 Jul 2012 18:27:24 +0000 (11:27 -0700)]
Enhanced do_mounts_dm to handle multiple devices

Handling mutliple device-mappers is preperation for adding
the boot cache.

The change to optionally accept <num> fields is a temporary
measure until all scripts supply the <num> fields, then the
code will be changed to make it required.

BUG=chromium-os:25441
TEST=booted stumpy and ran code with a number of tests in a mock
test environment.

Change-Id: I10b9c21d2b76763872a91053db94a8354429f33d
Signed-off-by: Paul Taysom <taysom@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27311
Reviewed-by: Kees Cook <keescook@chromium.org>
11 years agoCHROMIUM: ARM: exynos: snow: Turn down drive strength for wifi pins
Doug Anderson [Thu, 2 Aug 2012 21:43:36 +0000 (14:43 -0700)]
CHROMIUM: ARM: exynos: snow: Turn down drive strength for wifi pins

We are seeing EMI from the SDIO clock on Snow.  Turn down the drive
strength of these pins to reduce hard edges on the lines and improve
EMI.  We're not adjusting Daisy settings right now since WiFi is hooked
up differently there and we need extra testing to tell that the drive
strength is safe.

BUG=chrome-os-partner:12151
TEST=Boot on Snow and see WiFi still work.
TEST=Measure EMI and see it reduced.  After applying that CL, EMI is
lower than before(5dB lower at 450MHz/11dB lower at 750MHz).
TEST=Ran wifi test suites (MatFunc, Manager, SecMat) and didn't see
any instability which could be introduced by this CL

Change-Id: Ib979a57710117edc60893c0d32f5b64eeb6cc6db
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29084
Reviewed-by: Tan Gao <tgao@chromium.org>
11 years agoCHROMIUM: config: exynos: Enable PTN3460 bridge driver
Sean Paul [Mon, 6 Aug 2012 22:39:42 +0000 (15:39 -0700)]
CHROMIUM: config: exynos: Enable PTN3460 bridge driver

Enable the PTN3460 bridge driver for exynos.

BUG=chrome-os-partner:10829
BUG=chrome-os-partner:11158
BUG=chrome-os-partner:12046
TEST=Tested on snow, screen came up on power-on and resume

Change-Id: I31410f521224b2e3d7e17837e86314c1ed63f0d2
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29346
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoARM: exynos: lcd: Remove ptn3460 initialization
Sean Paul [Mon, 6 Aug 2012 22:10:05 +0000 (15:10 -0700)]
ARM: exynos: lcd: Remove ptn3460 initialization

Removes PTN3460 bridge initialization code out of the board setup. We
will use the PTN3460 bridge driver to do this instead.

BUG=chrome-os-partner:10829
BUG=chrome-os-partner:11158
BUG=chrome-os-partner:12046
TEST=Tested on snow, screen came up on power-on and resume

Change-Id: I0bd6e57a2e568efc936ddb3102a0b823fe2c2ae9
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29345
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: exynos: dt: Match ptn3460 node bindings
Sean Paul [Mon, 6 Aug 2012 22:35:48 +0000 (15:35 -0700)]
CHROMIUM: exynos: dt: Match ptn3460 node bindings

Rename the ptn3460 device tree node to match the bindings documentation
in Documentation/devicetree/bindings/video/ptn3460.txt

BUG=chrome-os-partner:10829
BUG=chrome-os-partner:11158
BUG=chrome-os-partner:12046
TEST=Tested on snow, screen came up on power-on and resume

Change-Id: Ib884fd732272e21bfbc8b42350b9bc49bec08dc1
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29344
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoauxdisplay/ptn3460: Add driver for NXP PTN3460
Sean Paul [Sat, 4 Aug 2012 16:12:33 +0000 (09:12 -0700)]
auxdisplay/ptn3460: Add driver for NXP PTN3460

Add a new driver to handle the NXP PTN3460 DP/LVDS bridge chip. The
driver currently gets its platform data from device tree. In its current
state, it only supports power up/down using PD_N & RST_N pins.

BUG=chrome-os-partner:10829
BUG=chrome-os-partner:11158
BUG=chrome-os-partner:12046
TEST=Tested on snow, screen came up on power-on and resume

Change-Id: Ic9c7884edfe514ae5ab646b172c4c47352d46276
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29239
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoARM: exynos: dp: Remove 90ms bridge delay
Sean Paul [Fri, 3 Aug 2012 07:56:22 +0000 (00:56 -0700)]
ARM: exynos: dp: Remove 90ms bridge delay

Now that the DP driver supports hotplug interrupts, we can get rid of
the 90ms delay and let the DP driver handle any glitching that occurs
because of the bridge.

BUG=chrome-os-partner:10829
BUG=chrome-os-partner:11158
BUG=chrome-os-partner:12046
TEST=Tested on snow, screen came up on power-on and resume

Change-Id: Ieabeeaf81e4e657b91c7996a3ded73dc650eff99
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29146
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agovideo/exynos: dp: Enable hotplug interrupts
Sean Paul [Fri, 3 Aug 2012 07:36:56 +0000 (00:36 -0700)]
video/exynos: dp: Enable hotplug interrupts

Enable hotplug interrupts and move the hotplug scheduling into the
interrupt handler. This allows us to introduce a screen at any time
while we're running.

BUG=chrome-os-partner:10829
BUG=chrome-os-partner:11158
BUG=chrome-os-partner:12046
TEST=Tested on snow, screen came up on power-on and resume

Change-Id: I410fe3ffb9ac341a13135c09dbeb9eec8d75beef
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29145
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agovideo/exynos: dp: Fix bug when checking dp->irq
Sean Paul [Fri, 3 Aug 2012 07:38:21 +0000 (00:38 -0700)]
video/exynos: dp: Fix bug when checking dp->irq

Fix a bug where we check !dp->irq instead of the correct check for
-ENXIO.

BUG=None
TEST=None

Change-Id: Ibcdd16fb71eb41e4380ac8911ad6063634ff80e2
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29144
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agovideo/exynos: dp: Move hotplug into a workqueue
Sean Paul [Fri, 3 Aug 2012 05:47:53 +0000 (22:47 -0700)]
video/exynos: dp: Move hotplug into a workqueue

Move the hotplug related code from probe and resume into a workqueue.
This allows us to initialize the DP driver (and resume it) when there
is no monitor connected.

BUG=chrome-os-partner:10829
BUG=chrome-os-partner:11158
BUG=chrome-os-partner:12046
TEST=Tested on snow, screen came up on power-on and resume

Change-Id: I1cd21d8430541396a376dc31c0be51a29f0560fc
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29143
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agovideo/exynos: dp: Improve EDID error handling
Sean Paul [Mon, 6 Aug 2012 18:30:42 +0000 (11:30 -0700)]
video/exynos: dp: Improve EDID error handling

EDID error handling has 2 problems:
 - It doesn't fail as early as it can
 - The retry counts for i2c and aux transactions are huge

This patch fails if the initial i2c transaction fails, and reduces the
aux and i2c retry counts down to 3.

BUG=None
TEST=None

Change-Id: I72598c883cfc812b1985f716ba70ac8294e95366
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29302
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agovideo/exynos: dp: Fix up a couple return values
Sean Paul [Sat, 4 Aug 2012 15:41:48 +0000 (08:41 -0700)]
video/exynos: dp: Fix up a couple return values

Fix the return values of exynos_dp_enable_hw_link_training and
exynos_dp_get_pll_lock_status to reflect what they actually return.

BUG=None
TEST=None

Change-Id: I9d7733b523d42c9de5db48b4d30592092dc40dcd
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29238
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agortc: recycle id when unloading a rtc driver
Vincent Palatin [Thu, 2 Aug 2012 22:32:49 +0000 (22:32 +0000)]
rtc: recycle id when unloading a rtc driver

When calling rtc_device_unregister, we are not freeing the id used by the
driver.
So when doing a unload/load cycle for a RTC driver (e.g. rmmod rtc_cmos
&& modprobe rtc_cmos), its id is incremented by one. As a consequence,
we no longer have neither an rtc0 driver nor a /proc/driver/rtc (as it
only exists for the first driver).

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=on x86 platform, rmmod rtc_cmos && modprobe rtc_cmos
and see the new rtc driver is still /sys/class/rtc/rtc0 and
/proc/driver/rtc still exists.

Change-Id: I1b60e25611d30b46a3744d38dc34213db6e21b72
Reviewed-on: https://gerrit.chromium.org/gerrit/29103
Reviewed-by: Derek Basehore <dbasehore@chromium.org>
Tested-by: Derek Basehore <dbasehore@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>

11 years agoCHROMIUM: sysrq: Added Chrome OS specific 'x' key
Sameer Nanda [Mon, 6 Aug 2012 16:16:21 +0000 (09:16 -0700)]
CHROMIUM: sysrq: Added Chrome OS specific 'x' key

On Chrome OS systems the magic sysrq x key will cause the following to
happen:
- show processes in blocked state
- emergency file sync
- crash the system

This key combination can be used in the field by users to cause the
system to crash so that crash dumps can be collected to help debug UI
freeze issues.

BUG=chromium-os:33249
TEST=First "echo 0x1000 > /proc/sys/kernel/sysrq", then do the two tests
below:
1. Alt-F10-x should cause the system to crash. Looks for kcrash logs
under /var/spool/crash when the system reboots.
2. All other magic sysrq operation aside from alt-F10-x should be
ineffective.

Change-Id: I62d0a7f0028c072928be0125da4e069bafa5d88c
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29316
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: exynos: pwm: Avoid flickers in the PWM when adjusting
Doug Anderson [Mon, 6 Aug 2012 18:12:50 +0000 (11:12 -0700)]
CHROMIUM: exynos: pwm: Avoid flickers in the PWM when adjusting

When adjusting the PWM we want to avoid using the manual update bit
and avoid stopping / starting the PWM since this can make the LCD
flicker noticibly during the brightness adjustment.  Now we detect
the cases where we actually need to use manual update.

BUG=chrome-os-partner:12186
TEST=Can adjust backlight and don't see any flicker during steps.
TEST=Backlight works after suspend/resume (and has the right
brighness).

Change-Id: I7084d271b8dce70f7bc1baaa07bc2abc91f9551b
Signed-off-by: Simon Que <sque@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29209

11 years agoRevert "mwifiex: Change some debug logging to info logging"
Gary Morain [Mon, 6 Aug 2012 17:53:30 +0000 (10:53 -0700)]
Revert "mwifiex: Change some debug logging to info logging"

This reverts commit 5cf9fa2631c7503408174b546fe30dd675ded84d

Turn off the extra debug logging before R22 branches.

Change-Id: I719b494ae361f20e42ee4ec21b1165decd449bed
Reviewed-on: https://gerrit.chromium.org/gerrit/29296
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Gary Morain <gmorain@chromium.org>
Tested-by: Gary Morain <gmorain@chromium.org>
11 years agoAdd /proc/<pid>/totmaps
thiagog [Mon, 30 Jul 2012 21:17:20 +0000 (14:17 -0700)]
Add /proc/<pid>/totmaps

BUG=None
TEST=Manual

/proc/<pid>/totmaps is an alternative to /proc/<pid>/smaps. It contains a
summary of all memory displayed in smaps, while hiding the memory page
addresses. Thus, it is possible to access any process's totmaps info.
totmaps also gets the information from the PTEs, like smaps. Furthermore,
it also gives more detailed and accurate information about the memory
usage of a process than statm. The fields available in totmaps are Rss,
totmaps, Shared_Clean, Shared_Dirty, Private_clean, Private_Dirty,
Referenced, Anonymous, AnonHugePages, Swap and Locked.

Sample output:

Rss:                6120 kB
Pss:                3335 kB
Shared_Clean:       1008 kB
Shared_Dirty:       4012 kB
Private_Clean:         4 kB
Private_Dirty:      1096 kB
Referenced:         1812 kB
Anonymous:          5108 kB
AnonHugePages:         0 kB
Swap:                  0 kB
Locked:                0 kB

Change-Id: I4867554c1a4d200d304c3765447977767b7b3c72
Signed-off-by: Thiago Goncales <thiagog@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28731
Reviewed-by: Kees Cook <keescook@chromium.org>
11 years agoCHROMIUM: exynos: Print out time for firmware + early kernel init on Exynos
Sonny Rao [Mon, 6 Aug 2012 08:02:55 +0000 (01:02 -0700)]
CHROMIUM: exynos: Print out time for firmware + early kernel init on Exynos

This reads the MCT global register which is started by the firmware
very early on to get the approximate amount of time we spend in
firmware and early kernel initialization prior to time-keeping.

BUG=chrome-os-partner:12196
TEST=kernel prints out a reasonable time and /tmp/firmware-boot-time is
not 0

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Change-Id: I25214fe4cad0de7f29f50a1f4859e663d451f5ed
Reviewed-on: https://gerrit.chromium.org/gerrit/29265
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
11 years agoCHROMIUM: config: exynos5: Disable USB_GADGET
Vivek Gautam [Sat, 4 Aug 2012 07:17:05 +0000 (03:17 -0400)]
CHROMIUM: config: exynos5: Disable USB_GADGET

Disabling the USB_GADGET and related support since we are not using it.

BUG=chrome-os-partner:11145
TEST=emerge-daisy chromeos-kernel; tested with usb MSD
and usb HID.

Change-Id: Ie56c90f099253fc53f8ca4b684965bb4f94db6f1
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27973
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoUPSTREAM: mwifiex: update max_chan_per_scan correctly for SSID scan
Bing Zhao [Sat, 4 Aug 2012 01:34:45 +0000 (18:34 -0700)]
UPSTREAM: mwifiex: update max_chan_per_scan correctly for SSID scan

As per recent patch "658f37b mwifiex: scan less channels..."
less channels are scanned per scan command in associated state.

Default number of channels per scan command for normal scan are
already 4, but those are 14 for SSID specific scan operation.

This code change in this patch is required for SSID specific scan.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
This patch has been submitted to wireless-testing.git and expected
in upstream shortly.

BUG=chrome-os-partner:11597
TEST=Run autotest WiFiMatFunc.090_BgScanBackoff and pass the test

Change-Id: Ie5decec777e91ca28d36dbe366a7ec6c8677b434
Reviewed-on: https://gerrit.chromium.org/gerrit/29230
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
11 years agoARM: Exynos: Set 70.25Mhz for pixel clock and adjust snow LCD timings
Ajay Kumar [Thu, 2 Aug 2012 07:27:28 +0000 (03:27 -0400)]
ARM: Exynos: Set 70.25Mhz for pixel clock and adjust snow LCD timings

This patch sets sclk_fimd to 70.25Mhz and
LCD timings are adjusted to get a refresh rate~=60
in both the cases(only LCD and LCD + HDMI).

BUG=chrome-os-partner:11695
TEST=LCD, HDMI and Gscaler are working fine on snow.

Change-Id: Ie301fcb2e4f3e16610a24cac756c2b63cf4e2fa7
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28938
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoexynos: drm: Use sclk_vpll as source for sclk_fimd
Ajay Kumar [Wed, 1 Aug 2012 05:08:01 +0000 (01:08 -0400)]
exynos: drm: Use sclk_vpll as source for sclk_fimd

Use sclk_vpll as source instead of mout_mpll_user
for sclk_fimd in order to set fractional values
for pixel clock by using VPLL as source.

BUG=chrome-os-partner:11695
TEST=LCD, HDMI and Gscaler are working fine on snow.

Change-Id: I0350dd1e4941364b3018e522c7beca6e4357f045
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28937
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoARM: Exynos: Add clock_ops callbacks for clk_fout_vpll and set VPLL to 281MHz
Ajay Kumar [Wed, 1 Aug 2012 04:57:07 +0000 (00:57 -0400)]
ARM: Exynos: Add clock_ops callbacks for clk_fout_vpll and set VPLL to 281MHz

VPLL was set in u-boot to 300Mhz.
We add set_rate and get_rate callback for clk_fout_vpll
in order to set VPLL to 281Mhz.

BUG=chrome-os-partner:11695
TEST=LCD, HDMI and Gscaler are working fine on snow.

Change-Id: Idac1be4608336b09f4fcacf076e22ec73bbc35a8
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28385
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>

11 years agoCHROMIUM: x86: smp: don't send NMI while stopping CPUs
Sameer Nanda [Thu, 2 Aug 2012 21:48:23 +0000 (14:48 -0700)]
CHROMIUM: x86: smp: don't send NMI while stopping CPUs

There have been an increasing number of reports of systems freezing.
The kernel watchdogs are not causing reboots.

While debugging NMI watchdog issues couple of months back I had noticed
that the new code that sends NMIs to other CPUs can cause lockups since
the perf counter NMI handler also gets executed in this path.  The perf
counter handler is a _lot_ of code to be executing when the CPUs are
being stopped especially in panic situations.

Setting smp_no_nmi_ipi to true to see if this helps bring down the
system freezing reports and also hopefully provides us stack traces to
debug the root cause of the panics.

BUG=chromium-os:32987
TEST="echo bug > /proc/breakme" and check that kcrash files are
generated correctly.

Change-Id: I276ea6c6918ab05714692bd614e7dfe179a4d32a
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29085
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
11 years agoCHROMIUM: sysrq: treat F10 as magic sysrq key
Sameer Nanda [Thu, 2 Aug 2012 23:10:31 +0000 (16:10 -0700)]
CHROMIUM: sysrq: treat F10 as magic sysrq key

Chrome OS keyboards don't have a sysrq key. This means we lose magic
sysrq functionality on systems that don't have external USB keyboards
attached to them, i.e., default configuration for Chromebooks.

This change treats F10 key as sysrq key for sysrq filtering purposes.
With this change in place, as an example, alt-F10-c will cause a kernel
crash, reboot system and generate a kcrash file.

Note that this change only impacts systems in dev mode since the sysrq
functionality is only enabled in dev mode currently.

BUG=chromium-os:32987
TEST=hit 'alt-F10-c' key combination.  This should cause a kernel panic
and the system will reboot.  Kernel crash file will be be present under
/var/spool/crash.

Change-Id: Ic795023927f4411964a2040ff407dc115e0960ec
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29110
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoUPSTREAM: mwifiex: correction in mcs index check
Bing Zhao [Thu, 2 Aug 2012 21:56:14 +0000 (14:56 -0700)]
UPSTREAM: mwifiex: correction in mcs index check

mwifiex driver supports 2x2 chips as well. Hence valid mcs values
are 0 to 15. The check for mcs index is corrected in this patch.

For example: if 40MHz is enabled and mcs index is 11, "iw link"
command would show "tx bitrate: 108.0 MBit/s" without this patch.
Now it shows "tx bitrate: 108.0 MBit/s MCS 11 40Mhz" with the patch.

Cc: "3.2.y, 3.3.y, 3.4.y" <stable@vger.kernel.org>
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:12190
TEST=Build and run autotest WiFiMatFunc, WiFiSecMat, WiFiManager, WiFiPerf

Change-Id: I4ec246b8d8e9a1f36eb3caa4438e19076dc3f8bd
Reviewed-on: https://gerrit.chromium.org/gerrit/29094
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agoUPSTREAM: mwifiex: wakeup main thread to handle command queued
Bing Zhao [Thu, 2 Aug 2012 21:54:46 +0000 (14:54 -0700)]
UPSTREAM: mwifiex: wakeup main thread to handle command queued

We miss to wakeup main thread after adding command to cmd pending
queue at follwing places. These commands are handled later when
main thread is woken up for handling an interrupt for sleep event
from firmware. This adds worst case delay of 50msec.

1) We don't wakeup main thread when asynchronous command is added
to cmd pending queue. Move queue_work() call from
mwifiex_wait_queue_complete() to mwifiex_send_cmd_async() to wakeup
main thread for sync as well as async commands.

2) Scan operation is triggered due to following reasons
   a) request from user (ex. "iw scan" command)
   b) Scan performed by driver internally.
   In first case main thread is woken up when first scan command is
queued in cmd pending queue (we don't need to wakeup main thread for
subsequent scan commands, because they are queued in scan command
response handler), but it is not done for second case. queue_work()
is moved inside mwifiex_scan_networks() to handle both the cases.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chrome-os-partner:12190
TEST=Build and run autotest WiFiMatFunc, WiFiSecMat, WiFiManager, WiFiPerf

Change-Id: I0578930c86224c382fa4ae25e0b0d7fc3887c93e
Reviewed-on: https://gerrit.chromium.org/gerrit/29093
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agoUPSTREAM: mwifiex: wake up main thread to handle Tx traffic if scan is delayed/aborted
Bing Zhao [Thu, 2 Aug 2012 21:53:39 +0000 (14:53 -0700)]
UPSTREAM: mwifiex: wake up main thread to handle Tx traffic if scan is delayed/aborted

This is a flaw in recently implemented logic to handle Tx traffic
and scan operation simultaneously. We missed to wakeup main thread
to handle Tx traffic if scan is delayed/aborted.

For some cards (SD8797, for example), firmware will send SLEEP event
if there is no activity for 50msec. While handling the SLEEP event,
main thread will be woken up and Tx packet gets sent hence. In worst
case Tx traffic will be delayed for 50msec.

For other cards, such as USB8797, firmware won't send SLEEP event.
So, Tx traffic gets stuck if no other event triggers the wakeup of
main thread.

This patch fixes above issues.

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:12190
TEST=Build and run autotest WiFiMatFunc, WiFiSecMat, WiFiManager, WiFiPerf

Change-Id: I0f60e30639fe531b554fde32a6bb55303abb0fb4
Reviewed-on: https://gerrit.chromium.org/gerrit/29092
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agoUPSTREAM: mwifiex: fix wrong return values in add_virtual_intf() error cases
Bing Zhao [Thu, 2 Aug 2012 21:52:20 +0000 (14:52 -0700)]
UPSTREAM: mwifiex: fix wrong return values in add_virtual_intf() error cases

commit 858faa57dd9e2b91f3f870fbb1185982e42f5a2b upstream

add_virtual_intf() needs to return an ERR_PTR(), instead of NULL,
on errors, otherwise cfg80211 will crash.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
BUG=chrome-os-partner:12190
TEST=Build and run autotest WiFiMatFunc, WiFiSecMat, WiFiManager, WiFiPerf

Change-Id: I90c07d50d50f25476a0495b3beff6a9b3f74226d
Reviewed-on: https://gerrit.chromium.org/gerrit/29091
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agoUPSTREAM: mwifiex: fix WPS eapol handshake failure
Bing Zhao [Thu, 2 Aug 2012 21:50:34 +0000 (14:50 -0700)]
UPSTREAM: mwifiex: fix WPS eapol handshake failure

commit f03ba7e9a24e5e9efaad56bd1713b994ea556b16 upstream.

After association, STA will go through eapol handshake with WPS
enabled AP. It's observed that WPS handshake fails with some 11n
AP. The reason for the failure is that the eapol packet is sent
via 11n frame aggregation.

The eapol packet should be sent directly without 11n aggregation.

This patch fixes the problem by adding WPS session control while
dequeuing Tx packets for transmission.

Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
BUG=chrome-os-partner:12190
TEST=Build and run autotest WiFiMatFunc, WiFiSecMat, WiFiManager, WiFiPerf

Change-Id: I19c6250f8d63e1c9c7440d95d8d09fc16f6393b2
Reviewed-on: https://gerrit.chromium.org/gerrit/29090
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agoUPSTREAM: mwifiex: fix 11n rx packet drop issue
Bing Zhao [Thu, 2 Aug 2012 21:44:05 +0000 (14:44 -0700)]
UPSTREAM: mwifiex: fix 11n rx packet drop issue

commit 925839243dc9aa4ef25305f5afd10ed18258a4ac upstream.

Currently we check the sequence number of last packet received
against start_win. If a sequence hole is detected, start_win is
updated to next sequence number.

Since the rx sequence number is initialized to 0, a corner case
exists when BA setup happens immediately after association. As
0 is a valid sequence number, start_win gets increased to 1
incorrectly. This causes the first packet with sequence number 0
being dropped.

Initialize rx sequence number as 0xffff and skip adjusting
start_win if the sequence number remains 0xffff. The sequence
number will be updated once the first packet is received.

Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
BUG=chrome-os-partner:12190
TEST=Build and run autotest WiFiMatFunc, WiFiSecMat, WiFiManager, WiFiPerf

Change-Id: I787cbd42acff6350cb617a339a0ae5ecfcb69b97
Reviewed-on: https://gerrit.chromium.org/gerrit/29089
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>

11 years agoCHROMIUM: config: exynos5: Enable ADC and thermistor
Naveen Krishna Chatradhi [Wed, 1 Aug 2012 12:40:23 +0000 (21:40 +0900)]
CHROMIUM: config: exynos5: Enable ADC and thermistor

Enable support for Samsung's s3c-adc driver and NTC thermistor
driver.

BUG=chrome-os-partner:11688
TEST=Can now see this in dmesg:
  [    0.863241] s3c-adc 12d10000.adc: attached adc driver
TEST=With a future CL can cat the sysfs entry for each hwmon
representing the thermistors
  localhost ~ # cat /sys/class/hwmon/hwmon1/device/temp1_input
  61542

Change-Id: Icebed0b8105dbc589b1782cac525bc24181ba7b0
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28940

11 years agoCHROMIUM: config: Renormalize splitconfig
Doug Anderson [Thu, 2 Aug 2012 18:47:38 +0000 (11:47 -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: I6990037f07bb983ff9f47e8db9c3c9dc5651de71
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29046
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoARM: cros5250: Setup the regulator for the adc
Doug Anderson [Wed, 1 Aug 2012 22:36:25 +0000 (15:36 -0700)]
ARM: cros5250: Setup the regulator for the adc

We can now specify the regulator of the adc in the device tree.  That
means we don't need to name the regulator "vdd" and can instead call
it something more meaningful like "vdd_1v8".

BUG=chrome-os-partner:11688
TEST=After enabling ADC config I can see this in dmesg.
  [    0.863241] s3c-adc 12d10000.adc: attached adc driver
TEST=Suspend/resume works.

Change-Id: I5b0e9d7ea3a296d6cd7d608071b378d15e7967ec
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28987
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoarm: cros5250-common: use always-on option for vdd regulator
Naveen Krishna Chatradhi [Wed, 1 Aug 2012 12:23:17 +0000 (21:23 +0900)]
arm: cros5250-common: use always-on option for vdd regulator

The adc driver uses this regulator and it calls regulator_enable() and
regulator_disable().  Once it does that set of calls the vdd_1v8 rail
will turn off (although it was on at boot).  That's not so good since
the 1v8 rail is used by lots of components and needs to be on all the
time.

We'll change the regulator to be always on.

BUG=chrome-os-partner:11688
TEST=powerd_suspend then press power button; device wakes up

Change-Id: I7ef30b88746e86d331b06d927569f88f20d9593b
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28939
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoarm: exynos5: dts: Add adc to device tree
Doug Anderson [Wed, 1 Aug 2012 22:32:35 +0000 (15:32 -0700)]
arm: exynos5: dts: Add adc to device tree

Having the ADC in the device tree allows us to properly specify its
regulator among other benefits.

Note that this needs a followon CL to add the regulator to the device
trees of individual boards.

BUG=chrome-os-partner:11688
TEST=In next CL I add dts definition to board then I see in dmesg:
  [    0.863241] s3c-adc 12d10000.adc: attached adc driver

Change-Id: Id1f6e6687ce7f86e76124559a258a9f9c2792565
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28986
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoarm: exynos5: Remove platform device for adc
Doug Anderson [Wed, 1 Aug 2012 22:22:34 +0000 (15:22 -0700)]
arm: exynos5: Remove platform device for adc

Removing the platform registration of the ADC device in preparation
for moving to device tree.

This is a partial revert of https://gerrit.chromium.org/gerrit/27151
AKA 7fae83c9d8c927c77f4aff21eb744e1f46ca2cf5, which added the
platform registration.

Things still left from the original change:
* Physical address still left in map.h.  This is harmless and actually
  seems beneficial.
* Still doing the enabling power by mucking with S5P_ADC_PHY_CONTROL.
  This is ugly and should idelaly be cleaned up in a followon CL.
* Still left change to get platform_get_irq(pdev, 0) instead of 1.
  I did a print out and saw that it was getting 138 which seems to
  correspond to adc0.

BUG=chrome-os-partner:11688
TEST=In follow-on CLs I add dts definitions and still see ADC come up
in dmesg.

Change-Id: I3683d6d71b3eb19243d89c0b650540fbab602c2c
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28985
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agosamsung: adc: Add device tree support
Doug Anderson [Wed, 1 Aug 2012 22:07:53 +0000 (15:07 -0700)]
samsung: adc: Add device tree support

Add device tree probe support for Samsung's adc driver.

BUG=chrome-os-partner:11688
TEST=In follow-on CLs I add dts definitions and remove platform
definitions and still see ADC come up in dmesg.

Change-Id: I42a428949a48829b2c4dc1290f4757a25bda2892
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28984
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: config: enable mali syfs support
Sam Leffler [Wed, 25 Jul 2012 17:07:24 +0000 (10:07 -0700)]
CHROMIUM: config: enable mali syfs support

Turn on CONFIG_T6XX_DEBUG_SYS for sysfs support and CONFIG_T6XX_DVFS_FREQ_LOCK
for the ability to lock the dvfs frequency.  Temporary for debugging.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=chrome-os-partner:11795
TEST=boot and check sysfs files are present

Change-Id: If8fe7fbfb884ec7e01ec4427b8c31a754d6625ca
Reviewed-on: https://gerrit.chromium.org/gerrit/28527
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Sam Leffler <sleffler@chromium.org>
11 years agoCHROMIUM: regulator: Add device tree node for max77686
Doug Anderson [Wed, 1 Aug 2012 21:59:25 +0000 (14:59 -0700)]
CHROMIUM: regulator: Add device tree node for max77686

This just passes the device tree node to regulator_register() which
allows get_regulator() to work when supplies are defined in the device
tree.

NOTE: The maxim77686 driver has changed significantly upstream so this
is not easily posted upstream.  Hopefully the code there has already
been fixed.

BUG=chrome-os-partner:11688
TEST=In follow-on CLs I have specified supplies in the device tree.
Before this change that didn't work for max77686 provided supplies.
After this change that works.

Change-Id: I93a46db7e80910a8a98ac89c93e1291b96f97dad
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/28983
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoARM MALI: Cleanup sysfs support.
Sam Leffler [Tue, 24 Jul 2012 23:40:33 +0000 (16:40 -0700)]
ARM MALI: Cleanup sysfs support.

Promote T6XX_DEBUG_SYS and T6XX_DVFS_FREQ_LOCK (renamed from T6XX_FREQ_LOCK)
to real config knobs and fixup the associated code:

o conditionally compiled sysfs files are now present only when configured
o dvfs on/off uses existing routines to control dvfs support instead of
  directly frobbing internal state
o add kbasep_pm_metrics_isactive instead of inspecting internal state
  (sometimes incorrectly; e.g. metrics.timer.active instead of
  metrics.timer_active)
o fix signed/unsigned badness in dvfs freq lock stuff
o fix set_clock to identify why something fails and remove the clock wait
  logic that is already done in kbase_platform_dvfs_set_clock
o static'ize CONFIG_T6XX_DVFS_FREQ_LOCK functions used only in the file
o rename sysfs helper functions
o make clkout write accept any value (instead of requiring "3d")
o checkpatch complaints

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=none
TEST=build w/ each combination of config knobs; check r/w of each sysfs file

Change-Id: Iae7ae43cef66e54ffc89d71b1d8fa1e9135acf74
Reviewed-on: https://gerrit.chromium.org/gerrit/28340
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Gabriele Paoloni <gabriele.paoloni@arm.com>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
11 years agoCHROMIUM: config: switch BATTERY_SBS to module on exynos
Olof Johansson [Wed, 1 Aug 2012 06:32:13 +0000 (23:32 -0700)]
CHROMIUM: config: switch BATTERY_SBS to module on exynos

Battery init is 300ms on critical boot path, so moving it to a module
helps overall boot time.

BUG=chrome-os-partner:11403
TEST=boot

Change-Id: Ia52fe5942c97816a4f8c2e443a3726fe86ed9591
Signed-off-by: Olof Johansson <olof@lixom.net>
Reviewed-on: https://gerrit.chromium.org/gerrit/28919
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Simon Que <sque@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: USB: DWC3: Disabling gadget support for DWC3
Vivek Gautam [Mon, 30 Jul 2012 16:58:12 +0000 (12:58 -0400)]
CHROMIUM: USB: DWC3: Disabling gadget support for DWC3

This patch removes the dependency of USB_DWC3 on USB_GADGET
and further disables the gadget support and related features
in dwc3 since we are not using it.

BUG=chrome-os-partner:11145
TEST=emerge-daisy chromeos-kernel; tested with usb MSD and usb HID.

Change-Id:I269ab2aee26e913cc06f2dbbc9c7ac9ef6b2cbac
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27751
Reviewed-by: Doug Anderson <dianders@chromium.org>