If two SSR drivers register with the same ramdump device pointing
at shared memory sysfs will complain about duplicate sysfs nodes:
WARNING: at fs/sysfs/dir.c:455 sysfs_add_one+0x78/0x98()
sysfs: cannot create duplicate filename
'/devices/virtual/misc/ramdump_smem'
Avoid this case by making the names of the ramdump devices
unique via smem-$subsystem (smem-modem, smem-dsps, etc.).
Change-Id: I6c3d5b0a4a7739a42b14940a141cc0c87168a4e0
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
PIL core code already calls shutdown on all processor during late
init, but we would like to remove that code. Therefore force GSS
into low power mode by explicitly calling the shutdown op during
driver probe. This achieves the same goal without requiring the
PIL core to call shutdown on all processors.
Change-Id: I13f0d2d6544d9e8d7668272e1059b27a1767ea8e
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This patch adds support for CMA to dma-mapping subsystem for ARM
architecture. By default a global CMA area is used, but specific devices
are allowed to have their private memory areas if required (they can be
created with dma_declare_contiguous() function during board
initialisation).
Contiguous memory areas reserved for DMA are remapped with 2-level page
tables on boot. Once a buffer is requested, a low memory kernel mapping
is updated to to match requested memory access type.
GFP_ATOMIC allocations are performed from special pool which is created
early during boot. This way remapping page attributes is not needed on
allocation time.
CMA has been enabled unconditionally for ARMv6+ systems.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
Conflicts:
arch/arm/include/asm/mach/map.h
arch/arm/mm/init.c
arch/arm/mm/mm.h
arch/arm/mm/mmu.c
Change-Id: I85e3b43a9fa1e3c4d33cbc85fff6dee1b815041d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
If the proxy vote fails for some reason the wake lock will never
be released. Check the return value of the proxy vote and unlock
the wakelock if the proxy vote fails.
Change-Id: I0982896ab722bffed5f1c49247974dc84d5f3942
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Future versions of subsystem_restart() will require calling
subsystem_restart() with a pointer returned from
subsystem_register(). Remove this call for lpass from the modem
driver so that we can ease the transition.
Change-Id: Ib81016fcc221789ae6b886eb60733ea7273c698e
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
All 8930 platform boards using the 1.2 SoC have been reworked so that
the sd card detect line's esd circuit is no longer powered by the sd
card's voltage regulator. So this means we can turn the regulator off
to save power without affecting the sd card detect functionality. This
change to the boards will be true for newer versions of the SoC too.
Change-Id: Iab5b87f3d00414668ea71aa6e87bd675a035ab59
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
The CXO is the only crystal source for the MSM on the
8974. Thus as long as the apps processor is awake,
the CXO clock is expected to be on. To be safe, vote
for CXO in the active set in post_init, which is the
earliest point that this vote can be asserted.
Change-Id: Ib38e97d9c44fc60d0ce898a8d600519a327bb66a
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
The bms module is reused in multiple pmics. It is now unnecessary
to check for 8921 versions in the driver. As a result of this change
older 8921 versions are not supported.
CRs-Fixed: 372679
Change-Id: Ie9131d47ed08fa6fa39812c9e60be34cc6280e4c
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
To correctly set rates of local clocks, the frequency
value should be rounded up to the supported values before
calling the API to set rate. This patch adds support for
rounding the rate to the supported values.
Change-Id: Id0cdc14121edfedbffce83834f521d8ce67b82f4
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
For the digital gain to be applied on the codec it is required to write
the digital gain register after the digital portion of the codec is
turned ON. This applies both for RX and TX digital path setup. Fix digital
gain setting sequence for RX and TX paths by rewriting the gain register
once the digital path is turned ON
Change-Id: I7b9c59c1b29b838845d27e406ba0f8a004c868b1
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Add data aggregation support using RNDIS Multi Packet feature
to achieve better UDP Downlink throughput. Max 3 RNDIS Packets
aggregated into one RNDIS Packet with this implementation.
With this change, seeing UDP Downlink throughput increase
from 90 Mbps to above 100 Mbps when using Iperf and sending
data more than 100 Mbps.
CRs-Fixed: 352010
Change-Id: I7c353d21d60002b66c08181fd621f9ab8753cb0f
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
After completing a wakeup, trigger the TX worker to start sending
pending data.
Without the fix, the TX worker will wait until either other activity or
a power-down transmit before sending pending TX data.
Change-Id: Ica90b35d9a3169992db49ff493f783c27a2989da
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
During VPE/VFE initialization, pass the device pointer to
regulator_get() as per the expected usage of the API.
Change-Id: Ide33ff05814e11d5955a8ec7916ef595dceb0f84
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
Removed the ACK from the protocol when a sleep request is received when
already in the turning-off state to avoid an extra wakeup just to send
the ACK.
This case happens when both the local and remote sides transition to the
turning-off state and send a sleep request. Both sides will then
receive the sleep request at which point they can immediately transition
to the off side without having to perform a wakeup just to send the ACK.
Change-Id: I3fe4a82da34b68ef51ee9aa0c00507361b0717ed
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Temporarily increase the Application processor inactivity timeout to
prevent a local inactivity timeout while the external modem is booting.
This is necessary to allow releasing a power-collapse ACK change without
breaking SMUX until the external modem changes have also been mainlined.
Once the external modem changes have been mainlined, then this timeout
will be reduced to 250ms to improve power consumption when idle.
Change-Id: Ic9e12c849dd53955c6ff4a1eaff0a2ec761ffa35
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Store the MTU to use the proper MTU requested by remote if the
configuration fails for other options. If the remote does not
send the MTU in the next configuration request,
we need to use that value.
CRs-fixed: 373233
Change-Id: I35d9aa777f237bce5a4194036261128af1a7ada7
Signed-off-by: Mallikarjuna GB <gbmalli@codeaurora.org>
CONFIG_MMC_MSM_CARD_HW_DETECTION is no longer used so this
patch removes it completely from kconfig as well as from
defconfigs.
Change-Id: I8e7220722e0e90296d379105c61787ca54a1afd4
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Halt the system when HSIC system error happens and dump HSIC
link registres. Also, save the address of msm_hsic_hcd
structure to a global pointer.
CRs-Fixed: 375536
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Change-Id: Ia346778911f610338f38492bc1ff0e8a9c7a87c7
The 2D clock was synchronously tied to the AXI bus in frequency on
the 7x30 platform. So its was never set before. Now, with the
updated clock APIs, this made the clock to be enabled before it is
prepared. This change ensures the clock is prepared before it is
enabled.
Change-Id: If05be2a4e4742687cb5fe7de2f27136be69b2dc3
CRs-fixed: 375424
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
Newer versions of SDCCv4 controller has added a soft
reset mechanism to reset the controller state machine
or reset the entire controller to default power on state.
MCI_POWER[SW_RST] - The impact of this reset bit will be
similar to the impact of the reset by doing clk_reset() on
host controller clock (HCLK). With this all SW registers
and all internal logic is reset.
MCI_POWER[SW_RST_CONFIG] - Resets the controller state machines
without resetting configuration registers (MCI_POWER, MCI_CLK,
MCI_INT_MASKn).
Change-Id: I7fd13e736b23dff16c20bd9f865ca97e7daaf304
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
If a histogram reader waits for completion in the do_histogram ioctl
and during this time the device is suspended, the complete for this
gets called from mdp_histogram_ctrl_all() in the panel_next_off()
sequence. This results in mgmt->hist not set to NULL. The subsequent
do_histogram ioctls after device resume fail due to multiple reader
failure condition since the histogram irq will be enabled now from
the same mdp_histogram_ctrl_all() during panel_next_on() sequence and
this by-passes mgmt->hist getting set to NULL that is present in
histogram_start() ioctl. Handle this scenario.
Change-Id: Ib0485da24c0f09a3f26768b75231903c8a2e0033
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
This reverts commit 2423ba8ae07458ec93efa07d777454f26d1d7c90.
commit 2423ba8... will be refered to as commit X
Commit X should have been listed as a parent of commit
56a123baaab84af584fbbf5cbb29955ec5c92f39 (i.e. video: msm: Always queue
histogram work & lock histogram calls).
commit 56a123b... will be refered to as commit Y
Commit Y is composed of 3 commits that were squashed together after they
caused errors when only one of them merged into mainline. Commit X was
created to revert the first of these 3 commits, and thus resolve the
errors.
However, when updating commit Y, commit X was omitted as the parent commit.
So when commit Y merged as a parent of commit X, commit X reverted part of
commit Y. By reverting commit X, this commit restores commit Y.
Change-Id: Ibfad464a2579354c92bc62d406672dcfc6a24009
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
There are two head switches for GPU, one is for the GPU core
itself, the other is for surrounding digital circuits. KGSL
needs to control them both.
The turn on sequence is:
1. Turn on GPU core
2. Turn on digital circuits
The turn off sequence is:
1. Turn off digital circuits
2. Turn off GPU core
Two regulator (actually head switch) names "vdd_dig" and "vdd"
are created in device tree file, representing digital
circuits and GPU core head switches respectively. In struct
kgsl_pwrctrl, adding a new regulator struct "gpu_dig"
which corresponds to vdd_dig. And the existing struct "gpu_reg"
corresponds to vdd.
Change-Id: Idb05caf547ad148885adb9cf498c47635067b70b
Signed-off-by: Pu Chen <puchen@codeaurora.org>
Add clock for pil-vidc and the pil vidc driver is needed to download
video firmware using PIL for video content protection.
Change-Id: I31219d6c8ea777b29da207933ac72e43d7296426
Signed-off-by: Riaz Ur Rahaman <riazr@codeaurora.org>
Calling del_timer() on uninitialized timers can potentially lead
to a deadlock where a CPU spins forever waiting to lock the timer
base. Enabling debug objects for timers allows us to detect these
problems and resolve them before they become real bugs. This
scenario occurs in smd_tty when the timer has never been
initialized and we close the smd_tty port.
WARNING: at lib/debugobjects.c:262 debug_print_object+0x94/0xbc()
ODEBUG: assert_init not available (active state 0) object type: timer_list
hint: stub_timer+0x0/0x10
Modules linked in:
[<c001521c>] (unwind_backtrace+0x0/0x12c) from [<c007b2fc>]
(warn_slowpath_common+0x4c/0x64)
[<c007b2fc>] (warn_slowpath_common+0x4c/0x64) from [<c007b394>]
(warn_slowpath_fmt+0x2c/0x3c)
[<c007b394>] (warn_slowpath_fmt+0x2c/0x3c) from [<c02edc20>]
(debug_print_object+0x94/0xbc)
[<c02edc20>] (debug_print_object+0x94/0xbc) from [<c02ede48>]
(debug_object_assert_init+0xf4/0x10c)
[<c02ede48>] (debug_object_assert_init+0xf4/0x10c) from [<c008ac98>]
(del_timer+0x10/0x1f0)
[<c008ac98>] (del_timer+0x10/0x1f0) from [<c0037794>]
(smd_tty_close+0x80/0xac)
[<c0037794>] (smd_tty_close+0x80/0xac) from [<c0378dec>]
(tty_release+0x178/0x498)
[<c0378dec>] (tty_release+0x178/0x498) from [<c037965c>]
(tty_open+0x3a8/0x4f4)
[<c037965c>] (tty_open+0x3a8/0x4f4) from [<c01527ac>]
(chrdev_open+0x114/0x134)
[<c01527ac>] (chrdev_open+0x114/0x134) from [<c014ccec>]
(__dentry_open+0x190/0x29c)
[<c014ccec>] (__dentry_open+0x190/0x29c) from [<c014ceb0>]
(nameidata_to_filp+0x58/0x64)
[<c014ceb0>] (nameidata_to_filp+0x58/0x64) from [<c015d73c>]
(do_last+0x840/0x990)
[<c015d73c>] (do_last+0x840/0x990) from [<c015d950>]
(path_openat+0xc4/0x390)
[<c015d950>] (path_openat+0xc4/0x390) from [<c015dcfc>]
(do_filp_open+0x30/0x7c)
[<c015dcfc>] (do_filp_open+0x30/0x7c) from [<c014c9c0>]
(do_sys_open+0xd8/0x174)
[<c014c9c0>] (do_sys_open+0xd8/0x174) from [<c000e340>]
(ret_fast_syscall+0x0/0x3c)
Fix it by initializing the timer when we setup the ports. Use
mod_timer() to increase the timeout when necessary.
Change-Id: Idbc1175ed08761b435c21d858e8d016d451c2991
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
eMMC4.5 specification supports HS200 bus speed mode which allows the
card interface clock to run at more than 52MHz and maximum up to 200MHz.
On most of our existing chipsets we interface eMMC cards on SDC1 slot
as it give 8-bit data interface but timing closure for this slot is not
done for >100MHz clock on any of the existing chipsets (MSM8960, MSM8930
& APQ8064).
Since the timing closure is done till 100 MHz, we can enable HS200 mode
that runs at max. 100MHz. Recent performance measurements also indicate
that HS200 @96MHz (Clock plan supports max. 96MHz) gives better
performance than DDR@48MHz. So enable HS200 @96 MHz. On future targets
which get timing closed at ~200MHz, HS200 at that frequency will be
enabled.
Change-Id: I726e65ec99a9ead99ce683844e7cc15ece7a225e
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Sysfs attributes have lockdep keys and so they should exist in
the data section. Failure to do this results in lockdep turning
itself off and warnings such as:
BUG: key eeb0883c not in .data!
Fix this problem by statically allocating the attributes.
Change-Id: I30202d8ed561c766ecd2c86657117282e2e25fd1
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Ignore error fatal and status interrupts from the external modem
when SSR is in progress
Change-Id: I6a60aca10ccdfc68a75b3a84cde1127eb50860e8
Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
Devices attributes have lockdep keys and so they should exist in
the data section. Failure to do this results in lockdep turning
itself off and warnings such as:
BUG: key eeb0883c not in .data!
Fix this problem by statically allocating the devices attributes
and hardcoding the names instead of generating them dynamically.
Change-Id: I8db28768b3bdffab21db8c2ea2cfb21f0e4010c1
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
msm8930 uses external mic biasing for headset mic. Correct the
microphone bias for headset microphone by setting it to external
biasing
Change-Id: I0324f6f9922e12a3263ff803a7fa882ac08a956c
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
DWC3 has separate irq line for OTG interrupts (e.g. ID / BSV).
These interrupts are needed to detect cable connect and disconnect
events. Hence, request for this interrupt line from OTG driver.
Also, update device tree binding documentation for DWC3 core.
Change-Id: Ie97e4b3b5dcf840eabeb01b5c5d6531a8a70a3c9
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
The dump to the kernel log that currently indicates
what clocks were enabled during suspend also indicates
all the clocks in the path to the root clock for each
enabled clock.
For each clock in that path to the root, indicate what
rate that source is at, and the current vdd level voted
on for that rate.
Example output before this change:
[ 49.128612] mdp_clk -> pll2_clk -> pxo_clk
[ 49.136303] mdp_clk -> pll2_clk -> pxo_clk
Output after this change:
[ 49.128612] mdp_clk [200000000, 2] ->
pll2_clk [800000000] -> pxo_clk [27000000]
[ 49.136303] mdp_clk [200000000, 2] ->
pll2_clk [800000000] -> pxo_clk [27000000]
Change-Id: Ie59392ab3fe67808685fbb0192d326c7071034c5
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Allow booting with only a subset of the CPUs enabled by default. The
others can potentially be added later with hotplug, at which point
the voltage, bus and clock requests for them will be applied.
Change-Id: If57eb1d2e13071474696bfdcc77842da289f9a0e
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Dynamic hardware clock gating is supported for most multimedia
ahb and axi clocks on 8930. This patch enables this feature for
these clocks.
Change-Id: I64ba96a7d14576e2fc7f0c0963deb00f2fc02cf7
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
inst_lock of pcam_inst needs to be initialized and destroyed
properly.
Change-Id: Ie041fc429cdf122c01b93393bb4a6c20a08e4267
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
Featurizing card detection with CONFIG_MMC_MSM_CARD_HW_DETECTION
is not giving any benefit hence remove it.
Change-Id: I933de6c3979352d29b150cc061622c5b70075787
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Check that the ops pointer is valid before using it, otherwise we
may fault.
Change-Id: I7f1420638eca53f6d85b8c3ff114033ce77cb408
CRs-fixed: 360810
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Remove unneeded idle commands from the command stream when updating
pagetables and doing TLB flushes. Ths cuts down on the number of
commands in the ringbuffer during switches.
Change-Id: I8f1fa31db33c465ecdbd0ca897f4651f2670c4e4
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
In case of IOMMU memory needs to only be flushed when it is
unmapped and not mappped. Also, when an application is running
the number of unmaps would in most cases be less than number of
maps, so this way the number of flushes wil be fewer.
Change-Id: Id4107631c343045edbc744125035202844405910
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Check global GPU status registers in intervals of 2 seconds,
if the registers did not change after 2 seconds trigger a hang.
When there is an actual GPU hang and GPU is stalled, this reduces
the current hang detection time from 10 seconds to 2 seconds.
Faster GPU hang detection reduces the overall time to recover
from GPU hang.
Change-Id: If432ccacc1b77b4fc7f08b756886bd3ae5edf04f
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
A busy loop is executed when we allocate space from the ringbuffer.
If the GPU is hung then we can wait indefinitely in the busy loop.
Add a wait time to this busy loop, and if the wait time elapses then
report a GPU hang instead of waiting indefinitely.
Change-Id: I035c39063cbfa25380702720f929df5319e73e61
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Log power packets in addition to power state changes.
Change-Id: I46b8d86df881b328bb9124611bdbf1a0db2928f9
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
The wakeup worker and TX worker both run on the same single-threaded
workqueue, so the wakeup worker needs to reschedule after sending a
wakeup character to allow pending characters to get flushed.
Without this change, a burst of wakeup characters will be sent once the
exponential back-off delay is 32ms after which the wakeup worker
reschedules itself as a delayed work item.
Change-Id: I4260c7f5b2f1f90e87575eac4b407be2bc6adb1d
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
If the receive retry queue size gets too large, then automatically
enable flow control to prevent having to drop buffers.
Change-Id: If27599015b362ce013e177ee350e026933390d72
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Use temporary values to allow using arguments with side effects in the
unit test macros.
Change-Id: Iebe7586e1d3469fcf9729b77ddedc701c71a2bd3
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Clarify test messages for list-empty reporting to avoid confusing
the list-empty flag with an event count value.
Change-Id: I31aeb6feb89ada5f7d5b691432b5d8f4aba64cc8
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Add range checking of the channel ID for packet logging. This prevents
out-of-bounds array access when reading the channel state.
Change-Id: Ic91b29e89ef9997525f6283b8212408cccd646f8
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>