Merge tag 'for-linus-5.12b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / include / linux / mhi.h
index ece53a2..d26acc8 100644 (file)
@@ -279,7 +279,7 @@ struct mhi_controller_config {
        u32 num_channels;
        const struct mhi_channel_config *ch_cfg;
        u32 num_events;
-       const struct mhi_event_config *event_cfg;
+       struct mhi_event_config *event_cfg;
        bool use_bounce_buf;
        bool m2_no_db;
 };
@@ -347,12 +347,14 @@ struct mhi_controller_config {
  * @unmap_single: CB function to destroy TRE buffer
  * @read_reg: Read a MHI register via the physical link (required)
  * @write_reg: Write a MHI register via the physical link (required)
+ * @reset: Controller specific reset function (optional)
  * @buffer_len: Bounce buffer length
  * @index: Index of the MHI controller instance
  * @bounce_buf: Use of bounce buffer
  * @fbc_download: MHI host needs to do complete image transfer (optional)
  * @pre_init: MHI host needs to do pre-initialization before power up
  * @wake_set: Device wakeup set flag
+ * @irq_flags: irq flags passed to request_irq (optional)
  *
  * Fields marked as (required) need to be populated by the controller driver
  * before calling mhi_register_controller(). For the fields marked as (optional)
@@ -437,6 +439,7 @@ struct mhi_controller {
                        u32 *out);
        void (*write_reg)(struct mhi_controller *mhi_cntrl, void __iomem *addr,
                          u32 val);
+       void (*reset)(struct mhi_controller *mhi_cntrl);
 
        size_t buffer_len;
        int index;
@@ -444,6 +447,7 @@ struct mhi_controller {
        bool fbc_download;
        bool pre_init;
        bool wake_set;
+       unsigned long irq_flags;
 };
 
 /**
@@ -681,6 +685,13 @@ enum mhi_ee_type mhi_get_exec_env(struct mhi_controller *mhi_cntrl);
  */
 enum mhi_state mhi_get_mhi_state(struct mhi_controller *mhi_cntrl);
 
+/**
+ * mhi_soc_reset - Trigger a device reset. This can be used as a last resort
+ *                to reset and recover a device.
+ * @mhi_cntrl: MHI controller
+ */
+void mhi_soc_reset(struct mhi_controller *mhi_cntrl);
+
 /**
  * mhi_device_get - Disable device low power mode
  * @mhi_dev: Device associated with the channel