1*4d49d352SNishad Kamdar /* SPDX-License-Identifier: GPL-2.0 */ 2df2069acSChunfeng Yun /* 3df2069acSChunfeng Yun * mtu3_qmu.h - Queue Management Unit driver header 4df2069acSChunfeng Yun * 5df2069acSChunfeng Yun * Copyright (C) 2016 MediaTek Inc. 6df2069acSChunfeng Yun * 7df2069acSChunfeng Yun * Author: Chunfeng Yun <chunfeng.yun@mediatek.com> 8df2069acSChunfeng Yun */ 9df2069acSChunfeng Yun 10df2069acSChunfeng Yun #ifndef __MTK_QMU_H__ 11df2069acSChunfeng Yun #define __MTK_QMU_H__ 12df2069acSChunfeng Yun 13df2069acSChunfeng Yun #define MAX_GPD_NUM 64 14df2069acSChunfeng Yun #define QMU_GPD_SIZE (sizeof(struct qmu_gpd)) 15df2069acSChunfeng Yun #define QMU_GPD_RING_SIZE (MAX_GPD_NUM * QMU_GPD_SIZE) 16df2069acSChunfeng Yun 17df2069acSChunfeng Yun #define GPD_BUF_SIZE 65532 1848e0d373SChunfeng Yun #define GPD_BUF_SIZE_EL 1048572 19df2069acSChunfeng Yun 20df2069acSChunfeng Yun void mtu3_qmu_stop(struct mtu3_ep *mep); 21df2069acSChunfeng Yun int mtu3_qmu_start(struct mtu3_ep *mep); 22df2069acSChunfeng Yun void mtu3_qmu_resume(struct mtu3_ep *mep); 23df2069acSChunfeng Yun void mtu3_qmu_flush(struct mtu3_ep *mep); 24df2069acSChunfeng Yun 25df2069acSChunfeng Yun void mtu3_insert_gpd(struct mtu3_ep *mep, struct mtu3_request *mreq); 26df2069acSChunfeng Yun int mtu3_prepare_transfer(struct mtu3_ep *mep); 27df2069acSChunfeng Yun 28df2069acSChunfeng Yun int mtu3_gpd_ring_alloc(struct mtu3_ep *mep); 29df2069acSChunfeng Yun void mtu3_gpd_ring_free(struct mtu3_ep *mep); 30df2069acSChunfeng Yun 31df2069acSChunfeng Yun irqreturn_t mtu3_qmu_isr(struct mtu3 *mtu); 32df2069acSChunfeng Yun int mtu3_qmu_init(struct mtu3 *mtu); 33df2069acSChunfeng Yun void mtu3_qmu_exit(struct mtu3 *mtu); 34df2069acSChunfeng Yun 35df2069acSChunfeng Yun #endif 36