summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/baseband-xmm-power.c
AgeCommit message (Collapse)Author
2012-06-15arm: tegra: xmm: removing L3 state transitionVinayak Pane
Remove L3 state from xmm power driver. New usb phy code allows pm state transition L0->L2 and L2->L0. When the system goes in LP0/LP1 suspend then the modem power state is kept at L2 and bus state in suspend controlled by PMC. At system resume the hsic bus is given back to USB. Bug 991709 Change-Id: Ib3b74d7da30a5103eddd747726ac7c4423472c76 Signed-off-by: Vinayak Pane <vpane@nvidia.com> Reviewed-on: http://git-master/r/108076 Reviewed-by: Michael Hsu <mhsu@nvidia.com> Reviewed-by: Steve Lin <stlin@nvidia.com>
2012-06-04arm: tegra: xmm: changing mdelay and add wait_eventVinayak Pane
baseband_xmm_power has delays related to CP sync-up. Changing these delays from mdelay() to msleep and usleep_range. Adding wait_event mechanism to wait for L2->L0 Bug 932574 Change-Id: Ie33a3f1cc0a798e592f00153435b0135713213ea Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Signed-off-by: Vinayak Pane <vpane@nvidia.com> Reviewed-on: http://git-master/r/102689 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Steve Lin <stlin@nvidia.com>
2012-05-24usb: tegra: modify USB platform data structuresRakesh Bodla
Modify USB structures of platform data. Based on the new platform data structures modifying the initialization in board files. Bug 887361 Change-Id: Ie6347a078c9a596a4debe21a353e127ddde35220 Signed-off-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-on: http://git-master/r/103597 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-05-21arm: tegra: xmm: pm qos for modem enumerationVinayak Pane
XMM modem first enumeration has timing requirement, so khubd should perform enum within 1 second. An issue is seen sometimes when the hub events are not sent on time (on fully loaded system) and then khubd timesout. This patch adds PM QOS request to bump up the cpu frequency for 2 seconds. Bug 946027 Change-Id: I1a43c043d42cfa442517a2a7ad8d69a934d4ab47 Signed-off-by: Vinayak Pane <vpane@nvidia.com> Reviewed-on: http://git-master/r/102697 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-05-21arm: tegra: xmm: simultaneous L3 to L0 wakeupVinayak Pane
In AP initiated L3->L0 wakeup xmm power state is set BBXMM_PS_L3TOL0 but if CP is also trying to wakeup then ipc_ap_wake_irq with falling edge treats it incorrectly as CP wakeup pending - new race condition. Adding a check to fix this scenario for both L3 and L3TOL0 states. Bug 966077 Change-Id: I3af3538b48745588f17e4c13a3e23e4033f21821 Signed-off-by: Vinayak Pane <vpane@nvidia.com> Reviewed-on: http://git-master/r/102698 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Steve Lin <stlin@nvidia.com>
2012-05-16arm: tegra: xmm: baseband modem pm code cleanupVinayak Pane
- Platform data is treated as const and not modified in driver. - Driver specific data is stored and used from a new structure. - Remove support for older firmware version of XMM modem (<1130). - Shortening of names for compliance and to fit in 80 characters. - Organize irq function to reduce indentation. Change-Id: I269401aa0a2efc685d7a630b4952cb31cbca6a4f Signed-off-by: Vinayak Pane <vpane@nvidia.com> Reviewed-on: http://git-master/r/101587 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Steve Lin <stlin@nvidia.com>
2012-04-23arm: tegra: xmm: check return value of autopm_getShawn Joo
check return value of usb_autopm_get_interface(). if return value is not success, usb_autopm_put_interface() should not be called to make up the reference count. Bug 936094 Signed-off-by: Shawn Joo <sjoo@nvidia.com> Reviewed-on: http://git-master/r/85974 (cherry picked from commit aad2bf5c8fef639465c4bb895b73a23c3f0c0403) Change-Id: Ifd1deb1e0953eae1fd8d41f48989b650d6951fed Reviewed-on: http://git-master/r/97647 Reviewed-by: Shawn Joo <sjoo@nvidia.com> Tested-by: Shawn Joo <sjoo@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Steve Lin <stlin@nvidia.com>
2012-04-19arm: tegra: resolve compilation time warningsSanjay Singh Rawat
Bug 949219 Change-Id: I875f8688a272c415ebf345b8f30e4afdf7551b29 Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-on: http://git-master/r/91523 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-04-18arm: tegra: enterprise: disable dsi_csi_rail in LP0Vinayak Pane
AVDD_DSI_CSI is shared by modem and dsi. If DSI turns off this rail then HSIC fails after wakeup from modem. This patch provides a way to turn on this rail from modem as well as from DSI. Create two virtual power rails from avdd_csi_dsi to control it from both the drivers separately. This is enterprise specific change as per the power rail layout. Bug 920881 (cherry picked from commit ab52b51c59f776ae770d48a28a2744e2db2e5d2f) Reviewed-on: http://git-master/r/85656 Change-Id: I2e9c04a8f4e8d6fd20584b4e75657c1cb6d5c8bd Signed-off-by: Vinayak Pane <vpane@nvidia.com> Reviewed-on: http://git-master/r/89134 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Puneet Saxena <puneets@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-04-16arm: tegra: xmm: add shutdown handler to off cpSeongho Joo
add shutdown handler to turn off CP when power off and disable irq for ap wake. Bug 942968 Signed-off-by: Seongho Joo <sjoo@nvidia.com> Reviewed-on: http://git-master/r/88188 (cherry picked from commit d37a1900afb9982115f18989b0114bad8f2602bd) Change-Id: I1541453e21b46149bba08eafb0eadf9a598aa182 Reviewed-on: http://git-master/r/96455 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-16arm: tegra: xmm: modify CP power sequenceSeongho Joo
modify CP power sequence timing based on modem vendor spec information. > 20 ms : REST low and ON low > 400 us : RESET high and ON low > 60 us : RESEET high and ON high Bug 943280 Signed-off-by: Seongho Joo <sjoo@nvidia.com> Reviewed-on: http://git-master/r/85964 (cherry picked from commit 8a6e64228f11d46f502c654bd9a1b508af93a67b) Change-Id: I01f4fae493627d46707ebfcad676fc0a25b5258d Reviewed-on: http://git-master/r/96453 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-16arm: tegra: baseband: check usb intf after resumeVinayak Pane
Check for valid interface after system resume and before enabling runtime pm. Bug 944052 Signed-off-by: Vinayak Pane <vpane@nvidia.com> Reviewed-on: http://git-master/r/85330 (cherry picked from commit a32495671f104e1ba0f5a4940bde17d34b9c87f2) Change-Id: I77dc559ac0d4b31be756d3e770c04b8e5e7bfe36 Reviewed-on: http://git-master/r/96332 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-12arm: tegra: xmm: CP wakeup and system suspendSeshendra Gadagottu
To handle race condition between CP wakeup and system suspend following policy enforced: 1. If system suspend happens first, then buffer the CP wake request and will abort the suspend at the end of device suspend complete. 2. If CP wakeup happens first, then system suspend starts then abort the system suspend immediately. Bug 938553 Bug 948198 Bug 943035 Signed-off-by: Seshendra Gadagottu<sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/83130 (cherry picked from commit b2bd06368d3f6e16e5a7dd81c76dda0293de301b) Change-Id: Ic7024aa739472a666f1274ccd7c9722259d54fa5 Reviewed-on: http://git-master/r/93384 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Vinayak Pane <vpane@nvidia.com> Tested-by: Vinayak Pane <vpane@nvidia.com> Reviewed-by: Steve Lin <stlin@nvidia.com>
2012-03-26arm: tegra: xmm: reduce timeout timing on resumeSeongho Joo
1.reduce CP ack timeout to 1000 ms, based on modem vendor spec. expected timing is 10ms, but modem vendor recommend to wait less than 1 sec. 2.move log print after spinlock section. log in spinlock could waste cpu resource. Bug 932104 Signed-off-by: Seongho Joo <sjoo@nvidia.com> Reviewed-on: http://git-master/r/86003 (cherry picked from commit de853a886153cfb35cafcf797df490207187cc33) Change-Id: I4b1ea80d25e0aa1f93599c08eedf306dbed00d63 Reviewed-on: http://git-master/r/91934 Reviewed-by: Shawn Joo <sjoo@nvidia.com> Tested-by: Shawn Joo <sjoo@nvidia.com> Reviewed-by: Steve Lin <stlin@nvidia.com>
2012-03-13arm: tegra: xmm: add usb interface checkXin Xie
BUG 928909 Signed-off-by: Xin Xie <xxie@nvidia.com> Reviewed-on: http://git-master/r/82756 (cherry picked from commit f24375055ecba7c40c740a6b88ad03e38ea8b10c) Change-Id: I2b3d59ea433555f595a1468cae3242b7dc54958a Signed-off-by: Xin Xie <xxie@nvidia.com> Reviewed-on: http://git-master/r/89565 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Steve Lin <stlin@nvidia.com>
2012-03-08arm: tegra: comms: hsic first enum issue with flight mode offSeshendra Gadagottu
After flight mode on/off, EHCI phy power and modem power on sequences not correct. For first enumeration HSIC phy should be power and then modem needs to be powered before sending any hub events. Also corrected initial state for ipc_ap_wake_state. Bug 946027 Change-Id: I84edbebaa408fd6830adc09ebd0c67cb288a2626 Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/86297 (cherry picked from commit 700c7bc52b26b370ff2449a9a9f91b22188a9aee) Reviewed-on: http://git-master/r/88008 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-07arm: tegra: xmm: change irq handler to irq threadshawn joo
since irq function has printk and long context. change the handler to irq thread for stable running. Bug 937413 Signed-off-by: shawn joo <sjoo@nvidia.com> Reviewed-on: http://git-master/r/83350 (cherry picked from commit 1bf117669ed8b4fdb854074aef26d1a568544616) Change-Id: Ib760e19903b7e9975a1ac7b8275537c75830764d Reviewed-on: http://git-master/r/87633 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-07arm: tegra: xmm: ignore same xmm_onoff valueSeongho Joo
sysfs xmm_onoff is called from userspace. If it is called twice with same value it could cause a problem. if it happens, this change will ignore the case. Bug 943018 Signed-off-by: Seongho Joo <sjoo@nvidia.com> Reviewed-on: http://git-master/r/85721 (cherry picked from commit e722f73d1eed055682dbfeeedfa9c73173a7b3b6) Change-Id: Ief96b667242a9af3df078cf62c9e9a9531b80f45 Reviewed-on: http://git-master/r/87639 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-07arm: tegra: xmm: add enable_irq_wake in probeSeongho Joo
Add enable_irq_wake in probe to enable gpio irq wake. Bug 928950 Signed-off-by: Seongho Joo <sjoo@nvidia.com> Reviewed-on: http://git-master/r/85972 (cherry picked from commit e81069047c14a0ab9a3e1eb5588060959d550c49) Change-Id: Ic513179670661ddc8a75d73a0afaa6264847cb1a Reviewed-on: http://git-master/r/87644 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-05arm: tegra: comms: add mutex for on/off switchSeshendra Gadagottu
Mutex protection is added on xmm_onoff Bug 938553 Change-Id: I260847861a56f612f06c20cd7429c19c9001ac99 Signed-off-by: Xin Xie <xxie@nvidia.com> Reviewed-on: http://git-master/r/84751 (cherry picked from commit 14ac86297c4faa6a9cbf95877b782c997698347c) Reviewed-on: http://git-master/r/87506 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Steve Lin <stlin@nvidia.com>
2012-03-05arm: tegra: xmm power state handlingSeshendra Gadagottu
Avoid unwanted xmm power state changes. Added missing spin_unlock_irqrestore. Bug 935834 Bug 938553 Signed-off-by: Seshendra Gadagottu<sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/82796 (cherry picked from commit 8af674aadfc1196851d5a2ecd1ecdd2cfe2d4148) Change-Id: Ic5b354376c0239773762d1b0f6e8848491e74e08 Reviewed-on: http://git-master/r/87503 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2012-02-03arm: tegra: xmm: Fix linux warningSeshendra Gadagottu
Fixed linux warnings in baseband_xmm_power.c file. BUG 921565 Reviewed-on: http://git-master/r/77964 Change-Id: I6d0c6ef0c30351d6bfc77a733d306ab581ad9ea6 Signed-off-by: Seshendra Gadagottu<sgadagottu@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/78712 Reviewed-by: Automatic_Commit_Validation_User
2012-02-03tegra: usb: baseband: CP wakeup during system suspendSeshendra Gadagottu
baseband_xmm_power driver is updated with suspend/resume noirq callbacks. If any CP wake-up is pending during suspen_noirq callback, then ongoing system suspend will be aborted. With this mechanism, CP wakeup after baseband_xmm_power driver suspend is handled. BUG 904762 Reviewed-on: http://git-master/r/72933 Change-Id: Iae6f638885118c73d6154aad9daefee0cfc8e7d4 Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/78435 Reviewed-by: Automatic_Commit_Validation_User
2012-02-03arm: tegra: baseband: Configure wakeup source for xmmSeshendra Gadagottu
Configure wake irq for waking up AP from xmm modem. Also enable/disable this wake source base on flight mode off/on setting. Reviewed-on: http://git-master/r/69701 Change-Id: Iad274da9869102874efab27312fe8a182ab55bf3 Signed-off-by: Seshendra Gadagottu<sgadagottu@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/78026 Reviewed-by: Automatic_Commit_Validation_User
2012-01-30arm: tegra: comms: Auto suspend after system resumeSeshendra Gadagottu
Re-enable usb auto suspend on system resume by making get_interface() and put_interface() calls. BUG 921565 Reviewed-on: http://git-master/r/73468 Change-Id: Ieb7c82e73a7134e1d3bb8b0b3e96a42ed6672afe Signed-off-by: Seshendra Gadagottu<sgadagottu@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/77763 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-01-30arm: tegra: comms: fix crash at dev attr changeVinayak Pane
Check the state machine before poweron the modem by device attribute change routine. Maintain the state machine to avoid crash after writing state change to /sys/devices/platform/baseband_xmm_power/xmm_onoff Also cancel workqueue at module unload to avoid possible crash. Bug 898008 Reviewed-on: http://git-master/r/72934 Change-Id: I0d8286774040f155c930ecb0bb69778de6c606ac Signed-off-by: Vinayak Pane <vpane@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/77744 Reviewed-by: Automatic_Commit_Validation_User
2012-01-10arm: tegra: comms: Resume issue with XMM flashed modemSeshendra Gadagottu
power_onff flag updated correctly for flashed modem. BUG 905931 Change-Id: I383b1e01e380c04d8fd0179c50c77e4adf6f2a0b Reviewed-on: http://git-master/r/72894 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Michael Hsu <mhsu@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> (cherry picked from commit c70dc7a8bc0c0bff5b09b5099d5ac3a1a1b2299d) Reviewed-on: http://git-master/r/73960 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-15arm: tegra: comms: dynamic loading of hcd driverSeshendra Gadagottu
ehci on/off mechanism is replaced with dynamic add/removel of ehci-hcd driver. BUG 787270 Reviewed-on: http://git-master/r/65091 (cherry picked from commit 50381a027547354140d599876f452ff6a304e330) Change-Id: Ic9827c23fdbf367b87bb4ba153b65e7c867576d3 Reviewed-on: http://git-master/r/68391 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2011-11-30arm: tegra: xmm: Implementation for L2 power managementrepo sync -j4 # Run four syncs in parallel
Implemented L2 power management using autopm. Added code for AP/CP initiated L2->L0 resume. BUG 828389 BUG 873401 Reviewed-on: http://git-master/r/62115 (cherry picked from commit 14de0dc3ba9637b82a600693730752f2cbfebc66) Change-Id: I233b777e96592fbf25e3c0a92d2d74dc7162eb40 Reviewed-on: http://git-master/r/66503 Reviewed-by: Michael Hsu <mhsu@nvidia.com> Tested-by: Michael Hsu <mhsu@nvidia.com> Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Steve Lin <stlin@nvidia.com> Rebase-Id: R6779d1c8045deee78111d2b5b32a0400a7c3b4b0
2011-11-30arm: tegra: comms: GPIO changes for XMM modem ver 1130 or laterMichael Hsu
XMM modem version 1130 (or later) changes the GPIO power up sequence. Add module variable to support pre-1130 and post-1130 modem versions. BUG 828389 Reviewed-on: http://git-master/r/58240 (cherry picked from commit 0639c200face90d6dd0144acc7362c02909fa66c) Change-Id: If3a3486741d72d1251deeca3759af6b39c2031f1 Reviewed-on: http://git-master/r/62750 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rf848b30671a8739c11a376011165db6165f0a259
2011-11-30arm: tegra: xmm : Wakelock for power management state changesSeshendra Gadagottu
Used a wakelock to follow L0->L2->L3 state transition for modem power states. Added code for AP initiated L2->L0. BUG 828389 Original-Change-Id: Iad90364d27a0fac204c12880d6aa17a6e032b7d2 Reviewed-on: http://git-master/r/45486 Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: R3f9c890584fbf626bac8e36e1fa0561376ffff94
2011-11-30arm: tegra: xmm : Changes for CP initiated system resumeSeshendra Gadagottu
Added the changes required for CP initiated L3 -> L0 resume. BUG 828389 Reviewed-on: http://git-master/r/49462 (cherry picked from commit 58de177d5eb9ad81c6bfb25195a88011ce8622b9) Change-Id: I423a7ff7cd6d5b1679b6f643337b28d2af5ce602 Reviewed-on: http://git-master/r/54198 Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Michael Hsu <mhsu@nvidia.com> Tested-by: Michael Hsu <mhsu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> Rebase-Id: R7a831e137f784d10c0914ac9226b86f2c99ee2b1
2011-11-30arm : tegra: sysfs interface for xmm power module on/offSeshendra Gadagottu
Now xmm power module made static part of the kernel. xmm modem can be on/off using the sysfs interface. BUG 828389 Original-Change-Id: Icfbe83beeac43f88418eee29f71ccd58d9b840c2 Reviewed-on: http://git-master/r/47773 Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: R3adb92f2a3f3523c1006969a42499263dd0fa6fb
2011-11-30arm: tegra: comms: Intel XMM6260 flashless boot.Michael Hsu
Add baseband power drivers to manage gpio for turning on modem, and re-enumerating modem after modem's boot rom has transferred control to downloaded modem software. BUG 828389 Original-Change-Id: Ide96a28b8f0183d8328751d3b3dec92b8068a3c8 Reviewed-on: http://git-master/r/39435 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rb3d170a5460bff29550d664c3f783134d2a3a41f
2011-11-30arm: tegra: Implement HSIC power management for baseband devices.Seshendra Gadagottu
Add power management for HSIC baseband power module. Currently the power module implemented state handling for L0->L3 and L3->L0 state transitions. BUG 828389 Original-Change-Id: I46b7da66bfa85fac57261ec68668435855739981 Reviewed-on: http://git-master/r/33065 Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Rebase-Id: R2d04847c5dc12db17b49ec62a4e12f061bca29fe