1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef __MTK_MDP_COMP_H__
16#define __MTK_MDP_COMP_H__
17
18
19
20
21
22
23
24
25enum mtk_mdp_comp_type {
26 MTK_MDP_RDMA,
27 MTK_MDP_RSZ,
28 MTK_MDP_WDMA,
29 MTK_MDP_WROT,
30 MTK_MDP_COMP_TYPE_MAX,
31};
32
33enum mtk_mdp_comp_id {
34 MTK_MDP_COMP_RDMA0,
35 MTK_MDP_COMP_RDMA1,
36 MTK_MDP_COMP_RSZ0,
37 MTK_MDP_COMP_RSZ1,
38 MTK_MDP_COMP_RSZ2,
39 MTK_MDP_COMP_WDMA,
40 MTK_MDP_COMP_WROT0,
41 MTK_MDP_COMP_WROT1,
42 MTK_MDP_COMP_ID_MAX,
43};
44
45
46
47
48
49
50
51
52
53
54struct mtk_mdp_comp {
55 struct device_node *dev_node;
56 struct clk *clk[2];
57 void __iomem *regs;
58 struct device *larb_dev;
59 enum mtk_mdp_comp_type type;
60 enum mtk_mdp_comp_id id;
61};
62
63int mtk_mdp_comp_init(struct device *dev, struct device_node *node,
64 struct mtk_mdp_comp *comp, enum mtk_mdp_comp_id comp_id);
65void mtk_mdp_comp_deinit(struct device *dev, struct mtk_mdp_comp *comp);
66int mtk_mdp_comp_get_id(struct device *dev, struct device_node *node,
67 enum mtk_mdp_comp_type comp_type);
68void mtk_mdp_comp_clock_on(struct device *dev, struct mtk_mdp_comp *comp);
69void mtk_mdp_comp_clock_off(struct device *dev, struct mtk_mdp_comp *comp);
70
71
72#endif
73