Only call an SVID handler's disconnect function only if it was
previously connected, i.e. when the state machine had proceeded
received a successful DISCOVER_SVIDs response. This helps to
avoid excessive notification to SVID clients.
While at it, require that .connect and .disconnect callbacks
are supplied during registration. This helps to eliminate NULL
checks each time they are called.
Change-Id: I030153a6b2106a6504ed51b5cb00a27f842e2488
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Add a queue to store messages in the phy_msg_received() callback.
This eliminates the call to flush_work() and allows for more
robust handling of incoming messages especially if they arrive
while the usbpd_sm work function is in progress.
In particular this fixes a bug seen when a REQUEST message is
received just after sending a SRC_CAPABILITIES, but since there
may not be a previous message, flush_work() is not called, and the
end of usbpd_sm() overwrites pd->rx_msg_type and pd->rx_msg_len
to 0. As a result, when usbpd_sm() is run again, it will see no
message and proceed to SRC_HARD_RESET.
Change-Id: I4510f91e7d23ab161517c13702462da4ec8d7a2e
Signed-off-by: Jack Pham <jackp@codeaurora.org>
MSA0 is remapped to HLOS during SSR/PDR for ramdump purposes.
Remap this memory region only after Adrastea is being shutdown, otherwise
Adrastea could still try to access this region resulting in SMMU fault.
CRs-Fixed: 1082630
Change-Id: I490b5679de4cb4837f5ed5d4e40d339e12c8ecc9
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
Taking the pi_lock without disabling interrupts in reset_all_task_stats()
is problematic. In that an interrupt can end up waking a task which in
turn needs the pi_lock again causing a deadlock. Disable interrupts along
with taking the lock to avoid this problem.
Change-Id: If27cb2bb3fcaafa5c8435f3c2e0e4be9b8f1e987
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
The secure buffers does not allow passing offset into the buffer
and hence skip calculation of offset for secure buffers.
Change-Id: I2cd3b87aca032d4c5868cc9db35987213349a337
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
Add device tree bindings document for reboot-mode driver.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Git-commit: 376e27e485cbe9f903369a002d07d5a01225d1d3
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/
Change-Id: Ic0f2a51b5af661fd23576ae5135c920b92f0cdfd
Signed-off-by: Xiaogang Cui <xiaogang@codeaurora.org>
This driver parses the reboot commands like "reboot bootloader"
and "reboot recovery" to get a boot mode described in the
device tree , then call the write interfae to store the boot
mode in some place like special register or sram, which can
be read by the bootloader after system reboot, then the bootloader
can take different action according to the mode stored.
This is commonly used on Android based devices, in order to
reboot the device into fastboot or recovery mode.
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
Tested-by: John Stultz <john.stultz@linaro.org>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Git-commit: 4fcd504edbf7c793325511c2df8dcd083958e28a
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/
Change-Id: Id65f6b9186e7a5209542a380bae31a1d8933b931
Signed-off-by: Wufeng.jiang <wufeng.jiang@codeaurora.org>
Signed-off-by: Xiaogang Cui <xiaogang@codeaurora.org>