From e3bc123a2260145e34b57454da3db0edd117eb8e Mon Sep 17 00:00:00 2001 From: Simon Xue Date: Mon, 15 Nov 2021 11:10:10 +0800 Subject: [PATCH] iommu/rockchip: fix v2 pte read/write permission bit Change-Id: I9f799d5ef116b4a2ed62a39d62b439e30d41c155 Signed-off-by: Simon Xue --- drivers/iommu/rockchip-iommu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 2bceb51dd2a3..310686a05bca 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -285,14 +285,14 @@ static inline u32 rk_mk_dte_v2(dma_addr_t pt_dma) * 11:9 - Page address bit 34:32 * 8:4 - Page address bit 39:35 * 3 - Security - * 2 - Readable - * 1 - Writable + * 2 - Writable + * 1 - Readable * 0 - 1 if Page @ Page address is valid */ #define RK_PTE_PAGE_ADDRESS_MASK_V2 0xfffffff0 #define RK_PTE_PAGE_FLAGS_MASK_V2 0x0000000e -#define RK_PTE_PAGE_READABLE_V2 BIT(2) -#define RK_PTE_PAGE_WRITABLE_V2 BIT(1) +#define RK_PTE_PAGE_READABLE_V2 BIT(1) +#define RK_PTE_PAGE_WRITABLE_V2 BIT(2) static inline phys_addr_t rk_pte_page_address(u32 pte) {