According to the PD 2.0 Spec, Section 6.2.1.3, the MessageID
field shall only be incremented upon successful transmission
(meaning GoodCRC was received). Thus, increment the counter
only when pd_phy_write() succeeds.
Change-Id: I73dce5736c473a1f79db9be868442c7941d13c44
Signed-off-by: Jack Pham <jackp@codeaurora.org>
By default IPC Router core uses edge and port specific wakeup sources
which are blocking system suspend in special use cases like streaming
non wakeup sensors data at high speed.
Add dynamic wakeup source enable/disable functionality to acquire the
wakeup source only during the APPS suspend stage.
CRs-Fixed: 2057391
Change-Id: I2a5ea4e2c31432a9dd195c702ef7001b26eed33d
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Prevent pd_phy_write() from sending a TX message if an RX
message IRQ is being handled, or if the RX_TOKEN is set
(indicating a message has just arrived) by returning -EBUSY
to let the upper layer gracefully abort. This helps in cases
(such as compliance testing) in which VDM messages are
received very quickly after one another and the protocol
layer needs to first handle the incoming message.
Change-Id: I3e26d7ff062ff7f51b6c66ab8d078b05749f808a
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Since ErrorRecovery handling requires a spoof disconnect, the
charger driver needs to avoid immediately reapplying the
terminations. Re-use the PROP_PR_SWAP property which ignores
the disconnect. After the 25ms delay, policy engine will
explicitly reset back to DRP.
Also remove the transition to ErrorRecovery from PE_SNK_DISCOVERY
as it is removed in V1.3 of the PD 2.0 specification.
Change-Id: I41f1da293208b6813dfb540a123ee84ac35b4a68
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Move setting of PD_IN_HARD_RESET to the phy_sig_received()
callback in order to inform the charger to ignore the upcoming
VBUS toggle as soon as possible. This will help decrease the
possibility of racing to set the appropriate HW bits while
VBUS turns off and leads to the charger indicating disconnect.
Change-Id: I42cc2969defa48c9987fa4bea64780866861d868
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Add support for bus master to trigger PCIe device into ram dump
mode to collect device ram dump. RDDM capabilities are extended to
support under kernel panic as well.
CRs-Fixed: 2055981
Change-Id: I18f7d5784992df70aafc6e41d248ced3fac37181
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
PCIe linkdown event can trigger anytime. During linkdown event
abort any work MHI host doing that require PCIE link.
CRs-Fixed: 2055975
Change-Id: Idba907c7977594dc08575e0020a7afa4868bc0e4
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>