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>
In order to bind devices with variable PCIe device IDs with same device
tree node, make PCIe device ID optional parameter in device tree node.
If PCIe device ID not specified in device tree, any device can be bind
with the node.
CRs-Fixed: 2040899
Change-Id: Iaedcb40db15fa0e8c5c30eb147c904a10cd7569d
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
MHI is not supported by all targets, however many MHI client drivers
have a common driver that include MHI APIs. Create dummy APIs such
that even if MHI not present, does not cause any compile errors.
CRs-Fixed: 2053159
Change-Id: I427d925a658518d230a1d14df0cf27a7b19f207e
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
Add support for subsystem restart and shutdown processing
for slave mode and master mode.
CRs-Fixed: 1097560
Change-Id: I8c60605d202d38a7a8f8fb587a179f95ec402692
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
MHI host is not always the bus master. Add support to
operate on slave mode.
CRs-Fixed: 1095436
Change-Id: I4af92c8171cf9ba38267afa753cec33f291d55eb
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
Add support for MHI host to directly upload firmware
to compatible devices using MHI protocol.
CRs-Fixed: 1095436
Change-Id: Iff7043f1f9afc4824edeaeccc46ed427ce7ee291
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
In order to support multiple MHI devices connected
to same host we have, re-organize struct mhi_device_ctxt
such that all information related to device is included inside
struct mhi_device_ctxt. Created an abstract power management
layer to operate MHI in bus master, and slave mode. PCIe bus,
device, slot are extracted from DT to identify physical device.
CRs-Fixed: 1086301
Change-Id: I27a12b7412db75e4843794d80146ca7475b02fdc
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
In order to support subsystem restart, and
link down recovery, redesign mhi power
management state machine.
CRs-Fixed: 1081654
Change-Id: I3005b829bfdea1d3e9f086676c446b62b5d30d0b
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
Add support for new MHI hardware channel 102 to be
use by MHI clients as ADPL channel.
CRs-Fixed: 1027069
Change-Id: Ib3c2019fc269064d097bb7f40f01d4580e63a603
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
Set the correct DMA mask on the platform device to
avoid bounce buffering from the default 32 bit mask.
Change-Id: I7e201e83fd21b0f0a6f57754a3b6f3eded9be58f
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Signed-off-by: Tony Truong <truong@codeaurora.org>
Replace the MHI defined enum for return codes with
kernel standard return codes. This greatly improves readability
and parsing of errors by userspace clients.
Change-Id: Ica47f8c3a149f23243b5fb6a4aabcdc0a36b1535
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Signed-off-by: Tony Truong <truong@codeaurora.org>
Enable clients to queue virtual buffers, thus leaving
all the DMA operations to MHI.
Change-Id: I824d2f387b1a21d322ca0628963995824227bd76
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Parse MHI ring information from DT instead of statically allocating
data structure.
This is necessary as different platforms support different
configurations.
Change-Id: I59cd660459d627f93479a11257653611070fd3a4
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>
Enable the MHI core driver for communication
between host and device using PCIe as an interconnect
and supporting MHI as the communication protocol.
The driver exposes several kernel space APIs
for use by other kernel entities to interface to
the PCIe device over MHI.
APIs for read and write and other notifications
are supported by this MHI driver.
Support for full power management and device reset
is also included.
CRs-Fixed: 689329
Change-Id: Ibc2fd7c2d5689001485f71b1133ada2c4ca236a9
Signed-off-by: Andrei Danaila <adanaila@codeaurora.org>