Commit Graph

29 Commits

Author SHA1 Message Date
Anand N Sunkad ca991bcdb6 wcnss: get MUX control before dumping IRIS register
Sometimes dumping IRIS register along with PRONTO register
results in crash.
To mitigate issue get MUX control before dumping IRIS register.

Change-Id: Ie1e19a254ec1ae43c2713c86c4d35a2d9968bcd6
CRs-Fixed: 777663
Signed-off-by: Anand N Sunkad <asunka@codeaurora.org>
2015-01-09 20:05:47 +05:30
Anand N Sunkad 75145de910 Revert "wcnss: handle CBC complete event from firmware"
This reverts commit 7db9a1a9f7.
Above commit depends on firmware code changes, As new code
changes that would be introduced removes this dependency,
hence reverting this commit.

Change-Id: I86479d05f98e48949a140e30efae4e311e1cbf00
CRs-Fixed: 744296
Signed-off-by: Anand N Sunkad <asunka@codeaurora.org>
2014-10-28 15:42:54 +05:30
Linux Build Service Account 474f32dd23 Merge "wcnss: add condition to check for pronto ver3 hardware" 2014-10-14 08:49:45 -07:00
Siddharth Bhal 2ed06d5246 wcnss: add condition to check for pronto ver3 hardware
Add support to check for pronto ver3 hardware is present
by reading a device tree entry

Change-Id: I01cd71ac6c00b6c1e4c5ea46b3f3c0b57a0dbd95
CRs-Fixed: 737209
Signed-off-by: Siddharth Bhal <sbhal@codeaurora.org>
2014-10-13 13:55:56 +05:30
Anand N Sunkad 7db9a1a9f7 wcnss: handle CBC complete event from firmware
Add case to handle cold boot calibration complete
event from firmware.

Change-Id: I3d3dce178fadd7f993ee31667c89bcebb02c388b
CRs-Fixed: 734932
Signed-off-by: Anand N Sunkad <asunka@codeaurora.org>
2014-10-12 11:16:47 +05:30
Hardik Kantilal Patel e20799c35e wcnss: Add API to get monotonic boot time
Add WCNSS platform driver API to expose monotonic boot time so that
WLAN host driver can get the timestamp.

Change-Id: Id1db5bc7efac036cf76d2090ab5c07d2aece5e1a
CRs-Fixed: 706813
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
2014-08-08 18:15:07 +05:30
Pradeep Kumar Goudagunta d05d06f723 wcnss: Add support for register dump on wdog bite
-Add support to dump PMU register after enabling measure
 and debug clk.
-Add support to read IRIS registers on failure of enabling
 measure clk.

Change-Id: I77abd6ea6d97a890643c0bc1eab46188c6e42b67
CRs-Fixed: 652321
Signed-off-by: Pradeep Kumar Goudagunta <gpradeep@codeaurora.org>
2014-05-26 11:51:46 +05:30
Mihir Shete d8b4f0b291 wcnss: add API to check if wcnss is undergoing an SSR
Wlan driver should not read registers from wcnss or
try to communicate with the chip when it is undergoing
a subsystem-restart. Added an API with the wcnss platform
driver to check if ssr is in progress, this API will be
used by the wlan driver to protect register access and
other prohibited operations.

Change-Id: Ia0d93e774af126d84dbaabf5c36a2c90fdbd58be
CRs-Fixed: 621974
Signed-off-by: Mihir Shete <smihir@codeaurora.org>
2014-03-22 05:39:54 -07:00
Hardik Kantilal Patel e3dba04894 wcnss: Pronto and IRIS voltage regulator change for 8x16
Set Pronto and IRIS voltage regulator according to 8x16
power grid requirment.

Change-Id: I0b3b2dcb3cf82bc23e5d047809fa31a5e6b9b337
CRs-fixed: 567674
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
2014-03-15 05:04:00 +05:30
Hardik Kantilal Patel b209209acf wcnss: Memory map change for wcnss subsystem
Read Pronto base address register from dtsi file.

Change-Id: If895c75c5a153b6190a0a67c0bd6cd54a4e1a5bb
CRs-fixed: 567674
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
2014-03-14 07:57:05 +05:30
Linux Build Service Account 395450fae9 Merge "wlan: Store avoid channel list" 2013-12-24 21:38:22 -08:00
Leo Chang 3d90fd3fa7 wlan: Store avoid channel list
Store avoid channel list into recoverable location.
If Softap mode detects current channel is not safe to use,
WLAN kernel module will be restarted.
Then WLAN kernel module internal storage will lost
unsafe channel information.
To avoid start softap with unsafe channel, channel information
should be stored in static location.

Change-Id: I5a6d7ab7314936d7bbaaf7a005e58179a4dc0613
CRs-fixed: 576020
Signed-off-by: Leo Chang <leochang@codeaurora.org>
2013-12-20 15:02:17 -08:00
Hardik Kantilal Patel 46e2c8c727 wcnss: Add support to configure the Wlan MAC addr
This change introduces a sysfs entry to allow userspace to
configure the wlan MAC addr and exports an API which allows
WLAN and other wireless technologies to query the wlan MAC
addr

Change-Id: If723ceed9e6cf68533eaa42cef6fab59bb3ae9da
CRs-Fixed: 583465
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
2013-12-18 02:34:48 +05:30
Sameer Thalappil 127699a206 wcnss: Enable/disable WCNSS register dump on WCNSS bite
When Apps recieves a WDOG bite from WCNSS, collecting a register
dump of WCNSS is helpful to root cause the failure. WCNSS may not
be properly clocked in some WCNSS bite cases, and that may
cause unclocked register access failures.  So add a feature flag
so that customers can disable this register dump on production
builds.

Change-Id: Ifc9c577ac3a342634e01b3da9c12973c5c1a7713
CRs-Fixed: 556962
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-10-11 15:09:21 -07:00
Deepak Katragadda d5653c97f4 msm: pil: Move all WCNSS clock and regulator proxy votes to PIL ops
The voting for clocks and regulators during WCNSS boot up/restart
was split across the WCNSS platform driver and the PIL ops. Move
all the proxy voting to PIL ops to consolidate the code and remove
unnecessary code. This also allows for future clean up patches that
consolidate the start/powerup and stop/shutdown subsystem ops.

Change-Id: I9808185b6b941228cdc4bb0f5293bedd04aed84d
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2013-09-04 17:29:45 -07:00
Sameer Thalappil 11f6e35349 wcnss: Add API to expose the IRIS XO mode set
IRIS XO mode can be configured thru module parameter; and it can also
be auto detected. Add an API to expose the IRIS XO mode set. WLAN driver
can use this API for it's XO specific operation.

Change-Id: If40ae715f5e400e13a6fc9588d2bd144958ee8c2
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-09-04 17:01:26 -07:00
Sameer Thalappil 366d153972 wcnss: Add API to read WLAN RX buffer count
WLAN driver's RX buffer count is a configurable value; WCNSS platform
driver will expose an API to read this configurable value from device
tree. Using a smaller coount of this buffer will reduce the memory
usage of WLAN driver.

Change-Id: Ida3da258ec1efdc16d37e50f69de8248fd6a26f9
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-09-04 16:44:22 -07:00
Sameer Thalappil f0c066e124 wcnss: Add support to auto detect Iris XO
WCNSS platform driver can detect the Iris card attached to it. And if
dynamic XO detection is enabled, then WCNSS driver can configure the
48MHZ/19.2MHZ Iris XO configuration based on the Iris card attached to
it. The Iris register for this configuration can be read, once the 5wire
GPIO settings are applied. (Even before applying the Iris XO)

The dynamic XO will only be performed on 8x26 variants. If the dynamic
detection is not enabled, then platform driver will choose the settings
based on the has_48mhz_xo module parameter or qcom,has_48mhz_xo device
tree entry.

Change-Id: I8990468492efa1d3d3a606d01904a77eeaa6a980
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-09-04 16:40:18 -07:00
Naresh Jayaram 1f5993b694 msm: wcnss: Dump PMIC regulator contol registers
Dump PMIC registers which are related to WCNSS(RIVA)during the
WCNSS SSR or WDI timeout.  This  information helps to check PMIC
status during the SSR. This allows to debug multiple crash issues,
where WCNSS SSR dumps are insufficient to conclude why FIQ is not
reaching the WCNSS from HOST and why SPM is stuck.

CRs-fixed: 487483
Change-Id: I14bae1d0e99d5345b298c97917b23d246f0fef25
Signed-off-by: Naresh Jayaram <njayar@codeaurora.org>
2013-09-04 16:37:24 -07:00
Sameer Thalappil 1fb106155f wcnss: Add support to download calibrated data
WCNSS Firmware needs raw NV data (settings & some register values),
to do the power-on calibration. Once firmware does the power-on
calibration; it can then re-use the calibrated data. And it need not
do the calibration again when the next time it boots. WCNSS sends this
calibrated data to Apps; and Apps saves this into a persistent area.
And in the subsequent bootup, Apps sends the calibrated data to WCNSS.

Add interfaces to read calibrated data; and also add inteface to write
calibrated data to platform driver.

Change-Id: Ic18d40150093024b10a53e28f8a423dd9d3846eb
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-09-04 16:31:50 -07:00
Sameer Thalappil 7aaba558f9 wcnss: Prevent NV download by WCNSS driver during SSR
NV download is not done by WCNSS platform driver during SSR. After
SSR WCNSS depends on WLAN driver to load NV image.

Change-Id: I2c3f64aa94634b89b1f191d56748e8cf7b71cdc5
CRs-fixed: 457015
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-09-04 16:02:35 -07:00
Sameer Thalappil f8451dab5b wcnss: Log WCNSS registers in reset & bite handler
Reset interrupt is sent to WCNSS when host drivers fail to
communicate with WCNSS over SMD. So log certain Pronto registers to
know the failure reason at Pronto. Similar debug mechanism is already
added for Riva. The same WCNSS registers are also logged in watchdog
bite handler.

Change-Id: I0ef4256b9702a61785e9ca2f0ccbf9f947d6dfa7
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-09-04 15:45:07 -07:00
Sameer Thalappil a60c6ec1d3 wcnss: Notify Kernel suspend/resume to WCNSS
Notify WCNSS when the Kernel is suspended and also when it resumes.
Certain notifications from WCNSS are not required when Apps is
suspended.

Change-Id: I4e237d4793803798c599d4659bb2d7c0e496a393
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-09-04 15:34:33 -07:00
Sameer Thalappil f2e71af489 wcnss: Add interface to Reset wcnss
Add wcnss reset interface, this interface generates an FIQ to Riva.
Upon receiving this interrupt, Riva will execute the ERR_FATAL
routine and invoke SSR.

Change-Id: I74c293121cb69b312ed980902a12019adb700792
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-09-04 15:22:16 -07:00
Sameer Thalappil 9cd4faff87 wcnss: Pre-alloc memory for WLAN driver
WLAN driver will use this pre-allocated memory (when available) for
large memory allocations; this will prevent WLAN driver load
failures because of the un-availability of the large size slabs
during module load.

Change-Id: I8a8139bdf343ddc871036f6d5c6ab90993816de0
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-09-04 15:17:46 -07:00
Sameer Thalappil 1d8bffc811 wcnss: Add wcnss support for 8974
- Install 5wire interface for wcnss device.
- Add the powerup sequence for wcnss device.
- Apply regulator settings by dynamically detecting the hardware.
- Add device tree documentation for WCNSS platform driver.

Change-Id: I533b56001313a480231f1e30d16ce12730f15f37
Acked-by: Bharath Pandravada <bharathp@qca.qualcomm.com>
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-09-04 15:16:33 -07:00
Sameer Thalappil e5f2aa567f wcnss: wake lock APIs for host drivers
wcnss related host drivers can use these APIs to prevent Apps suspend.
WLAN driver uses this API to prevent suspend, when it's module
initialization routines are being executed.

Change-Id: Id072804e6ccc953c78caf6cf11c73e0ea1d71d18
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2013-09-04 15:05:47 -07:00
Sameer Thalappil ab2ef1ae08 wcnss: cancel any pending APPS votes from coldboot before SSR
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>
2013-09-04 15:04:22 -07:00
Yunsen Wang 59c501de8e net: wireless: wcnss: Initial version of the WCNSS WLAN Driver
This is the initial version of the Wireless ConNectivity SubSystem (WCNSS)
WLAN driver. The WCNSS is a new Hardware integrating WLAN, BT and FM
technologies that is built into new MSM chip. This version of the driver
does basic WLAN device detection, WLAN SMD channel allocation probing and
trigger the PIL to download the WCNSS SW image.

Change-Id: I054566453152e8d8d02f79693e6a51f26d047835
Acked-by: Jeff Johnson <jjohnson@qualcomm.com>
Signed-off-by: Yunsen Wang <yunsenw@codeaurora.org>
2013-09-04 14:49:16 -07:00