This is an initial driver for the new QPIC based NAND controller(NANDc)
that is introduced in MDM9x25. This driver has been leveraged from the
current driver msm_nand.c and is modified for the new hardware changes
in QPIC NANDc. Addition of SPS/BAM support is one of the major
hardware changes in new controller. It also supports only BCH ECC and
based on the device capabilities either 4 bit or 8 bit BCH ECC will
be used. This driver is based on the device tree architecture.
Change-Id: Ie9f782a796bd7c1506997e8eaa1e797310dc26a0
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
This reverts commit 2fed6b6f759ebeb4a678f399a192815c5ab136e5.
Bluetooth sleep mechanism is not stable with the new design.
Change-Id: I9fa7e3af5b2668764f5fb335d93a54451568f857
Signed-off-by: Ram Mohan Korukonda <rkorukon@codeaurora.org>
Add device tree information for NAND controller. Also, add
documentation defining bindings for NAND controller and MTD
flash partition layout for NAND devices.
Change-Id: I6eaf949a54a19aacd3249711033563efd7fd90c2
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
In mmc_wait_for_req_done() function, change the call wait_for_completion()
to wait_for_compltion_io(). This change makes the kernel account for
wait time as I/O wait and through another configuration, this io wait
is treated as busy which makes the acpu clock to scale up.
Change-Id: Iebdc7b1b22871bf845f10a55e2272816c72d9964
Signed-off-by: Murali Palnati <palnatim@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
APPS vote from coldboot may be still pending when SSR is invoked;
so make sure that the APPS votes from coldboot are cancelled before
SSR votes for these Riva regulators.
Change-Id: I975be7470ce08e941c5846642a9379f23574915b
CRs-fixed: 380434
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Use alternate core clocks on the KGSL and Venus IOMMUs,
updating the device tree and clock table accordingly.
Change-Id: Ie201dbe8af37b54c8f479d4788b54010caaea360
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Prop bit is checked in userspace and must be set in driver in order
to be recognized as a direct input device (touchscreen).
Change-Id: I80bf2b9fd390ed58a22a78834f71afe41e3d2776
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Refactor the IOMMU clock control code to always require a
core clock as well as an interface clock. Add support for
an optional alternate core clock and update device tree
bindings accordingly. Clean up the probe function to remove
needless enabling / disabling of clocks.
Change-Id: I4d744ffabc1e6fb123bacfda324f64408257cb25
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
We see a kernel panic when we reboot with recovery mode
from the UI. Though kernel prepares to stop the other
cores(cpu_relax), but in some race condition mpdecision kicks
in to wake up(CPU_UP_PREPARE) the other core, before we go
ahead for issuing pcom command from core-0 for restart and this
causes a BUG in stop machine code.
So to resolve this before we issue a PCOM_RESET_CHIP command from
core-0, we must ensure that IRQ and FIQ is disabled and also
map the user pages to 1:1 mapping so as to not have unpredictable
MMU errors or kernel panics.
Moving the code put of pm2.c as this code is more restart specific and
not related to power management code.
CRs-Fixed: 359879
Change-Id: If26fdf3a4dd1fb5ecc4c28859bfd68650ff4e747
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Add support for identifying the msm8974 SoC and update the
MIDR fallback table accordingly.
Change-Id: Idc34cac2963776b07ad59c0727bcb49ae42be1ea
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Modify Physical layer settings for PHY strength
and regulator to improve the rise/fall time of
the DSI clock waveform.
CRs-Fixed: 363172
Change-Id: I072fe56a7827ce98222271b6a547154dc337fcef
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Using an unitiliazed spinlock can cause a kernel BUG
in the SMB349 driver.
Fix this by initializing the spinlock in the probe
function.
Change-Id: I9ce691398939f7104b71b58505e2d15dc910328c
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
QSECOM requires a total of 6MB for concurrent
use. The memory is divided between HDCP (3M),
Payready (2M), and QSECOM (1MB).
Increase the QSECOM ION heap from 1MB to 6MB.
Change-Id: I98bef75832e8a774174b1dcd2a18a7d675284ba7
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
The peripheral registrations are stored in a table
on apps processor. During SSR, these need to be deleted
and fresh ones are recorded after SSR completes. Currently
this clean up function is called from interrupt context.
This cleanup function works on a shared table, which is
protected by mutexes. Using this mutex in interrupt function
causes bug with spinlocks and generates warnings. Moving this
cleanup to work queue resolves the issue.
However, there might be race condition with this move. A new
registration might come in, while the clean up is still going on
OR yet to begin. Adding a bit mask which tracks the peripheral
undergoing SSR. if new registration is received from this processor
before clean up is completed, the registration packet is dropped.
Also, an error message is printed in kernel to notify of the drop.
Change-Id: I95e143220a3960d4e9459bb9874bab2911be0937
CRs-Fixed: 371866
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
The wcd9310 codec driver already can detect and report unsupported headset
plugging. Create headset jack with unsupported headset mask to be able to
report via sound core.
Change-Id: I0119d01c039362cc7b185f9f3407d78c958bc49a
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Queuing a request on a disabled endpoint during composition switch leads
to prime failure. Hence return -EINVAL if a request is queued on a disabled
endpoint.
Also, in f_mtp, block queuing a request in OUT ep in receive_file_work, if
the device state is STATE_OFFLINE.
Change-Id: I0e706d5280a2460baf6ab05dbf97a09c59b642fb
CRs-Fixed: 378207
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
Since the arch_timer is a system-wide block, other hardware in an SoC
can make use of the counter values. Export a way to read the physical
counter for use by other drivers.
Change-Id: I0bcd95fa4cd7507c41ac608fc9740955d15d4b88
Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
Setting the 'Secondary Bus Reset' bit in 'Bridge Control' register
of root complex port configuration space is causing the PCIE core to
reset due to hardware limitation. Discard any request to set this bit.
Change-Id: Iacad6ba8e8a49406428bf875901817f3f96fa24d
Signed-off-by: Niranjana Vishwanathapura <nvishwan@codeaurora.org>
Video driver allocates on-chip memory (OCMEM) and
hands it over to the video hardware for internal usage.
Video encode/decode performance improves with OCMEM.
Change-Id: Ic6e35278db24cedc003aa33d5e3cef52172e2254
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
8064 does not support the msm dcvs governor
Change-Id: I51d44cf7d3339127f86b736e0c9b7c18122830f2
CRs-Fixed: 363761
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
usbnet driver uses tasklet as bottom half handler. Since tasklet
runs in interrupt context in case of high throughput driver is
spending more time in interrupt context to process rx buffers
this is causing watch dog reset. Hence replace the tasklet with
workqueue to avoid watchdog reset.
CRs-Fixed: 378526
Change-Id: I8eac339e37d734dbaaf7a2e874d3974f562e8680
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
NR for VCAP is capable of receiving manual tuning parameters. In
order for the client to pass in these parameters a separate ioctl
was developed.
Change-Id: Ia8d7e8de80ee4fd7ccd2019d30b4457f1000e106
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Buffer unprepare is not done while releasing stats buffers,
hence add support for buf unprepare ioctl
Change-Id: If4fa95c270363d1948b5924c2365785d1427e2f4
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
The QPNP VADC driver supports the User Bank Peripheral of
the voltage ADC(VADC).
VADC is a 15 bit ADC that measures signals through the
Main analog multiplexer (AMUX) and PREMUX. The driver
arbitrates the request to issue ADC read requests.
VADC driver includes support for the conversion sequencer.
The conversion sequencer is a HW triggered signal to start
ADC measurement on trigger events for PA ON,
camera flash and TX threshold.
The AMUX supports external pull-ups simultaneously. Clients
can select the appropriate AMUX input channel to measure the
ADC for the intended pull up configuration.
Change-Id: I8886968ccec54ad03334b113b4516d4d200e0da8
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Add UASP function to Android supported functions array. UASP
function depend on Target core. Provide empty functions when
Target core is not enabled.
Change-Id: I959f26ebd63e036dae041708d0ad6169213a3cf0
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
The write buffer is allocated twice in bot_send_write_request
function. Fix this by removing additional memory allocation.
Change-Id: I3253c149c3703621be30d0f84499d6af0aff8bc8
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
For 8625 2.0 PLL4 is capable to run at 1.4GHz. Add acpuclock
table for the same and also add support to dynamically
re-program the PLL4 assuming 801.6MHz jump is fine from
H/W perspective.
Change-Id: I3712907d4aa3f4c085f874652797e9e7d4203598
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
Move the IOMMU device tree entries into an SoC-independent
file to allow them to be reused across multiple SoCs.
Change-Id: I8b0a3f1e9bd072e321d9bd8a0c4d5a53585e7842
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Update the DTS entries for the MDP IOMMU with the correct
interrupt numbers.
Change-Id: I7cb6128ab5841ca157eb5af2c67b656d1a015ea3
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
The hardware requires a TLB sync operation at the end of
each TLB maintenance operation.
Change-Id: I8102253cfc12af530216346efa5bb9760db25352
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Use the label property to specify device labels instead of
a vendor-specific property.
Change-Id: I74f3b57db469781f738f0d52c785d992c1e88efb
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
When probing the context devices, dev_info already prints
the device name, so printing it again is redundant. The
context name is more useful anyway, so print this instead.
Change-Id: Ibe2e33501baa1fd53f6ff45943226377eb61fd7e
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Add the DTS entry and clock table entries to support the
VFE IOMMU on 8974.
Change-Id: I6e382228a02323c3b9ef844429827ceb00570feb
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Add device tree entries for the cache ERP devices on 8974
using the existing bindings.
Change-Id: I23a254b13244b88762b93f2e728cd907d20b00df
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
MDP pipe or mixer size registers have 12-bit number, so boundary
checks are needed for those parameters. If not, input req sizes could
be very large 32 bit unsigned numbers, e.g. 0xffffffff, unsigned
operations may have overflow to pass all later checks, causing MDP
underruns or hang issues.
CRs-fixed: 380469
Change-Id: I096d7022ede21d54266b46a140782ab0348dd54b
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
bam_dmux_log() takes a formatted string and a variable argument list
similar to printf() and creates printf() style output to a private kfifo
log. This change fixes a particular invocation of bam_dmux_log() which has
an invalid variable argument list for the formatted string used. Depending
on system timing, this invocation could succeed as expected, or it could
cause a null pointer exception.
To prevent further issues, add the __printf() function attribute so that
the gcc compiler will check at compile time the arguments to bam_dmux_log()
for proper number and types according to printf() usage.
CRs-Fixed: 382037
Change-Id: I247ac3e83664385b9dc61a434049ca5c8bb60cd2
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Some userspace applications use /proc/stat to determine how many CPUs
the system has. CPU hotplug can offline a CPU at runtime and causing the
offline CPU not present in /proc/stat if we only show online cpu in
/proc/stat.
Change-Id: I4fd0cfcdb174244044634389da2fbdef77744c19
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Initialize platform data pointer for I2S probe if the interface
is not slimbus. Slimbus probe is called first and if interface
is determined to be slimbus then I2C probe for codec will simply
return. This is necessary to avoid wrong update of platform data
pointer.
Change-Id: I40fb66eca4af15aa0ef534e8021285f46f155a42
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
Add bounds checking to kgsl_sharedmem_find_region to ensure that GPU
addresses supplied by the user via KGSL_IOCTL_SHAREMEM_FREE and
KGSL_IOCTL_CFF_SYNCMEM are within a valid range for the MMU scheme of
choice.
CRs-Fixed: 380296
Change-Id: Ic0dedbadf40fca4a9e04ba075e67e08e617806b5
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
LE connections don't have sniff/active connection
mode, unlike BR/EDR. Make sure that the link which
has been requested to enter sniff/active mode is not
an LE connection.
CRs-fixed: 376972
Change-Id: Iec4714d1c2ea7621267f9064b7046eb9d5ff9462
Signed-off-by: Sunny Kapdi <sunnyk@codeaurora.org>
Fixed incorrect setting of the internal state of the MPM driver. In
lpm_resources, since Vdd_dig is represented via corner voltage, update
the default value to represent the same. Also, modify lpm_resources to
use the noirq RPM API during exit sleep.
Change-Id: I58365702d1eb490504e62a6f45b93fd37f474e9f
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Put a reasonable upper limit on the number of indirect buffers allowed
per submission via IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS.
CRs-Fixed: 380267
Change-Id: Ic0dedbadd78a0ad3f09f67660f34b2fba421007f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Turn on the feature which allows SLUMBER in place of SLEEP for targets
with low latency GPU power rail bring-up.
CRs-Fixed: 369927
Change-Id: I3c2bf2049a6b7670da7c2e5ec4cde3cf66642c9b
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Turn on the IOMMU clocks in recovery as the recovered command
stream may have commands that read and write to IOMMU registers.
Change-Id: I6a8d9fa17a57b0c4f8564fc62d019b2e150b8399
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Fix warning with the LDM/STM instructions. The instructions dont
have a register offset so set the offset to 0.
Change-Id: I2c988373c88e280015faa43076139650747d7ff3
Acked-by: Kaushik Sikdar <ksikdar@qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
MASK_RX bit is set to prevent transmitted data from looped back.
Set the TX and RX mode to T=0 mode; not T=1 mode.
Change-Id: Ida78fb56cf4b51c0fa88cb57da58c0dcc5db51c9
Acked-by: Ho Lee <holee@qualcomm.com>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
New driver module to read RPM RBCPR stats. RPM processor
maintains the RBCPR stats in MSG RAM. This driver
module will read the stats from the MSG RAM and display the stats.
Users can acess the RPM RBCPR stats through debugfs. Currently
these stats are only maintained for MSM8930.
CRs-Fixed: 364785
Change-Id: I306409609e9aeb103a88207be7fc3a7ab2638d36
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>