Andy Gross [Mon, 20 Jul 2015 22:25:52 +0000 (17:25 -0500)]
firmware: qcom: scm: Convert to platform driver
This patch creates a platform driver for the SCM so that we can adequately
manage resources. This removes clients having to carry the necessary
clocks to use the SCM resources.
Signed-off-by: Andy Gross <agross@codeaurora.org>
Conflicts:
drivers/firmware/qcom_scm.c
Archit Taneja [Tue, 16 Feb 2016 05:10:56 +0000 (10:40 +0530)]
drm/i2c: adv7511: Add HPD support
Add Hot Plug detect support for ADV7533. This involves:
1) Enabling the correct HPD interrupt enable registers in
adv7511_power_on, adv7511_get_modes and adv7533_bridge_attach.
2) Flushing the irq stat registers in adv7511_irq_process only after
we have called drm_helper_hpd_irq_event.
3) Getting rid of the HPD_ENABLE macro instances.
4) Add a 200 ms sleep in adv7511_get_modes after powering on the
chip. This seems to be needed when we rely on EDID_READY
interrupt to start reading EDID.
This patch adds mic support to the lpass driver, most of the driver is
reused as it is, only the register level access is changed depending on
te direction of the stream.
ASoC: qcom: add generic bit masks for RDMA and WRDMA
This patch adds generic masks for accessing bits in rdma/wrdma
registers. Doing this would simplify the driver and adding capture
support would be much simpler. Also there is no point in having same
bit masks for bits in both rdma and wrdma registers.
This patch also deletes the RDMA specific bit masks and makes the code
use the generic bit masks.
ASoC: qcom: rename rdma_ch_bit_map to dma_ch_bit_map
rdma_ch_bit_map can be reused for wrdma channel allocations as wrdma
channel numbering start after rdma channel numbers.
With capture support referring rdma_ch_bit_map for wrdma channel allocation
is confusing, so renaming rdma_ch_bit_map to dma_ch_bit_map makes sense.
This patch updates the internal dma allocation callbacks to take the
stream direction so that it can allocate channels suitable for that
stream direction. Before the capture support this was not necessary.
ASoC: qcom: rename rdmactl_audif_start to dmactrl_audif_start
This patch renames rdmactl_audif_start to dmactrl_audif_start as this
is common for both rdma and wrdma. Without this patch the name would be
bit misleading to the readers.
There is no point in having local allocation functions when the driver
can use snd_dma_alloc/free() apis. This patch replaces the local versions
of the dma allocation apis with the snd_dma_alloc/free() apis.
This patch adds msm8x16-wcd codec support which has been tested for
Audio In using Headset Mic/Secondary Mic/Primary Mic and Audio out via
Speaker/Headset.
usb: phy: msm: Fix state machine worker logic for OTG mode.
Issue is that if the board is booted without micro usb cable and usb
device attached, kernel fails to populate the usb host and device.
The reason for this is that the state machine worker logic only checks
for USB_DR_MODE_PERIPHERAL and USB_DR_MODE_HOST modes to run worker
thread. However if the phy is configured in OTG mode it would fail
to run the state machine, resulting in failure to detect for very
first time.
This patch fixes by adding OTG checks in to the logic.
Issue is noticed on Qualcomm Dragon board DB410C.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
(cherry picked from commit 15fddd0d508b672385f4fd6fed33c179a7943c5d) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
(cherry picked from commit 81b32c972b83d0c27d3a3c3f0fb8c899a3fa1ffe) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Bjorn Andersson [Mon, 11 Jan 2016 18:33:27 +0000 (10:33 -0800)]
wcn36xx: Disable power save for now
Enabling power save results in extremely long ping times and stalling
transfers. So disable it for not until we can figure out how to work
around this.
Jason Mobarak [Tue, 11 Mar 2014 22:49:01 +0000 (15:49 -0700)]
wcn36xx: don't pad beacons for mesh
Patch "wcn36xx: Pad TIM PVM if needed" has caused a regression in mesh
beaconing. The field tim_off is always 0 for mesh mode, and thus
pvm_len (referring to the TIM length field) and pad are both incorrectly
calculated. Thus, msg_body.beacon_length is incorrectly calculated for
mesh mode. Fix this.
Signed-off-by: Jason Mobarak <jam@cozybit.com> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Pontus Fuchs [Mon, 17 Feb 2014 07:36:13 +0000 (08:36 +0100)]
wcn36xx: Copy all members in config_sta v1 conversion
When converting to version 1 of the config_sta struct not all
members where copied. This fixes the problem of multicast frames
not being delivered on an encrypted network.
Pontus Fuchs [Mon, 17 Feb 2014 20:20:53 +0000 (21:20 +0100)]
wcn36xx: Add helper macros to cast sta to priv
While poking at this I also change two related things. I rename one
variable to make the names consistent. I also move one assignment of
priv_sta to the declaration to save a few lines.
Pontus Fuchs [Mon, 10 Feb 2014 20:33:54 +0000 (21:33 +0100)]
wcn36xx: Pad TIM PVM if needed
The wcn36xx FW expects a fixed size TIM PVM in the beacon template. If
supplied with a shorter than expected PVM it will overwrite the IE
following the TIM.
Fengwei Yin [Sun, 20 Dec 2015 13:20:41 +0000 (21:20 +0800)]
wcn36xx: split DMA mask register writing.
Per comments from Bjorn Andersson <bjorn.andersson@sonymobile.com>,
split DMA mask register writing as seperate patch in case we need
bi-sect in the furture.
Fengwei Yin [Sun, 20 Dec 2015 13:20:40 +0000 (21:20 +0800)]
wcn36xx: handle rx skb allocation failure to avoid system crash
Lawrence reported that git clone could make system crash on a
Qualcomm ARM soc based device (DragonBoard, 1G memory without
swap) running 64bit Debian.
It's turned out the crash is related with rx skb allocation
failure. git could consume more than 600MB anonymous memory.
And system is in extremely memory shortage case.
But driver didn't handle the rx allocation failure case. This patch
doesn't submit skb to upper layer if rx skb allocation fails.
Instead, it reuse the old skb for rx DMA again. It's more like
drop the packets if system is in memory shortage case.
With this change, git clone is OOMed instead of system crash.
Reported-by: King, Lawrence <lking@qti.qualcomm.com> Signed-off-by: Fengwei Yin <fengwei.yin@linaro.org>
ASoC: qcom: use correct device pointer in dma allocation
dev pointer in struct snd_soc_pcm_runtime does not have dma_ops set. In
v4.4 kernel dma_ops would end up pointing to dummy_dma_ops in such cases.
So attempting to use such device in allocating coherent memory on aarch64
would fail.
According to commit 1dccb598df549d892b6450c261da54cdd7af44b4 ("arm64:
simplify dma_get_ops") The current behavior of dma_get_ops is to fall
back to the global dma_ops when a device has not set its own dma_ops,
but only for DT based systems.
So, this patch fixes the driver to use correct device pointer while
allocating coherent memory, and also deletes un-necessary dma_mask setup
on soc_runtime->dev.
Without this patch lpass driver would fail with below log:
...
[ 6.541542] ADV7533: lpass_platform_alloc_buffer: Could not allocate DMA buffer
[ 6.541914] apq8016-lpass-cpu 7708000.lpass-cpu: ASoC: pcm constructor failed: -12
[ 6.548216] qcom-apq8016-sbc 7702000.sound: ASoC: can't create pcm ADV7533 :-12
[ 6.555581] qcom-apq8016-sbc 7702000.sound: ASoC: failed to instantiate card -12
[ 6.566072] qcom-apq8016-sbc: probe of 7702000.sound failed with error -12
...
On msm8x16 SOCs the codec integration is split into digital and analog
parts, digitial part is integrated with SOC and the analog part is
integrated as part of pmic chip pm8916.
This driver provides basic playback support with lot of todos:
1> Capture support
2> Cleanup
3> Multi button head set support.
4> Impedenace matching logic.
ALSA: pcm: add IEC958 channel status helper for hw_params
Add IEC958 channel status helper that gets the audio properties from
snd_pcm_hw_params instead of snd_pcm_runtime. This is needed to
produce the channel status bits already in audio stream configuration
phase.
ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders
The hdmi-codec is a platform device driver to be registered from
drivers of external HDMI encoders with I2S and/or spdif interface. The
driver in turn registers an ASoC codec for the HDMI encoder's audio
functionality.
The structures and definitions in the API header are mostly redundant
copies of similar structures in ASoC headers. This is on purpose to
avoid direct dependencies to ASoC structures in video side driver.
Ivan T. Ivanov [Wed, 13 May 2015 12:20:12 +0000 (15:20 +0300)]
usb: phy: msm: Ensure that workers are initialized before use
Charger detect and USB state detect workers could be triggered from
USB-HOST and USB cable detect notifiers. Ensure that workers are
initialized before driver register its interest for cable events.
Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Currently the rates of the xo and sleep clocks are hard-coded in the
GCC driver, but this is a board layout description that actually should
be in the DT. Moving them into DT also allows us to insert the RPM
controlled clocks between the DT and GCC clocks.
move the allocation of iommu-sec page table into msm_iommu_dev
in order to use properly initialised struct device.
The dma_alloc_attrs would fail to allocate memory with the fake
struct device which was the case before this change.
Nicolas Dechesne [Wed, 29 Jul 2015 13:03:15 +0000 (15:03 +0200)]
kernel: configs: improve distro.config, mostly for systemd
* add missing options required/optional for systemd
http://cgit.freedesktop.org/systemd/systemd/tree/README
Some options were enabled by default in arch/arm64/defconfig, but not in
arch/arm/multi_v7_defconfig..
* rework/move the options to separate out systemd configs
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>