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>
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>
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>
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>
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>
Reset and power off timing is different. Hence need a
separate callback function.
Change-Id: I9714a4449b1fbeab84017da4be17f5ca2cb6cab6
Signed-off-by: Arun KS <arunks@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>