From 047298203fc3bc2b290f44b9531a7b7d553fe9b7 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Sat, 20 May 2023 00:50:10 +0000 Subject: [PATCH] LinuxKPI: qcom: update qmi and mhi Update qcom QMI and MHI bits in order to keep an upcoming driver compiling. MFC after: 10 days --- .../linuxkpi/common/include/linux/mhi.h | 21 +++++++++++++++++-- .../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 3d3965d3f42..427ac626f49 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 fc7cfc0480a..765398557ed 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 */