1 /* SPDX-License-Identifier: GPL-2.0 */
3 * ARM HDLCD Controller register definition
6 #ifndef __HDLCD_DRV_H__
7 #define __HDLCD_DRV_H__
9 struct hdlcd_drm_private {
10 struct drm_device base;
14 struct drm_plane *plane;
16 #ifdef CONFIG_DEBUG_FS
17 atomic_t buffer_underrun_count;
18 atomic_t bus_error_count;
20 atomic_t dma_end_count;
24 #define drm_to_hdlcd_priv(x) container_of(x, struct hdlcd_drm_private, base)
25 #define crtc_to_hdlcd_priv(x) container_of(x, struct hdlcd_drm_private, crtc)
27 static inline void hdlcd_write(struct hdlcd_drm_private *hdlcd,
28 unsigned int reg, u32 value)
30 writel(value, hdlcd->mmio + reg);
33 static inline u32 hdlcd_read(struct hdlcd_drm_private *hdlcd, unsigned int reg)
35 return readl(hdlcd->mmio + reg);
38 int hdlcd_setup_crtc(struct drm_device *dev);
39 void hdlcd_set_scanout(struct hdlcd_drm_private *hdlcd);
41 #endif /* __HDLCD_DRV_H__ */