aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/mhi.h
diff options
context:
space:
mode:
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2020-03-24 11:40:45 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-26 15:51:07 +0100
commit3316ab2b45f6bf4797d8d65b22fda3cc13318890 (patch)
tree8cf015a625e9d65ef366b0dff54957639942552f /include/linux/mhi.h
parentmisc: rtsx: set correct pcr_ops for rts522A (diff)
downloadwireguard-linux-3316ab2b45f6bf4797d8d65b22fda3cc13318890.tar.xz
wireguard-linux-3316ab2b45f6bf4797d8d65b22fda3cc13318890.zip
bus: mhi: core: Add support for reading MHI info from device
The MHI register base has several registers used for getting the MHI specific information such as version, family, major, and minor numbers from the device. This information can be used by the controller drivers for usecases such as applying quirks for a specific revision etc... While at it, let's also rearrange the local variables in mhi_register_controller(). Suggested-by: Hemant Kumar <hemantk@codeaurora.org> Reviewed-by: Jeffrey Hugo <jhugo@codeaurora.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20200324061050.14845-3-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/mhi.h')
-rw-r--r--include/linux/mhi.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/mhi.h b/include/linux/mhi.h
index d83e7772681b..ad1996001965 100644
--- a/include/linux/mhi.h
+++ b/include/linux/mhi.h
@@ -310,6 +310,10 @@ struct mhi_controller_config {
* @sw_ev_rings: Number of software event rings
* @nr_irqs_req: Number of IRQs required to operate (optional)
* @nr_irqs: Number of IRQ allocated by bus master (required)
+ * @family_number: MHI controller family number
+ * @device_number: MHI controller device number
+ * @major_version: MHI controller major revision number
+ * @minor_version: MHI controller minor revision number
* @mhi_event: MHI event ring configurations table
* @mhi_cmd: MHI command ring configurations table
* @mhi_ctxt: MHI device context, shared memory between host and device
@@ -348,6 +352,15 @@ struct mhi_controller_config {
* Fields marked as (required) need to be populated by the controller driver
* before calling mhi_register_controller(). For the fields marked as (optional)
* they can be populated depending on the usecase.
+ *
+ * The following fields are present for the purpose of implementing any device
+ * specific quirks or customizations for specific MHI revisions used in device
+ * by the controller drivers. The MHI stack will just populate these fields
+ * during mhi_register_controller():
+ * family_number
+ * device_number
+ * major_version
+ * minor_version
*/
struct mhi_controller {
struct device *cntrl_dev;
@@ -375,6 +388,10 @@ struct mhi_controller {
u32 sw_ev_rings;
u32 nr_irqs_req;
u32 nr_irqs;
+ u32 family_number;
+ u32 device_number;
+ u32 major_version;
+ u32 minor_version;
struct mhi_event *mhi_event;
struct mhi_cmd *mhi_cmd;