cascardo/linux.git
11 years agoCHROMIUM: mfd: max77686: don't read when updating if mask is 0xff
Daniel Kurtz [Wed, 15 Aug 2012 07:26:25 +0000 (15:26 +0800)]
CHROMIUM: mfd: max77686: don't read when updating if mask is 0xff

If an update is going to set all of the bits of a register, there is no
reason to read its value first.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chrome-os-partner:10891
TEST=builds clean and snow boots;
TEST=ftrace shows that most update_reg calls, when mask is 0xff, only
     cause a single i2c write

Change-Id: I14270ba5f3ef6d060401a7c6c69b6f493a9f6588
Reviewed-on: https://gerrit.chromium.org/gerrit/30551
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agos5p-mfc: Handle multi-frame input buffer
ARUN MANKUZHI [Mon, 13 Aug 2012 12:53:02 +0000 (18:23 +0530)]
s5p-mfc: Handle multi-frame input buffer

When one input buffer has more than one input frame,
mfc try run is called again with the remaining bytes.

BUG=chrome-os-partner:12027
TEST=Ran VDA unit test for VP8

Change-Id: Ia031d8a7ed0577eb6000bde5eaed86de8faf93aa
Signed-off-by: ARUN MANKUZHI <arun.m@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29986
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Arun Kumar K <arun.kk@samsung.com>
Commit-Ready: Arun Mankuzhi <arun@chromium.org>
Tested-by: Arun Mankuzhi <arun@chromium.org>
11 years agoCHROMIUM: ASoC: Update pointer to account for pending dma transfers.
Dylan Reid [Fri, 17 Aug 2012 00:05:02 +0000 (17:05 -0700)]
CHROMIUM: ASoC: Update pointer to account for pending dma transfers.

Make dma_pointer check how much of the current dma transfer has
completed.  This improves the accuracy of the pointer operation, which
previously was only updated once a period.  Before this change calling
snd_pcm_avail() right before a dma transfer completed would indicate
that the entire transfer was still pending, now it will indicate the
actual count of free frames.

If the dma being used doesn't support the residue operation to query a
pending transfer, then assume that no bytes have been transfered.  This
leads to the same behavior as before the change.

BUG=chrome-os-partner:12278
TEST=aplay -B10000 file assure no dropouts.
cras_test_client --playback_file sine.wav --buffer_frames 960 --callback_threshold 480 --min_cb_level 480 --rate 48000

Change-Id: I9149c1b54a1e56242094ea6ea9ff6246b384851b
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30615
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ARM: SAMSUNG: Add residue DMA operation.
Dylan Reid [Thu, 16 Aug 2012 23:47:32 +0000 (16:47 -0700)]
CHROMIUM: ARM: SAMSUNG: Add residue DMA operation.

Add a new dma op, residue.  It returns the count of bytes left to be
transfered by the dma.  This is useful for Audio, the Samsung dma ASoC
layer will use this to provide an accurate update to the hw_ptr that is
exported to user space.  ASoC wants large transfers to reduce the amount
of wakeups, but needs to be able to know how much audio has been played
for latency estimates.

BUG=chrome-os-partner:12278
TEST=aplay file, add debug prints to watch the residue value change.

Change-Id: I9783e0182f94ef2016d7f424219082005f8d07a0
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30614
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: dmaengine: pl330: Set residue in tx_status callback.
Dylan Reid [Thu, 16 Aug 2012 23:31:57 +0000 (16:31 -0700)]
CHROMIUM: dmaengine: pl330: Set residue in tx_status callback.

Fill txstate.residue with the amount of bytes remaining in the current
transfer if the transfer is not complete.  This will be of particular
use to i2s DMA transfers, providing more accurate hw_ptr values to ASoC.

BUG=chrome-os-partner:12778
TEST='aplay -B10000 <filename>' should be smooth.

Change-Id: I06f49c7193ab127db135678ad8a58c3d0801f7cc
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30613
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agodrm/exynos: move exynos_drm_crtc and exynos_drm_fb defs to exynos_drm_drv.h
Mandeep Singh Baines [Thu, 16 Aug 2012 18:04:53 +0000 (11:04 -0700)]
drm/exynos: move exynos_drm_crtc and exynos_drm_fb defs to exynos_drm_drv.h

Refactoring that is required for follow-up CLs. I need to access to
the crtc and fb struct from the finish_pageflip code called by the
vblank interrupt handler.

BUG=chrome-os-partner:12586
TEST=Suspend/resume. VT switch. Browsing.

Change-Id: Icb77eae4b10d481097abd4441d14d071f99a0e0e
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30588
Reviewed-by: Pawel Osciak <posciak@google.com>
11 years agodrm/exynos: Name the connector properly.
Stéphane Marchesin [Fri, 17 Aug 2012 01:06:55 +0000 (18:06 -0700)]
drm/exynos: Name the connector properly.

If the connector isn't recognized, it won't be named properly, and Chrome
will not pick it up as a laptop LCD (and won't handle it as a laptop,
including detecting the projection). Fix this by identifying our connector
as eDP.

BUG=none
TEST=by hand, run xrandr on an exynos device, and check that the output
TEST=is now named "eDP-1" not "None-1".

Change-Id: Ief7f45818407dfa140540517e994bd0edc5479f9
Reviewed-on: https://gerrit.chromium.org/gerrit/30638
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: Benson Leung <bleung@chromium.org>
11 years agoUPSTREAM: staging: gdm72xx: fix reference counting in gdm_wimax_event_init
Ben Chan [Tue, 24 Jul 2012 14:49:42 +0000 (07:49 -0700)]
UPSTREAM: staging: gdm72xx: fix reference counting in gdm_wimax_event_init

This patch fixes the commit "staging/gdm72xx: cleanup little at
gdm_wimax_event_rcv" (8df858ea76b76dde9a39d4edd9aaded983582cfe),
which mishandles the reference counting of wm_event.

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

Change-Id: I5aa436ba6a3d01ccd68dd355b6d9405776ea3e2c
Reviewed-on: https://gerrit.chromium.org/gerrit/30133
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
11 years agoUPSTREAM: staging/gdm72xx: cleanup little at gdm_wimax_event_rcv
Devendra Naga [Thu, 12 Jul 2012 06:12:25 +0000 (11:57 +0545)]
UPSTREAM: staging/gdm72xx: cleanup little at gdm_wimax_event_rcv

the event sock check is done at the netlink_init itself.

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

Change-Id: I8ef8a42bdd6ac462211344371174a20d28b049a9
Reviewed-on: https://gerrit.chromium.org/gerrit/30132
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
11 years agoARM: EXYNOS5: powering on ISP pd before suspend
Prathyush K [Fri, 10 Aug 2012 13:07:14 +0000 (18:37 +0530)]
ARM: EXYNOS5: powering on ISP pd before suspend

The ISP pd needs to be powered on before suspending and then
powered off after resuming. This is a software workaround and should
be removed later. It is noticed that the board does not resume if ISP
is powered off before suspend. ISP is powered down during bootup as
it is an unused IP.

BUG=chrome-os-partner:11793
Test=MFC/GSC/Sysmmu get suspended after probe and resume upon video
playback. Tested on Daisy.

Change-Id: Ibb1663cb4fb2c2bca8c4df875d90afd6e770d310
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30205
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>

11 years agoCHROMIUM: chromeos_arm: Process ChromeOS GPIOs statically defined in the dt.
Gabe Black [Thu, 16 Aug 2012 09:16:14 +0000 (02:16 -0700)]
CHROMIUM: chromeos_arm: Process ChromeOS GPIOs statically defined in the dt.

This change turns the chromeos_arm init code into a driver and device so that
it can have GPIOs attached to it by links which have nice, friendly names
instead of just numbers. The code which processes the GPIO is split out into
a separate function so that it can be reused in case other switches need the
same treatment.

BUG=chrome-os-partner:11297
TEST=Used update_kernel.sh to put onto a snow. Verified that the gpio showed
up as /sys/devices/platform/chromeos_arm/write-protect/.

Change-Id: Ie52a5b3dd751b05bd03c57aab316abe309821fbc
Signed-off-by: Gabe Black <gabeblack@google.com>
[olofj: cleanup, removed args, bindings update]
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30533

11 years agoCHROMIUM: chromeos_arm: cleanups
Olof Johansson [Thu, 16 Aug 2012 21:01:35 +0000 (14:01 -0700)]
CHROMIUM: chromeos_arm: cleanups

Print with dev_* now that we have a platform device.

Also, u-boot doesn't pass along a copy of the nvblock. :( So remove the
checks for it and revise the comment.

BUG=none
TEST=boot, check for chromeos_arm in dmesg

Change-Id: I9a2258a6c475450479e1ad39b8632c580ad0ab27
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30587
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agoCHROMIUM: Add the write protect switch to the snow device tree
Gabe Black [Thu, 16 Aug 2012 09:07:32 +0000 (02:07 -0700)]
CHROMIUM: Add the write protect switch to the snow device tree

Having this GPIO statically defined in the device tree instead of having it
passed in by U-Boot avoids the problem of U-Boot's GPIO numbering not matching
the kernel's.

BUG=chrome-os-partner:11297
TEST=Built with other changes, booted, and verified that the chromeos_arm
driver correctly parsed the new device tree entries.

Change-Id: I6b8a39770ef4d904393ccb20e40fffed8d3ad404
Signed-off-by: Gabe Black <gabeblack@google.com>
[olofj: Fixed up bindings, removed compatible field from firmware node]
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30532

11 years agoCHROMIUM: exynos: snow: specify suspend state for all pins
Jonathan Kliegman [Tue, 7 Aug 2012 17:38:02 +0000 (13:38 -0400)]
CHROMIUM: exynos: snow: specify suspend state for all pins

By default all pins go active low on suspend.  As this isn't
the desired state for all circuits on the device, specify
the actual state we want each pin in on suspend.

BUG=chrome-os-partner:11988
TEST=On device, validate:
  i2c devices resume correctly
  i2c arbitration values are correct on EC
  EC battery command works correctly
  resume functions normally
  power_Resume test runtime has no regression

Change-Id: Ia70fe26342ceb6fea974ef7d08d488ce3d12a58f
Signed-off-by: Jonathan Kliegman <kliegs@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30026
Reviewed-by: Frank Hislop <frh@google.com>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
11 years agoARM: EXYNOS5: save CLK_TOP_SRC3 register before powergating
Prathyush K [Tue, 14 Aug 2012 14:36:40 +0000 (20:06 +0530)]
ARM: EXYNOS5: save CLK_TOP_SRC3 register before powergating

After S2R, the CLK_TOP_SRC3 register gets modified if the GSC/MFC devices are
powergated. This is a software workaround for this problem and will be
removed later.

To reproduce the problem:
Boot the board
Run S2R
Read CLK_TOP_SRC3 (armio 0x1002021C) This will show: 0x01000550
Powergate GSC (armiow 0x10044000 0)
Read CLK_TOP_SRC3 (armio 0x1002021C) This will show: 0x01000050
Power on GSC (armiow 0x10044000 7)
Read CLK_TOP_SRC3 (armio 0x1002021C) This will show: 0x01000050

The clock for gscalar gets set to XXTI which results in the gscalar
device running very slow and we notice a big drop in performance when
running video. Similar issue exists with powergating MFC. This is
observed only after S2R and not before.

BUG=chrome-os-partner:11793
Test=MFC/GSC/Sysmmu get suspended after probe and resume upon
video playback. Tested on Daisy.

Change-Id: I5901f4cc05fa5a42e7bdabb99bfbf1d31acb060c
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30206
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoARM: EXYNOS5: dts: add power domain property to mfc/gscalar/sysmmu nodes
Prathyush K [Tue, 31 Jul 2012 08:58:07 +0000 (14:28 +0530)]
ARM: EXYNOS5: dts: add power domain property to mfc/gscalar/sysmmu nodes

This patch adds the powerdomain property to the mfc/gsc/sysmmu nodes which
points to their respective power domain nodes. This property is retrieved
during the driver's probe and the device is added to its power domain.
MFC and its sysmmus are added to mfc_pd and all the gscalar devices and
their sysmmus are added to the gsc_pd.

BUG=chrome-os-partner:11793
Test=MFC/GSC/Sysmmu get suspended after probe and resume upon video
playback. Tested on Daisy.

Change-Id: Ifc811fb847e434b116b76dc85b908b6c0da187a5
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29161
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoARM: EXYNOS: Enable PM_GENERIC_DOMAINS for exynos
Prathyush K [Mon, 13 Aug 2012 12:22:20 +0000 (17:52 +0530)]
ARM: EXYNOS: Enable PM_GENERIC_DOMAINS for exynos

This patch enables PM_GENERIC_DOMAINS for the exynos chipset.

BUG=chrome-os-partner:11793
Test=MFC/GSC/Sysmmu get suspended after probe and resume upon video
playback. Tested on Daisy.

Change-Id: I3a4f7c4b8f280010608c2f04104b29b6a01a174a
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30204
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoexynos/gsc: add gscalar device to its power domain
Naveen krishna Chatradhi [Tue, 31 Jul 2012 06:29:02 +0000 (11:59 +0530)]
exynos/gsc: add gscalar device to its power domain

This patch adds the gscalar devices to its power domain by calling
the function 'pm_genpd_of_add_device_by_name'. The power domain
is found by searching for a of property 'samsung,pd' in the of node.

BUG=chrome-os-partner:11793
Test=MFC/GSC/Sysmmu get suspended after probe and resume upon
video playback. Tested on Daisy.

Change-Id: Ia1056b06c85a4bfbd6a44aaa131f6145492767a7
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29163
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoexynos/mfc: add mfc device to power domain
Naveen krishna Chatradhi [Tue, 31 Jul 2012 06:30:19 +0000 (12:00 +0530)]
exynos/mfc: add mfc device to power domain

This patch adds the mfc device to the genpd by calling the
function 'pm_genpd_of_add_device_by_name'. The power domain
is found by searching for a of property 'samsung,pd' in the of node.

BUG=chrome-os-partner:11793
Test=MFC/GSC/Sysmmu get suspended after probe and resume upon
video playback. Tested on Daisy.

Change-Id: Idc4b08608dec668cdd8bb706c0e4460d3fe5f351
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29164
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoiommu/exynos: add exynos sysmmu device to power domain
Prathyush K [Tue, 31 Jul 2012 06:26:16 +0000 (11:56 +0530)]
iommu/exynos: add exynos sysmmu device to power domain

This patch adds the sysmmu devices to genpd by calling the
function 'pm_genpd_of_add_device_by_name'. The power domain
is found by searching for a of property 'samsung,pd' in the of node.

BUG=chrome-os-partner:11793
Test=MFC/GSC/Sysmmu get suspended after probe and resume upon video
playback. Tested on Daisy.

Change-Id: I4ce7949a1742d95327420094208583ddbc071bb0
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29162
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoPM / Domains: add generic function 'pm_genpd_of_add_device_by_name'
Prathyush K [Thu, 16 Aug 2012 12:35:16 +0000 (18:05 +0530)]
PM / Domains: add generic function 'pm_genpd_of_add_device_by_name'

A new function pm_genpd_of_add_device_by_name is added to the pm_domain
file. This function takes three parameters - target device to be added to
genpd, a device node and the name of the property. This function reads
the "propname" property from the device node and finds the corresponding
genpd device node. The target device is then added to this genpd by
calling __pm_genpd_of_add_device.

of_property_read_u32(dev_node, propname, &val);
genpd_node = of_find_node_by_phandle(val);
__pm_genpd_of_add_device(genpd_node, dev, NULL);

Change-Id: I03933a2ad95355c154018b40e351d51da1b96867
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30522
Tested-by: Prathyush Kalashwaram <prathyush@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: ath9k: fix decrypt_error initialization in ath_rx_tasklet()
Lorenzo Bianconi [Fri, 10 Aug 2012 09:00:24 +0000 (11:00 +0200)]
UPSTREAM: ath9k: fix decrypt_error initialization in ath_rx_tasklet()

ath_rx_tasklet() calls ath9k_rx_skb_preprocess() and ath9k_rx_skb_postprocess()
in a loop over the received frames. The decrypt_error flag is
initialized to false
just outside ath_rx_tasklet() loop. ath9k_rx_accept(), called by
ath9k_rx_skb_preprocess(),
only sets decrypt_error to true and never to false.
Then ath_rx_tasklet() calls ath9k_rx_skb_postprocess() and passes
decrypt_error to it.
So, after a decryption error, in ath9k_rx_skb_postprocess(), we can
have a leftover value
from another processed frame. In that case, the frame will not be marked with
RX_FLAG_DECRYPTED even if it is decrypted correctly.
When using CCMP encryption this issue can lead to connection stuck
because of CCMP
PN corruption and a waste of CPU time since mac80211 tries to decrypt an already
deciphered frame with ieee80211_aes_ccm_decrypt.
Fix the issue initializing decrypt_error flag at the begging of the
ath_rx_tasklet() loop.

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chromium-os:25036
TEST=WiFiSecMat

Change-Id: I200265f25909f06f5ded0c9e75c37b8c0b670155
Reviewed-on: https://gerrit.chromium.org/gerrit/30438
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoCHROMIUM: i2c-s3c2410: do not generate STOP for QUIRK_HDMIPHY buses
Daniel Kurtz [Tue, 14 Aug 2012 12:52:54 +0000 (20:52 +0800)]
CHROMIUM: i2c-s3c2410: do not generate STOP for QUIRK_HDMIPHY buses

The datasheet says that the STOP sequence should be:
 1) I2CSTAT.5 = 0 - Clear BUSY (or 'generate STOP')
 2) I2CCON.4 = 0 - Clear IRQPEND
 3) Wait until the stop condition takes effect.
 4*) I2CSTAT.4 = 0  - Clear TXRXEN

Where, step "4*" is only for buses with the "HDMIPHY" quirk.

However, after much experimentation, it appears that:
 a) normal buses automatically clear BUSY and transition from
    Master->Slave when they complete generating a STOP condition.
    Therefore, step (3) can be done in doxfer() by polling I2CCON.4
    after starting the STOP generation here.
 b) HDMIPHY bus does neither, so there is no way to do step 3.
    There is no indication when this bus has finished generating STOP.

In fact, we have found that as soon as the IRQPEND bit is cleared in
step 2, the HDMIPHY bus generates the STOP condition, and then immediately
starts transferring another data byte, even though the bus is supposedly
stopped.  This is presumably because the bus is still in "Master" mode,
and its BUSY bit is still set.

To avoid these extra post-STOP transactions on HDMI phy devices, we just
disable Serial Output on the bus (I2CSTAT.4 = 0) directly, instead of
first generating a proper STOP condition.  This should float SDA & SCK
terminating the transfer.  Subsequent transfers start with a proper START
condition, and proceed normally.

The HDMIPHY bus is an internal bus that always has exactly two devices,
the host as Master and the HDMIPHY device as the slave. Skipping the STOP
condition has been tested on this bus and works.

Also, since we disable the bus directly from the isr, we can skip the bus
idle polling loop at the end of doxfer().

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

Change-Id: Ic6518aceba46a058b65e6adff1bc7a5a295eb5b0
Reviewed-on: https://gerrit.chromium.org/gerrit/29876
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>
11 years agoARM: EXYNOS5: dts: Add power domain nodes for exynos5
Prathyush K [Tue, 31 Jul 2012 06:19:27 +0000 (11:49 +0530)]
ARM: EXYNOS5: dts: Add power domain nodes for exynos5

This patch adds the power domain nodes for various ips to the
exynos5250 dtsi.

BUG=chrome-os-partner:11793
TEST=Kernel boots and genpd is able to parse through all the
power domains. Tested on Daisy.

Change-Id: I9573aaea970af91d23a2679990d219111ef0f1be
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Naveen krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29160
Tested-by: naveen krishna chatradhi <naveen@chromium.org>
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: [TG3] : Disable WOL by default
Benson Leung [Wed, 15 Aug 2012 21:51:05 +0000 (14:51 -0700)]
CHROMIUM: [TG3] : Disable WOL by default

Do not set WOL_ENABLE by default at init. WOL_CAP is still enabled,
so it can be set later on.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:12127
TEST=On a system with a tg3 ethernet MAC (parrot), do the following
1. run "ethtool -s eth0 wol g" to enable WOL from PHY activity
2. reboot the system
3. run "ethtool eth0" and check that "g" is not listed in "Wake-on"

Change-Id: I59de49028ef925a08bebf46255220abc9d6d6a2a
Reviewed-on: https://gerrit.chromium.org/gerrit/30473
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoARM: SAMSUNG: use spin_lock_irqsave() in clk_set_parent
Mandeep Singh Baines [Fri, 20 Jan 2012 02:03:07 +0000 (11:03 +0900)]
ARM: SAMSUNG: use spin_lock_irqsave() in clk_set_parent

From 0cdf3aff, "ARM: SAMSUNG: use spin_lock_irqsave() in
clk_{enable,disable}":

  The clk_enable()and clk_disable() can be used process and ISR either.
  And actually it is used for real product and other platforms use it
  now. So spin_lock_irqsave() should be used instead.

We need to make a similar change in clk_set_parent(). Otherwise,
you can potentially get spinlock recursion:

BUG: spinlock recursion on CPU#0, kinteractive/68
 lock: 807832a8, .magic: dead4ead, .owner: kinteractive/68, .owner_cpu: 0
[<80015f54>] (unwind_backtrace+0x0/0x128) from [<804f2914>] (dump_stack+0x20/0x24)
[<804f2914>] (dump_stack+0x20/0x24) from [<804f57b8>] (spin_dump+0x80/0x94)
[<804f57b8>] (spin_dump+0x80/0x94) from [<804f57f8>] (spin_bug+0x2c/0x30)
[<804f57f8>] (spin_bug+0x2c/0x30) from [<80222730>] (do_raw_spin_lock+0x54/0x150)
[<80222730>] (do_raw_spin_lock+0x54/0x150) from [<804f96ec>] (_raw_spin_lock_irqsave+0x20/0x28)
[<804f96ec>] (_raw_spin_lock_irqsave+0x20/0x28) from [<80022ea4>] (clk_enable+0x3c/0x84)
[<80022ea4>] (clk_enable+0x3c/0x84) from [<8038336c>] (s5p_mfc_clock_on+0x60/0x74)
[<8038336c>] (s5p_mfc_clock_on+0x60/0x74) from [<8038645c>] (s5p_mfc_read_info+0x20/0x38)
[<8038645c>] (s5p_mfc_read_info+0x20/0x38) from [<8037ca3c>] (s5p_mfc_handle_frame+0x2e4/0x4bc)
[<8037ca3c>] (s5p_mfc_handle_frame+0x2e4/0x4bc) from [<8037d420>] (s5p_mfc_irq+0x1ec/0x6cc)
[<8037d420>] (s5p_mfc_irq+0x1ec/0x6cc) from [<8007fc74>] (handle_irq_event_percpu+0x8c/0x244)
[<8007fc74>] (handle_irq_event_percpu+0x8c/0x244) from [<8007fe78>] (handle_irq_event+0x4c/0x6c)
[<8007fe78>] (handle_irq_event+0x4c/0x6c) from [<80082dd8>] (handle_fasteoi_irq+0xe4/0x150)
[<80082dd8>] (handle_fasteoi_irq+0xe4/0x150) from [<8007f424>] (generic_handle_irq+0x3c/0x50)
[<8007f424>] (generic_handle_irq+0x3c/0x50) from [<8000f7c4>] (handle_IRQ+0x88/0xc8)
[<8000f7c4>] (handle_IRQ+0x88/0xc8) from [<80008564>] (gic_handle_irq+0x44/0x68)
[<80008564>] (gic_handle_irq+0x44/0x68) from [<8000e400>] (__irq_svc+0x40/0x60)
Exception stack(0xef3cbe68 to 0xef3cbeb0)
[<8000e400>] (__irq_svc+0x40/0x60) from [<80022cfc>] (clk_set_parent+0x30/0x74)
[<80022cfc>] (clk_set_parent+0x30/0x74) from [<803ac7f8>] (set_apll.isra.0+0x28/0xb0)
[<803ac7f8>] (set_apll.isra.0+0x28/0xb0) from [<803ac8e4>] (exynos5250_set_frequency+0x64/0xb8)
[<803ac8e4>] (exynos5250_set_frequency+0x64/0xb8) from [<803ac280>] (exynos_target+0x1b0/0x220)
[<803ac280>] (exynos_target+0x1b0/0x220) from [<803a4a0c>] (__cpufreq_driver_target+0xb0/0xd4)
[<803a4a0c>] (__cpufreq_driver_target+0xb0/0xd4) from [<803aab80>] (cpufreq_interactive_updown_task+0x214/0x264)
[<803aab80>] (cpufreq_interactive_updown_task+0x214/0x264) from [<80047d04>] (kthread+0x9c/0xa8)
[<80047d04>] (kthread+0x9c/0xa8) from [<8000fa48>] (kernel_thread_exit+0x0/0x8)

BUG=chrome-os-partner:12565
TEST=Did some browsing.

Change-Id: Ie6541c96aac0648b4fd96d426cddbcde77e7d15f
LKML-Reference: <1345058187-18843-1-git-send-email-msb@chromium.org>
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Suggested-by: Sunil Mazhavanchery <sunilm@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/30445
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: printk: prevent unbounded time inside console_unlock
Mandeep Singh Baines [Wed, 15 Aug 2012 06:16:50 +0000 (23:16 -0700)]
CHROMIUM: printk: prevent unbounded time inside console_unlock

We are seeing softlockups inside console_unlock():

BUG: soft lockup - CPU#0 stuck for 12s! [rsyslogd:285]
PC is at _raw_spin_lock_irqsave+0x10/0x28
LR is at down_trylock+0x1c/0x3c
(_raw_spin_lock_irqsave+0x10/0x28) from [<8004d830>] (down_trylock+0x1c/0x3c)
(down_trylock+0x1c/0x3c) from [<80028e40>] (console_trylock+0x1c/0x60)
(console_trylock+0x1c/0x60) from [<800292f8>] (console_unlock+0x1c8/0x1f4)
(console_unlock+0x1c8/0x1f4) from [<80268e74>] (do_con_write.part.14+0x1cc8/0x1cf4)
(do_con_write.part.14+0x1cc8/0x1cf4) from [<80268f34>] (con_write+0x40/0x54)
(con_write+0x40/0x54) from [<802547c0>] (do_output_char+0xa0/0x1c8)
(do_output_char+0xa0/0x1c8) from [<80254928>] (process_output+0x40/0x5c)
(process_output+0x40/0x5c) from [<80255170>] (n_tty_write+0x28c/0x3b4)
(n_tty_write+0x28c/0x3b4) from [<80251ea8>] (tty_write+0x198/0x238)
(tty_write+0x198/0x238) from [<800ed208>] (vfs_write+0xc4/0x140)
(vfs_write+0xc4/0x140) from [<800ed484>] (sys_write+0x4c/0x78)
(sys_write+0x4c/0x78) from [<8000e7c0>] (ret_fast_syscall+0x0/0x30)

The softlockup can be caused by a printk storm. Since console_unlock
can retry an unbounded number of times, we can get stuck in inside
for an unbounded amount of time. The fix is to schedule work instead
of retrying inside console_unlock() when there is more work to do.

Upstream:

printk.c upstream is dramatically different from 3.4 so I'll need to
write a new patch to send upstream.

BUG=chrome-os-partner:12565
TEST=See below.

$ dmesg # verify OK
$ reboot

*reboot*

$ cat /dev/pstore/console-ramoops # verify OK
$ dmesg # verify OK
$ echo bug > /proc/breakme

*crash*

$ cat /dev/pstore/console-ramoops # verify OK
$ cat /var/spool/*.kcrash # verify OK

Change-Id: If2955af0bd96b8a27b87f6a4306094c019a86dc7
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30384
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: gpu: i915: Make RP down timeout shorter
Sameer Nanda [Mon, 13 Aug 2012 21:33:02 +0000 (14:33 -0700)]
CHROMIUM: gpu: i915: Make RP down timeout shorter

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

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

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

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

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

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

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

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

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

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

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

The patch fixes this.

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

Change-Id: I6631d8be7389b397ac533ed0be52aae673b91a2c
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit d9e0d149b5dcc2ef4688afc572b9906bcda941ef)
Reviewed-on: https://gerrit.chromium.org/gerrit/29993
Tested-by: Vikas Sajjan <vikas.sajjan@samsung.com>
11 years agoUPSTREAM: ARM: dma-mapping: fix atomic allocation alignment
Aaro Koskinen [Tue, 7 Aug 2012 12:39:25 +0000 (14:39 +0200)]
UPSTREAM: ARM: dma-mapping: fix atomic allocation alignment

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

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

Change-Id: Ic801c21c23c6dec1fd0ccf32a50312d6f486ed34
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Prathyush K <prathyush.k@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
(cherry picked from commit e4ea6918c93b9f59d34e8ca2124b2b64b1afe73b)
Reviewed-on: https://gerrit.chromium.org/gerrit/29992
Tested-by: Vikas Sajjan <vikas.sajjan@samsung.com>
11 years agoCHROMIUM: ASoC: max98095 - Export switches for MIC3 route.
Dylan Reid [Mon, 13 Aug 2012 22:31:28 +0000 (15:31 -0700)]
CHROMIUM: ASoC: max98095 - Export switches for MIC3 route.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

BUG=chromium-os:33273
TEST=none

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

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

/dev/pstore/console-ramoops

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

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

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

Crash

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

EC reset

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

Crash

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

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

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

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

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

BUG=chromium-os:33273
TEST=none

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The previous GFP_FLAGS are available via a Kconfig option.

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

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

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

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

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

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

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

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

Change-Id: I682a1faa64550f7f45ddeeef35eb9dc649d1c702
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29733
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: config: Renormalize splitconfig
Naveen Krishna Chatradhi [Thu, 9 Aug 2012 03:04:36 +0000 (12:04 +0900)]
CHROMIUM: config: Renormalize splitconfig

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

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

Change-Id: I4c2be3dedc436058c21b2e32949cc7f62a36dd91
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/29732
Commit-Ready: Olof Johansson <olofj@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: ALSA: ASoC: Get snow hp/mic detect GPIOs from device tree.
Dylan Reid [Wed, 8 Aug 2012 17:42:24 +0000 (10:42 -0700)]
CHROMIUM: ALSA: ASoC: Get snow hp/mic detect GPIOs from device tree.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

BUG=chromium-os:33054
TEST=manual

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

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

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

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

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

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

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

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

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

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

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

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

following warnings were fixed

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

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

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

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

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

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

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

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

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

return the error of filp_open rather returning -ENOENT.

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

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

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

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

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

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

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

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

This driver is accessible using the following configuration
options:

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

Committed changes follow below:

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

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

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

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

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

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

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

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

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

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

Enable the PTN3460 bridge driver for exynos.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

BUG=None
TEST=None

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

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

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

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

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

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

BUG=None
TEST=None

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

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

BUG=None
TEST=None

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

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

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

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

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

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

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

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

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

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

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

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

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

This reverts commit 5cf9fa2631c7503408174b546fe30dd675ded84d

Turn off the extra debug logging before R22 branches.

Change-Id: I719b494ae361f20e42ee4ec21b1165decd449bed
Reviewed-on: https://gerrit.chromium.org/gerrit/29296
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Gary Morain <gmorain@chromium.org>
Tested-by: Gary Morain <gmorain@chromium.org>