.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2015-2016 MediaTek Inc. |
---|
3 | 4 | * Author: Yong Wu <yong.wu@mediatek.com> |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify |
---|
6 | | - * it under the terms of the GNU General Public License version 2 as |
---|
7 | | - * published by the Free Software Foundation. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope that it will be useful, |
---|
10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | | - * GNU General Public License for more details. |
---|
13 | 5 | */ |
---|
14 | 6 | #ifndef MTK_IOMMU_SMI_H |
---|
15 | 7 | #define MTK_IOMMU_SMI_H |
---|
.. | .. |
---|
17 | 9 | #include <linux/bitops.h> |
---|
18 | 10 | #include <linux/device.h> |
---|
19 | 11 | |
---|
20 | | -#ifdef CONFIG_MTK_SMI |
---|
21 | | - |
---|
22 | | -#define MTK_LARB_NR_MAX 16 |
---|
| 12 | +#if IS_ENABLED(CONFIG_MTK_SMI) |
---|
23 | 13 | |
---|
24 | 14 | #define MTK_SMI_MMU_EN(port) BIT(port) |
---|
25 | 15 | |
---|
26 | 16 | struct mtk_smi_larb_iommu { |
---|
27 | 17 | struct device *dev; |
---|
28 | 18 | unsigned int mmu; |
---|
29 | | -}; |
---|
30 | | - |
---|
31 | | -struct mtk_smi_iommu { |
---|
32 | | - unsigned int larb_nr; |
---|
33 | | - struct mtk_smi_larb_iommu larb_imu[MTK_LARB_NR_MAX]; |
---|
| 19 | + unsigned char bank[32]; |
---|
34 | 20 | }; |
---|
35 | 21 | |
---|
36 | 22 | /* |
---|