Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * ARC PGU DRM driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  * Copyright (C) 2016 Synopsys, Inc. (www.synopsys.com)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #ifndef _ARCPGU_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #define _ARCPGU_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) struct arcpgu_drm_private {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 	void __iomem		*regs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 	struct clk		*clk;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 	struct drm_framebuffer	*fb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 	struct drm_crtc		crtc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 	struct drm_plane	*plane;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define crtc_to_arcpgu_priv(x) container_of(x, struct arcpgu_drm_private, crtc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) static inline void arc_pgu_write(struct arcpgu_drm_private *arcpgu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 				 unsigned int reg, u32 value)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	iowrite32(value, arcpgu->regs + reg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) static inline u32 arc_pgu_read(struct arcpgu_drm_private *arcpgu,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 			       unsigned int reg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 	return ioread32(arcpgu->regs + reg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) int arc_pgu_setup_crtc(struct drm_device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) int arcpgu_drm_hdmi_init(struct drm_device *drm, struct device_node *np);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) #endif