[PATCH v3 2/3] iommu/mediatek: add support for 6-bit encoded port IDs
AngeloGioacchino Del Regno
angelogioacchino.delregno at collabora.com
Tue Oct 11 02:55:03 PDT 2022
Il 10/10/22 14:54, Alexandre Mergnat ha scritto:
> From: Fabien Parent <fparent at baylibre.com>
>
> Until now the port ID was always encoded as a 5-bit data. On MT8365,
> the port ID is encoded as a 6-bit data. This requires to add extra
> macro F_MMU_INT_ID_LARB_ID_EXT, and F_MMU_INT_ID_PORT_ID_EXT in order
> to support 6-bit encoded port IDs.
>
> Signed-off-by: Fabien Parent <fparent at baylibre.com>
> Signed-off-by: Markus Schneider-Pargmann <msp at baylibre.com>
> Signed-off-by: Alexandre Mergnat <amergnat at baylibre.com>
> ---
> drivers/iommu/mtk_iommu.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
> index 5a4e00e4bbbc..35e9731c3441 100644
> --- a/drivers/iommu/mtk_iommu.c
> +++ b/drivers/iommu/mtk_iommu.c
> @@ -108,8 +108,12 @@
> #define F_MMU_INT_ID_SUB_COMM_ID(a) (((a) >> 7) & 0x3)
> #define F_MMU_INT_ID_COMM_ID_EXT(a) (((a) >> 10) & 0x7)
> #define F_MMU_INT_ID_SUB_COMM_ID_EXT(a) (((a) >> 7) & 0x7)
> +/* Macro for 5 bits lenght port ID field (default) */
Typo: s/lenght/length/g
> #define F_MMU_INT_ID_LARB_ID(a) (((a) >> 7) & 0x7)
> #define F_MMU_INT_ID_PORT_ID(a) (((a) >> 2) & 0x1f)
> +/* Macro for 6 bits lenght port ID field */
Same here.
After fixing that:
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
More information about the Linux-mediatek
mailing list