Commit Graph

41 Commits

Author SHA1 Message Date
Hanumant Singh 2bd9ae689f esoc: mdm-4x: Correct copyright information
Fix the copyright year information.

Change-Id: Id8c8d870fc67bf28d934b6813c29eb9349dd596c
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2015-05-21 12:52:15 -07:00
Hanumant Singh e754c16324 esoc: mdm-4x: Add support to send shutdown request
The shutdown request must be sent from mdm driver
to prevent a race condition between the request being
processed by the mdm followed by its reset and the
APQ disabling the monitoring the mdms status line.
If the request was sent by SSR, in some cases, the mdm
would shutdown, before APQ could disable the status
interrupt, and it would be interpreted by APQ as
an erroneous hard reset of the md.

Change-Id: I413df861ff5ef413a84fdf4778829e8af0cf8df5
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2015-04-06 15:02:06 -07:00
Deepak Katragadda febe7fb69b qcom: ssr: Send sysmon shutdown command during subsystem shutdown
When the ref-count for a subsystem goes down to 0, i.e.
there are no current clients for it, the subsystem is
shutdown by calling the shutdown callbacks registered
by the subsystem driver.
Before doing so, send the sysmon shutdown command to
the subsystem so that it could take care of any cleanup
required at its end.

Change-Id: I36559de328581b9c856e042eadcf45b02e2c764b
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2014-07-24 09:42:47 -07:00
Deepak Katragadda 9250c4ca2e qcom: sysmon: Replace sending strings as parameters to sysmon APIs
Currently, all the sysmon APIs use string names to derive the
information about subsystems that the events should be sent to.
To do so, a list of subsystems that support sysmon are stored
in a static array. This approach makes sysmon break when the
name of a subsystem changes or when new subsystems are added.

Instead, store the sysmon pdev id information that is read
from the subsystem's dt nodes in the subsys descriptor. These
descriptors are then passed as parameters to the sysmon APIs.

Change-Id: I0c0b68412acb4913e823586931a7fd0b8f03f15b
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2014-07-24 09:28:00 -07:00
Hanumant Singh a109cb6524 esoc: mdm: Wait for request engine registration
Any commands sent to the external soc, prior to request
engine registration can result in lost requests. Wait
for request engine registration before initiating any
command engine operations.

Change-Id: I24cebb70c941df8c4b421175b6e5f6ea40228ba6
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-07-10 19:52:12 -07:00
Hanumant Singh 7f63e1a70b esoc: Add engine registration notifications
Ensure that communication with external SOC can be
initiated after engine registration is completed.

Change-Id: I8914b2bc08ad21d7ffb976351a424a8638df9134
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-07-10 19:52:12 -07:00
Hanumant Singh d2e82524cb esoc: mdm-4x: Remove boot and debug timeouts
Add explict boot fail event to report a failure to
boot the external soc.
Allow the external soc to send notification in case
it reaches unexpected state.
Instead of relying on timeout, the request engine
(userspace) will determine the state of the data link
to the external modem and inform the driver if boot
or debug execution failed.

Change-Id: I490698d5615299c29aa4b161c01739f627cd9d2f
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-06-23 11:28:39 -07:00
Deepak Katragadda c5d2d30ea6 esoc: Add support to allow SSR framework to read esoc dt node
For a subsystem to register with the SSR framework, a
subsys_register call is made by the driver pertaining
to the subsystem. The subsys descriptor parameter that
is passed with this call is expected to have it's device
of_node structure to be filled for the subsystem_restart
driver to access certain information about the subsystem.

Fill the of_node structure for esoc. This change is needed
for the subsystem_restart driver to read the ssctl instance
id property for esoc.

Change-Id: Ic8eef38390ac423210cbddff76fab51b09f331b6
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2014-06-10 11:02:33 -07:00
Hanumant Singh ea28e34763 esoc: mdm-4x: Configure errfatal and status interrupts as wakeup irq
In case of power collapse scenarios, wakeup APQ to catch crashes on
the external mdm.

Change-Id: I6e7a0f0252611fa43f92fed0fdaf6efb0a9c83ca
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-06-03 16:00:17 -07:00
Linux Build Service Account 276d0b24f8 Merge "esoc: mdm-4x: Deassert gpios before lowering PON signal" 2014-06-01 18:08:40 -07:00
Linux Build Service Account ba3f133570 Merge "esoc: mdm-4x: Pmic shut down needs to be 400ms" 2014-05-29 17:02:00 -07:00
Hanumant Singh 339c16cba3 esoc: mdm-4x: Deassert gpios before lowering PON signal
Prevent backpowering of the 9k pmic by lowering all IPC
gpios prior to deasserting PON.

Change-Id: I34c5209711b32ebf11e814721406c4897cdb95ee
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-05-28 15:17:05 -07:00
Hanumant Singh 471bf3dc39 esoc: mdm-4x: Pmic shut down needs to be 400ms
legacy value of 4s not applicable to mdm9x25 or mdm9x35

Change-Id: I19230b60f60bb4aca29d45d46144974394186eb4
CRs-Fixed: 669064
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-05-28 12:23:50 -07:00
Deepak Katragadda 6e769ad179 qcom: sysmon: Replace the use of enums with strings in sysmon API
Currently, the sysmon_send_shutdown and sysmon_get_reason
APIs expect an enum that identifies a subsystem. Instead,
use a string with the name with which these subsystems have
registered with the SSR framework.

Change-Id: Ie57fe2899f585d07dc8d57bed2dbb91f079a3200
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
2014-05-21 13:46:59 -07:00
Ameya Thakur 2634d03a7f esoc: mdm: Reset esoc only if the system is resetting
We now cold reset the esoc only if the system is resetting.
Earlier we would reset it in the shut down flow as well.
This was causing the mdm to get powered on again since it
had already been shut down at this point.

Change-Id: I3041f3e4983f8c29212cd48a52fec3b8d2c90f93
Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
2014-04-11 16:15:26 -07:00
Hanumant Singh b59527d39e esoc: Fix bug in fifo allocation
Request fifo reference udef for event fifo as well.

Change-Id: I0d3e5b0405f76a0ba6596c8de90a31f44bca11b0
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-03-28 12:02:03 -07:00
Hanumant Singh 5a08ef7e93 esoc: mdm: Remove power off step from debug mode
After debug is done, a complete power down of the modem
will wipe out the crash cause information.
Remove the power down step and rely on a reset during the
subsequent power up.

Change-Id: Ic3157d5a8d22f7b16a6ecc1fa325d2127d8aafca
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-03-20 10:30:34 -07:00
Linux Build Service Account e6719d6bea Merge "esoc: mdm-4x: Always poweroff the modem using AP2M_PON" 2014-03-14 07:44:38 -07:00
Hanumant Singh 8c5d81e434 esoc: mdm-4x: Always poweroff the modem using AP2M_PON
In case of a shutdown of the modem, even if we see the mdm
initiate a shutdown on its own, we need to explicitly power
off the mdm from APQ end. If the AP2M_PON remains high,
the mdm will power back on.

Change-Id: I9a2e6dc84667005178add3303e0ce399bd54cd61
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-03-12 18:16:13 -07:00
Hanumant Singh 77670781c3 esoc: Add esoc link type to esoc descriptor
Allow clients access to external soc link type
information.

CRs-Fixed: 627764
Change-Id: I6273d11c455f322bc5448ffd847c1d44ed18cb17
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-03-10 11:53:19 -07:00
Linux Build Service Account 365dfd4418 Merge "esoc: Fix bugs in esoc_client registration" 2014-03-05 08:40:09 -08:00
Hanumant Singh 41418b0df3 esoc: Fix bugs in esoc_client registration
Fix incorrect esoc name descriptor from subsys_esocn
to esocn.
Add stub definition for registration and unregister
in case CONFIG_ESOC_CLIENT is not set.
Force probe deferral if requested external soc
has not yet probed.

Change-Id: I10a19c9f5eb0a1483b8ebf930e67f94a70c76151
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-03-01 13:18:03 -08:00
Hanumant Singh 2613adda44 esoc: mdm-4x: Handle primary soc reset
Force cold reset of mdm in case of a restart or poweroff
of the primary soc.

Change-Id: I786f867d490486a9ec08ab90136ffa890db7d386
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-02-25 20:38:19 -08:00
Joonwoo Park 5157332245 esoc: mdm-4x: handle atomic context better
Function mdm_notify() is executed in atomic context when kernel crash so
using jiffies and sleep are not proper way.  Use local_clock() and mdelay()
instead.  Also reduce timeout to 3 seconds per mdm's spec.

CRs-fixed: 612545
Change-Id: I557ec08d5960c9c7caa5a9d4d15e79f70eedd8b0
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2014-02-25 16:26:04 -08:00
Hanumant Singh 658e9de055 esoc: mdm-4x: Add coresight support for external modem.
Allow modem debugging using CTI pulses.

Change-Id: I092f4e8728aceb1fcb6712425ca930d8bc3fa14b
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-02-12 16:16:22 -08:00
Linux Build Service Account 47fca56c0f Merge "esoc: Add support for client notifications" 2014-02-11 14:00:48 -08:00
Hanumant Singh 1297c4a630 esoc: Add support for client notifications
Allow clients to register for external soc events.

Change-Id: If96ec725ecddfb548d7e680b09bfd68be573c11c
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-02-10 00:31:27 -08:00
Matt Wagantall 5054ff49f2 esoc: mdm-4x: Remove illegal msleep() from mdm_notify()
Code in mdm_notify() cannot sleep since it's called from an atomic
context in the panic path. For simplicity, just remove the delay
and busy-loop since, during panic, there's nothing else the CPU
could be spending cycles on anyway.

This avoids warnings like:
  bad: scheduling from the idle thread!
  ...
  (msleep+0x14/0x20) from [<c08f9d94>] (mdm_notify+0x134/0x190)
  (mdm_notify+0x134/0x190) from [<c08fa298>] (mdm_crash_shutdown+0x1c/0x20)
  (mdm_crash_shutdown+0x1c/0x20) from [<c023f500>] (subsys_panic+0x18/0x20)
  (subsys_panic+0x18/0x20) from [<c05a98a8>] (bus_for_each_dev+0x50/0x88)
  (bus_for_each_dev+0x50/0x88) from [<c023f674>] (ssr_panic_handler+0x18/0x28)
  (ssr_panic_handler+0x18/0x28) from [<c0b2dea0>] (notifier_call_chain+0x38/0x68)
  (notifier_call_chain+0x38/0x68) from [<c0b2df04>] (__atomic_notifier_call_chain+0x34/0x44)
  (__atomic_notifier_call_chain+0x34/0x44) from [<c0b2df28>] (atomic_notifier_call_chain+0x14/0x18)
  (atomic_notifier_call_chain+0x14/0x18) from [<c0b217a4>] (panic+0xac/0x1f0)
  (panic+0xac/0x1f0) from [<c020a028>] (die+0x290/0x2f4)

Change-Id: I2fbc99fd907d25a9894e747e653c06523c52ad6b
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2014-02-06 20:05:17 -08:00
Vikram Mulukutla bd91122223 msm: Move PIL and SSR headers
Architectural changes in the ARM Linux kernel require moving
some MSM specific headers related to the peripheral image
loader and the subsystem restart drivers to include/soc/qcom.

subsystem_restart.h is used by external modules and thus
leave a proxy in include/soc/qcom for now. Once external modules
switch over to this new include path, the header in the
old location can be deleted.

Change-Id: I0680dc34481d09170ce2609259c5318a9e6dbf37
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2014-01-27 19:08:06 -08:00
Ameya Thakur 26da8e647e esoc: mdm-4x: Add support for boot done notification
We now return from the power up function only once we recieve a
BOOT_DONE notification from the mdm-helper. This is to ensure
that when we return from power on the esoc is fully accessible
to the client.

Change-Id: I6da8f7461fab33e4a7bde7c05c551deaf5808886
Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
2014-01-24 17:11:04 -08:00
Hanumant Singh 5e64feff2f esoc: mdm-4x: Add support for external mdm9x35
Mdm9x35 has more than one interface for communication.
The interface to be used is specified with the help of a gpio.

Change-Id: I09723e1c8a6e2e374a9b2166b655e8c4a349ca2d
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-01-14 21:09:24 -08:00
Hanumant Singh b42487f1ff esoc: mdm: Add command engine for mdm9x35
Use a common command engine for mdm9x25 and mdm9x35.

Change-Id: I8c02ac07bdf77b801668e795ef89a3fa35ab2da7
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-01-14 11:54:19 -08:00
Hanumant Singh 9fd2722988 esoc: Allow esoc driver binding with multiple external socs
Add support to match and bind a given esoc driver on the primary soc
with multiple external socs in case of a family of external socs
with similar characteristics.

Change-Id: Ib8eca880a18e88da71e4c610f855acf3e1ce5cef
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-01-14 11:53:15 -08:00
Hanumant Singh 1b6b9c33b8 esoc: mdm-4x: Fix initialization and debug of external mdm
Request for image transfer needs to be send, once request engine
is prepared to handle the request.
Debug of external modem should only be performed if explicitly
requested ie when EXE_DEBUG command is received.

Change-Id: I530f46abffe831c8b607185380bb5422f69d6ccb
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-01-06 19:09:32 -08:00
Hanumant Singh c18438c9db esoc: mdm-4x: Add support for shutdown request
In case of power off command for external modem,
request primary soc to cleanup the interface to the
external modem.

Change-Id: Ie573b3bce2155a67c52f705433ed2485c22bee5e
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2014-01-03 11:05:45 -08:00
Kumar Gala 36771b361f ARM: dts: msm: Change bindings for subsystem dt properties
Rename properties and compatible strings to return to the old
naming convention.

Change-Id: Id22274c31c4be8cfe354810d866640b2ac41ceed
Signed-off-by: Kumar Gala <galak@codeaurora.org>
2013-12-27 13:49:50 -06:00
Hanumant Singh 81bae33b83 esoc: Add support for external modem command engine
Subsystem restart based command engine, to power on/off
and reset the external mode. Additionally enable debug mode
of external modem in case of crashes.

Change-Id: I624fed73db586766574adb33627fb5f0dfe22465
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2013-12-18 18:43:57 -08:00
Hanumant Singh f9338b2b52 esoc: Add control link for external mdm9x25
Control and monitor the state of an external mdm9x25
via gpios.

Change-Id: Idf01e7ae806343952e3c2c23cabc8fa6f71a9fd5
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2013-12-18 18:43:17 -08:00
Hanumant Singh 2f559512d0 esoc: Add back esoc files
Commit f06163e6d0
msm: reap unused kernel files
removes unused files from the kernel tree.
This patch mistakenly removed some of the files
that were merged by
commit 5ad7ffa13d
esoc: Add external soc control framework
We add back the files that were removed from esoc.

Change-Id: I33750fed5272ce2d8e5f4b37347483920a4e8e95
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2013-12-03 11:01:14 -08:00
Ian Maund f06163e6d0 msm: reap unused kernel files
This change removes source files from the kernel tree that
were not being used during make. The list of used files
was generated using an annotated make log and was then
compared with new files added since the public release of
kernel version 3.10.00. New files which were added but
not used have been removed from the tree.

A diff was also run to determine the list of files that had
been modified since the release of kernel version 3.10.00.
These files were then scrubbed based on the current kernel
configuration, removing invalid and unused conditionals.

Some files which support planned functionality or are
useful in debugging have been excluded from this reap.

Change-Id: Ia44a224d3cea7bc78dd45e8a8279860d35d4b008
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2013-11-21 17:45:28 -08:00
Hanumant Singh 5ad7ffa13d esoc: Add external soc control framework
External slave soc can be powered on/off and monitored
for power states and crash events.

Change-Id: I9c3317f798b204b754d612a3115dcd71935b5ef2
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
2013-11-14 14:45:51 -08:00