devfreq: exynos5422: Enable all levels, but keep voltage at highest level

This patch keeps INT locked to highest voltage and not frequency.
This exercises the whole of devfreq levels from 83-500MHz.
Also tunes the table so as to keep the "core clocks" running
at a reasonably high level so that we dont need locking
for HDMI/MMC/Video playback.

BUG=chrome-os-partner:26245
TEST=Boot on Pi. Run V8, WebGL, Video and run power_LoadTest.

Change-Id: I80170cc9939552d4015ef3ec50946a65232b8758
Signed-off-by: Arjun.K.V <arjun.kv@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/188523
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Queue: naveen krishna <naveen@chromium.org>
Tested-by: naveen krishna <naveen@chromium.org>
CHROMIUM: s5p-mfc: Configure param change register for all frames

Incase of multi-instance encoding, param change register
should be cleared before the next encode frame command.
Else param change for the current instance may affect the
params of other instances.
So set/clear param change register before every encode frame.

BUG=chrome-os-partner:27686
TEST=Hangout and check encoded bitrate

Change-Id: I7e499b8ba60919f274413930684ce47594b34475
Signed-off-by: Arun Mankuzhi <arun.m@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/193999
Reviewed-by: Wu-Cheng Li <wuchengli@chromium.org>
Tested-by: Wu-Cheng Li <wuchengli@chromium.org>
Commit-Queue: Kiran AVND <kiran@chromium.org>
drm/i915: Lock the config_mutex during resume modeset

The warning for the config_mutex was introduced in this backport:

commit 0ef7dfb5ac7bf042ca8e346c8ebeda4cd6827553
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sun Dec 2 01:05:46 2012 +0100

UPSTREAM: drm/i915: use drm_modeset_lock_all

But the locking wasn't done, resulting in a warning. While this a
harmless warning (nothing should contend the lock while we are on the
resume path) we should still do proper locking to make the warning go
away.

BUG=chromium:352453
TEST=compiles, run, suspend/resume on link, no warning observed

Change-Id: I0508020c28c8bb384e059a1966bfe4eaa8d5ce25
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/193479
Reviewed-by: Sean Paul <seanpaul@chromium.org>
ARM: dt: exynos5: add architected timers

All exynos boards support architected timers so we should update the
device tree to reflect this.

BUG=chrome-os-partner:13805
TEST=Built and booted the kernel on pi

Change-Id: I06fa470b287537d94a34de0978088eabfab01e02
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/193682
Reviewed-by: Olof Johansson <olofj@chromium.org>
CHROMIUM: ARM: exynos: print exynos5800 instead of exynos5422

Change the name of SoC to 5800 from 5422 in boot logs.
This is done as per requirement from business team.

BUG=chrome-os-partner:27871
TEST=Verified UI, DPMS, and S2R on Peach-pi.

Change-Id: Ibbcfbe2050fae7d44c814499a8c7addb9a1744db
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/193745
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
CHROMIUM: ALSA: hda/realtek - Fixed single output machine get empty hp sense

Base on kernel commit 8314f22589297bdb100788112f901fe885edacbc.
If it only has single output of HP out of machine.
The driver parser will copy hp_pins to line_out_pins.
hp_pins will empty for alc283_init and alc283_shutup functions.
This will cause not have value for hp_pin_sense.
Add check line_out_type code will solve it.

BUG=chrome-os-partner:27373
TEST=test suspend and resume on Chrome Box.

Change-Id: I8f217ff0cfd92e4f13cd2e0ede548ac8e11fba9c
Signed-off-by: Kailang Yang <kailang@realtek.com>
Reviewed-on: https://chromium-review.googlesource.com/194054
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Merge branch 'chromeos-3.8' of https://chromium.googlesource.com/chromiumos/third_party/kernel-next into chromeos-3.8
regulator: tps65090: Increase the number of FET retries

We've seen cases where tps65090 will fail for 5 times in a row but
still eventually recover.  I even saw it recover after 888 times once.
Increase the number of tries from 5 to 1000.  They delay for 1000
tries would suck, but still better than having a FET not turn on at
all.

On my device with an tps65090 in a bad state I normally see failures
like this during suspend/resume testing:

[   34.130359] regulator regulator.47: reg 0xf enable ok after 6 tries
[   46.954987] regulator regulator.47: reg 0xf enable ok after 4 tries
[   57.509159] regulator regulator.47: reg 0xf enable ok after 8 tries
[   69.193873] regulator regulator.47: reg 0xf enable ok after 4 tries
[   83.964589] regulator regulator.47: reg 0xf enable ok after 3 tries
[   99.930964] regulator regulator.47: reg 0xf enable ok after 6 tries
[  114.813848] regulator regulator.47: reg 0xf enable ok after 3 tries
[  127.826926] regulator regulator.47: reg 0xf enable ok after 2 tries
[  142.482595] regulator regulator.47: reg 0xf enable ok after 7 tries

BUG=chrome-os-partner:26056
TEST=On machine with iffy tps65090 I can see success after > 5 tries

Change-Id: Icb52e73c67be8b9b0cbadfa706e90f36e281aa17
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/189239
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Revert "ARM: dtsi: Remove G2D powerdomain node for Exynos542X"

This reverts commit ef6929d2031c32b010591cf74a6ec85eccbe58ee.

G2D powerdomain stuff and SSS stuff is apparently causing problems.
Get us back to a known stable state: R34.

BUG=chrome-os-partner:27880
TEST=suspend_stress_test

Change-Id: I265ccb006d5acda7eaa1fcc6f74d19fb5cf0243d
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/194320
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Revert "ARM: dts: exynos5250/542X: add dt node for sss module"

This reverts commit 8fb384d13dfcbdaf6bdaa4cc94d1042bde82d87f.

G2D powerdomain stuff and SSS stuff is apparently causing problems.
Get us back to a known stable state: R34.

BUG=chrome-os-partner:27880
TEST=suspend_stress_test

Change-Id: Ied50ea71e2786ba434baf1ec71b4c91dc3b880ce
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/194321
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Revert "clk:exynos-5250: Add gate clock for SSS module"

This reverts commit e24869568f8ad8c9bcb80fa18f4734d0968940fe.

G2D powerdomain stuff and SSS stuff is apparently causing problems.
Get us back to a known stable state: R34.

BUG=chrome-os-partner:27880
TEST=suspend_stress_test

Change-Id: I7ea5156bf9ab302f23e711cfd211e3d4da95af19
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/194322
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Revert "arm: exynos: Keep G2D PD enabled during sleep on Exynos542X"

This reverts commit f84afb67d96a302a741b02a957062c37950d220d.

G2D powerdomain stuff and SSS stuff is apparently causing problems.
Get us back to a known stable state: R34.

BUG=chrome-os-partner:27880
TEST=suspend_stress_test

Change-Id: Ia07c0ef2de1954afc82e0199c4849b1114ae7dff
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/194290
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Revert "arm: exynos5420: dt: add clock nodes to g2d power domains"

This reverts commit 7b4050ef9562703905887a6086b14dcf77e8f3a7.

G2D powerdomain stuff and SSS stuff is apparently causing problems.
Get us back to a known stable state: R34.

BUG=chrome-os-partner:27880
TEST=suspend_stress_test

Change-Id: I37d0ad93b7d4bae718f7c4836e40e0c1d6ce027c
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/194363
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
UPSTREAM: r8152: fix the submission of the interrupt transfer

The submission of the interrupt transfer should be done after setting
the bit of WORK_ENABLE, otherwise the callback function would have
the opportunity to be returned directly.

Clear the bit of WORK_ENABLE before killing the interrupt transfer.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 3d55f44f563de2ab83209e8ead48d922b0d56a65)

BUG=chrome-os-partner:24570
TEST=manual testing with RealTek USB rtl8153

Change-Id: I30c75082270a905f8d11acf7ab83843604c6915b
Signed-off-by: Inki Yoo <inki.yoo@samsung.com>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/192227
UPSTREAM: r8152: move some functions

Move the following functions which is for the further coding.
 - rtl_clear_bp
 - r8153_clear_bp
 - r8153_teredo_off
 - r8152b_disable_aldps
 - r8152b_enable_aldps
 - r8152b_hw_phy_cfg

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 4349968ad29a9023005e31eca5d971143d127ba8)

BUG=chrome-os-partner:24570
TEST=manual testing with RealTek USB rtl8153

Change-Id: I7f1e7a0da162c69dee5eaa77185a020408fbe214
Signed-off-by: Inki Yoo <inki.yoo@samsung.com>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/192228
UPSTREAM: r8152: add three functions

Replace some codes with the following three functions.
 - rtl_drop_queued_tx
 - rxdy_gated_en
 - r8152_power_cut_en

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 00a5e360c54ada2fbd58bacbb1c1fd79d2fde80d)

BUG=chrome-os-partner:24570
TEST=manual testing with RealTek USB rtl8153

Change-Id: If63f7a7b94cd382018d41d56b7b77ecdaa48c827
Signed-off-by: Inki Yoo <inki.yoo@samsung.com>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/192229
UPSTREAM: r8152: replace some types from int to bool

Modify the following functions.
 - r8153_u1u2en
 - r8153_u2p3en
 - r8153_power_cut_en

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b97027233db74a24eb3aca693ed3f85461c7f440)

BUG=chrome-os-partner:24570
TEST=manual testing with RealTek USB rtl8153

Change-Id: I998360b65b52b9296ef5d1f20463104de101b31c
Signed-off-by: Inki Yoo <inki.yoo@samsung.com>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/192260
UPSTREAM: r8152: load the default MAC address

Except for RTL_VER_01, replace loading the MAC address from PLA_IDR
with from PLA_BACKUP. The default MAC address may be modified by
the other OS, so the PLA_IDR may be not the default MAC address.

The data in the PLA_BACKUP address of the RTL_VER_01 may be destoryed,
so load MAC address from PLA_IDR for RTL_VER_01.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 8a91c8246a847a2435a7ef361bfcd4c2b5be4ea2)

BUG=chrome-os-partner:24570
TEST=manual testing with RealTek USB rtl8153

Change-Id: I48942afdea5fd951db1d58f3249f6382460361cf
Signed-off-by: Inki Yoo <inki.yoo@samsung.com>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/192261
UPSTREAM: r8152: reduce the frequency of spin_lock

Replace getting one item from a list with getting the whole list one time.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit d84130a10820d074fe52b066f459838324d3774c)

BUG=chrome-os-partner:24570
TEST=manual testing with RealTek USB rtl8153

Change-Id: Ieef4b47383af0620db9f51009e844ab08cd2d940
Signed-off-by: Inki Yoo <inki.yoo@samsung.com>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/192262
UPSTREAM: r8152: clear BMCR_PDOWN

Modify the method of enabling the PHY to clear BMCR_PDOWN only.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f0cbe0ac87c123a80dac3b2df72ecb947ef63ad8)

BUG=chrome-os-partner:24570
TEST=manual testing with RealTek USB rtl8153

Change-Id: I24459ac9ca17d5b2d18d0847ed4dfc36776a3470
Signed-off-by: Inki Yoo <inki.yoo@samsung.com>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/192263