summaryrefslogtreecommitdiff
path: root/include/linux/mhi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mhi.h')
-rw-r--r--include/linux/mhi.h66
1 files changed, 17 insertions, 49 deletions
diff --git a/include/linux/mhi.h b/include/linux/mhi.h
index 059dc94d20bb..fb3ba639f4f8 100644
--- a/include/linux/mhi.h
+++ b/include/linux/mhi.h
@@ -86,16 +86,32 @@ enum mhi_ch_type {
};
/**
+ * struct mhi_buf - MHI Buffer description
+ * @buf: Virtual address of the buffer
+ * @name: Buffer label. For offload channel, configurations name must be:
+ * ECA - Event context array data
+ * CCA - Channel context array data
+ * @dma_addr: IOMMU address of the buffer
+ * @len: # of bytes
+ */
+struct mhi_buf {
+ void *buf;
+ const char *name;
+ dma_addr_t dma_addr;
+ size_t len;
+};
+
+/**
* struct image_info - Firmware and RDDM table
* @mhi_buf: Buffer for firmware and RDDM table
* @entries: # of entries in table
*/
struct image_info {
- struct mhi_buf *mhi_buf;
/* private: from internal.h */
struct bhi_vec_entry *bhi_vec;
/* public: */
u32 entries;
+ struct mhi_buf mhi_buf[] __counted_by(entries);
};
/**
@@ -215,7 +231,6 @@ enum mhi_db_brst_mode {
* @lpm_notify: The channel master requires low power mode notifications
* @offload_channel: The client manages the channel completely
* @doorbell_mode_switch: Channel switches to doorbell mode on M0 transition
- * @auto_queue: Framework will automatically queue buffers for DL traffic
* @wake-capable: Channel capable of waking up the system
*/
struct mhi_channel_config {
@@ -232,7 +247,6 @@ struct mhi_channel_config {
bool lpm_notify;
bool offload_channel;
bool doorbell_mode_switch;
- bool auto_queue;
bool wake_capable;
};
@@ -491,22 +505,6 @@ struct mhi_result {
};
/**
- * struct mhi_buf - MHI Buffer description
- * @buf: Virtual address of the buffer
- * @name: Buffer label. For offload channel, configurations name must be:
- * ECA - Event context array data
- * CCA - Channel context array data
- * @dma_addr: IOMMU address of the buffer
- * @len: # of bytes
- */
-struct mhi_buf {
- void *buf;
- const char *name;
- dma_addr_t dma_addr;
- size_t len;
-};
-
-/**
* struct mhi_driver - Structure representing a MHI client driver
* @probe: CB function for client driver probe function
* @remove: CB function for client driver remove function
@@ -721,12 +719,6 @@ enum mhi_state mhi_get_mhi_state(struct mhi_controller *mhi_cntrl);
void mhi_soc_reset(struct mhi_controller *mhi_cntrl);
/**
- * mhi_device_get - Disable device low power mode
- * @mhi_dev: Device associated with the channel
- */
-void mhi_device_get(struct mhi_device *mhi_dev);
-
-/**
* mhi_device_get_sync - Disable device low power mode. Synchronously
* take the controller out of suspended state
* @mhi_dev: Device associated with the channel
@@ -750,18 +742,6 @@ void mhi_device_put(struct mhi_device *mhi_dev);
int mhi_prepare_for_transfer(struct mhi_device *mhi_dev);
/**
- * mhi_prepare_for_transfer_autoqueue - Setup UL and DL channels with auto queue
- * buffers for DL traffic
- * @mhi_dev: Device associated with the channels
- *
- * Allocate and initialize the channel context and also issue the START channel
- * command to both channels. Channels can be started only if both host and
- * device execution environments match and channels are in a DISABLED state.
- * The MHI core will automatically allocate and queue buffers for the DL traffic.
- */
-int mhi_prepare_for_transfer_autoqueue(struct mhi_device *mhi_dev);
-
-/**
* mhi_unprepare_from_transfer - Reset UL and DL channels for data transfer.
* Issue the RESET channel command and let the
* device clean-up the context so no incoming
@@ -777,18 +757,6 @@ int mhi_prepare_for_transfer_autoqueue(struct mhi_device *mhi_dev);
void mhi_unprepare_from_transfer(struct mhi_device *mhi_dev);
/**
- * mhi_queue_dma - Send or receive DMA mapped buffers from client device
- * over MHI channel
- * @mhi_dev: Device associated with the channels
- * @dir: DMA direction for the channel
- * @mhi_buf: Buffer for holding the DMA mapped data
- * @len: Buffer length
- * @mflags: MHI transfer flags used for the transfer
- */
-int mhi_queue_dma(struct mhi_device *mhi_dev, enum dma_data_direction dir,
- struct mhi_buf *mhi_buf, size_t len, enum mhi_flags mflags);
-
-/**
* mhi_queue_buf - Send or receive raw buffers from client device over MHI
* channel
* @mhi_dev: Device associated with the channels