• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2016 MediaTek Inc.
4  * Author: Ming Hsiu Tsai <minghsiu.tsai@mediatek.com>
5  */
6 
7 #ifndef __MTK_MDP_COMP_H__
8 #define __MTK_MDP_COMP_H__
9 
10 /**
11  * enum mtk_mdp_comp_type - the MDP component
12  * @MTK_MDP_RDMA:	Read DMA
13  * @MTK_MDP_RSZ:	Riszer
14  * @MTK_MDP_WDMA:	Write DMA
15  * @MTK_MDP_WROT:	Write DMA with rotation
16  */
17 enum mtk_mdp_comp_type {
18 	MTK_MDP_RDMA,
19 	MTK_MDP_RSZ,
20 	MTK_MDP_WDMA,
21 	MTK_MDP_WROT,
22 	MTK_MDP_COMP_TYPE_MAX,
23 };
24 
25 /**
26  * struct mtk_mdp_comp - the MDP's function component data
27  * @node:	list node to track sibing MDP components
28  * @dev_node:	component device node
29  * @clk:	clocks required for component
30  * @larb_dev:	SMI device required for component
31  * @type:	component type
32  */
33 struct mtk_mdp_comp {
34 	struct list_head	node;
35 	struct device_node	*dev_node;
36 	struct clk		*clk[2];
37 	struct device		*larb_dev;
38 	enum mtk_mdp_comp_type	type;
39 };
40 
41 int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
42 		      struct mtk_mdp_comp *comp,
43 		      enum mtk_mdp_comp_type comp_type);
44 void mtk_mdp_comp_deinit(struct device *dev, struct mtk_mdp_comp *comp);
45 void mtk_mdp_comp_clock_on(struct device *dev, struct mtk_mdp_comp *comp);
46 void mtk_mdp_comp_clock_off(struct device *dev, struct mtk_mdp_comp *comp);
47 
48 
49 #endif /* __MTK_MDP_COMP_H__ */
50