summaryrefslogtreecommitdiff
path: root/drivers/esoc
AgeCommit message (Collapse)Author
2018-04-17esoc: Use standard reset time for mdm9x55 atomic resetGustavo Solaira
The atomic reset command uses mdelay so it should use the standard reset time of 203ms otherwise the system can get locked for many seconds. Change-Id: I476efac0a2244101f0f5e4d046582c5746dbead6 Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2018-04-17esoc: Only force power off if the graceful shutdown failsGustavo Solaira
Force power off should only be used in case the graceful shutdown fails otherwise the esoc will be resetted even when not needed. Change-Id: I2180e36a10bb325e55a8782554c71165fa7a6bee Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2017-12-05esoc: Convert timeout for reset and shutdown to device tree optionGustavo Solaira
Convert the timeout and shutdown intervals to be read from the device tree and set default values in case no option is provided. Change-Id: I90efb5910ddf1667db5cde79f46a4a94da1668ec Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2017-11-21esoc: Bring mdm9x55 in sync with mdm9x45 functionalityGustavo Solaira
Some options available for mdm9x45 esocs were missing from the mdm9x55 setup hardware function. Add those to bring them in sync. The way a power down is performed on mdm9x55 is also changed to be similar to mdm9x45. Change-Id: I14b0e77d08cb319581cfd02304eba8351c378306 Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2017-07-23esoc: Fix irq unbalance wake disable warningArun KS
Power management irq wakeup mode is by default disabled. Calling irq_set_irq_wake() on a disabled irq causes warning. Remove irq_set_irq_wake() function from mdm_enable/disable_irqs functions and set it once in probe. Change-Id: Ib7f49ae101e6dc04790649d408c1722df8da8bd2 Signed-off-by: Arun KS <arunks@codeaurora.org>
2017-05-02esoc: mdm-4x: Separate out callback function for 9x45Arun KS
Reset and power off timing is different. Hence need a separate callback function. Change-Id: I9714a4449b1fbeab84017da4be17f5ca2cb6cab6 Signed-off-by: Arun KS <arunks@codeaurora.org>
2017-05-02esoc: Add provision to handle shutdown request in userspaceArun KS
In certain scenarios, modem shutdown requests are handled in userspace. Enhance request engine of esoc driver to send shutdown requests to userspace. Also, during a shutdown, avoid setting status to 0, if line is not a power source. There can be multiple mdms monitoring status line. This can otherwise be misinterpreted as an unexpected reset by other mdms. Change-Id: I9c20a86e76f892cc61dbfb814202b26e5cce3e96 Signed-off-by: Arun KS <arunks@codeaurora.org> Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2017-05-02esoc: Update SSR driver with crash statusArun KS
During an unexpected reset or error fatal, update the crash status to SSR. This is important for the drivers listening at SSR related kernel notifier calls, where crash status is also passed as a data payload. Change-Id: Ide0634d0139a84b5988fa87e709877f3028029ef Signed-off-by: Arun KS <arunks@codeaurora.org>
2017-04-30esoc: mdm-4x: Add support for mdm9x45 and apq8096Arun KS
Add mdm_ops for mdm9x45 and apq8064. Change-Id: Iea167175b9bd35a515d15a72897947a889093c03 Signed-off-by: Arun KS <arunks@codeaurora.org> Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2017-04-30esoc: Add support for autobootArun KS
Some of the external SoC are flash based and can boot independently. Extend esoc driver to support such auto boot esocs. This patch also adds support for primary esoc. Primary esoc are esoc that control secondary esoc such as modems. Primary esoc have control over reset/poweroff of secondary esoc. Secondary esoc don't have control over reset/poweroff of primary esoc. In general modems are considered as secondary esoc while apps processor is considered as primary esoc. Change-Id: Id02417fcd122ac108cf75d3381ee7955f0f8f783 Signed-off-by: Arun KS <arunks@codeaurora.org> Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2017-04-30esoc: Add err_fatal signal status to clink_opsArun KS
Auto_boot esoc devices can boot and crash before esoc driver comes up. But there is no way for the user space code to know that it has crashed by looking at status line alone. Hence, create a new ioctl entry to export status of err_fatal line to user space. Change-Id: Ie7d6115c749d4c63f06aefca29ba457d38eccc7f Signed-off-by: Arun KS <arunks@codeaurora.org>
2017-04-30esoc: Fix integration with SSR driverArun KS
SSR driver expects subsystem descriptor device type to be struct platform_device, whereas esoc driver is passing a struct device instead. This results in a NULL pointer crash during platform_get_irq in subsystem_restart.c. Fix esoc driver to pass platform_device. Change-Id: I93d02623cb7ac14ea3171c3792a4c52c73a74dea Signed-off-by: Arun KS <arunks@codeaurora.org> Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2017-04-26esoc: remove reduntant return_esoc_udev() fn callMohammed Khajapasha
Remove reduntant return_esoc_udev() function call while deleting a esoc device from an esoc clink. Change-Id: Id2e812addb1bd8af0e23c4182427adbee9731a58 Signed-off-by: Mohammed Khajapasha <mkhaja@codeaurora.org>
2017-03-29esoc: Fix user space corruption due to wrong data typeArun KS
ESOC IOCTL was designed to transfer data of type unsigned int, but was pushing data of unsigned long type. Hence causing data corruption in user space. Fix this by changing put user to use unsigned int. Change-Id: Ia233eedd76f1ca1ec3036889d6764e568ee975dd Signed-off-by: Arun KS <arunks@codeaurora.org>
2017-03-24esoc: add support for additonal physical link infoSatya Durga Srinivasu Prabhala
Some of the device configurations support multiple external SOCs. To differentiate physical links, add support for additonal info about the physical link. CRs-Fixed: 2024578 Change-Id: If71bf23d798f8bf0b6594a686415fe9b806e4226 Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2017-03-15esoc: Fix potential NULL pointer dereferencesSatya Durga Srinivasu Prabhala
Update checks to avoid potential NULL pointer dereferences which are reported in static analysis. Change-Id: Ibb9db8fb44f9e27da9e531b762dfddd9725c1b4f Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2017-02-27esoc: Add check for possible null pointer returnsHanumant Singh
The call to kasprintf() can fail, with a failure to allocate memory. Handle the condition appropriately. CRs-Fixed: 1014400 Change-Id: I83d3a6c8bdfd7a104b88a3bedd50f49faeecd97a Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2017-02-27esoc: mdm-dbg: Add a debug request engine for external mdmHanumant Singh
Add a stub request engine for debugging external modem. Change-Id: I6360831f21f83fcd25df72492b1d57b30a7d2197 Signed-off-by: Hanumant Singh <hanumant@codeaurora.org> Signed-off-by: Bruce Levy <blevy@codeaurora.org> [satyap@codeaurora.org: fix checkpatch issue] Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-25esoc: Add debug engine for external modems.Hanumant Singh
Modifies the behavior of the command engine to mask out certain commands/notifications sent to the external mdm, for the purposes of debugging the external mdm. Change-Id: Iff35fd87f6d66849f6ec7d2924e1547400967c4e Signed-off-by: Hanumant Singh <hanumant@codeaurora.org> Signed-off-by: Bruce Levy <blevy@codeaurora.org>
2016-03-22esoc: Snapshot esoc driversAbhimanyu Kapur
Snapshot esoc components, headers and UAPI headers from msm-3.18@0922caf50f22e751a05e (Merge "usb: dwc3-msm: Fix incorrect roles with multiple instances") Change-Id: I55e7ea4359c1f5b855f082e66d5816316da2fd48 Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>