1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright 2016 Linaro Ltd. 4 * Copyright 2016 ZTE Corporation. 5 */ 6 7 #ifndef __ZX_DRM_DRV_H__ 8 #define __ZX_DRM_DRV_H__ 9 10 extern struct platform_driver zx_crtc_driver; 11 extern struct platform_driver zx_hdmi_driver; 12 extern struct platform_driver zx_tvenc_driver; 13 extern struct platform_driver zx_vga_driver; 14 zx_readl(void __iomem * reg)15static inline u32 zx_readl(void __iomem *reg) 16 { 17 return readl_relaxed(reg); 18 } 19 zx_writel(void __iomem * reg,u32 val)20static inline void zx_writel(void __iomem *reg, u32 val) 21 { 22 writel_relaxed(val, reg); 23 } 24 zx_writel_mask(void __iomem * reg,u32 mask,u32 val)25static inline void zx_writel_mask(void __iomem *reg, u32 mask, u32 val) 26 { 27 u32 tmp; 28 29 tmp = zx_readl(reg); 30 tmp = (tmp & ~mask) | (val & mask); 31 zx_writel(reg, tmp); 32 } 33 34 #endif /* __ZX_DRM_DRV_H__ */ 35