162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2020 MediaTek Inc. 462306a36Sopenharmony_ci * Author: Yong Wu <yong.wu@mediatek.com> 562306a36Sopenharmony_ci */ 662306a36Sopenharmony_ci#ifndef __DT_BINDINGS_MEMORY_MTK_MEMORY_PORT_H_ 762306a36Sopenharmony_ci#define __DT_BINDINGS_MEMORY_MTK_MEMORY_PORT_H_ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#define MTK_LARB_NR_MAX 32 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#define MTK_M4U_ID(larb, port) (((larb) << 5) | (port)) 1262306a36Sopenharmony_ci#define MTK_M4U_TO_LARB(id) (((id) >> 5) & 0x1f) 1362306a36Sopenharmony_ci#define MTK_M4U_TO_PORT(id) ((id) & 0x1f) 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#define MTK_IFAIOMMU_PERI_ID(port) MTK_M4U_ID(0, port) 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#endif 18