WIP FPC-III support
[linux/fpc-iii.git] / drivers / gpu / drm / arc / arcpgu.h
blob6aac44b953ad1cc271158e1a85eeba8ba3d07985
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * ARC PGU DRM driver.
5 * Copyright (C) 2016 Synopsys, Inc. (www.synopsys.com)
6 */
8 #ifndef _ARCPGU_H_
9 #define _ARCPGU_H_
11 struct arcpgu_drm_private {
12 void __iomem *regs;
13 struct clk *clk;
14 struct drm_framebuffer *fb;
15 struct drm_crtc crtc;
16 struct drm_plane *plane;
19 #define crtc_to_arcpgu_priv(x) container_of(x, struct arcpgu_drm_private, crtc)
21 static inline void arc_pgu_write(struct arcpgu_drm_private *arcpgu,
22 unsigned int reg, u32 value)
24 iowrite32(value, arcpgu->regs + reg);
27 static inline u32 arc_pgu_read(struct arcpgu_drm_private *arcpgu,
28 unsigned int reg)
30 return ioread32(arcpgu->regs + reg);
33 int arc_pgu_setup_crtc(struct drm_device *dev);
34 int arcpgu_drm_hdmi_init(struct drm_device *drm, struct device_node *np);
35 int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np);
37 #endif