1#
2# Copyright 2017 Advanced Micro Devices, Inc.
3#
4# Permission is hereby granted, free of charge, to any person obtaining a
5# copy of this software and associated documentation files (the "Software"),
6# to deal in the Software without restriction, including without limitation
7# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8# and/or sell copies of the Software, and to permit persons to whom the
9# Software is furnished to do so, subject to the following conditions:
10#
11# The above copyright notice and this permission notice shall be included in
12# all copies or substantial portions of the Software.
13#
14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20# OTHER DEALINGS IN THE SOFTWARE.
21#
22#
23# Makefile for the 'clk_mgr' sub-component of DAL.
24# It provides the control and status of HW CLK_MGR pins.
25
26CLK_MGR = clk_mgr.o
27
28AMD_DAL_CLK_MGR = $(addprefix $(AMDDALPATH)/dc/clk_mgr/,$(CLK_MGR))
29
30AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR)
31
32
33ifdef CONFIG_DRM_AMD_DC_SI
34###############################################################################
35# DCE 60
36###############################################################################
37CLK_MGR_DCE60 = dce60_clk_mgr.o
38
39AMD_DAL_CLK_MGR_DCE60 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dce60/,$(CLK_MGR_DCE60))
40
41AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCE60)
42endif
43
44###############################################################################
45# DCE 100 and DCE8x
46###############################################################################
47CLK_MGR_DCE100 = dce_clk_mgr.o
48
49AMD_DAL_CLK_MGR_DCE100 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dce100/,$(CLK_MGR_DCE100))
50
51AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCE100)
52
53###############################################################################
54# DCE 100 and DCE8x
55###############################################################################
56CLK_MGR_DCE110 = dce110_clk_mgr.o
57
58AMD_DAL_CLK_MGR_DCE110 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dce110/,$(CLK_MGR_DCE110))
59
60AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCE110)
61###############################################################################
62# DCE 112
63###############################################################################
64CLK_MGR_DCE112 = dce112_clk_mgr.o
65
66AMD_DAL_CLK_MGR_DCE112 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dce112/,$(CLK_MGR_DCE112))
67
68AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCE112)
69###############################################################################
70# DCE 120
71###############################################################################
72CLK_MGR_DCE120 = dce120_clk_mgr.o
73
74AMD_DAL_CLK_MGR_DCE120 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dce120/,$(CLK_MGR_DCE120))
75
76AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCE120)
77ifdef CONFIG_DRM_AMD_DC_DCN
78###############################################################################
79# DCN10
80###############################################################################
81CLK_MGR_DCN10 = rv1_clk_mgr.o rv1_clk_mgr_vbios_smu.o rv2_clk_mgr.o
82
83AMD_DAL_CLK_MGR_DCN10 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn10/,$(CLK_MGR_DCN10))
84
85AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN10)
86
87###############################################################################
88# DCN20
89###############################################################################
90CLK_MGR_DCN20 = dcn20_clk_mgr.o
91
92AMD_DAL_CLK_MGR_DCN20 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn20/,$(CLK_MGR_DCN20))
93
94AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN20)
95
96###############################################################################
97# DCN21
98###############################################################################
99CLK_MGR_DCN21 = rn_clk_mgr.o rn_clk_mgr_vbios_smu.o
100
101# prevent build errors regarding soft-float vs hard-float FP ABI tags
102# this code is currently unused on ppc64, as it applies to Renoir APUs only
103ifdef CONFIG_PPC64
104CFLAGS_$(AMDDALPATH)/dc/clk_mgr/dcn21/rn_clk_mgr.o := $(call cc-option,-mno-gnu-attribute)
105endif
106
107# prevent build errors:
108# ...: '-mgeneral-regs-only' is incompatible with the use of floating-point types
109# this file is unused on arm64, just like on ppc64
110ifdef CONFIG_ARM64
111CFLAGS_REMOVE_$(AMDDALPATH)/dc/clk_mgr/dcn21/rn_clk_mgr.o := -mgeneral-regs-only
112endif
113
114AMD_DAL_CLK_MGR_DCN21 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn21/,$(CLK_MGR_DCN21))
115
116AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN21)
117###############################################################################
118# DCN30
119###############################################################################
120CLK_MGR_DCN30 = dcn30_clk_mgr.o dcn30_clk_mgr_smu_msg.o
121
122# prevent build errors regarding soft-float vs hard-float FP ABI tags
123# this code is currently unused on ppc64, as it applies to VanGogh APUs only
124ifdef CONFIG_PPC64
125CFLAGS_$(AMDDALPATH)/dc/clk_mgr/dcn30/dcn30_clk_mgr.o := $(call cc-option,-mno-gnu-attribute)
126endif
127
128# prevent build errors:
129# ...: '-mgeneral-regs-only' is incompatible with the use of floating-point types
130# this file is unused on arm64, just like on ppc64
131ifdef CONFIG_ARM64
132CFLAGS_REMOVE_$(AMDDALPATH)/dc/clk_mgr/dcn30/dcn30_clk_mgr.o := -mgeneral-regs-only
133endif
134
135AMD_DAL_CLK_MGR_DCN30 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn30/,$(CLK_MGR_DCN30))
136
137AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN30)
138###############################################################################
139# DCN301
140###############################################################################
141CLK_MGR_DCN301 = vg_clk_mgr.o dcn301_smu.o
142
143# prevent build errors regarding soft-float vs hard-float FP ABI tags
144# this code is currently unused on ppc64, as it applies to VanGogh APUs only
145ifdef CONFIG_PPC64
146CFLAGS_$(AMDDALPATH)/dc/clk_mgr/dcn301/vg_clk_mgr.o := $(call cc-option,-mno-gnu-attribute)
147endif
148
149# prevent build errors:
150# ...: '-mgeneral-regs-only' is incompatible with the use of floating-point types
151# this file is unused on arm64, just like on ppc64
152ifdef CONFIG_ARM64
153CFLAGS_REMOVE_$(AMDDALPATH)/dc/clk_mgr/dcn301/vg_clk_mgr.o := -mgeneral-regs-only
154endif
155
156AMD_DAL_CLK_MGR_DCN301 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn301/,$(CLK_MGR_DCN301))
157
158AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN301)
159endif
160