cascardo/linux.git
11 years agoCHROMIUM: ramoops: Copy the entire buffer to deal with bit rot
Sameer Nanda [Thu, 30 Aug 2012 16:48:10 +0000 (09:48 -0700)]
CHROMIUM: ramoops: Copy the entire buffer to deal with bit rot

If unclean shutdown is done by yanking power rails, the RAM may be in a
state where it is not getting refreshed for a short period of time. This
can cause bit rotting in RAM and throw off the wraparound and buffer
size calculation logic. To get around this, copy the entire console
buffer. Note that this, of course, won't do anything to fix the bit
rotting but the intent here is that some logs are better than none.

Also squeezed in a minor cleanup of renaming headp to tailp since it
really tracks the tail, not head.

BUG=chrome-os-partner:13249
TEST=on a snow system do a warm reboot by either issuing the
"warm_reboot" command from servo ec console or by pressing
alt-volume_up-r keys together. The system should reboot. Upon bootup,
check contents of "/dev/pstore/console-ramoops" and ensure they are from
dmesg of the previous boot.

Change-Id: I999e95bf854fff26265404a680255f25cc2f7fe6
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31909
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: Correct i2c wait free time calculation
Simon Glass [Thu, 30 Aug 2012 20:03:06 +0000 (13:03 -0700)]
CHROMIUM: Correct i2c wait free time calculation

We should be using usecs_to_jiffies() for microsecond values. Correct
this.

BUG=chrome-os-partner:12420
BRANCH=snow
TEST=manual
On kernel:

while true; do i2cdump  -f -y 4 0x48; done >/dev/null

On EC:

pmu 1000

See that there are no errors.

Change-Id: I589721e200ad9ad7d872ee952aece84ca2bec923
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31924
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: Increase i2c arbitration wait time
Simon Glass [Thu, 30 Aug 2012 20:03:06 +0000 (13:03 -0700)]
CHROMIUM: Increase i2c arbitration wait time

We currently intend to wait 50ms for the EC to release the i2c bus
(although due to a bug soon to be fixed, we wait longer).

The longest transaction we expect the EC to perform is 4 bytes, which
should be about 0.5ms, but if there is a bug in the EC driver the time
could wind out significantly.

Change the wait time to 500ms.

BUG=chrome-os-partner:12420
BRANCH=snow
TEST=manual
On kernel:

while true; do i2cdump  -f -y 4 0x48; done >/dev/null

On EC:

pmu 1000

See that there are no errors.

Change-Id: I2ab5c6f0ac1182485ac1a4f60e4e76ba83fb3987
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31923
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: dts: Set no-ack-irq for tps65090
Jonathan Kliegman [Thu, 30 Aug 2012 18:02:55 +0000 (14:02 -0400)]
CHROMIUM: dts: Set no-ack-irq for tps65090

Set no-ack-irq to prevent the tps from acknowledging interrupts
on the tps chip.

BUG=chrome-os-partner:13109
TEST=Tested with and without devicetree flag set.
  Validated message in probe matches devicetree setting
  Unplugged and replugged power cable, confirmed battery icon
    updated correctly and debug messages (removed in CL) outputted
    the correct logic path.

Change-Id: I90df39c9fa4f7fa34df9701dc3e50522361cddea
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31896
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agodrivers: mfd: tps65090: Add devicetree flag to not ack tps interrupts
Jonathan Kliegman [Thu, 30 Aug 2012 17:51:49 +0000 (13:51 -0400)]
drivers: mfd: tps65090: Add devicetree flag to not ack tps interrupts

On some systems the tps65090 chip can be connected to multiple masters.
Add a device tree option to disable checking interrupts if a configuration
is present to prevent race conditions with only one device seeing the
interrupt.

BUG=chrome-os-partner:13109
TEST=Tested with and without devicetree flag set.
  Validated message in probe matches devicetree setting
  Unplugged and replugged power cable, confirmed battery icon
    updated correctly and debug messages (removed in CL) outputted
    the correct logic path.

Change-Id: I1d196373d65b36def67eeeb053f60c2471729d9c
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31895
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: Input: cyapa - skip cyapa_dump_data if no DEBUG
Daniel Kurtz [Mon, 27 Aug 2012 14:10:55 +0000 (22:10 +0800)]
CHROMIUM: Input: cyapa - skip cyapa_dump_data if no DEBUG

ftrace shows this debugging function is still consuming several ~10 usec
even with DEBUG disabled.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:33910
TEST=cd /sys/kernel/debug/tracing/
TEST=echo 'cyapa*' > set_ftrace_filter
TEST=echo 'cyapa_irq' > set_graph_function
TEST=echo function_graph > current_tracer
TEST=move finger on touch surface
TEST=less trace
  => cyapa_dump_data() only present when DEBUG defined in cyapa.c

Change-Id: Ia8c789dfb01dda52c31167174a8a4731c965b603
Reviewed-on: https://gerrit.chromium.org/gerrit/31464
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoUPSTREAM: ARM: Remove current_mm per-cpu variable
Catalin Marinas [Mon, 28 Nov 2011 15:59:10 +0000 (15:59 +0000)]
UPSTREAM: ARM: Remove current_mm per-cpu variable

The current_mm variable was used to store the new mm between the
switch_mm() and switch_to() calls where an IPI to reset the context
could have set the wrong mm. Since the interrupts are disabled during
context switch, there is no need for this variable, current->active_mm
already points to the current mm when interrupts are re-enabled.

Reviewed-by: Will Deacon <will.deacon@arm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Marc Zyngier <Marc.Zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit e323969ccda2d69f02e047c08b03faa09215c72a)

BUG=chromium-os:34007
TEST=generic system testing

Change-Id: I3ba9043520e275d593526f97aa2ecdd877effa4a
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31852
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: mfd: tps65090 uses rising edge interrupt
Simon Que [Wed, 29 Aug 2012 20:09:36 +0000 (13:09 -0700)]
CHROMIUM: mfd: tps65090 uses rising edge interrupt

This is to avoid a conflict with the EC, which uses the preceding
falling edge for interrupts.

BUG=chrome-os-partner:13109
TEST=udevadm monitor, plug and unplug AC.  Should see power_supply
events.

Change-Id: If4a8740a6ca55821928410f693c2ad9b128e66b5
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31735
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agoCHROMIUM: dts: Configure BUCK2,3,4 to standby opmode.
Todd Broch [Wed, 29 Aug 2012 00:16:03 +0000 (17:16 -0700)]
CHROMIUM: dts: Configure BUCK2,3,4 to standby opmode.

BUCK2,3,4 drive vdd_arm, vdd_int and vdd_g3d respectively.  These
exynos regulators can safely be turned off during standby.  They were
previously off during S3 but recent op_mode additions to the device
tree have set them to always on.

CL disables these regulators in standby.

BUG=chrome-os-partner:11256
TEST=manual,
enter standby ... measure power on arm,int,g3d to be zero.  Resume
from suspend without issues.

Signed-off-by: Todd Broch <tbroch@chromium.org>
Change-Id: Ib714e1fe166afbd2607574eaabc4819a492b3fa1
Reviewed-on: https://gerrit.chromium.org/gerrit/31660
Reviewed-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
11 years agoCHROMIUM: leds: Fix chromeos keyboard LED suspend behavior
Simon Que [Wed, 29 Aug 2012 19:16:19 +0000 (12:16 -0700)]
CHROMIUM: leds: Fix chromeos keyboard LED suspend behavior

Should use the built-in suspend/resume functions in led-class.c instead.

Also renamed the set function to correctly reflect the device type.

BUG=chrome-os-partner:13273
TEST=set the keyboard backlight to various levels (low, medium, full)
and run powerd_suspend.  The backlight should turn off.  Resume.  The
backlight should be restored to its previous value (maybe with a delay).

Change-Id: Ifd56debd6f157b71729bf563b4242c58709549f7
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31722
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoCHROMIUM: Input: atmel_mxt_ts - disable input_dev when updating FW & Config
Yufeng Shen [Tue, 28 Aug 2012 21:59:20 +0000 (17:59 -0400)]
CHROMIUM: Input: atmel_mxt_ts - disable input_dev when updating FW & Config

When the FW update is in progress, the linux input layer may
call open/close on the driver, which translates to writing
certain values into the device T9 control register, which does
not exist at all when the system is in bootloader mode and the
writing to register will make the firmware update corrupted.

So unregister the input device from input subsystem when doing
FW update and re-create it when update finishes. Also doing the
same for config update.

Signed-off-by: Yufeng Shen <miletus@chromium.org>
BUG=chromium-os:33981
TEST=Boot system and let the device auto-update the FW and make
     sure the update is successful.

Change-Id: If8f7ea2953f1a825cbcad4a548cf563345518c7d
Reviewed-on: https://gerrit.chromium.org/gerrit/31638
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
11 years agoarm: exynos: tweak busfreq sysfs support
Sam Leffler [Wed, 22 Aug 2012 22:38:49 +0000 (15:38 -0700)]
arm: exynos: tweak busfreq sysfs support

Silence console msgs generated when reading the cur_freq data due
to null pointers.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=none
TEST=cat busfreq/cur_freq and note no console messages

Change-Id: I14867d8d29aee92f3dd2a5daf0eef0bda2fffcf3
Reviewed-on: https://gerrit.chromium.org/gerrit/31618
Reviewed-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
11 years agoUPSTREAM: ARM: 7445/1: mm: update CONTEXTIDR register to contain PID of current process
Will Deacon [Fri, 6 Jul 2012 14:43:03 +0000 (15:43 +0100)]
UPSTREAM: ARM: 7445/1: mm: update CONTEXTIDR register to contain PID of current process

This patch introduces a new Kconfig option which, when enabled, causes
the kernel to write the PID of the current task into the PROCID field
of the CONTEXTIDR on context switch. This is useful when analysing
hardware trace, since writes to this register can be configured to emit
an event into the trace stream.

The thread notifier for writing the PID is deliberately kept separate
from the ASID-writing code so that we can support newer processors using
LPAE, where the ASID is stored in TTBR0. As such, the switch_mm code is
updated to perform a read-modify-write sequence to ensure that we don't
clobber the PID on CPUs using the classic 2-level page tables.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit 575320d625d5b5eb115575a1f5e17af456e69577)

BUG=chromium-os:34007
TEST=general system testing

Change-Id: I4a4ba8b8911efac06914ed0c2974d16b502d78f2
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31715
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoUPSTREAM: ARM: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW on ASID-capable CPUs
Catalin Marinas [Mon, 28 Nov 2011 13:53:28 +0000 (13:53 +0000)]
UPSTREAM: ARM: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW on ASID-capable CPUs

Since the ASIDs must be unique to an mm across all the CPUs in a system,
the __new_context() function needs to broadcast a context reset event to
all the CPUs during ASID allocation if a roll-over occurred. Such IPIs
cannot be issued with interrupts disabled and ARM had to define
__ARCH_WANT_INTERRUPTS_ON_CTXSW.

This patch changes the check_context() function to
check_and_switch_context() called from switch_mm(). In case of
ASID-capable CPUs (ARMv6 onwards), if a new ASID is needed and the
interrupts are disabled, it defers the __new_context() and
cpu_switch_mm() calls to the post-lock switch hook where the interrupts
are enabled. Setting the reserved TTBR0 was also moved to
check_and_switch_context() from cpu_v7_switch_mm().

Reviewed-by: Will Deacon <will.deacon@arm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Marc Zyngier <Marc.Zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 7fec1b57b8a925d83c194f995f83d9f8442fd48e)

BUG=chromium-os:34007
TEST=general system testing

Change-Id: I0628afd963eb7af1dfa0c3230f08f670feba9e9d
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31714
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoUPSTREAM: ARM: Use TTBR1 instead of reserved context ID
Will Deacon [Tue, 31 May 2011 14:38:43 +0000 (15:38 +0100)]
UPSTREAM: ARM: Use TTBR1 instead of reserved context ID

On ARMv7 CPUs that cache first level page table entries (like the
Cortex-A15), using a reserved ASID while changing the TTBR or flushing
the TLB is unsafe.

This is because the CPU may cache the first level entry as the result of
a speculative memory access while the reserved ASID is assigned. After
the process owning the page tables dies, the memory will be reallocated
and may be written with junk values which can be interpreted as global,
valid PTEs by the processor. This will result in the TLB being populated
with bogus global entries.

This patch avoids the use of a reserved context ID in the v7 switch_mm
and ASID rollover code by temporarily using the swapper_pg_dir pointed
at by TTBR1, which contains only global entries that are not tagged
with ASIDs.

Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Marc Zyngier <Marc.Zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
[catalin.marinas@arm.com: add LPAE support]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 3c5f7e7b4a0346de670b08f595bd15e7eec91f97)

BUG=chromium-os:34007
TEST=general system testing

Change-Id: I853a937d0a045c0487e97d74783064329d42eaf0
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31713
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoAdd implementation of poll() to dma_buf using KDS
David Garbett [Mon, 2 Jul 2012 09:18:27 +0000 (10:18 +0100)]
Add implementation of poll() to dma_buf using KDS

BUG=chrome-os-partner:11949
TEST=local build, run on ARM

Change-Id: I955e12be4d52e771eccc267befff8b42f316c150
Signed-off-by: Ray Smith <Raymond.Smith@arm.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27056
Commit-Ready: John Sheu <sheu@chromium.org>
Reviewed-by: John Sheu <sheu@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
11 years agoKDS: Fix incorrect timeout
Ronald Sloot [Fri, 10 Aug 2012 13:18:30 +0000 (14:18 +0100)]
KDS: Fix incorrect timeout

kds_waitall uses wait_event_interruptible() and
wait_event_interruptible_timeout() incorrectly.

BUG=chrome-os-partner:11949
TEST=build, run on ARM

Change-Id: Ide44ccff6e902c6d8b5483d67335e36e094da5d2
Signed-off-by: David Garbett <David.Garbett@arm.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29878
Commit-Ready: John Sheu <sheu@chromium.org>
Reviewed-by: John Sheu <sheu@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
11 years agoCHROMIUM: ALSA: hda/ca0132 - cache firmware on first load.
Chih-Chung Chang [Wed, 22 Aug 2012 06:21:09 +0000 (14:21 +0800)]
CHROMIUM: ALSA: hda/ca0132 - cache firmware on first load.

So we won't load it from at resume time.
Also remove the size check for the speakereq file.

BUG=chrome-os-partner:12927
TEST=build and install, audio still works.

Change-Id: Ic1eb133f5d5a33fbf0e823736a62ff391648d939
Signed-off-by: Chih-Chung Chang <chihchung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31093
Reviewed-by: Dylan Reid <dgreid@chromium.org>
11 years agodrm/exynos: Implement fimd_display_power_on
Stéphane Marchesin [Tue, 28 Aug 2012 21:34:18 +0000 (14:34 -0700)]
drm/exynos: Implement fimd_display_power_on

Also fix fimd_power_on to turn the panel off in the off case.

BUG=chromium-os-partner:12832
TEST=by hand, screen goes completely black after the timeout.

Change-Id: Ia79f5e53009110715395a5984e3e3f96809c7aed
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31634
Reviewed-by: John Sheu <sheu@chromium.org>
11 years agodrm/exynos: Fix doxygen comment for the event.
Stéphane Marchesin [Fri, 24 Aug 2012 21:38:05 +0000 (14:38 -0700)]
drm/exynos: Fix doxygen comment for the event.

BUG=none
TEST=compiles

Change-Id: I505539c5cb25ae38f672d21dac3bda837a6c66ec
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31390

11 years agoleds: chromeos keyboard name should contain "kbd_backlight"
Simon Que [Tue, 28 Aug 2012 19:50:58 +0000 (12:50 -0700)]
leds: chromeos keyboard name should contain "kbd_backlight"

The driver sysfs directory should be "chromeos::kbd_backlight"
This is to match how other keyboard backlight drivers do it.

BUG=chromium-os:32959
TEST=See /sys/class/leds, there should be "chromeos::kbd_backlight"

Change-Id: Icaed85f110211a1e51f15ebcbb90b9e9b5e63291
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31626
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
11 years agoCHROMIUM: chromeos_laptop: Use LEDs for keyboard backlight
Simon Que [Tue, 28 Aug 2012 00:42:23 +0000 (17:42 -0700)]
CHROMIUM: chromeos_laptop: Use LEDs for keyboard backlight

Previously using regular backlight driver, now using LEDs driver.

BUG=chromium-os:32959
TEST=Go to /sys/class/leds/keyboard_leds, make sure you can change
keyboard backlight by writing to "brightness"

Change-Id: I780629a014030639dae1497712b7a4d7ed599e26
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31543
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
11 years agoCHROMIUM: config: Enable keyboard backlight LEDs
Simon Que [Tue, 28 Aug 2012 00:41:30 +0000 (17:41 -0700)]
CHROMIUM: config: Enable keyboard backlight LEDs

BUG=chromium-os:32959
TEST=None (see later patch(es))

Change-Id: I487688054743eae0743201d923ba8f2c1ebc3ff5
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31542
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
11 years agoCHROMIUM: leds: Add Chrome OS keyboard LEDs driver
Simon Que [Tue, 28 Aug 2012 00:36:57 +0000 (17:36 -0700)]
CHROMIUM: leds: Add Chrome OS keyboard LEDs driver

It is ACPI-based keyboard backlight LEDs.

BUG=chromium-os:32959
TEST=None (see next patch(es) for build/test info)

Change-Id: I0871851b1c67af33a9b9bd83c1dc93b1f8253ac5
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31541
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
11 years agoregulator: max77686: Add support for various operating modes
Abhilash Kesavan [Fri, 17 Aug 2012 10:53:45 +0000 (16:23 +0530)]
regulator: max77686: Add support for various operating modes

MAX77686 supports a low power mode as well as a standby mode for
its LDOs and BUCKs. Initially add LDO8 standby mode as it leaks
~160mW through a suspend/resume cycle. The idea would be to set
these modes for the rest of the LDOs and BUCKs as well.
Note: The device tree bindings have been taken from the upstream
MFD driver with the new optional bindings for operating mode and
buck ramp delay added.

BUG=chrome-os-partner:12522
TEST=Verify 1350_ldoin power during suspend along with follow-on
patches.

Change-Id: I1144254ebf6cf096bc5b11217c3045aff41d8db0
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30257
Reviewed-by: Todd Broch <tbroch@chromium.org>
11 years agoCHROMIUM: dts: Add regulator operating mode bindings
Abhilash Kesavan [Tue, 28 Aug 2012 15:55:56 +0000 (08:55 -0700)]
CHROMIUM: dts: Add regulator operating mode bindings

Some of the LDOs and BUCKs on the MAX77686 PMIC can be put
into a low power or standby state. Add bindings to control
the operating mode (primarily enabling the standby mode for
LDO8).

BUG=chrome-os-partner:12660
TEST=Verify that the standby mode bit is being set using:
i2cget -y -f 0 0x9 0x47 (get a value of 0x48).
Suspend the system (rtcwake -m mem -s 25) and measure 1350_ldoin_mw
power. Prior to the patches 1350_ldoin_mw showed ~95mW and after it
showed ~2mW. Verified DP across 20 suspend/resume cycles.
HDMI S2R support is on-going; with or without these patches the
behaviour of HDMI is identical (corrupted images on cable insertion
post-resume).

Change-Id: I58f7975e9cb14a051139988b6237d3f5599589c2
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31596
Reviewed-by: Todd Broch <tbroch@chromium.org>
11 years agoexynos: Store mwifiex_ds_misc_subsc_evt in mwifiex_private
Jeff Disher [Mon, 27 Aug 2012 15:33:50 +0000 (11:33 -0400)]
exynos: Store mwifiex_ds_misc_subsc_evt in mwifiex_private

Since mwifiex_ds_misc_subsc_evt is used in an asynchronous case, store
the structure in the long-lived mwifiex_private instead of on the
calling stack.
Ideally, we would use this storage for the synchronous case, as well,
and explicitly clear the buffer on the "end" of the operation such that
we could prove only one message was in flight and that we were never
corrupting another.  That would require a more invasive change to create
such an "end".
This fixes a problem where the response of the asynchronous operation
would corrupt a stack frame potentially in use by a different thread.

BUG=chrome-os-partner:12367
TEST=Walked back and forth between Wifi access points on the same
network while poster circle was actively animating on the screen (this
constant flushing of KDS resources creates an easy-to-recognize panic
when this corruption occurs), watching the wifi reset without panic.

Change-Id: I06b9c522d1f50e0de1c5754399d154cfd93830a4
Signed-off-by: Jeff Disher <disher@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31473
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Jeff Disher <disher@chromium.org>
Tested-by: Jeff Disher <disher@chromium.org>
11 years agoDRM: HDMI: Initialized AUI and AVI Header info for HDMI IP
Fahad Kunnathadi [Thu, 23 Aug 2012 11:25:09 +0000 (07:25 -0400)]
DRM: HDMI: Initialized AUI and AVI Header info for HDMI IP

Audio and Video Header information has to be initialized to HDMI IP,

Fix: For compliance test suite TestID 7-19
Test: AVI Info Frame missing
AVI InfoFrame is transmitted on every two video field.
Test: AUI InfoFrame missing
Audio InfoFrame is transmitted on every two video fields.

Added code for getting VIC.

BUG=chrome-os-partner:13173
TEST=Verified that all the compliance tests pass
for 480p,720p and 1080p in
Agilent Technologies,N5998A
protocol analyser.

Change-Id: I2b1aeedeb33818f839f395d5f9097f3d50f76cc6
Signed-off-by: Fahad Kunnathadi <fahad.k@samsung.com>
Signed-off-by: Shirish S <s.shirish@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31429
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Shirish S <shirish@chromium.org>
Commit-Ready: Shirish S <shirish@chromium.org>

11 years agodrm/exynos: enable dvi mode for dvi monitor
Seung-Woo Kim [Tue, 24 Apr 2012 08:39:15 +0000 (17:39 +0900)]
drm/exynos: enable dvi mode for dvi monitor

Hdmi monitor and dvi monitor can be distinguished with edid.
This patch enables dvi mode if dvi monitor is connected and does
not enable audio feature for dvi mode because dvi has no audio
feature.

This patch is inspired from  commit id:
872d20d66c0b7de0787675dce8569a61e4d9bc0 in drm-next branch.

BUG=chrome-os-partner:13173
TEST=Verified that all the dvi related compliance tests pass
Agilent Technologies,N5998A
protocol analyser.

Change-Id: I94c7ba951512bb9f1926880e9b8b41d8668495a3
Signed-off-by: Shirish S <s.shirish@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31428
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Shirish S <shirish@chromium.org>
Commit-Ready: Shirish S <shirish@chromium.org>

11 years agoCHROMIUM: Input: synaptics - add retry mechanism for reconnect
Chung-yih Wang [Tue, 21 Aug 2012 07:57:55 +0000 (15:57 +0800)]
CHROMIUM: Input: synaptics - add retry mechanism for reconnect

On the Samsung Series 5 Chromebook, the Synaptics ClickPad will sometimes not
send an "0xFA" PS/2 ACK in response to a command byte during the reconnect
sequence following a resume from suspend. From our experiments, the failure can
happen during any byte of any of the commands in the reconnect batch.

This failure results in a timeout in the psmouse driver. In addition, the
ClickPad will often also respond to the next PS/2 command byte with an "0xFE"
PS/2 RESEND response.

This patch makes the synaptics reconnect-at-resume more tolerant to such
failures.

Signed-off-by: Chung-yih Wang <cywang@chromium.org>
BUG=chromium-os:31522
TEST=on device; run platform_TouchpadResume test

Change-Id: Ic13d67fc8f3cad72fb5e6f6146f81060bfee5474
Reviewed-on: https://gerrit.chromium.org/gerrit/31099
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Ready: Chung-yih Wang <cywang@chromium.org>
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
Tested-by: Chung-yih Wang <cywang@chromium.org>
11 years agoCHROMIUM: config: exynos5: Enable busfreq support
Abhilash Kesavan [Tue, 14 Aug 2012 15:09:55 +0000 (20:39 +0530)]
CHROMIUM: config: exynos5: Enable busfreq support

Enable support for Samsung's busfreq driver which controls VDD_INT.

BUG=chrome-os-partner:11792
TEST=Measurements for variation in VDD_INT on Daisy show a reduction
of ~70-80mW at home screen.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Change-Id: I875e5d2ea9c80e777a1ac1d2b57c88acb70cb59b
Reviewed-on: https://gerrit.chromium.org/gerrit/28944
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Tested-by: Arjun.K.V <arjun.kv@samsung.com>
11 years agoarm: exynos: Add busfreq support for smdk5250
Abhilash Kesavan [Sun, 19 Aug 2012 11:39:54 +0000 (17:09 +0530)]
arm: exynos: Add busfreq support for smdk5250

The busfreq driver controls the MIF and INT frequencies and
voltages.
Note: MIF cannot be varied for DDR3 boards and hence has been
disabled.

BUG=chrome-os-partner:11792
TEST=Measurements for variation in VDD_INT on Daisy show a reduction
of ~70-80mW at home screen.

Change-Id: I02e6cae2c1aec2b88c17b5bcccd3ebfc9d439f98
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28943
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Tested-by: Arjun.K.V <arjun.kv@samsung.com>
11 years agoarm: exynos: Add ppmu support for Exynos5
Abhilash Kesavan [Tue, 14 Aug 2012 12:00:13 +0000 (17:30 +0530)]
arm: exynos: Add ppmu support for Exynos5

Platform Performance Monitoring Unit (PPMU) is used to monitor and
gather performance information for custom IPs such such as MFC. This
information is used by the busfreq driver to vary/control VDD_INT.

BUG=chrome-os-partner:11792
TEST=Build and boot Snow

Change-Id: I0c94bfb23c2715afa0d26ca8595b59c7780f3a45
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28942
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Tested-by: Arjun.K.V <arjun.kv@samsung.com>
11 years agocpufreq: exynos: Updated the DVFS table with ASV for EXYNOS5250
Abhilash Kesavan [Sun, 19 Aug 2012 09:48:49 +0000 (15:18 +0530)]
cpufreq: exynos: Updated the DVFS table with ASV for EXYNOS5250

Choose from the newly added DVFS/ASV table for EXYNOS5250 based on
4/30 released guide. Different lot samples are supported.

BUG=chrome-os-partner:11794
TEST=Check that the ASV group is chosen based on lot

Change-Id: I392eae626cbee0f6ed7962cfecea5614296fd92b
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28393
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Tested-by: Arjun.K.V <arjun.kv@samsung.com>
Commit-Ready: Arjun.K.V <arjun.kv@samsung.com>

11 years agoarm: exynos: Add Adaptive Supply Voltage for Exynos5250
Abhilash Kesavan [Sun, 19 Aug 2012 09:47:54 +0000 (15:17 +0530)]
arm: exynos: Add Adaptive Supply Voltage for Exynos5250

Add Adaptive Supply Voltage support for Exynos5250. ASV lists out
various voltage settings per frequency appropriate for the silicon.
This table will be used by cpufreq and busfreq drivers to set the
core and INT voltages.

BUG=chrome-os-partner:11794
TEST=Build and boot to Login prompt 10 times on Snow and vary the
cpu frequency via sysfs. This is not good enough but I don't have
a cpufreq stress test.

Change-Id: I97cc1b5877aa56d237fa6b458693eccd98046122
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/28392
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Tested-by: Arjun.K.V <arjun.kv@samsung.com>
Commit-Ready: Arjun.K.V <arjun.kv@samsung.com>

11 years agoUPSTREAM: drm/exynos: fixed wrong pageflip finish event for interlace mode
Seung-Woo Kim [Mon, 23 Apr 2012 11:30:13 +0000 (20:30 +0900)]
UPSTREAM: drm/exynos: fixed wrong pageflip finish event for interlace mode

Pageflip finish event for interlace mode has bug on checking top
field vsync because of comparing between dma address converted
by start coordinates and non-converted dma address.

Add layer update change specifice to exynos5.

BUG=chrome-os-partner:13173
TEST=Verified the same patch with HDMI analser,
     for chrome os version 22.0.1229

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
(cherry picked from commit 8379e4823d04e2552e1395c2410fc16733e28c6e)

Change-Id: I75b9b3fbef7bd1acd809eb97709b7b503938f414
Signed-off-by: Fahad Kunnathadi <fahad.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31430
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Shirish S <shirish@chromium.org>
Commit-Ready: Shirish S <shirish@chromium.org>

11 years agodrm/exynos: hdmi: Correct the timing values for HDMI
Shirish S [Mon, 27 Aug 2012 07:22:14 +0000 (16:22 +0900)]
drm/exynos: hdmi: Correct the timing values for HDMI

The current method of calculation uses DRM_MODE_FLAG_PVSYNC
and DRM_MODE_FLAG_PHSYNC, which makes it non-usable for "Nx480/576"
etc resolutions whose flags use a higher value for flags variable.

Hence now,DRM_MODE_FLAG_NVSYNC and DRM_MODE_FLAG_NHSYNC are used for
calculating HSYNC and VSYNC Polarity.

Also as per the Exynos 5 IP design, the hsync start and hsync end
has a offset of 2 pixels.This patch corrects this.

The above modifications are required for passing the HDMI compliance
tests.

BUG=chrome-os-partner:13173
TEST=Verified that all the compliance tests pass
for 480p,720p and 1080p in
Agilent Technologies,N5998A protocol analyser.

Change-Id: I25d1bb2a77dcd109ec0669555b3d87f1a277299a
Signed-off-by: Shirish S <s.shirish@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31447
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Tested-by: Shirish S <shirish@chromium.org>
Commit-Ready: Shirish S <shirish@chromium.org>

11 years agodrm/exynos: mixer: Set mixer pipe
Sean Paul [Tue, 28 Aug 2012 03:27:03 +0000 (20:27 -0700)]
drm/exynos: mixer: Set mixer pipe

Set the mixer pipe correctly so we don't call finish pageflip on the
wrong crtc.

BUG=chrome-os-partner:12889
TEST=Tested on snow with hdmi

Change-Id: I78144c690be3872d9fe06923e91e1f427269f9c7
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31555
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agogpu: vithar: Change the GPU DVFS algorithm
Shariq Hasnain [Tue, 7 Aug 2012 11:46:37 +0000 (17:16 +0530)]
gpu: vithar: Change the GPU DVFS algorithm

Changed the GPU DVFS algorithm as follows:
1) Added a new OPP (350 MHz) to mali_dvfs_infotbl.
2) Removed the configurable option for setting the number of levels.
Now, there are 7 levels by default.
3) Modified the scaling logic. Now voltage is upscaled after utilization
exceed the max threshold certain times. The max and min threshold values
are also changed.
4) Modified the GPU DVFS table with updated voltage values.
5) GPU start with 266 Mhz when loaded after being idle for sometime.

BUG=chrome-os-partner:11795
TEST=Less power consumed whle running webGL apps.
For 'Aquarium' the power consumed by vithar is reduce to 739.63mW from
999.37mW.

Change-Id: I3ff5092c30e45c950d69323c16ab7241b0bceaef
Signed-off-by: Shariq Hasnain <shariq.786@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29582
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Abhilash Kesavan <a.kesavan@samsung.com>
Tested-by: Arjun.K.V <arjun.kv@samsung.com>
Commit-Ready: Abhilash Kesavan <a.kesavan@samsung.com>

11 years agogpu: vithar: Enable GPU frequency/voltage scaling
Abhilash Kesavan [Sun, 22 Jul 2012 05:49:00 +0000 (11:19 +0530)]
gpu: vithar: Enable GPU frequency/voltage scaling

Enable support for GPU DVFS; it supports the following frequencies:
533, 450, 400, 266, 160, 100 MHz.

BUG=chrome-os-partner:11795
TEST=Build and boot Snow. Check voltage variation when the
GPU DVFS is functioning.
Build with MALI_DVFS_DEBUG define enabled, boot and check
GPU DVFS debug prints

Change-Id: Ifd4ea158e12ff15285529808e590196ec88fe776
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
[dianders removed unneeded CSTD_UNUSED]
Reviewed-on: https://gerrit.chromium.org/gerrit/27976
Reviewed-by: Prashanth Godrehal <prashanth.g@samsung.com>
Tested-by: Arjun.K.V <arjun.kv@samsung.com>
Reviewed-by: Sam Leffler <sleffler@chromium.org>
11 years agoCHROMIUM: ALSA: hda - Cancel power work before suspending.
Dylan Reid [Thu, 23 Aug 2012 21:25:04 +0000 (14:25 -0700)]
CHROMIUM: ALSA: hda - Cancel power work before suspending.

If snd_hda_call_codec_suspend is called from the system suspend path
wait for powersave work to finish.  Without the call to _sync, the
power_work function can hang the workqueue if it has progressed past the
check of the power_on variable before this function sets it to 0.  In
that case the power_work function will call snd_hda_power_up (via it's
own call of hda_call_codec_suspend).  snd_hda_power_up will then call
cancel_delayed_work_sync for the work it is currently executing on.

BUG=chrome-os-partner:13008
TEST=suspend_test.sh from bug.

Change-Id: Ic127eeecdfb8995be5e2c630028f4e3cf5477a2e
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31285
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
11 years agodrm/i915: Send the AVI Infoframe mode code.
Stéphane Marchesin [Tue, 14 Aug 2012 19:47:41 +0000 (12:47 -0700)]
drm/i915: Send the AVI Infoframe mode code.

This is needed for HDMI conformance.

BUG=none
TEST=compiles

Change-Id: I483c81c76ddb39b47c84df3a0a2614a4aca12b3d
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30286
Reviewed-by: Sean Paul <seanpaul@chromium.org>
11 years agodrm/exynos: Only map GEM buffers into the IOMMU when needed.
Stéphane Marchesin [Fri, 24 Aug 2012 21:54:06 +0000 (14:54 -0700)]
drm/exynos: Only map GEM buffers into the IOMMU when needed.

We used to map all GEM buffers into the IOMMU, which would result in
eventually running out of space. Instead, map/unmap them as they get
used as a FB.

BUG=none
TEST=by hand, compiled and ran daisy, tried webGL and video mode changes.

Change-Id: Ic04b9618f51bf5e0e35de4c5498127e2cbdb4f97
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31391
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoAsoc: Samsung: Add I2S S/W RST in startup function
Padmavathi Venna [Fri, 24 Aug 2012 15:13:40 +0000 (20:43 +0530)]
Asoc: Samsung: Add I2S S/W RST in startup function

I2S module need to be reset after S2R. Keeping the S/W rst
control part in resume didn't help in playing audio after resume.
So this patch adds S/W RST control part in startup function which
gets triggered for every new audio stream playback.

BUG=chrome-os-partner:12579
TEST=tested by playing audio before suspend and after resume
using aplay command.

Change-Id: I27aa97da2c7c6cb42e24d19bf41f294732cfbd6e
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31335
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Commit-Ready: Alim Akhtar <alim.akhtar@samsung.com>

11 years agoAsoc: Samsung: Add support for I2S runtime S2R
Padmavathi Venna [Thu, 16 Aug 2012 13:20:04 +0000 (18:50 +0530)]
Asoc: Samsung: Add support for I2S runtime S2R

This patch adds runtime suspend to resume support for I2S

BUG=chrome-os-partner:12579
TEST=Tested by playing audio before suspend and after resume
using aplay command. I2S get suspended after probe and resume
upon audio playback.

Change-Id: Icd507188bbe2bb39e3bb9240ef6793b4ba937901
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29991
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
11 years agoCHROMIUM: scsi: make sure we avoid resume race
Derek Basehore [Sat, 25 Aug 2012 03:02:04 +0000 (20:02 -0700)]
CHROMIUM: scsi: make sure we avoid resume race

Added the same check in suspend to shutdown to prevent the race where we are
not resuming the disk yet, but we start to shutdown.

BUG=chrome-os-partner:11780
TEST=power_Resume, powerd_suspend

Change-Id: Ifb0b07854857e9baaa7647b8e655b553842f3326
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31427
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
11 years agoCHROMIUM: ata: make sure we avoid resume race
Derek Basehore [Sat, 25 Aug 2012 00:47:59 +0000 (17:47 -0700)]
CHROMIUM: ata: make sure we avoid resume race

Added code to make sure shutdown, freeze, etc. do not race with resume. This is
done by checking if there is work pending on the resume_work work_struct and
waiting for it to complete if there is.

BUG=chrome-os-partner:11780
TEST=power_Resume, powerd_suspend

Change-Id: I5d010ee341116b0498440fb3093085ab9163eb24
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31426
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
11 years agodrm/exynos: fix double invocation of drm_prime_(init/delete)_file_priv
Mandeep Singh Baines [Fri, 24 Aug 2012 21:38:31 +0000 (14:38 -0700)]
drm/exynos: fix double invocation of drm_prime_(init/delete)_file_priv

The double invocations are incorrect but seem to be safe so I don't
think this will fix any bugs.

BUG=none
TEST=Added printks to the init and delete methods.

Before:

[    7.639366] Mandeep: drm_prime_init_file ee3675d0
[    7.639377] Mandeep: drm_prime_init_file ee3675d0
[    7.639507] Mandeep: drm_prime_destroy_file ee3675d0
[    7.639518] Mandeep: drm_prime_destroy_file ee3675d0
[    7.639802] Mandeep: drm_prime_init_file ee372390
[    7.639810] Mandeep: drm_prime_init_file ee372390
[    8.473316] Mandeep: drm_prime_init_file ee356390
[    8.473331] Mandeep: drm_prime_init_file ee356390

After:

[    6.363842] Mandeep: drm_prime_init_file edc2e5d0
[    6.363994] Mandeep: drm_prime_destroy_file edc2e5d0
[    6.364260] Mandeep: drm_prime_init_file edc2e750
[    8.004837] Mandeep: drm_prime_init_file ee36ded0

Change-Id: I3350913fe158557d6ddf67c786a3abb578f6ccf4
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31381
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agodrm/exynos: Cleanup warning
Stéphane Marchesin [Fri, 24 Aug 2012 20:26:18 +0000 (13:26 -0700)]
drm/exynos: Cleanup warning

BUG=none
TEST=compiles

Change-Id: Ie0ec41c7d3721f85e1dce4f07241ecfbd80cbed4
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31388
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoRevert "video/exynos: dp: Add reporter to log dp errors"
Sean Paul [Fri, 24 Aug 2012 22:45:33 +0000 (15:45 -0700)]
Revert "video/exynos: dp: Add reporter to log dp errors"

We no longer need this hack, DP is not to blame for the flicker. This reverts commit 4d23813361c0a31fe314d6ffa523fa6dbe6942b9

Change-Id: I2675d8c39cfc809ac891c5458465217162757432
Reviewed-on: https://gerrit.chromium.org/gerrit/31399
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Sean Paul <seanpaul@chromium.org>
Tested-by: Sean Paul <seanpaul@chromium.org>
11 years agoCHROMIUM: config: turn off DYNAMIC_DEBUG on ARM
Olof Johansson [Fri, 24 Aug 2012 22:00:49 +0000 (15:00 -0700)]
CHROMIUM: config: turn off DYNAMIC_DEBUG on ARM

This was on during development to catch some of the wifi problems. It
should be disabled now for release.

BUG=chromium-os:32752
TEST=usual wifi tests

Change-Id: Ib006f06f7c29ba617326c62d87d5974609c6689b
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31392
Reviewed-by: Gary Morain <gmorain@chromium.org>
11 years agodrm/exynos: Factor all the finish_pageflips implementations.
Stéphane Marchesin [Fri, 24 Aug 2012 01:14:50 +0000 (18:14 -0700)]
drm/exynos: Factor all the finish_pageflips implementations.

Factor all finish_pageflips implementations in exynos_drm_crtc.c so we can
modify it without changing three places.

BUG=none
TEST=by hand, ran the device, browsed, ran webgl demos.

Change-Id: I2abafbe352bf684f31d1fc737e045832b521aebb
Reviewed-on: https://gerrit.chromium.org/gerrit/31300
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agodrivers: mfd: tps65090: disable wake capabilities for tps65090
Jonathan Kliegman [Thu, 23 Aug 2012 18:21:02 +0000 (14:21 -0400)]
drivers: mfd: tps65090: disable wake capabilities for tps65090

Disable the ability for the device to wake the system from the driver.
This can be turned back on via the wakeup-source devicetree setting
to configure the i2c interface to turn on wakeup for this device.

BUG=chrome-os-partner:13020
TEST=suspended and saw no immediate wake
  ran 'udevadm monitor' and confirmed battery events still present
  Add wakeup-sources; to dts to test that wakeup works if configured
    Saw device wake system up.
    Wrote disabled to
     /sys/class/i2c-dev/i2c-4/device/4-0048/power/wakeup
    Saw device no longer woke system

Change-Id: Ia88c326cf568239edf18cb5524353d89f6e494c0
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31247
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoarm: exynos: Clear ENABLE_WAKEUP_SW bit when entering suspend
Jonathan Kliegman [Fri, 24 Aug 2012 16:18:07 +0000 (12:18 -0400)]
arm: exynos: Clear ENABLE_WAKEUP_SW bit when entering suspend

Setting this bit to 0 causes the system to wait until suspended
to use the wakeup masks.  With it being set high previously,
masked interrupts were being received and processed before the
EINT_WAKEUP_MASK was configured.

BUG=chrome-os-partner:13020
TEST=On a system that generated spurious interrupts on EINT[22]:
  Suspend, notice resume waits for input or rtc
  Resume via: trackpad, keyboard, power button, lid, rtc0 and rtc1
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Change-Id: I9fc5148ed95a81bca1ac4ba1526eb6f93585ce36
Reviewed-on: https://gerrit.chromium.org/gerrit/31341
Tested-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>

11 years agodrm: exynos: Enable MIE block to handle 6bit dithering
Ajay Kumar [Fri, 24 Aug 2012 08:39:20 +0000 (04:39 -0400)]
drm: exynos: Enable MIE block to handle 6bit dithering

This patch enables MIE block on Gaia and programs MIE
to handle 8bit to 6 bit Dithering. Previously, FIMD output
was bypassing MIE since MIE was not being used.
Note that, even though MIE is regarded as different IP
and has its own SFR space, it is programed inside FIMD driver.

BUG=chrome-os-partner:11072
TEST=Checked the browser borders on Snow. Banding is not visible.

Change-Id: If4da91ba3af039232ba9582a079346099ac31a4d
Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31114
Reviewed-by: Shirish S <shirish@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Tested-by: Olof Johansson <olofj@chromium.org>
11 years agoarm: exynos: Remove hardcode wakeup unmask for EINT_0
Jonathan Kliegman [Fri, 24 Aug 2012 14:01:36 +0000 (10:01 -0400)]
arm: exynos: Remove hardcode wakeup unmask for EINT_0

For legacy reasons EINT_0 was being forced on for all
exynos systems as a wake interrupt.  For boards that need
EINT_0 they should probably enable it with enable_irq_wake

BUG=None
TEST=Observed normal suspend/resume cycle.  Confirmed
  trackpad, rtc, keyboard, lid and power button wakes.
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Change-Id: Icb6687a7f6b01cb6207a799948d957781fd4a7da
Reviewed-on: https://gerrit.chromium.org/gerrit/31337
Tested-by: Jon Kliegman <kliegs@chromium.org>
Commit-Ready: Thomas Abraham <thomas.ab@samsung.com>
Reviewed-by: Thomas Abraham <thomas.ab@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>

11 years agodrm/exynos: remove unneeded drm_vblank_off
Mandeep Singh Baines [Fri, 17 Aug 2012 20:03:46 +0000 (13:03 -0700)]
drm/exynos: remove unneeded drm_vblank_off

The drm_vblank_off calls in finish_page_flip are not needed. drm_vblank_put
will schedule an off 5 s in the future.

BUG=none
TEST=Suspend/resume. Multipe VT Switches. Multiple LCD off/on. Some browsing.

Change-Id: I08ac4a154995fcccc817c60c51a8a486972be1c5
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31281

11 years agoAdd two new quirks:
Stephen Hurd [Thu, 23 Aug 2012 19:00:14 +0000 (12:00 -0700)]
Add two new quirks:
SDHCI_QUIRK2_BROKEN_UHS:
    Disables all UHS modes.

SDHCI_QUIRK2_BROADCOM_REGISTERS:
    Bit twiddles some Broadcom-specific registers and supresses an error
    about the 64k bar0.

Add PCI fixes structs:
One for the chip itself with the required quirks in general (lightly tested)
and one that is Parrot specific which adds the new SDHCI_QUIRK2_BROKEN_UHS
quirk, disables ADMA mode, and adds a delay after power.

BUG=chrome-os-partner:12366
TEST=Excercise IO on SD/SDHC/MMC cards on a Parrot device.

Signed-off-by: Stephen Hurd <shurd@broadcom.com>
Change-Id: I278a19084b2dd9ddf3aedf2aaf14a9962080610d
Reviewed-on: https://gerrit.chromium.org/gerrit/31240
Commit-Ready: Stephen Hurd <shurd@broadcom.com>
Reviewed-by: Stephen Hurd <shurd@broadcom.com>
Tested-by: Stephen Hurd <shurd@broadcom.com>
Commit-Ready: Grant Grundler <grundler@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Dave Parker <dparker@chromium.org>
11 years agoCHROMIUM: Input: atmel_mxt_ts - save and restore t9_ctrl on wakeup disabled
Benson Leung [Thu, 23 Aug 2012 22:43:55 +0000 (15:43 -0700)]
CHROMIUM: Input: atmel_mxt_ts - save and restore t9_ctrl on wakeup disabled

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:12318
TEST=Close and open the lid to suspend and resume the system.
Make sure that the touchscreen does not generate a lot of
stray events on resume.

Change-Id: I57b34aab52149cc78cd55a79640b496239bbfa5e
Reviewed-on: https://gerrit.chromium.org/gerrit/31270
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoCHROMIUM: Input: atmel_mxt_ts - Suppress handle messages used for resume
Benson Leung [Tue, 14 Aug 2012 01:10:29 +0000 (18:10 -0700)]
CHROMIUM: Input: atmel_mxt_ts - Suppress handle messages used for resume

The position information at resume time while the system is in a
low power state may be garbage, so do not actually report this
information up to the input layer. Just perform the reads to clear
out the status on the device side.

BUG=chrome-os-partner:12318
TEST=Suspend/resume using lid close. Check that on resume,
the touch device doesn't show a bunch of garbage data
from when the lid was just being opened.

Change-Id: I4e60ab672d6191b9141e08e9b0bfdbf42649a95e
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31194
Reviewed-by: Yufeng Shen <miletus@chromium.org>
11 years agoCHROMIUM: Input: atmel_mxt_ts - disable reporting on stop
Benson Leung [Sat, 11 Aug 2012 01:43:52 +0000 (18:43 -0700)]
CHROMIUM: Input: atmel_mxt_ts - disable reporting on stop

Leave the touch device scanning and enabled, but disable reporting
on mxt_stop. This will prevent a needless recalibration due to the T9_ctrl
register being set to 0 (disabling the object) and then set back to 0x83.

BUG=chrome-os-partner:12042,chrome-os-partner:9717
TEST=Log in to guest mode. Test the touch screen.
Log out. Verify that in the next session (after X has restarted)
touch performance is still good.

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

11 years agoCHROMIUM: Input: atmel_mxt_ts - Add defines for T9 Touch Control
Benson Leung [Tue, 7 Aug 2012 23:20:18 +0000 (16:20 -0700)]
CHROMIUM: Input: atmel_mxt_ts - Add defines for T9 Touch Control

Fix the use of magic numbers (such as 0x83) to write to
T9 Touch Control.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chromium-os:33368
TEST=Builds clean.

Change-Id: I28d650becaa103490541cd88b600fdb535b4196c
Reviewed-on: https://gerrit.chromium.org/gerrit/29558
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
11 years agoCHROMIUM: i2c-s3c2410: do not special case HDMIPHY stuck bus detection
Daniel Kurtz [Mon, 20 Aug 2012 13:46:48 +0000 (21:46 +0800)]
CHROMIUM: i2c-s3c2410: do not special case HDMIPHY stuck bus detection

Commit "i2c-s3c2410: Add HDMIPHY quirk for S3C2440" added support for
HDMIPHY with some special handling in s3c24xx_i2c_set_master:

"due to unknown reason (probably HW bug in HDMIPHY and/or the controller)
a transfer fails to finish. The controller hangs after sending the last
byte, the workaround for this bug is resetting the controller after each
transfer"

The "unknown reason" was that the proper sequence for generating a STOP
condition wasn't being followed as per the datasheet. Since this is now
fixed, remove the special handling.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chrome-os-partner:10089
TEST=No "s3c-i2c 12ce0000.i2c" error/warning messages in dmesg
TEST=HDMI output works
  1) EDID displayed in /var/log/Xorg.0.log
  2) Video shown on external monitor

Change-Id: I463f29c401d9cea37d081a0586c7ec2e71605631
Reviewed-on: https://gerrit.chromium.org/gerrit/29879
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agodrm/i915: Only apply the adaptive backlight modulation when it is enabled.
Stéphane Marchesin [Fri, 24 Aug 2012 00:14:11 +0000 (17:14 -0700)]
drm/i915: Only apply the adaptive backlight modulation when it is enabled.

Otherwise things go very, very dark.

BUG=chromium-os:33854
TEST=by hand

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

11 years agodrm/exynos: track vblank events on a per crtc basis
Mandeep Singh Baines [Fri, 17 Aug 2012 20:03:46 +0000 (13:03 -0700)]
drm/exynos: track vblank events on a per crtc basis

The goal of the change is to make sure we send the vblank event on the
current vblank. My hope is to fix any races that might be causing flicker.
After this change I only see a flicker in the transition plymouth and
X11.

Simplified the code by tracking vblank events on a per-crtc basis. This
allowed me to remove all error paths from the callback. It also allowed
me to remove the vblank wait from the callback.

BUG=chrome-os-partner:12586
TEST=Suspend/resume. Multipe VT Switches. Multiple LCD off/on. Some browsing.
TEST=Power down and restart multiple times.

Change-Id: Ia71863161c6cb7f2dca20d14a68acd5e19b0db53
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30781
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: drm/i915: Adaptive backlight support
Stéphane Marchesin [Wed, 13 Jun 2012 23:47:47 +0000 (16:47 -0700)]
CHROMIUM: drm/i915: Adaptive backlight support

This patch implements i915 adaptive backlight support for SNB and IVB.
The intended use for the adaptive backlight is to generate interrupts
whenever the luminance of the screen changes by some thresholds. The
main caveat with that implementation is that those additional
interrupts will wake up the CPU and consume more power. Instead, we
hook into the vblank handler and handle it from there. This makes the
implementation a little less intuitive but a lot more efficient.
We also need to compute the gamma correction from the interrupt
handler so we do this with a (new) fixed point module.

BUG=chrome-os-partner:11002
TEST=set the adaptive backlight property with:
TEST=xrandr --output eDP1 --set "Adaptive backlight" on
TEST=then watch a full screen movie and see the backlight level change
TEST=to read the backlight percentage:
TEST=echo $((`printf "%d\n" \`intel_reg_read 0x48254 | cut -f 2 -d :\``*100/4882))

Change-Id: I9b9631cacc7d90e2801a542a3789118521bc25f0
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26748

11 years agoCHROMIUM: config: remove unused mousedev and polldev
Daniel Kurtz [Fri, 17 Aug 2012 16:37:00 +0000 (00:37 +0800)]
CHROMIUM: config: remove unused mousedev and polldev

All modern input drivers use evdev, not legacy mousedev, and none of the
input drivers used in chromium OS use polldev.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=builds clean; notice 29 less functions in
     /sys/kernel/debug/tracing/available_filter_functions

Change-Id: I0fb2a2580faadb88710c3af11b1459dc5ab91363
Reviewed-on: https://gerrit.chromium.org/gerrit/30832
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoARM: exynos: Recover WiFi functionality on daisy.
Bryan Freed [Wed, 22 Aug 2012 21:00:06 +0000 (14:00 -0700)]
ARM: exynos: Recover WiFi functionality on daisy.

A previous WiFi revamp for snow broke daisy.
This change gets it working again.

BUG=chrome-os-partner:11366
TEST=manual:boot daisy and verify wifi works.

Change-Id: I1dde8e61a2f31a7bb6e1e9582c2d5ac36bd56337
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31147
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoregulator: tps65090: Poll timeout bit on enable
Sean Paul [Wed, 22 Aug 2012 00:04:43 +0000 (17:04 -0700)]
regulator: tps65090: Poll timeout bit on enable

Instead of just reading power good bit once, poll the register up to 5
times. This fixes an issue where the regulator is not setup and we read
the status too early. We will now wait until either the TOFET bit is
de-asserted, or ~5 ms elapse before checking for power good.

BUG=chrome-os-partner:12762
TEST=Tested on snow, no regressions found

Change-Id: Ied6dc840dcc4a94970cecac659efbffcbb55d651
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31072
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ath9k_hw: enable MAC hang detection for AR9300 chips
Rajkumar Manoharan [Mon, 20 Aug 2012 14:16:04 +0000 (19:46 +0530)]
CHROMIUM: ath9k_hw: enable MAC hang detection for AR9300 chips

Enable MAC/Baseband hang detection for all AR9300 chips.
This routine helps to recover the chip from know stuck
states.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:12518
TEST=Recompile

Change-Id: I6dc4fb1f5d4ed17b884f556bd5d67fe1d892d7df
Reviewed-on: https://gerrit.chromium.org/gerrit/31089
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agodrm/exynos: add a flip_pending flag to track page flip complete
Mandeep Singh Baines [Thu, 16 Aug 2012 21:54:13 +0000 (14:54 -0700)]
drm/exynos: add a flip_pending flag to track page flip complete

exynos does not have flip completed interrupt so we'll use the vblank
interrupt to detect when a flip is completed.

BUG=chrome-os-partner:12586
TEST=Suspend/resume. VT Switch. LCD off. Some browsing.

Change-Id: I3574c54dda47cc00a378b8e18f2d081d9ccc5fc0
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30780
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agoCHROMIUM: config: turn on HID_CHERRY=m
Olof Johansson [Wed, 22 Aug 2012 17:32:02 +0000 (10:32 -0700)]
CHROMIUM: config: turn on HID_CHERRY=m

Turn on support for the Cherry cymotion keyboards, since some
people might want to use them with Chromeboxes.

BUG=chromium-os:31607
TEST=plug in a cherry cymotion linux keyboard. Sorry, don't have one (external bugreport)

Change-Id: I08839e5ef08d21d7540a609cbb7e2332b069a357
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31119
Reviewed-by: Benson Leung <bleung@chromium.org>
11 years agoRevert "CHROMIUM: drivers: device tree support for gpio-charger"
Simon Que [Wed, 15 Aug 2012 06:14:26 +0000 (23:14 -0700)]
Revert "CHROMIUM: drivers: device tree support for gpio-charger"

This reverts commit 2e42da7e808a2c4f6713fb2618fca0529b4c053c.

BUG=chrome-os-partner:11739
TEST=build kernel succesfully

Signed-off-by: Simon Que <sque@chromium.org>
Change-Id: I35cb59b03e2f6bb1a87fa99f0fceb27d5e4137ad
Reviewed-on: https://gerrit.chromium.org/gerrit/31048
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: input: cyapa: recover from watchdog triggered reset
Du, Dudley [Mon, 16 Jul 2012 11:04:25 +0000 (19:04 +0800)]
CHROMIUM: input: cyapa: recover from watchdog triggered reset

Newer versions of Cypress Trackpad firmware use a watchdog timer
to reset the device after an internal failure. The reset operation
will put the device into bootloader mode, so the kernel driver
must use cyapa_detect to bring the trackpad into operational mode
on a failed i2c transaction.

BUG=chrome-os-partner:12838
TEST=test with trackpad v1.2 firmware on CYTRA_103002-00
Trigger a watchdog reset using an electrostatic discharge.
Ensure that the cyapa_detect case is triggered, and the pad
is functional after the event.

Change-Id: Ib2270eb48d80643756fdc06e944a1c9afac4e64f
Signed-off-by: Du, Dudley <dudl@cypress.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/27496
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>

11 years agoRevert "CHROMIUM: HACK: mmc: core: Do not rescan after resume"
Alim Akhtar [Fri, 17 Aug 2012 11:23:47 +0000 (16:53 +0530)]
Revert "CHROMIUM: HACK: mmc: core: Do not rescan after resume"

This reverts commit adabba54966cbfd3b0dc9b006bb30f9fa0a1a48e.
This is not needed as we have a fix for this hack.

BUG=chrome-os-partner:12802
TEST= after reverting this CL and with other 2 CL, sd card detection
works fine after s2r cycle.

Change-Id: Idccaf531bc272533e3918b703a55f56f15a8cb48
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30692
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
11 years agoCHROMIUM: exynos: snow: Disable mmc on the external SD card slot
Doug Anderson [Tue, 21 Aug 2012 19:47:35 +0000 (12:47 -0700)]
CHROMIUM: exynos: snow: Disable mmc on the external SD card slot

MMC is not supported on this slot on this system.

BUG=chrome-os-partner:11811

TEST=With patch series, plug in an MMC card and saw that it was
detected before this patch but isn't detected after.

Change-Id: Ie9d1cd13628d27e60b47572837c162b00563bf72
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31023
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: mwifiex: Disable WOW by default.
Todd Broch [Tue, 21 Aug 2012 20:05:10 +0000 (13:05 -0700)]
CHROMIUM: mwifiex: Disable WOW by default.

Disable WOW for two reasons:
1. Appears to have some hand in WIFI device waking during Standby and
entering high energy state.
2. Is not required feature and often burns additional power.

BUG=chrome-os-partner:12164
TEST=manual,  associate wifi and measure power in suspend to be
reasonable.

Change-Id: I039650eb8c986a447022fd87bf87880cc7b47635
Signed-off-by: Todd Broch <tbroch@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31020
Reviewed-by: Gary Morain <gmorain@chromium.org>
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Reviewed-by: Bing Zhao <bzhao@marvell.com>
11 years agoCHROMIUM: scsi: don't wait for disk to wakeup on resume
Derek Basehore [Wed, 8 Aug 2012 21:53:08 +0000 (14:53 -0700)]
CHROMIUM: scsi: don't wait for disk to wakeup on resume

This is done in the same way as the ata ports. Instead of waiting for the disk
to resume in sd_resume, we put a function into the workqueue and return. We also
make sure that a race does not happen between resume and suspend. This is done
by making the suspend code wait until the work_struct in the ata_port finishes.

There does not seem to be any differences between what this change does and what
happened before when it breaks. It seems that the disk will be woken up in
another place if the function to wake it up in resume fails.

Note: I have not decided exactly what to do for error paths and therefore there
are currently none when ata ports or disks fail to resume

BUG=chrome-os-partner:11780
TEST=power_Resume, powerd_suspend, opening and closing laptop, commenting out
the line that wakes up the disk and seeing the system behaviour (same before and
after change)

Change-Id: I05ba125ef55c2cc9e6849d9fec693c574f81221a
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29673

11 years agoCHROMIUM: ata: don't wait on ata ports for resume
Derek Basehore [Wed, 8 Aug 2012 20:20:47 +0000 (13:20 -0700)]
CHROMIUM: ata: don't wait on ata ports for resume

This change causes dpm_resume to not block on resuming ata ports. This is done
by putting the function calls to wake up the ata ports in a workqueue. I make
sure that there is not a race between suspend and resume by making the suspend
code for ata_port wait until the work for resume is done.

I tested what would happen when the ata ports do not resume (by commenting out
the line that resumes and returning -1). We do wake up, but after ~2 minutes,
the machine reboots. The machine blocks on any io that requires disk. Mouse
clicks do not seem to register.

Without the change, pretty much the same thing occurs (from a user experience),
except that the mouse arrow is not visible.

BUG=chrome-os-partner:11780
TEST=power_Resume, powerd_suspend

Change-Id: Ica746d313349a3d8c5f6ba6912f6a3b18e5c2b3f
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29672

11 years agommc: dw_mmc: Add a DISABLE_MMC quirk that sets the core mmc cap
Doug Anderson [Tue, 21 Aug 2012 19:45:40 +0000 (12:45 -0700)]
mmc: dw_mmc: Add a DISABLE_MMC quirk that sets the core mmc cap

This quirk can be set from the device tree to disable mmc on a given
slot.

BUG=chrome-os-partner:11811
TEST=With patch series, plug in an MMC card and saw that it was
detected before this patch but isn't detected after.

Change-Id: I169b070578cff16b74f1556934e09ea3ea542b84
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31022

11 years agommc: core: Add a capability for disabling mmc cards
Doug Anderson [Tue, 21 Aug 2012 19:42:44 +0000 (12:42 -0700)]
mmc: core: Add a capability for disabling mmc cards

On some systems we need a way to disable MMC card support in a MMC/SD
card slot.  Add support in the core SD/MMC code to support this.

BUG=chrome-os-partner:11811
TEST=With patch series, plug in an MMC card and saw that it was
detected before this patch but isn't detected after.

Change-Id: I5b94a1d7deba85e0eb4709a419589cc3e9058eca
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/31021

11 years agoCHROMIUM: ARM: config: cros5250: set HDMI I2C speed to ~400 kHz
Daniel Kurtz [Fri, 10 Aug 2012 13:29:08 +0000 (21:29 +0800)]
CHROMIUM: ARM: config: cros5250: set HDMI I2C speed to ~400 kHz

The HDMI I2C is hooked up internally to the HDMI core which supports
Fast Mode (400 kbit/s) I2C operation.

Note: actual rate is reported as 378 kHz.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chrome-os-partner:8665
TEST=No i2c-8 (12ce0000.i2c) errors when plugging/unplugging hdmi cable

Change-Id: I79f259ce7d02786ba57bca2cf79ee8650617591e
Reviewed-on: https://gerrit.chromium.org/gerrit/29877
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: chromeos: config: CHARGER_TPS65090 option
Simon Que [Tue, 21 Aug 2012 17:34:31 +0000 (10:34 -0700)]
CHROMIUM: chromeos: config: CHARGER_TPS65090 option

Enable for Exynos5 only.

BUG=chrome-os-partner:11739
TEST=Check that the tps65090-charger sysfs is picked up by
"power-supply-info".  Or make sure the sysfs is present.
Check that the "online" and "status" fields are correct when AC is
plugged and unplugged.
Check with "udevadm monitor" that udev events are sent when plugging and
unplugging.

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

11 years agoCHROMIUM: dts: cros5250: Add tps65090 charger/irq
Simon Que [Tue, 21 Aug 2012 16:43:16 +0000 (09:43 -0700)]
CHROMIUM: dts: cros5250: Add tps65090 charger/irq

Adding charger and irq to the device tree for cros5250.

BUG=chrome-os-partner:10617,chrome-os-partner:11739,chrome-os-partner:12244
TEST=Check that the tps65090-charger sysfs is picked up by
"power-supply-info".  Or make sure the sysfs is present.
Check that the "online" and "status" fields are correct when AC is
plugged and unplugged.
Check with "udevadm monitor" that udev events are sent when plugging and
unplugging.

Change-Id: Ib3c60c5795354c624f8eaff82941c870fef94200
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30998
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: usb: Add support for root hub port status CAS
Stanislaw Ledwon [Mon, 18 Jun 2012 13:20:00 +0000 (15:20 +0200)]
UPSTREAM: usb: Add support for root hub port status CAS

Adds support for handling the Compliance Mode of USB 3.0 port

The host controller port status register supports CAS (Cold Attach
Status) bit. This bit could be set when USB3.0 device is connected
when system is in Sx state. When the system wakes to S0 this port
status with CAS bit is reported and this port can't be used by any
device.

When CAS bit is set the port should be reset by warm reset. This
was not supported by xhci driver.

The issue was found when pendrive was connected to suspended
platform. The link state of "Compliance Mode" was reported together
with CAS bit. This link state was also not supported by xhci and
core/hub.c.

The CAS bit is defined only for xhci root hub port and it is
not supported on regular hubs. The link status is used to force
warm reset on port. Make the USB core issue a warm reset when port
is in ether the 'inactive' or 'compliance mode'. Change the xHCI driver
to report 'compliance mode' when the CAS is set. This force warm reset
on the root hub port.

This patch should be backported to stable kernels as old as 3.2, that
contain the commit 10d674a82e553cb8a1f41027bb3c3e309b3f6804 "USB: When
hot reset for USB3 fails, try warm reset."

BUG=chrome-os-partner:12672
TEST=connect USB 3.0 device on 3.0 port and do "rtcwake -m mem -s 10"
Device is detected successfully.

Change-Id: Ie0dbb523b9017c768886ec4e564a812acfe54f01
Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com>
Signed-off-by: Stanislaw Ledwon <staszek.ledwon@linux.intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Andiry Xu <andiry.xu@amd.com>
Cc: stable@vger.kernel.org
(cherry picked from commit 8bea2bd37df08aaa599aa361a9f8b836ba98e554)
Reviewed-on: https://gerrit.chromium.org/gerrit/30691

11 years agoCHROMIUM: drivers: mfd: power supply event on tps65090 irq
Simon Que [Tue, 21 Aug 2012 16:41:15 +0000 (09:41 -0700)]
CHROMIUM: drivers: mfd: power supply event on tps65090 irq

This allows udev events to be generated when the power supply state is
updated.

BUG=chrome-os-partner:11739
TEST=Build successfully

Change-Id: I3b28e9a9af9aaeb6b0eff128ee649fb637e7dad4
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30997
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: drivers: power: Add TPS65090 battery charger
Simon Glass [Sun, 17 Jun 2012 16:51:09 +0000 (09:51 -0700)]
CHROMIUM: drivers: power: Add TPS65090 battery charger

This driver reads AC status from the tps65090 directly.

Note: At present the TPS65090 has a few problems, one of which is that
the status registers do not work. As a result we are reading registers
that we should not. Definitions for these registers have been put into
tps65090-private.h for now.

BUG=chrome-os-partner:10617,chrome-os-partner:11739,chrome-os-partner:12244
TEST=Build successfully

Change-Id: I909fb5919cb782c49a72c488b3b36b245b029112
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30357
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ARM: cros5250: fix broken card detection on sd
Alim Akhtar [Fri, 17 Aug 2012 12:05:22 +0000 (17:35 +0530)]
CHROMIUM: ARM: cros5250: fix broken card detection on sd

We have a mechanism to detect insertion and removal of sd/mmc card
through cd_gpio. With this property set, even if sd card is not
persent in slot, dwmmc driver always reports that the card is persent.
This CL removes 'card-detection-broken' property and passes a flag
indicating card-detect line the active low.

BUG=chrome-os-partner:12802
TEST=tested with the other CL, sd card insertion/removal is reported
correctly. Also tested sd card insertion/removal after s2r cycle, that
works.

Change-Id: Ib6c0c044407d6a319b53e5f70059536a8454e5a0
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30693

11 years agommc: dw_mmc: fix the incorrect gpio read value for card _persent_
Alim Akhtar [Sun, 19 Aug 2012 16:26:34 +0000 (21:56 +0530)]
mmc: dw_mmc: fix the incorrect gpio read value for card _persent_

When the card detect gpio line is pulled __low__ that indicates the
persent of card and when pulled __high__ indicates card is removed.
This CL assigns correct status for card persent variable.  Implemented
this in a more generic way by using device tree. Handles both active
high and active low card detect gpio.

BUG=chrome-os-partner:12802
TEST=with other CL, tested sd card insertion/removal works fine
     and sd card getting detected after s2r cycle

Change-Id: If1c405d1e0ddf7315697d125813f96570094d714
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30694
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
11 years agoexynos5: usb: dwc3: Add the suspend/resume functionality
Vikas C Sajjan [Fri, 3 Aug 2012 17:25:32 +0000 (22:55 +0530)]
exynos5: usb: dwc3: Add the suspend/resume functionality

Adds the suspend and resume functionality to exynos dwc3 driver

BUG=chrome-os-partner:11740
TEST=tested USB 3.0 and USB 2.0 device on SS hub detected after S2R

Change-Id: Ia1e2d421c0bf1e9d644a8e68b7579a046932b752
Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/29177

11 years agoexynos5: usb: xhci: Add the suspend/resume functionality
Vikas C Sajjan [Fri, 3 Aug 2012 17:27:13 +0000 (22:57 +0530)]
exynos5: usb: xhci: Add the suspend/resume functionality

Adds the suspend and resume functionality for the exynos XHCI driver

BUG=chrome-os-partner:11740
TEST=Tested USB 3.0 and USB 2.0 devices on SS Hub detected after S2R

Change-Id: I18380012e1c492f505729eec05c8fed47ebd8632
Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29178
Commit-Ready: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: usb: dwc3: Add suspend/resume functionality
vikas sajjan [Fri, 3 Aug 2012 11:44:19 +0000 (17:14 +0530)]
CHROMIUM: usb: dwc3: Add suspend/resume functionality

This patch adds the suspend and resume funtionality to DWC3 core

BUG=chrome-os-partner:11740
TEST=USB 3.0 and USB 2.0 device on SS Hub detected after S2R
TEST=Tests described in USB PLL-related still work.
  https://gerrit.chromium.org/gerrit/30184

Change-Id: I440b70f6248d56a5369e6867cdc1fd533106f72e
Signed-off-by: Vikas C Sajjan <vikas.sajjan@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27636

11 years agoUPSTREAM: ath9k: fix ASPM initialization on resume
Felix Fietkau [Thu, 16 Aug 2012 09:29:56 +0000 (11:29 +0200)]
UPSTREAM: ath9k: fix ASPM initialization on resume

BUG=chrome-os-partner:10677
TEST=Manual (run wifi test suites)

ath_pci_aspm_init is only called on card init, so PCI registers get reset
after a suspend/resume cycle.

Change-Id: I1aa6427810959493895e30a4580f3e7803152b3d
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30885
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
11 years agoUPSTREAM: mac80211: always set in_reconfig=false on wakeup
Eliad Peller [Mon, 2 Jul 2012 12:08:25 +0000 (15:08 +0300)]
UPSTREAM: mac80211: always set in_reconfig=false on wakeup

BUG=chrome-os-partner:10785
TEST=Manual (run wifi test suites)

If the interfaces were removed just before a restart
work was started, open_count will be 0, and most of
the reconfig work will be skipped, including the
resetting of local->in_reconfig to false.

Leaving local->inconfig = true will result in
dropping any incoming packet.

Fix it by always setting local->in_reconfig = false
(even if there are no active interfaces).

Change-Id: I9ae806c59e0453548bceb8a932950b1a003a42e2
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30883
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
11 years agoUPSTREAM: mac80211: stop Rx during HW reconfig
Arik Nemtsov [Wed, 6 Jun 2012 08:25:02 +0000 (11:25 +0300)]
UPSTREAM: mac80211: stop Rx during HW reconfig

BUG=chrome-os-partner:10785
TEST=Manual (run wifi test suites)

While HW reconfig is in progress, drop all incoming Rx. This prevents
incoming packets from changing the internal state of the driver or
calling callbacks of the low level driver while it is in inconsistent
state.

Change-Id: I84efd3b2a45d3ebba6c7827bcd22daa26271fdbb
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30882
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
11 years agoUPSTREAM: mac80211: add stations after AP start on reconfig
Arik Nemtsov [Sun, 3 Jun 2012 20:31:56 +0000 (23:31 +0300)]
UPSTREAM: mac80211: add stations after AP start on reconfig

BUG=chrome-os-partner:10785
TEST=Manual (run wifi test suites)

When performing a HW restart for an AP mode interface, add stations back
only after the AP is beaconing. This mimics the normal flow of STA
addition on AP.

Some devices (wlcore) do not support adding stations before beaconing,
so this has the added benefit of making recovery work for them.

Change-Id: I087759324047648092e717ec7fe266e9b15d1776
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30881
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
11 years agoUPSTREAM: mac80211: fix error in station state transitions during reconfig
Meenakshi Venkataraman [Wed, 30 May 2012 09:39:33 +0000 (11:39 +0200)]
UPSTREAM: mac80211: fix error in station state transitions during reconfig

BUG=chrome-os-partner:10785
TEST=Manual (run wifi test suites)

As part of hardware reconfig mac80211 tries
to restore the station state to its values
before the hardware reconfig, but it only
goes to the last-state - 1. Fix this
off-by-one error.

Change-Id: Idd7ac847a66c9ef2eea0d6eaf7347d8a1a4fd792
Cc: stable@kernel.org [3.4]
Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30880
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
11 years agoUPSTREAM: mac80211: fix ADDBA declined after suspend with wowlan
Eyal Shapira [Tue, 29 May 2012 09:00:22 +0000 (02:00 -0700)]
UPSTREAM: mac80211: fix ADDBA declined after suspend with wowlan

BUG=chrome-os-partner:10785
TEST=Manual (run wifi test suites)

WLAN_STA_BLOCK_BA is set while suspending but doesn't get cleared
when resuming in case of wowlan. This causes further ADDBA requests
received to be rejected. Fix it by clearing it in the wowlan path
as well.

Change-Id: I24de4b4957e7f2c96df32672e08ead288eafffb4
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30879
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
11 years agousb: dwc3: core: Add constants relating to power down
Doug Anderson [Fri, 17 Aug 2012 23:05:25 +0000 (16:05 -0700)]
usb: dwc3: core: Add constants relating to power down

These constants aren't used anywhere yet but having in the header
could be useful for someone that wanted to use them in the future.

BUG=chrome-os-partner:11740
TEST=Kernel still compiles

Change-Id: I3181e7bfc34edad0a9bc0f9f80bf53f36e7b5768
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30786
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: config: exynos5: remove assorted PS/2 drivers
Daniel Kurtz [Fri, 17 Aug 2012 16:35:51 +0000 (00:35 +0800)]
CHROMIUM: config: exynos5: remove assorted PS/2 drivers

The exynos5 does not have a PS/2 port, nor does it use an emulated PS/2
for mice or trackpads.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=builds clean; notice 114 less functions in
     /sys/kernel/debug/tracing/available_filter_functions

Change-Id: I140f23b2d7f16fc4afa3a05f41b1698ba62b2764
Reviewed-on: https://gerrit.chromium.org/gerrit/30697
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>