Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 May 2023 01:01:03 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 047298203fc3 - main - LinuxKPI: qcom: update qmi and mhi
Message-ID:  <202305200101.34K1136b077347@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=047298203fc3bc2b290f44b9531a7b7d553fe9b7

commit 047298203fc3bc2b290f44b9531a7b7d553fe9b7
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-05-20 00:50:10 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-05-20 00:57:10 +0000

    LinuxKPI: qcom: update qmi and mhi
    
    Update qcom QMI and MHI bits in order to keep an upcoming driver
    compiling.
    
    MFC after:      10 days
---
 sys/compat/linuxkpi/common/include/linux/mhi.h      | 21 +++++++++++++++++++--
 .../linuxkpi/common/include/linux/soc/qcom/qmi.h    | 16 ++++++++--------
 2 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/mhi.h b/sys/compat/linuxkpi/common/include/linux/mhi.h
index 3d3965d3f42a..427ac626f494 100644
--- a/sys/compat/linuxkpi/common/include/linux/mhi.h
+++ b/sys/compat/linuxkpi/common/include/linux/mhi.h
@@ -1,7 +1,7 @@
 /*-
  * SPDX-License-Identifier: BSD-2-Clause
  *
- * Copyright (c) 2022 Bjoern A. Zeeb
+ * Copyright (c) 2022-2023 Bjoern A. Zeeb
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,6 +40,14 @@
 
 enum mhi_callback {
 	MHI_CB_SYS_ERROR,
+	MHI_CB_BW_REQ,
+	MHI_CB_EE_MISSION_MODE,
+	MHI_CB_EE_RDDM,
+	MHI_CB_FATAL_ERROR,
+	MHI_CB_IDLE,
+	MHI_CB_LPM_ENTER,
+	MHI_CB_LPM_EXIT,
+	MHI_CB_PENDING_DATA,
 };
 
 struct mhi_channel_config {
@@ -71,6 +79,7 @@ struct mhi_controller {
 	const char			*fw_image;
 
 	bool				fbc_download;
+	size_t				rddm_size;
 	size_t				sbl_size;
 	size_t				seg_len;
 	size_t				reg_len;
@@ -130,10 +139,11 @@ mhi_unregister_controller(struct mhi_controller *mhi_ctrl)
 
 /* -------------------------------------------------------------------------- */
 
-static __inline void
+static __inline int
 mhi_device_get_sync(struct mhi_device *mhi_dev)
 {
 	/* XXX TODO */
+	return (-1);
 }
 
 static __inline void
@@ -151,6 +161,13 @@ mhi_prepare_for_power_up(struct mhi_controller *mhi_ctrl)
 	return (0);
 }
 
+static __inline int
+mhi_sync_power_up(struct mhi_controller *mhi_ctrl)
+{
+	/* XXX TODO */
+	return (0);
+}
+
 static __inline int
 mhi_async_power_up(struct mhi_controller *mhi_ctrl)
 {
diff --git a/sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h b/sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h
index fc7cfc0480a9..765398557ed5 100644
--- a/sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h
+++ b/sys/compat/linuxkpi/common/include/linux/soc/qcom/qmi.h
@@ -1,7 +1,7 @@
 /*-
  * SPDX-License-Identifier: BSD-2-Clause
  *
- * Copyright (c) 2022 Bjoern A. Zeeb
+ * Copyright (c) 2022-2023 Bjoern A. Zeeb
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -67,7 +67,7 @@ struct qmi_elem_info {
 	enum soc_qcom_qmi_array_type		array_type;
 	uint8_t					tlv_type;
 	uint32_t				offset;
-	struct qmi_elem_info			*ei_array;
+	const struct qmi_elem_info		*ei_array;
 };
 
 struct qmi_response_type_v01 {
@@ -84,10 +84,10 @@ struct qmi_service {
 };
 
 struct qmi_msg_handler {
-	uint32_t		type;
-	uint32_t		msg_id;
-	struct qmi_elem_info	*ei;
-	size_t			decoded_size;
+	uint32_t				type;
+	uint32_t				msg_id;
+	const struct qmi_elem_info		*ei;
+	size_t					decoded_size;
 	void	(*fn)(struct qmi_handle *, struct sockaddr_qrtr *, struct qmi_txn *, const void *);
 };
 
@@ -140,7 +140,7 @@ qmi_handle_release(struct qmi_handle *handle)
 
 static __inline int
 qmi_send_request(struct qmi_handle *handle, void *x, struct qmi_txn *txn,
-    uint32_t msd_id, size_t len, struct qmi_elem_info *ei, void *req)
+    uint32_t msd_id, size_t len, const struct qmi_elem_info *ei, void *req)
 {
 
 	/* XXX TODO */
@@ -156,7 +156,7 @@ qmi_txn_cancel(struct qmi_txn *txn)
 
 static __inline int
 qmi_txn_init(struct qmi_handle *handle, struct qmi_txn *txn,
-    struct qmi_elem_info *ei, void *resp)
+    const struct qmi_elem_info *ei, void *resp)
 {
 
 	/* XXX TODO */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202305200101.34K1136b077347>