162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * mtu3_qmu.h - Queue Management Unit driver header
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2016 MediaTek Inc.
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * Author: Chunfeng Yun <chunfeng.yun@mediatek.com>
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#ifndef __MTK_QMU_H__
1162306a36Sopenharmony_ci#define __MTK_QMU_H__
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#define MAX_GPD_NUM		64
1462306a36Sopenharmony_ci#define QMU_GPD_SIZE		(sizeof(struct qmu_gpd))
1562306a36Sopenharmony_ci#define QMU_GPD_RING_SIZE	(MAX_GPD_NUM * QMU_GPD_SIZE)
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#define GPD_BUF_SIZE		65532
1862306a36Sopenharmony_ci#define GPD_BUF_SIZE_EL		1048572
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_civoid mtu3_qmu_stop(struct mtu3_ep *mep);
2162306a36Sopenharmony_ciint mtu3_qmu_start(struct mtu3_ep *mep);
2262306a36Sopenharmony_civoid mtu3_qmu_resume(struct mtu3_ep *mep);
2362306a36Sopenharmony_civoid mtu3_qmu_flush(struct mtu3_ep *mep);
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_civoid mtu3_insert_gpd(struct mtu3_ep *mep, struct mtu3_request *mreq);
2662306a36Sopenharmony_ciint mtu3_prepare_transfer(struct mtu3_ep *mep);
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ciint mtu3_gpd_ring_alloc(struct mtu3_ep *mep);
2962306a36Sopenharmony_civoid mtu3_gpd_ring_free(struct mtu3_ep *mep);
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ciirqreturn_t mtu3_qmu_isr(struct mtu3 *mtu);
3262306a36Sopenharmony_ciint mtu3_qmu_init(struct mtu3 *mtu);
3362306a36Sopenharmony_civoid mtu3_qmu_exit(struct mtu3 *mtu);
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci#endif
36