WIP FPC-III support
[linux/fpc-iii.git] / drivers / gpu / drm / zte / zx_drm_drv.h
blob80cdaf479c7446f1a3379f723bc395600bc4e051
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright 2016 Linaro Ltd.
4 * Copyright 2016 ZTE Corporation.
5 */
7 #ifndef __ZX_DRM_DRV_H__
8 #define __ZX_DRM_DRV_H__
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;
15 static inline u32 zx_readl(void __iomem *reg)
17 return readl_relaxed(reg);
20 static inline void zx_writel(void __iomem *reg, u32 val)
22 writel_relaxed(val, reg);
25 static inline void zx_writel_mask(void __iomem *reg, u32 mask, u32 val)
27 u32 tmp;
29 tmp = zx_readl(reg);
30 tmp = (tmp & ~mask) | (val & mask);
31 zx_writel(reg, tmp);
34 #endif /* __ZX_DRM_DRV_H__ */