Commit 412ae53aadb53cd63e754d638bafe6e426aeafee
Committed by
Albert ARIBAUD
1 parent
8c80eb3b53
Exists in
v2017.01-smarct4x
and in
37 other branches
lpc32xx: add support for board work_92105
Work_92105 from Work Microwave is an LPC3250- based board with the following features: - 64MB or 128MB SDR DRAM - 1 GB SLC NAND, managed through MLC controller. - Ethernet - Ethernet + PHY SMSC8710 - I2C: - EEPROM (24M01-compatible) - RTC (DS1374-compatible) - Temperature sensor (DS620) - DACs (2 x MAX518) - SPI (through SSP interface) - Port expander MAX6957 - LCD display (HD44780-compatible), controlled through the port expander and DACs This board has SPL support, and uses the LPC32XX boot image format. Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
Showing 22 changed files with 1129 additions and 1 deletions Inline Diff
- Makefile
- arch/arm/Kconfig
- arch/arm/cpu/arm926ejs/lpc32xx/Makefile
- arch/arm/cpu/arm926ejs/lpc32xx/clk.c
- arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
- arch/arm/cpu/arm926ejs/lpc32xx/dram.c
- arch/arm/cpu/arm926ejs/lpc32xx/lowlevel_init.S
- arch/arm/include/asm/arch-lpc32xx/clk.h
- arch/arm/include/asm/arch-lpc32xx/cpu.h
- arch/arm/include/asm/arch-lpc32xx/emc.h
- arch/arm/include/asm/arch-lpc32xx/mux.h
- arch/arm/include/asm/arch-lpc32xx/sys_proto.h
- board/work-microwave/work_92105/Kconfig
- board/work-microwave/work_92105/MAINTAINERS
- board/work-microwave/work_92105/Makefile
- board/work-microwave/work_92105/README
- board/work-microwave/work_92105/work_92105.c
- board/work-microwave/work_92105/work_92105_display.c
- board/work-microwave/work_92105/work_92105_display.h
- board/work-microwave/work_92105/work_92105_spl.c
- configs/work_92105_defconfig
- include/configs/work_92105.h
Makefile
1 | VERSION = 2015 | 1 | VERSION = 2015 |
2 | PATCHLEVEL = 04 | 2 | PATCHLEVEL = 04 |
3 | SUBLEVEL = | 3 | SUBLEVEL = |
4 | EXTRAVERSION = -rc5 | 4 | EXTRAVERSION = -rc5 |
5 | NAME = | 5 | NAME = |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
8 | # To see a list of typical targets execute "make help" | 8 | # To see a list of typical targets execute "make help" |
9 | # More info can be located in ./README | 9 | # More info can be located in ./README |
10 | # Comments in this file are targeted only to the developer, do not | 10 | # Comments in this file are targeted only to the developer, do not |
11 | # expect to learn how to build the kernel reading this file. | 11 | # expect to learn how to build the kernel reading this file. |
12 | 12 | ||
13 | # Do not use make's built-in rules and variables | 13 | # Do not use make's built-in rules and variables |
14 | # (this increases performance and avoids hard-to-debug behaviour); | 14 | # (this increases performance and avoids hard-to-debug behaviour); |
15 | MAKEFLAGS += -rR | 15 | MAKEFLAGS += -rR |
16 | 16 | ||
17 | # Avoid funny character set dependencies | 17 | # Avoid funny character set dependencies |
18 | unexport LC_ALL | 18 | unexport LC_ALL |
19 | LC_COLLATE=C | 19 | LC_COLLATE=C |
20 | LC_NUMERIC=C | 20 | LC_NUMERIC=C |
21 | export LC_COLLATE LC_NUMERIC | 21 | export LC_COLLATE LC_NUMERIC |
22 | 22 | ||
23 | # Avoid interference with shell env settings | 23 | # Avoid interference with shell env settings |
24 | unexport GREP_OPTIONS | 24 | unexport GREP_OPTIONS |
25 | 25 | ||
26 | # We are using a recursive build, so we need to do a little thinking | 26 | # We are using a recursive build, so we need to do a little thinking |
27 | # to get the ordering right. | 27 | # to get the ordering right. |
28 | # | 28 | # |
29 | # Most importantly: sub-Makefiles should only ever modify files in | 29 | # Most importantly: sub-Makefiles should only ever modify files in |
30 | # their own directory. If in some directory we have a dependency on | 30 | # their own directory. If in some directory we have a dependency on |
31 | # a file in another dir (which doesn't happen often, but it's often | 31 | # a file in another dir (which doesn't happen often, but it's often |
32 | # unavoidable when linking the built-in.o targets which finally | 32 | # unavoidable when linking the built-in.o targets which finally |
33 | # turn into vmlinux), we will call a sub make in that other dir, and | 33 | # turn into vmlinux), we will call a sub make in that other dir, and |
34 | # after that we are sure that everything which is in that other dir | 34 | # after that we are sure that everything which is in that other dir |
35 | # is now up to date. | 35 | # is now up to date. |
36 | # | 36 | # |
37 | # The only cases where we need to modify files which have global | 37 | # The only cases where we need to modify files which have global |
38 | # effects are thus separated out and done before the recursive | 38 | # effects are thus separated out and done before the recursive |
39 | # descending is started. They are now explicitly listed as the | 39 | # descending is started. They are now explicitly listed as the |
40 | # prepare rule. | 40 | # prepare rule. |
41 | 41 | ||
42 | # Beautify output | 42 | # Beautify output |
43 | # --------------------------------------------------------------------------- | 43 | # --------------------------------------------------------------------------- |
44 | # | 44 | # |
45 | # Normally, we echo the whole command before executing it. By making | 45 | # Normally, we echo the whole command before executing it. By making |
46 | # that echo $($(quiet)$(cmd)), we now have the possibility to set | 46 | # that echo $($(quiet)$(cmd)), we now have the possibility to set |
47 | # $(quiet) to choose other forms of output instead, e.g. | 47 | # $(quiet) to choose other forms of output instead, e.g. |
48 | # | 48 | # |
49 | # quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@ | 49 | # quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@ |
50 | # cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< | 50 | # cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< |
51 | # | 51 | # |
52 | # If $(quiet) is empty, the whole command will be printed. | 52 | # If $(quiet) is empty, the whole command will be printed. |
53 | # If it is set to "quiet_", only the short version will be printed. | 53 | # If it is set to "quiet_", only the short version will be printed. |
54 | # If it is set to "silent_", nothing will be printed at all, since | 54 | # If it is set to "silent_", nothing will be printed at all, since |
55 | # the variable $(silent_cmd_cc_o_c) doesn't exist. | 55 | # the variable $(silent_cmd_cc_o_c) doesn't exist. |
56 | # | 56 | # |
57 | # A simple variant is to prefix commands with $(Q) - that's useful | 57 | # A simple variant is to prefix commands with $(Q) - that's useful |
58 | # for commands that shall be hidden in non-verbose mode. | 58 | # for commands that shall be hidden in non-verbose mode. |
59 | # | 59 | # |
60 | # $(Q)ln $@ :< | 60 | # $(Q)ln $@ :< |
61 | # | 61 | # |
62 | # If KBUILD_VERBOSE equals 0 then the above command will be hidden. | 62 | # If KBUILD_VERBOSE equals 0 then the above command will be hidden. |
63 | # If KBUILD_VERBOSE equals 1 then the above command is displayed. | 63 | # If KBUILD_VERBOSE equals 1 then the above command is displayed. |
64 | # | 64 | # |
65 | # To put more focus on warnings, be less verbose as default | 65 | # To put more focus on warnings, be less verbose as default |
66 | # Use 'make V=1' to see the full commands | 66 | # Use 'make V=1' to see the full commands |
67 | 67 | ||
68 | ifeq ("$(origin V)", "command line") | 68 | ifeq ("$(origin V)", "command line") |
69 | KBUILD_VERBOSE = $(V) | 69 | KBUILD_VERBOSE = $(V) |
70 | endif | 70 | endif |
71 | ifndef KBUILD_VERBOSE | 71 | ifndef KBUILD_VERBOSE |
72 | KBUILD_VERBOSE = 0 | 72 | KBUILD_VERBOSE = 0 |
73 | endif | 73 | endif |
74 | 74 | ||
75 | ifeq ($(KBUILD_VERBOSE),1) | 75 | ifeq ($(KBUILD_VERBOSE),1) |
76 | quiet = | 76 | quiet = |
77 | Q = | 77 | Q = |
78 | else | 78 | else |
79 | quiet=quiet_ | 79 | quiet=quiet_ |
80 | Q = @ | 80 | Q = @ |
81 | endif | 81 | endif |
82 | 82 | ||
83 | # If the user is running make -s (silent mode), suppress echoing of | 83 | # If the user is running make -s (silent mode), suppress echoing of |
84 | # commands | 84 | # commands |
85 | 85 | ||
86 | ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 | 86 | ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4 |
87 | ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) | 87 | ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),) |
88 | quiet=silent_ | 88 | quiet=silent_ |
89 | endif | 89 | endif |
90 | else # make-3.8x | 90 | else # make-3.8x |
91 | ifneq ($(filter s% -s%,$(MAKEFLAGS)),) | 91 | ifneq ($(filter s% -s%,$(MAKEFLAGS)),) |
92 | quiet=silent_ | 92 | quiet=silent_ |
93 | endif | 93 | endif |
94 | endif | 94 | endif |
95 | 95 | ||
96 | export quiet Q KBUILD_VERBOSE | 96 | export quiet Q KBUILD_VERBOSE |
97 | 97 | ||
98 | # kbuild supports saving output files in a separate directory. | 98 | # kbuild supports saving output files in a separate directory. |
99 | # To locate output files in a separate directory two syntaxes are supported. | 99 | # To locate output files in a separate directory two syntaxes are supported. |
100 | # In both cases the working directory must be the root of the kernel src. | 100 | # In both cases the working directory must be the root of the kernel src. |
101 | # 1) O= | 101 | # 1) O= |
102 | # Use "make O=dir/to/store/output/files/" | 102 | # Use "make O=dir/to/store/output/files/" |
103 | # | 103 | # |
104 | # 2) Set KBUILD_OUTPUT | 104 | # 2) Set KBUILD_OUTPUT |
105 | # Set the environment variable KBUILD_OUTPUT to point to the directory | 105 | # Set the environment variable KBUILD_OUTPUT to point to the directory |
106 | # where the output files shall be placed. | 106 | # where the output files shall be placed. |
107 | # export KBUILD_OUTPUT=dir/to/store/output/files/ | 107 | # export KBUILD_OUTPUT=dir/to/store/output/files/ |
108 | # make | 108 | # make |
109 | # | 109 | # |
110 | # The O= assignment takes precedence over the KBUILD_OUTPUT environment | 110 | # The O= assignment takes precedence over the KBUILD_OUTPUT environment |
111 | # variable. | 111 | # variable. |
112 | 112 | ||
113 | # KBUILD_SRC is set on invocation of make in OBJ directory | 113 | # KBUILD_SRC is set on invocation of make in OBJ directory |
114 | # KBUILD_SRC is not intended to be used by the regular user (for now) | 114 | # KBUILD_SRC is not intended to be used by the regular user (for now) |
115 | ifeq ($(KBUILD_SRC),) | 115 | ifeq ($(KBUILD_SRC),) |
116 | 116 | ||
117 | # OK, Make called in directory where kernel src resides | 117 | # OK, Make called in directory where kernel src resides |
118 | # Do we want to locate output files in a separate directory? | 118 | # Do we want to locate output files in a separate directory? |
119 | ifeq ("$(origin O)", "command line") | 119 | ifeq ("$(origin O)", "command line") |
120 | KBUILD_OUTPUT := $(O) | 120 | KBUILD_OUTPUT := $(O) |
121 | endif | 121 | endif |
122 | 122 | ||
123 | # That's our default target when none is given on the command line | 123 | # That's our default target when none is given on the command line |
124 | PHONY := _all | 124 | PHONY := _all |
125 | _all: | 125 | _all: |
126 | 126 | ||
127 | # Cancel implicit rules on top Makefile | 127 | # Cancel implicit rules on top Makefile |
128 | $(CURDIR)/Makefile Makefile: ; | 128 | $(CURDIR)/Makefile Makefile: ; |
129 | 129 | ||
130 | ifneq ($(KBUILD_OUTPUT),) | 130 | ifneq ($(KBUILD_OUTPUT),) |
131 | # Invoke a second make in the output directory, passing relevant variables | 131 | # Invoke a second make in the output directory, passing relevant variables |
132 | # check that the output directory actually exists | 132 | # check that the output directory actually exists |
133 | saved-output := $(KBUILD_OUTPUT) | 133 | saved-output := $(KBUILD_OUTPUT) |
134 | KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ | 134 | KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \ |
135 | && /bin/pwd) | 135 | && /bin/pwd) |
136 | $(if $(KBUILD_OUTPUT),, \ | 136 | $(if $(KBUILD_OUTPUT),, \ |
137 | $(error failed to create output directory "$(saved-output)")) | 137 | $(error failed to create output directory "$(saved-output)")) |
138 | 138 | ||
139 | PHONY += $(MAKECMDGOALS) sub-make | 139 | PHONY += $(MAKECMDGOALS) sub-make |
140 | 140 | ||
141 | $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make | 141 | $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make |
142 | @: | 142 | @: |
143 | 143 | ||
144 | sub-make: FORCE | 144 | sub-make: FORCE |
145 | $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \ | 145 | $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \ |
146 | -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS)) | 146 | -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS)) |
147 | 147 | ||
148 | # Leave processing to above invocation of make | 148 | # Leave processing to above invocation of make |
149 | skip-makefile := 1 | 149 | skip-makefile := 1 |
150 | endif # ifneq ($(KBUILD_OUTPUT),) | 150 | endif # ifneq ($(KBUILD_OUTPUT),) |
151 | endif # ifeq ($(KBUILD_SRC),) | 151 | endif # ifeq ($(KBUILD_SRC),) |
152 | 152 | ||
153 | # We process the rest of the Makefile if this is the final invocation of make | 153 | # We process the rest of the Makefile if this is the final invocation of make |
154 | ifeq ($(skip-makefile),) | 154 | ifeq ($(skip-makefile),) |
155 | 155 | ||
156 | # Do not print "Entering directory ...", | 156 | # Do not print "Entering directory ...", |
157 | # but we want to display it when entering to the output directory | 157 | # but we want to display it when entering to the output directory |
158 | # so that IDEs/editors are able to understand relative filenames. | 158 | # so that IDEs/editors are able to understand relative filenames. |
159 | MAKEFLAGS += --no-print-directory | 159 | MAKEFLAGS += --no-print-directory |
160 | 160 | ||
161 | # Call a source code checker (by default, "sparse") as part of the | 161 | # Call a source code checker (by default, "sparse") as part of the |
162 | # C compilation. | 162 | # C compilation. |
163 | # | 163 | # |
164 | # Use 'make C=1' to enable checking of only re-compiled files. | 164 | # Use 'make C=1' to enable checking of only re-compiled files. |
165 | # Use 'make C=2' to enable checking of *all* source files, regardless | 165 | # Use 'make C=2' to enable checking of *all* source files, regardless |
166 | # of whether they are re-compiled or not. | 166 | # of whether they are re-compiled or not. |
167 | # | 167 | # |
168 | # See the file "Documentation/sparse.txt" for more details, including | 168 | # See the file "Documentation/sparse.txt" for more details, including |
169 | # where to get the "sparse" utility. | 169 | # where to get the "sparse" utility. |
170 | 170 | ||
171 | ifeq ("$(origin C)", "command line") | 171 | ifeq ("$(origin C)", "command line") |
172 | KBUILD_CHECKSRC = $(C) | 172 | KBUILD_CHECKSRC = $(C) |
173 | endif | 173 | endif |
174 | ifndef KBUILD_CHECKSRC | 174 | ifndef KBUILD_CHECKSRC |
175 | KBUILD_CHECKSRC = 0 | 175 | KBUILD_CHECKSRC = 0 |
176 | endif | 176 | endif |
177 | 177 | ||
178 | # Use make M=dir to specify directory of external module to build | 178 | # Use make M=dir to specify directory of external module to build |
179 | # Old syntax make ... SUBDIRS=$PWD is still supported | 179 | # Old syntax make ... SUBDIRS=$PWD is still supported |
180 | # Setting the environment variable KBUILD_EXTMOD take precedence | 180 | # Setting the environment variable KBUILD_EXTMOD take precedence |
181 | ifdef SUBDIRS | 181 | ifdef SUBDIRS |
182 | KBUILD_EXTMOD ?= $(SUBDIRS) | 182 | KBUILD_EXTMOD ?= $(SUBDIRS) |
183 | endif | 183 | endif |
184 | 184 | ||
185 | ifeq ("$(origin M)", "command line") | 185 | ifeq ("$(origin M)", "command line") |
186 | KBUILD_EXTMOD := $(M) | 186 | KBUILD_EXTMOD := $(M) |
187 | endif | 187 | endif |
188 | 188 | ||
189 | # If building an external module we do not care about the all: rule | 189 | # If building an external module we do not care about the all: rule |
190 | # but instead _all depend on modules | 190 | # but instead _all depend on modules |
191 | PHONY += all | 191 | PHONY += all |
192 | ifeq ($(KBUILD_EXTMOD),) | 192 | ifeq ($(KBUILD_EXTMOD),) |
193 | _all: all | 193 | _all: all |
194 | else | 194 | else |
195 | _all: modules | 195 | _all: modules |
196 | endif | 196 | endif |
197 | 197 | ||
198 | ifeq ($(KBUILD_SRC),) | 198 | ifeq ($(KBUILD_SRC),) |
199 | # building in the source tree | 199 | # building in the source tree |
200 | srctree := . | 200 | srctree := . |
201 | else | 201 | else |
202 | ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR))) | 202 | ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR))) |
203 | # building in a subdirectory of the source tree | 203 | # building in a subdirectory of the source tree |
204 | srctree := .. | 204 | srctree := .. |
205 | else | 205 | else |
206 | srctree := $(KBUILD_SRC) | 206 | srctree := $(KBUILD_SRC) |
207 | endif | 207 | endif |
208 | endif | 208 | endif |
209 | objtree := . | 209 | objtree := . |
210 | src := $(srctree) | 210 | src := $(srctree) |
211 | obj := $(objtree) | 211 | obj := $(objtree) |
212 | 212 | ||
213 | VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) | 213 | VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) |
214 | 214 | ||
215 | export srctree objtree VPATH | 215 | export srctree objtree VPATH |
216 | 216 | ||
217 | # Make sure CDPATH settings don't interfere | 217 | # Make sure CDPATH settings don't interfere |
218 | unexport CDPATH | 218 | unexport CDPATH |
219 | 219 | ||
220 | ######################################################################### | 220 | ######################################################################### |
221 | 221 | ||
222 | HOSTARCH := $(shell uname -m | \ | 222 | HOSTARCH := $(shell uname -m | \ |
223 | sed -e s/i.86/x86/ \ | 223 | sed -e s/i.86/x86/ \ |
224 | -e s/sun4u/sparc64/ \ | 224 | -e s/sun4u/sparc64/ \ |
225 | -e s/arm.*/arm/ \ | 225 | -e s/arm.*/arm/ \ |
226 | -e s/sa110/arm/ \ | 226 | -e s/sa110/arm/ \ |
227 | -e s/ppc64/powerpc/ \ | 227 | -e s/ppc64/powerpc/ \ |
228 | -e s/ppc/powerpc/ \ | 228 | -e s/ppc/powerpc/ \ |
229 | -e s/macppc/powerpc/\ | 229 | -e s/macppc/powerpc/\ |
230 | -e s/sh.*/sh/) | 230 | -e s/sh.*/sh/) |
231 | 231 | ||
232 | HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ | 232 | HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ |
233 | sed -e 's/\(cygwin\).*/cygwin/') | 233 | sed -e 's/\(cygwin\).*/cygwin/') |
234 | 234 | ||
235 | export HOSTARCH HOSTOS | 235 | export HOSTARCH HOSTOS |
236 | 236 | ||
237 | ######################################################################### | 237 | ######################################################################### |
238 | 238 | ||
239 | # set default to nothing for native builds | 239 | # set default to nothing for native builds |
240 | ifeq ($(HOSTARCH),$(ARCH)) | 240 | ifeq ($(HOSTARCH),$(ARCH)) |
241 | CROSS_COMPILE ?= | 241 | CROSS_COMPILE ?= |
242 | endif | 242 | endif |
243 | 243 | ||
244 | KCONFIG_CONFIG ?= .config | 244 | KCONFIG_CONFIG ?= .config |
245 | export KCONFIG_CONFIG | 245 | export KCONFIG_CONFIG |
246 | 246 | ||
247 | # SHELL used by kbuild | 247 | # SHELL used by kbuild |
248 | CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ | 248 | CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
249 | else if [ -x /bin/bash ]; then echo /bin/bash; \ | 249 | else if [ -x /bin/bash ]; then echo /bin/bash; \ |
250 | else echo sh; fi ; fi) | 250 | else echo sh; fi ; fi) |
251 | 251 | ||
252 | HOSTCC = cc | 252 | HOSTCC = cc |
253 | HOSTCXX = c++ | 253 | HOSTCXX = c++ |
254 | HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer | 254 | HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer |
255 | HOSTCXXFLAGS = -O2 | 255 | HOSTCXXFLAGS = -O2 |
256 | 256 | ||
257 | ifeq ($(HOSTOS),cygwin) | 257 | ifeq ($(HOSTOS),cygwin) |
258 | HOSTCFLAGS += -ansi | 258 | HOSTCFLAGS += -ansi |
259 | endif | 259 | endif |
260 | 260 | ||
261 | # Mac OS X / Darwin's C preprocessor is Apple specific. It | 261 | # Mac OS X / Darwin's C preprocessor is Apple specific. It |
262 | # generates numerous errors and warnings. We want to bypass it | 262 | # generates numerous errors and warnings. We want to bypass it |
263 | # and use GNU C's cpp. To do this we pass the -traditional-cpp | 263 | # and use GNU C's cpp. To do this we pass the -traditional-cpp |
264 | # option to the compiler. Note that the -traditional-cpp flag | 264 | # option to the compiler. Note that the -traditional-cpp flag |
265 | # DOES NOT have the same semantics as GNU C's flag, all it does | 265 | # DOES NOT have the same semantics as GNU C's flag, all it does |
266 | # is invoke the GNU preprocessor in stock ANSI/ISO C fashion. | 266 | # is invoke the GNU preprocessor in stock ANSI/ISO C fashion. |
267 | # | 267 | # |
268 | # Apple's linker is similar, thanks to the new 2 stage linking | 268 | # Apple's linker is similar, thanks to the new 2 stage linking |
269 | # multiple symbol definitions are treated as errors, hence the | 269 | # multiple symbol definitions are treated as errors, hence the |
270 | # -multiply_defined suppress option to turn off this error. | 270 | # -multiply_defined suppress option to turn off this error. |
271 | # | 271 | # |
272 | ifeq ($(HOSTOS),darwin) | 272 | ifeq ($(HOSTOS),darwin) |
273 | # get major and minor product version (e.g. '10' and '6' for Snow Leopard) | 273 | # get major and minor product version (e.g. '10' and '6' for Snow Leopard) |
274 | DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.') | 274 | DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.') |
275 | DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.') | 275 | DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.') |
276 | 276 | ||
277 | os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \ | 277 | os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \ |
278 | $(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;) | 278 | $(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;) |
279 | 279 | ||
280 | # Snow Leopards build environment has no longer restrictions as described above | 280 | # Snow Leopards build environment has no longer restrictions as described above |
281 | HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc") | 281 | HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc") |
282 | HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") | 282 | HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") |
283 | HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") | 283 | HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") |
284 | 284 | ||
285 | # since Lion (10.7) ASLR is on by default, but we use linker generated lists | 285 | # since Lion (10.7) ASLR is on by default, but we use linker generated lists |
286 | # in some host tools which is a problem then ... so disable ASLR for these | 286 | # in some host tools which is a problem then ... so disable ASLR for these |
287 | # tools | 287 | # tools |
288 | HOSTLDFLAGS += $(call os_x_before, 10, 7, "", "-Xlinker -no_pie") | 288 | HOSTLDFLAGS += $(call os_x_before, 10, 7, "", "-Xlinker -no_pie") |
289 | endif | 289 | endif |
290 | 290 | ||
291 | # Decide whether to build built-in, modular, or both. | 291 | # Decide whether to build built-in, modular, or both. |
292 | # Normally, just do built-in. | 292 | # Normally, just do built-in. |
293 | 293 | ||
294 | KBUILD_MODULES := | 294 | KBUILD_MODULES := |
295 | KBUILD_BUILTIN := 1 | 295 | KBUILD_BUILTIN := 1 |
296 | 296 | ||
297 | # If we have only "make modules", don't compile built-in objects. | 297 | # If we have only "make modules", don't compile built-in objects. |
298 | # When we're building modules with modversions, we need to consider | 298 | # When we're building modules with modversions, we need to consider |
299 | # the built-in objects during the descend as well, in order to | 299 | # the built-in objects during the descend as well, in order to |
300 | # make sure the checksums are up to date before we record them. | 300 | # make sure the checksums are up to date before we record them. |
301 | 301 | ||
302 | ifeq ($(MAKECMDGOALS),modules) | 302 | ifeq ($(MAKECMDGOALS),modules) |
303 | KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) | 303 | KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) |
304 | endif | 304 | endif |
305 | 305 | ||
306 | # If we have "make <whatever> modules", compile modules | 306 | # If we have "make <whatever> modules", compile modules |
307 | # in addition to whatever we do anyway. | 307 | # in addition to whatever we do anyway. |
308 | # Just "make" or "make all" shall build modules as well | 308 | # Just "make" or "make all" shall build modules as well |
309 | 309 | ||
310 | # U-Boot does not need modules | 310 | # U-Boot does not need modules |
311 | #ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) | 311 | #ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) |
312 | # KBUILD_MODULES := 1 | 312 | # KBUILD_MODULES := 1 |
313 | #endif | 313 | #endif |
314 | 314 | ||
315 | #ifeq ($(MAKECMDGOALS),) | 315 | #ifeq ($(MAKECMDGOALS),) |
316 | # KBUILD_MODULES := 1 | 316 | # KBUILD_MODULES := 1 |
317 | #endif | 317 | #endif |
318 | 318 | ||
319 | export KBUILD_MODULES KBUILD_BUILTIN | 319 | export KBUILD_MODULES KBUILD_BUILTIN |
320 | export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD | 320 | export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD |
321 | 321 | ||
322 | # Look for make include files relative to root of kernel src | 322 | # Look for make include files relative to root of kernel src |
323 | MAKEFLAGS += --include-dir=$(srctree) | 323 | MAKEFLAGS += --include-dir=$(srctree) |
324 | 324 | ||
325 | # We need some generic definitions (do not try to remake the file). | 325 | # We need some generic definitions (do not try to remake the file). |
326 | $(srctree)/scripts/Kbuild.include: ; | 326 | $(srctree)/scripts/Kbuild.include: ; |
327 | include $(srctree)/scripts/Kbuild.include | 327 | include $(srctree)/scripts/Kbuild.include |
328 | 328 | ||
329 | # Make variables (CC, etc...) | 329 | # Make variables (CC, etc...) |
330 | 330 | ||
331 | AS = $(CROSS_COMPILE)as | 331 | AS = $(CROSS_COMPILE)as |
332 | # Always use GNU ld | 332 | # Always use GNU ld |
333 | ifneq ($(shell $(CROSS_COMPILE)ld.bfd -v 2> /dev/null),) | 333 | ifneq ($(shell $(CROSS_COMPILE)ld.bfd -v 2> /dev/null),) |
334 | LD = $(CROSS_COMPILE)ld.bfd | 334 | LD = $(CROSS_COMPILE)ld.bfd |
335 | else | 335 | else |
336 | LD = $(CROSS_COMPILE)ld | 336 | LD = $(CROSS_COMPILE)ld |
337 | endif | 337 | endif |
338 | CC = $(CROSS_COMPILE)gcc | 338 | CC = $(CROSS_COMPILE)gcc |
339 | CPP = $(CC) -E | 339 | CPP = $(CC) -E |
340 | AR = $(CROSS_COMPILE)ar | 340 | AR = $(CROSS_COMPILE)ar |
341 | NM = $(CROSS_COMPILE)nm | 341 | NM = $(CROSS_COMPILE)nm |
342 | LDR = $(CROSS_COMPILE)ldr | 342 | LDR = $(CROSS_COMPILE)ldr |
343 | STRIP = $(CROSS_COMPILE)strip | 343 | STRIP = $(CROSS_COMPILE)strip |
344 | OBJCOPY = $(CROSS_COMPILE)objcopy | 344 | OBJCOPY = $(CROSS_COMPILE)objcopy |
345 | OBJDUMP = $(CROSS_COMPILE)objdump | 345 | OBJDUMP = $(CROSS_COMPILE)objdump |
346 | AWK = awk | 346 | AWK = awk |
347 | PERL = perl | 347 | PERL = perl |
348 | PYTHON = python | 348 | PYTHON = python |
349 | DTC = dtc | 349 | DTC = dtc |
350 | CHECK = sparse | 350 | CHECK = sparse |
351 | 351 | ||
352 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ | 352 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ |
353 | -Wbitwise -Wno-return-void -D__CHECK_ENDIAN__ $(CF) | 353 | -Wbitwise -Wno-return-void -D__CHECK_ENDIAN__ $(CF) |
354 | 354 | ||
355 | KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__ | 355 | KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__ |
356 | 356 | ||
357 | KBUILD_CFLAGS := -Wall -Wstrict-prototypes \ | 357 | KBUILD_CFLAGS := -Wall -Wstrict-prototypes \ |
358 | -Wno-format-security \ | 358 | -Wno-format-security \ |
359 | -fno-builtin -ffreestanding | 359 | -fno-builtin -ffreestanding |
360 | KBUILD_AFLAGS := -D__ASSEMBLY__ | 360 | KBUILD_AFLAGS := -D__ASSEMBLY__ |
361 | 361 | ||
362 | # Read UBOOTRELEASE from include/config/uboot.release (if it exists) | 362 | # Read UBOOTRELEASE from include/config/uboot.release (if it exists) |
363 | UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null) | 363 | UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null) |
364 | UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) | 364 | UBOOTVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) |
365 | 365 | ||
366 | export VERSION PATCHLEVEL SUBLEVEL UBOOTRELEASE UBOOTVERSION | 366 | export VERSION PATCHLEVEL SUBLEVEL UBOOTRELEASE UBOOTVERSION |
367 | export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR | 367 | export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR |
368 | export CONFIG_SHELL HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE AS LD CC | 368 | export CONFIG_SHELL HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE AS LD CC |
369 | export CPP AR NM LDR STRIP OBJCOPY OBJDUMP | 369 | export CPP AR NM LDR STRIP OBJCOPY OBJDUMP |
370 | export MAKE AWK PERL PYTHON | 370 | export MAKE AWK PERL PYTHON |
371 | export HOSTCXX HOSTCXXFLAGS DTC CHECK CHECKFLAGS | 371 | export HOSTCXX HOSTCXXFLAGS DTC CHECK CHECKFLAGS |
372 | 372 | ||
373 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE OBJCOPYFLAGS LDFLAGS | 373 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE OBJCOPYFLAGS LDFLAGS |
374 | export KBUILD_CFLAGS KBUILD_AFLAGS | 374 | export KBUILD_CFLAGS KBUILD_AFLAGS |
375 | 375 | ||
376 | # When compiling out-of-tree modules, put MODVERDIR in the module | 376 | # When compiling out-of-tree modules, put MODVERDIR in the module |
377 | # tree rather than in the kernel tree. The kernel tree might | 377 | # tree rather than in the kernel tree. The kernel tree might |
378 | # even be read-only. | 378 | # even be read-only. |
379 | export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions | 379 | export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions |
380 | 380 | ||
381 | # Files to ignore in find ... statements | 381 | # Files to ignore in find ... statements |
382 | 382 | ||
383 | export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \ | 383 | export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \ |
384 | -name CVS -o -name .pc -o -name .hg -o -name .git \) \ | 384 | -name CVS -o -name .pc -o -name .hg -o -name .git \) \ |
385 | -prune -o | 385 | -prune -o |
386 | export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ | 386 | export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ |
387 | --exclude CVS --exclude .pc --exclude .hg --exclude .git | 387 | --exclude CVS --exclude .pc --exclude .hg --exclude .git |
388 | 388 | ||
389 | # =========================================================================== | 389 | # =========================================================================== |
390 | # Rules shared between *config targets and build targets | 390 | # Rules shared between *config targets and build targets |
391 | 391 | ||
392 | # Basic helpers built in scripts/ | 392 | # Basic helpers built in scripts/ |
393 | PHONY += scripts_basic | 393 | PHONY += scripts_basic |
394 | scripts_basic: | 394 | scripts_basic: |
395 | $(Q)$(MAKE) $(build)=scripts/basic | 395 | $(Q)$(MAKE) $(build)=scripts/basic |
396 | $(Q)rm -f .tmp_quiet_recordmcount | 396 | $(Q)rm -f .tmp_quiet_recordmcount |
397 | 397 | ||
398 | # To avoid any implicit rule to kick in, define an empty command. | 398 | # To avoid any implicit rule to kick in, define an empty command. |
399 | scripts/basic/%: scripts_basic ; | 399 | scripts/basic/%: scripts_basic ; |
400 | 400 | ||
401 | PHONY += outputmakefile | 401 | PHONY += outputmakefile |
402 | # outputmakefile generates a Makefile in the output directory, if using a | 402 | # outputmakefile generates a Makefile in the output directory, if using a |
403 | # separate output directory. This allows convenient use of make in the | 403 | # separate output directory. This allows convenient use of make in the |
404 | # output directory. | 404 | # output directory. |
405 | outputmakefile: | 405 | outputmakefile: |
406 | ifneq ($(KBUILD_SRC),) | 406 | ifneq ($(KBUILD_SRC),) |
407 | $(Q)ln -fsn $(srctree) source | 407 | $(Q)ln -fsn $(srctree) source |
408 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ | 408 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ |
409 | $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) | 409 | $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) |
410 | endif | 410 | endif |
411 | 411 | ||
412 | # To make sure we do not include .config for any of the *config targets | 412 | # To make sure we do not include .config for any of the *config targets |
413 | # catch them early, and hand them over to scripts/kconfig/Makefile | 413 | # catch them early, and hand them over to scripts/kconfig/Makefile |
414 | # It is allowed to specify more targets when calling make, including | 414 | # It is allowed to specify more targets when calling make, including |
415 | # mixing *config targets and build targets. | 415 | # mixing *config targets and build targets. |
416 | # For example 'make oldconfig all'. | 416 | # For example 'make oldconfig all'. |
417 | # Detect when mixed targets is specified, and make a second invocation | 417 | # Detect when mixed targets is specified, and make a second invocation |
418 | # of make so .config is not included in this case either (for *config). | 418 | # of make so .config is not included in this case either (for *config). |
419 | 419 | ||
420 | version_h := include/generated/version_autogenerated.h | 420 | version_h := include/generated/version_autogenerated.h |
421 | timestamp_h := include/generated/timestamp_autogenerated.h | 421 | timestamp_h := include/generated/timestamp_autogenerated.h |
422 | 422 | ||
423 | no-dot-config-targets := clean clobber mrproper distclean \ | 423 | no-dot-config-targets := clean clobber mrproper distclean \ |
424 | help %docs check% coccicheck \ | 424 | help %docs check% coccicheck \ |
425 | ubootversion backup | 425 | ubootversion backup |
426 | 426 | ||
427 | config-targets := 0 | 427 | config-targets := 0 |
428 | mixed-targets := 0 | 428 | mixed-targets := 0 |
429 | dot-config := 1 | 429 | dot-config := 1 |
430 | 430 | ||
431 | ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),) | 431 | ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),) |
432 | ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),) | 432 | ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),) |
433 | dot-config := 0 | 433 | dot-config := 0 |
434 | endif | 434 | endif |
435 | endif | 435 | endif |
436 | 436 | ||
437 | ifeq ($(KBUILD_EXTMOD),) | 437 | ifeq ($(KBUILD_EXTMOD),) |
438 | ifneq ($(filter config %config,$(MAKECMDGOALS)),) | 438 | ifneq ($(filter config %config,$(MAKECMDGOALS)),) |
439 | config-targets := 1 | 439 | config-targets := 1 |
440 | ifneq ($(filter-out config %config,$(MAKECMDGOALS)),) | 440 | ifneq ($(filter-out config %config,$(MAKECMDGOALS)),) |
441 | mixed-targets := 1 | 441 | mixed-targets := 1 |
442 | endif | 442 | endif |
443 | endif | 443 | endif |
444 | endif | 444 | endif |
445 | 445 | ||
446 | ifeq ($(mixed-targets),1) | 446 | ifeq ($(mixed-targets),1) |
447 | # =========================================================================== | 447 | # =========================================================================== |
448 | # We're called with mixed targets (*config and build targets). | 448 | # We're called with mixed targets (*config and build targets). |
449 | # Handle them one by one. | 449 | # Handle them one by one. |
450 | 450 | ||
451 | PHONY += $(MAKECMDGOALS) __build_one_by_one | 451 | PHONY += $(MAKECMDGOALS) __build_one_by_one |
452 | 452 | ||
453 | $(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one | 453 | $(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one |
454 | @: | 454 | @: |
455 | 455 | ||
456 | __build_one_by_one: | 456 | __build_one_by_one: |
457 | $(Q)set -e; \ | 457 | $(Q)set -e; \ |
458 | for i in $(MAKECMDGOALS); do \ | 458 | for i in $(MAKECMDGOALS); do \ |
459 | $(MAKE) -f $(srctree)/Makefile $$i; \ | 459 | $(MAKE) -f $(srctree)/Makefile $$i; \ |
460 | done | 460 | done |
461 | 461 | ||
462 | else | 462 | else |
463 | ifeq ($(config-targets),1) | 463 | ifeq ($(config-targets),1) |
464 | # =========================================================================== | 464 | # =========================================================================== |
465 | # *config targets only - make sure prerequisites are updated, and descend | 465 | # *config targets only - make sure prerequisites are updated, and descend |
466 | # in scripts/kconfig to make the *config target | 466 | # in scripts/kconfig to make the *config target |
467 | 467 | ||
468 | KBUILD_DEFCONFIG := sandbox_defconfig | 468 | KBUILD_DEFCONFIG := sandbox_defconfig |
469 | export KBUILD_DEFCONFIG KBUILD_KCONFIG | 469 | export KBUILD_DEFCONFIG KBUILD_KCONFIG |
470 | 470 | ||
471 | config: scripts_basic outputmakefile FORCE | 471 | config: scripts_basic outputmakefile FORCE |
472 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | 472 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ |
473 | 473 | ||
474 | %config: scripts_basic outputmakefile FORCE | 474 | %config: scripts_basic outputmakefile FORCE |
475 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | 475 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ |
476 | 476 | ||
477 | else | 477 | else |
478 | # =========================================================================== | 478 | # =========================================================================== |
479 | # Build targets only - this includes vmlinux, arch specific targets, clean | 479 | # Build targets only - this includes vmlinux, arch specific targets, clean |
480 | # targets and others. In general all targets except *config targets. | 480 | # targets and others. In general all targets except *config targets. |
481 | 481 | ||
482 | ifeq ($(dot-config),1) | 482 | ifeq ($(dot-config),1) |
483 | # Read in config | 483 | # Read in config |
484 | -include include/config/auto.conf | 484 | -include include/config/auto.conf |
485 | 485 | ||
486 | # Read in dependencies to all Kconfig* files, make sure to run | 486 | # Read in dependencies to all Kconfig* files, make sure to run |
487 | # oldconfig if changes are detected. | 487 | # oldconfig if changes are detected. |
488 | -include include/config/auto.conf.cmd | 488 | -include include/config/auto.conf.cmd |
489 | 489 | ||
490 | # To avoid any implicit rule to kick in, define an empty command | 490 | # To avoid any implicit rule to kick in, define an empty command |
491 | $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; | 491 | $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; |
492 | 492 | ||
493 | # If .config is newer than include/config/auto.conf, someone tinkered | 493 | # If .config is newer than include/config/auto.conf, someone tinkered |
494 | # with it and forgot to run make oldconfig. | 494 | # with it and forgot to run make oldconfig. |
495 | # if auto.conf.cmd is missing then we are probably in a cleaned tree so | 495 | # if auto.conf.cmd is missing then we are probably in a cleaned tree so |
496 | # we execute the config step to be sure to catch updated Kconfig files | 496 | # we execute the config step to be sure to catch updated Kconfig files |
497 | include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd | 497 | include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd |
498 | $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig | 498 | $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig |
499 | @# If the following part fails, include/config/auto.conf should be | 499 | @# If the following part fails, include/config/auto.conf should be |
500 | @# deleted so "make silentoldconfig" will be re-run on the next build. | 500 | @# deleted so "make silentoldconfig" will be re-run on the next build. |
501 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.autoconf || \ | 501 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.autoconf || \ |
502 | { rm -f include/config/auto.conf; false; } | 502 | { rm -f include/config/auto.conf; false; } |
503 | @# include/config.h has been updated after "make silentoldconfig". | 503 | @# include/config.h has been updated after "make silentoldconfig". |
504 | @# We need to touch include/config/auto.conf so it gets newer | 504 | @# We need to touch include/config/auto.conf so it gets newer |
505 | @# than include/config.h. | 505 | @# than include/config.h. |
506 | @# Otherwise, 'make silentoldconfig' would be invoked twice. | 506 | @# Otherwise, 'make silentoldconfig' would be invoked twice. |
507 | $(Q)touch include/config/auto.conf | 507 | $(Q)touch include/config/auto.conf |
508 | 508 | ||
509 | -include include/autoconf.mk | 509 | -include include/autoconf.mk |
510 | -include include/autoconf.mk.dep | 510 | -include include/autoconf.mk.dep |
511 | 511 | ||
512 | # We want to include arch/$(ARCH)/config.mk only when include/config/auto.conf | 512 | # We want to include arch/$(ARCH)/config.mk only when include/config/auto.conf |
513 | # is up-to-date. When we switch to a different board configuration, old CONFIG | 513 | # is up-to-date. When we switch to a different board configuration, old CONFIG |
514 | # macros are still remaining in include/config/auto.conf. Without the following | 514 | # macros are still remaining in include/config/auto.conf. Without the following |
515 | # gimmick, wrong config.mk would be included leading nasty warnings/errors. | 515 | # gimmick, wrong config.mk would be included leading nasty warnings/errors. |
516 | ifneq ($(wildcard $(KCONFIG_CONFIG)),) | 516 | ifneq ($(wildcard $(KCONFIG_CONFIG)),) |
517 | ifneq ($(wildcard include/config/auto.conf),) | 517 | ifneq ($(wildcard include/config/auto.conf),) |
518 | autoconf_is_old := $(shell find . -path ./$(KCONFIG_CONFIG) -newer \ | 518 | autoconf_is_old := $(shell find . -path ./$(KCONFIG_CONFIG) -newer \ |
519 | include/config/auto.conf) | 519 | include/config/auto.conf) |
520 | ifeq ($(autoconf_is_old),) | 520 | ifeq ($(autoconf_is_old),) |
521 | include $(srctree)/config.mk | 521 | include $(srctree)/config.mk |
522 | include $(srctree)/arch/$(ARCH)/Makefile | 522 | include $(srctree)/arch/$(ARCH)/Makefile |
523 | endif | 523 | endif |
524 | endif | 524 | endif |
525 | endif | 525 | endif |
526 | 526 | ||
527 | # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use | 527 | # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use |
528 | # that (or fail if absent). Otherwise, search for a linker script in a | 528 | # that (or fail if absent). Otherwise, search for a linker script in a |
529 | # standard location. | 529 | # standard location. |
530 | 530 | ||
531 | ifndef LDSCRIPT | 531 | ifndef LDSCRIPT |
532 | #LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds.debug | 532 | #LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds.debug |
533 | ifdef CONFIG_SYS_LDSCRIPT | 533 | ifdef CONFIG_SYS_LDSCRIPT |
534 | # need to strip off double quotes | 534 | # need to strip off double quotes |
535 | LDSCRIPT := $(srctree)/$(CONFIG_SYS_LDSCRIPT:"%"=%) | 535 | LDSCRIPT := $(srctree)/$(CONFIG_SYS_LDSCRIPT:"%"=%) |
536 | endif | 536 | endif |
537 | endif | 537 | endif |
538 | 538 | ||
539 | # If there is no specified link script, we look in a number of places for it | 539 | # If there is no specified link script, we look in a number of places for it |
540 | ifndef LDSCRIPT | 540 | ifndef LDSCRIPT |
541 | ifeq ($(wildcard $(LDSCRIPT)),) | 541 | ifeq ($(wildcard $(LDSCRIPT)),) |
542 | LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds | 542 | LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds |
543 | endif | 543 | endif |
544 | ifeq ($(wildcard $(LDSCRIPT)),) | 544 | ifeq ($(wildcard $(LDSCRIPT)),) |
545 | LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot.lds | 545 | LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot.lds |
546 | endif | 546 | endif |
547 | ifeq ($(wildcard $(LDSCRIPT)),) | 547 | ifeq ($(wildcard $(LDSCRIPT)),) |
548 | LDSCRIPT := $(srctree)/arch/$(ARCH)/cpu/u-boot.lds | 548 | LDSCRIPT := $(srctree)/arch/$(ARCH)/cpu/u-boot.lds |
549 | endif | 549 | endif |
550 | endif | 550 | endif |
551 | 551 | ||
552 | else | 552 | else |
553 | # Dummy target needed, because used as prerequisite | 553 | # Dummy target needed, because used as prerequisite |
554 | include/config/auto.conf: ; | 554 | include/config/auto.conf: ; |
555 | endif # $(dot-config) | 555 | endif # $(dot-config) |
556 | 556 | ||
557 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE | 557 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE |
558 | KBUILD_CFLAGS += -Os | 558 | KBUILD_CFLAGS += -Os |
559 | else | 559 | else |
560 | KBUILD_CFLAGS += -O2 | 560 | KBUILD_CFLAGS += -O2 |
561 | endif | 561 | endif |
562 | 562 | ||
563 | ifdef BUILD_TAG | 563 | ifdef BUILD_TAG |
564 | KBUILD_CFLAGS += -DBUILD_TAG='"$(BUILD_TAG)"' | 564 | KBUILD_CFLAGS += -DBUILD_TAG='"$(BUILD_TAG)"' |
565 | endif | 565 | endif |
566 | 566 | ||
567 | KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) | 567 | KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) |
568 | 568 | ||
569 | KBUILD_CFLAGS += -g | 569 | KBUILD_CFLAGS += -g |
570 | # $(KBUILD_AFLAGS) sets -g, which causes gcc to pass a suitable -g<format> | 570 | # $(KBUILD_AFLAGS) sets -g, which causes gcc to pass a suitable -g<format> |
571 | # option to the assembler. | 571 | # option to the assembler. |
572 | KBUILD_AFLAGS += -g | 572 | KBUILD_AFLAGS += -g |
573 | 573 | ||
574 | # Report stack usage if supported | 574 | # Report stack usage if supported |
575 | ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-stack-usage.sh $(CC)),y) | 575 | ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-stack-usage.sh $(CC)),y) |
576 | KBUILD_CFLAGS += -fstack-usage | 576 | KBUILD_CFLAGS += -fstack-usage |
577 | endif | 577 | endif |
578 | 578 | ||
579 | KBUILD_CFLAGS += $(call cc-option,-Wno-format-nonliteral) | 579 | KBUILD_CFLAGS += $(call cc-option,-Wno-format-nonliteral) |
580 | 580 | ||
581 | # turn jbsr into jsr for m68k | 581 | # turn jbsr into jsr for m68k |
582 | ifeq ($(ARCH),m68k) | 582 | ifeq ($(ARCH),m68k) |
583 | ifeq ($(findstring 3.4,$(shell $(CC) --version)),3.4) | 583 | ifeq ($(findstring 3.4,$(shell $(CC) --version)),3.4) |
584 | KBUILD_AFLAGS += -Wa,-gstabs,-S | 584 | KBUILD_AFLAGS += -Wa,-gstabs,-S |
585 | endif | 585 | endif |
586 | endif | 586 | endif |
587 | 587 | ||
588 | # Prohibit date/time macros, which would make the build non-deterministic | 588 | # Prohibit date/time macros, which would make the build non-deterministic |
589 | KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) | 589 | KBUILD_CFLAGS += $(call cc-option,-Werror=date-time) |
590 | 590 | ||
591 | ifneq ($(CONFIG_SYS_TEXT_BASE),) | 591 | ifneq ($(CONFIG_SYS_TEXT_BASE),) |
592 | KBUILD_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) | 592 | KBUILD_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) |
593 | endif | 593 | endif |
594 | 594 | ||
595 | export CONFIG_SYS_TEXT_BASE | 595 | export CONFIG_SYS_TEXT_BASE |
596 | 596 | ||
597 | include $(srctree)/scripts/Makefile.extrawarn | 597 | include $(srctree)/scripts/Makefile.extrawarn |
598 | 598 | ||
599 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments | 599 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments |
600 | KBUILD_CPPFLAGS += $(KCPPFLAGS) | 600 | KBUILD_CPPFLAGS += $(KCPPFLAGS) |
601 | KBUILD_AFLAGS += $(KAFLAGS) | 601 | KBUILD_AFLAGS += $(KAFLAGS) |
602 | KBUILD_CFLAGS += $(KCFLAGS) | 602 | KBUILD_CFLAGS += $(KCFLAGS) |
603 | 603 | ||
604 | # Use UBOOTINCLUDE when you must reference the include/ directory. | 604 | # Use UBOOTINCLUDE when you must reference the include/ directory. |
605 | # Needed to be compatible with the O= option | 605 | # Needed to be compatible with the O= option |
606 | UBOOTINCLUDE := \ | 606 | UBOOTINCLUDE := \ |
607 | -Iinclude \ | 607 | -Iinclude \ |
608 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ | 608 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ |
609 | -I$(srctree)/arch/$(ARCH)/include \ | 609 | -I$(srctree)/arch/$(ARCH)/include \ |
610 | -include $(srctree)/include/linux/kconfig.h | 610 | -include $(srctree)/include/linux/kconfig.h |
611 | 611 | ||
612 | NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) | 612 | NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) |
613 | CHECKFLAGS += $(NOSTDINC_FLAGS) | 613 | CHECKFLAGS += $(NOSTDINC_FLAGS) |
614 | 614 | ||
615 | # FIX ME | 615 | # FIX ME |
616 | cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \ | 616 | cpp_flags := $(KBUILD_CPPFLAGS) $(PLATFORM_CPPFLAGS) $(UBOOTINCLUDE) \ |
617 | $(NOSTDINC_FLAGS) | 617 | $(NOSTDINC_FLAGS) |
618 | c_flags := $(KBUILD_CFLAGS) $(cpp_flags) | 618 | c_flags := $(KBUILD_CFLAGS) $(cpp_flags) |
619 | 619 | ||
620 | ######################################################################### | 620 | ######################################################################### |
621 | # U-Boot objects....order is important (i.e. start must be first) | 621 | # U-Boot objects....order is important (i.e. start must be first) |
622 | 622 | ||
623 | HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) | 623 | HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) |
624 | 624 | ||
625 | libs-y += lib/ | 625 | libs-y += lib/ |
626 | libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ | 626 | libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ |
627 | libs-$(CONFIG_OF_EMBED) += dts/ | 627 | libs-$(CONFIG_OF_EMBED) += dts/ |
628 | libs-y += fs/ | 628 | libs-y += fs/ |
629 | libs-y += net/ | 629 | libs-y += net/ |
630 | libs-y += disk/ | 630 | libs-y += disk/ |
631 | libs-y += drivers/ | 631 | libs-y += drivers/ |
632 | libs-y += drivers/dma/ | 632 | libs-y += drivers/dma/ |
633 | libs-y += drivers/gpio/ | 633 | libs-y += drivers/gpio/ |
634 | libs-y += drivers/i2c/ | 634 | libs-y += drivers/i2c/ |
635 | libs-y += drivers/mmc/ | 635 | libs-y += drivers/mmc/ |
636 | libs-y += drivers/mtd/ | 636 | libs-y += drivers/mtd/ |
637 | libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/ | 637 | libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/ |
638 | libs-y += drivers/mtd/onenand/ | 638 | libs-y += drivers/mtd/onenand/ |
639 | libs-$(CONFIG_CMD_UBI) += drivers/mtd/ubi/ | 639 | libs-$(CONFIG_CMD_UBI) += drivers/mtd/ubi/ |
640 | libs-y += drivers/mtd/spi/ | 640 | libs-y += drivers/mtd/spi/ |
641 | libs-y += drivers/net/ | 641 | libs-y += drivers/net/ |
642 | libs-y += drivers/net/phy/ | 642 | libs-y += drivers/net/phy/ |
643 | libs-y += drivers/pci/ | 643 | libs-y += drivers/pci/ |
644 | libs-y += drivers/power/ \ | 644 | libs-y += drivers/power/ \ |
645 | drivers/power/fuel_gauge/ \ | 645 | drivers/power/fuel_gauge/ \ |
646 | drivers/power/mfd/ \ | 646 | drivers/power/mfd/ \ |
647 | drivers/power/pmic/ \ | 647 | drivers/power/pmic/ \ |
648 | drivers/power/battery/ | 648 | drivers/power/battery/ |
649 | libs-y += drivers/spi/ | 649 | libs-y += drivers/spi/ |
650 | libs-$(CONFIG_FMAN_ENET) += drivers/net/fm/ | 650 | libs-$(CONFIG_FMAN_ENET) += drivers/net/fm/ |
651 | libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/ | 651 | libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/ |
652 | libs-y += drivers/serial/ | 652 | libs-y += drivers/serial/ |
653 | libs-y += drivers/usb/eth/ | 653 | libs-y += drivers/usb/eth/ |
654 | libs-y += drivers/usb/gadget/ | 654 | libs-y += drivers/usb/gadget/ |
655 | libs-y += drivers/usb/host/ | 655 | libs-y += drivers/usb/host/ |
656 | libs-y += drivers/usb/musb/ | 656 | libs-y += drivers/usb/musb/ |
657 | libs-y += drivers/usb/musb-new/ | 657 | libs-y += drivers/usb/musb-new/ |
658 | libs-y += drivers/usb/phy/ | 658 | libs-y += drivers/usb/phy/ |
659 | libs-y += drivers/usb/ulpi/ | 659 | libs-y += drivers/usb/ulpi/ |
660 | libs-y += common/ | 660 | libs-y += common/ |
661 | libs-$(CONFIG_API) += api/ | 661 | libs-$(CONFIG_API) += api/ |
662 | libs-$(CONFIG_HAS_POST) += post/ | 662 | libs-$(CONFIG_HAS_POST) += post/ |
663 | libs-y += test/ | 663 | libs-y += test/ |
664 | libs-y += test/dm/ | 664 | libs-y += test/dm/ |
665 | 665 | ||
666 | libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/) | 666 | libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/) |
667 | 667 | ||
668 | libs-y := $(sort $(libs-y)) | 668 | libs-y := $(sort $(libs-y)) |
669 | 669 | ||
670 | u-boot-dirs := $(patsubst %/,%,$(filter %/, $(libs-y))) tools examples | 670 | u-boot-dirs := $(patsubst %/,%,$(filter %/, $(libs-y))) tools examples |
671 | 671 | ||
672 | u-boot-alldirs := $(sort $(u-boot-dirs) $(patsubst %/,%,$(filter %/, $(libs-)))) | 672 | u-boot-alldirs := $(sort $(u-boot-dirs) $(patsubst %/,%,$(filter %/, $(libs-)))) |
673 | 673 | ||
674 | libs-y := $(patsubst %/, %/built-in.o, $(libs-y)) | 674 | libs-y := $(patsubst %/, %/built-in.o, $(libs-y)) |
675 | 675 | ||
676 | u-boot-init := $(head-y) | 676 | u-boot-init := $(head-y) |
677 | u-boot-main := $(libs-y) | 677 | u-boot-main := $(libs-y) |
678 | 678 | ||
679 | 679 | ||
680 | # Add GCC lib | 680 | # Add GCC lib |
681 | ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y) | 681 | ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y) |
682 | PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a | 682 | PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a |
683 | else | 683 | else |
684 | PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc | 684 | PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc |
685 | endif | 685 | endif |
686 | PLATFORM_LIBS += $(PLATFORM_LIBGCC) | 686 | PLATFORM_LIBS += $(PLATFORM_LIBGCC) |
687 | export PLATFORM_LIBS | 687 | export PLATFORM_LIBS |
688 | export PLATFORM_LIBGCC | 688 | export PLATFORM_LIBGCC |
689 | 689 | ||
690 | # Special flags for CPP when processing the linker script. | 690 | # Special flags for CPP when processing the linker script. |
691 | # Pass the version down so we can handle backwards compatibility | 691 | # Pass the version down so we can handle backwards compatibility |
692 | # on the fly. | 692 | # on the fly. |
693 | LDPPFLAGS += \ | 693 | LDPPFLAGS += \ |
694 | -include $(srctree)/include/u-boot/u-boot.lds.h \ | 694 | -include $(srctree)/include/u-boot/u-boot.lds.h \ |
695 | -DCPUDIR=$(CPUDIR) \ | 695 | -DCPUDIR=$(CPUDIR) \ |
696 | $(shell $(LD) --version | \ | 696 | $(shell $(LD) --version | \ |
697 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') | 697 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') |
698 | 698 | ||
699 | ######################################################################### | 699 | ######################################################################### |
700 | ######################################################################### | 700 | ######################################################################### |
701 | 701 | ||
702 | ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) | 702 | ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) |
703 | BOARD_SIZE_CHECK = \ | 703 | BOARD_SIZE_CHECK = \ |
704 | @actual=`wc -c $@ | awk '{print $$1}'`; \ | 704 | @actual=`wc -c $@ | awk '{print $$1}'`; \ |
705 | limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \ | 705 | limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \ |
706 | if test $$actual -gt $$limit; then \ | 706 | if test $$actual -gt $$limit; then \ |
707 | echo "$@ exceeds file size limit:" >&2 ; \ | 707 | echo "$@ exceeds file size limit:" >&2 ; \ |
708 | echo " limit: $$limit bytes" >&2 ; \ | 708 | echo " limit: $$limit bytes" >&2 ; \ |
709 | echo " actual: $$actual bytes" >&2 ; \ | 709 | echo " actual: $$actual bytes" >&2 ; \ |
710 | echo " excess: $$((actual - limit)) bytes" >&2; \ | 710 | echo " excess: $$((actual - limit)) bytes" >&2; \ |
711 | exit 1; \ | 711 | exit 1; \ |
712 | fi | 712 | fi |
713 | else | 713 | else |
714 | BOARD_SIZE_CHECK = | 714 | BOARD_SIZE_CHECK = |
715 | endif | 715 | endif |
716 | 716 | ||
717 | # Statically apply RELA-style relocations (currently arm64 only) | 717 | # Statically apply RELA-style relocations (currently arm64 only) |
718 | ifneq ($(CONFIG_STATIC_RELA),) | 718 | ifneq ($(CONFIG_STATIC_RELA),) |
719 | # $(1) is u-boot ELF, $(2) is u-boot bin, $(3) is text base | 719 | # $(1) is u-boot ELF, $(2) is u-boot bin, $(3) is text base |
720 | DO_STATIC_RELA = \ | 720 | DO_STATIC_RELA = \ |
721 | start=$$($(NM) $(1) | grep __rel_dyn_start | cut -f 1 -d ' '); \ | 721 | start=$$($(NM) $(1) | grep __rel_dyn_start | cut -f 1 -d ' '); \ |
722 | end=$$($(NM) $(1) | grep __rel_dyn_end | cut -f 1 -d ' '); \ | 722 | end=$$($(NM) $(1) | grep __rel_dyn_end | cut -f 1 -d ' '); \ |
723 | tools/relocate-rela $(2) $(3) $$start $$end | 723 | tools/relocate-rela $(2) $(3) $$start $$end |
724 | else | 724 | else |
725 | DO_STATIC_RELA = | 725 | DO_STATIC_RELA = |
726 | endif | 726 | endif |
727 | 727 | ||
728 | # Always append ALL so that arch config.mk's can add custom ones | 728 | # Always append ALL so that arch config.mk's can add custom ones |
729 | ALL-y += u-boot.srec u-boot.bin System.map binary_size_check | 729 | ALL-y += u-boot.srec u-boot.bin System.map binary_size_check |
730 | 730 | ||
731 | ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin | 731 | ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin |
732 | ifeq ($(CONFIG_SPL_FSL_PBL),y) | 732 | ifeq ($(CONFIG_SPL_FSL_PBL),y) |
733 | ALL-$(CONFIG_RAMBOOT_PBL) += u-boot-with-spl-pbl.bin | 733 | ALL-$(CONFIG_RAMBOOT_PBL) += u-boot-with-spl-pbl.bin |
734 | else | 734 | else |
735 | ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl | 735 | ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl |
736 | endif | 736 | endif |
737 | ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin | 737 | ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin |
738 | ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img | 738 | ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img |
739 | ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin | 739 | ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin |
740 | ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb u-boot-dtb.bin | 740 | ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb u-boot-dtb.bin |
741 | ifeq ($(CONFIG_SPL_FRAMEWORK),y) | 741 | ifeq ($(CONFIG_SPL_FRAMEWORK),y) |
742 | ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img | 742 | ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img |
743 | endif | 743 | endif |
744 | ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtb | 744 | ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtb |
745 | ifneq ($(CONFIG_SPL_TARGET),) | 745 | ifneq ($(CONFIG_SPL_TARGET),) |
746 | ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) | 746 | ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) |
747 | endif | 747 | endif |
748 | ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf | 748 | ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf |
749 | 749 | ||
750 | ifneq ($(BUILD_ROM),) | 750 | ifneq ($(BUILD_ROM),) |
751 | ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom | 751 | ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom |
752 | endif | 752 | endif |
753 | 753 | ||
754 | # enable combined SPL/u-boot/dtb rules for tegra | 754 | # enable combined SPL/u-boot/dtb rules for tegra |
755 | ifneq ($(CONFIG_TEGRA),) | 755 | ifneq ($(CONFIG_TEGRA),) |
756 | ifeq ($(CONFIG_SPL),y) | 756 | ifeq ($(CONFIG_SPL),y) |
757 | ifeq ($(CONFIG_OF_SEPARATE),y) | 757 | ifeq ($(CONFIG_OF_SEPARATE),y) |
758 | ALL-y += u-boot-dtb-tegra.bin | 758 | ALL-y += u-boot-dtb-tegra.bin |
759 | else | 759 | else |
760 | ALL-y += u-boot-nodtb-tegra.bin | 760 | ALL-y += u-boot-nodtb-tegra.bin |
761 | endif | 761 | endif |
762 | endif | 762 | endif |
763 | endif | 763 | endif |
764 | 764 | ||
765 | # Add optional build target if defined in board/cpu/soc headers | 765 | # Add optional build target if defined in board/cpu/soc headers |
766 | ifneq ($(CONFIG_BUILD_TARGET),) | 766 | ifneq ($(CONFIG_BUILD_TARGET),) |
767 | ALL-y += $(CONFIG_BUILD_TARGET:"%"=%) | 767 | ALL-y += $(CONFIG_BUILD_TARGET:"%"=%) |
768 | endif | 768 | endif |
769 | 769 | ||
770 | LDFLAGS_u-boot += $(LDFLAGS_FINAL) | 770 | LDFLAGS_u-boot += $(LDFLAGS_FINAL) |
771 | ifneq ($(CONFIG_SYS_TEXT_BASE),) | 771 | ifneq ($(CONFIG_SYS_TEXT_BASE),) |
772 | LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) | 772 | LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) |
773 | endif | 773 | endif |
774 | 774 | ||
775 | quiet_cmd_objcopy = OBJCOPY $@ | 775 | quiet_cmd_objcopy = OBJCOPY $@ |
776 | cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ | 776 | cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ |
777 | 777 | ||
778 | quiet_cmd_mkimage = MKIMAGE $@ | 778 | quiet_cmd_mkimage = MKIMAGE $@ |
779 | cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ | 779 | cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ |
780 | $(if $(KBUILD_VERBOSE:1=), >/dev/null) | 780 | $(if $(KBUILD_VERBOSE:1=), >/dev/null) |
781 | 781 | ||
782 | quiet_cmd_cat = CAT $@ | 782 | quiet_cmd_cat = CAT $@ |
783 | cmd_cat = cat $(filter-out $(PHONY), $^) > $@ | 783 | cmd_cat = cat $(filter-out $(PHONY), $^) > $@ |
784 | 784 | ||
785 | append = cat $(filter-out $< $(PHONY), $^) >> $@ | 785 | append = cat $(filter-out $< $(PHONY), $^) >> $@ |
786 | 786 | ||
787 | quiet_cmd_pad_cat = CAT $@ | 787 | quiet_cmd_pad_cat = CAT $@ |
788 | cmd_pad_cat = $(cmd_objcopy) && $(append) || rm -f $@ | 788 | cmd_pad_cat = $(cmd_objcopy) && $(append) || rm -f $@ |
789 | 789 | ||
790 | all: $(ALL-y) | 790 | all: $(ALL-y) |
791 | ifneq ($(CONFIG_SYS_GENERIC_BOARD),y) | 791 | ifneq ($(CONFIG_SYS_GENERIC_BOARD),y) |
792 | @echo "===================== WARNING ======================" | 792 | @echo "===================== WARNING ======================" |
793 | @echo "Please convert this board to generic board." | 793 | @echo "Please convert this board to generic board." |
794 | @echo "Otherwise it will be removed by the end of 2014." | 794 | @echo "Otherwise it will be removed by the end of 2014." |
795 | @echo "See doc/README.generic-board for further information" | 795 | @echo "See doc/README.generic-board for further information" |
796 | @echo "====================================================" | 796 | @echo "====================================================" |
797 | endif | 797 | endif |
798 | ifeq ($(CONFIG_DM_I2C_COMPAT),y) | 798 | ifeq ($(CONFIG_DM_I2C_COMPAT),y) |
799 | @echo "===================== WARNING ======================" | 799 | @echo "===================== WARNING ======================" |
800 | @echo "This board uses CONFIG_DM_I2C_COMPAT. Please remove" | 800 | @echo "This board uses CONFIG_DM_I2C_COMPAT. Please remove" |
801 | @echo "(possibly in a subsequent patch in your series)" | 801 | @echo "(possibly in a subsequent patch in your series)" |
802 | @echo "before sending patches to the mailing list." | 802 | @echo "before sending patches to the mailing list." |
803 | @echo "====================================================" | 803 | @echo "====================================================" |
804 | endif | 804 | endif |
805 | 805 | ||
806 | PHONY += dtbs | 806 | PHONY += dtbs |
807 | dtbs dts/dt.dtb: checkdtc u-boot | 807 | dtbs dts/dt.dtb: checkdtc u-boot |
808 | $(Q)$(MAKE) $(build)=dts dtbs | 808 | $(Q)$(MAKE) $(build)=dts dtbs |
809 | 809 | ||
810 | u-boot-dtb.bin: u-boot.bin dts/dt.dtb FORCE | 810 | u-boot-dtb.bin: u-boot.bin dts/dt.dtb FORCE |
811 | $(call if_changed,cat) | 811 | $(call if_changed,cat) |
812 | 812 | ||
813 | %.imx: %.bin | 813 | %.imx: %.bin |
814 | $(Q)$(MAKE) $(build)=arch/arm/imx-common $@ | 814 | $(Q)$(MAKE) $(build)=arch/arm/imx-common $@ |
815 | 815 | ||
816 | quiet_cmd_copy = COPY $@ | 816 | quiet_cmd_copy = COPY $@ |
817 | cmd_copy = cp $< $@ | 817 | cmd_copy = cp $< $@ |
818 | 818 | ||
819 | u-boot.dtb: dts/dt.dtb | 819 | u-boot.dtb: dts/dt.dtb |
820 | $(call cmd,copy) | 820 | $(call cmd,copy) |
821 | 821 | ||
822 | OBJCOPYFLAGS_u-boot.hex := -O ihex | 822 | OBJCOPYFLAGS_u-boot.hex := -O ihex |
823 | 823 | ||
824 | OBJCOPYFLAGS_u-boot.srec := -O srec | 824 | OBJCOPYFLAGS_u-boot.srec := -O srec |
825 | 825 | ||
826 | u-boot.hex u-boot.srec: u-boot FORCE | 826 | u-boot.hex u-boot.srec: u-boot FORCE |
827 | $(call if_changed,objcopy) | 827 | $(call if_changed,objcopy) |
828 | 828 | ||
829 | OBJCOPYFLAGS_u-boot.bin := -O binary \ | 829 | OBJCOPYFLAGS_u-boot.bin := -O binary \ |
830 | $(if $(CONFIG_X86_RESET_VECTOR),-R .start16 -R .resetvec) | 830 | $(if $(CONFIG_X86_RESET_VECTOR),-R .start16 -R .resetvec) |
831 | 831 | ||
832 | binary_size_check: u-boot.bin FORCE | 832 | binary_size_check: u-boot.bin FORCE |
833 | @file_size=$(shell wc -c u-boot.bin | awk '{print $$1}') ; \ | 833 | @file_size=$(shell wc -c u-boot.bin | awk '{print $$1}') ; \ |
834 | map_size=$(shell cat u-boot.map | \ | 834 | map_size=$(shell cat u-boot.map | \ |
835 | awk '/_image_copy_start/ {start = $$1} /_image_binary_end/ {end = $$1} END {if (start != "" && end != "") print "ibase=16; " toupper(end) " - " toupper(start)}' \ | 835 | awk '/_image_copy_start/ {start = $$1} /_image_binary_end/ {end = $$1} END {if (start != "" && end != "") print "ibase=16; " toupper(end) " - " toupper(start)}' \ |
836 | | sed 's/0X//g' \ | 836 | | sed 's/0X//g' \ |
837 | | bc); \ | 837 | | bc); \ |
838 | if [ "" != "$$map_size" ]; then \ | 838 | if [ "" != "$$map_size" ]; then \ |
839 | if test $$map_size -ne $$file_size; then \ | 839 | if test $$map_size -ne $$file_size; then \ |
840 | echo "u-boot.map shows a binary size of $$map_size" >&2 ; \ | 840 | echo "u-boot.map shows a binary size of $$map_size" >&2 ; \ |
841 | echo " but u-boot.bin shows $$file_size" >&2 ; \ | 841 | echo " but u-boot.bin shows $$file_size" >&2 ; \ |
842 | exit 1; \ | 842 | exit 1; \ |
843 | fi \ | 843 | fi \ |
844 | fi | 844 | fi |
845 | 845 | ||
846 | u-boot.bin: u-boot FORCE | 846 | u-boot.bin: u-boot FORCE |
847 | $(call if_changed,objcopy) | 847 | $(call if_changed,objcopy) |
848 | $(call DO_STATIC_RELA,$<,$@,$(CONFIG_SYS_TEXT_BASE)) | 848 | $(call DO_STATIC_RELA,$<,$@,$(CONFIG_SYS_TEXT_BASE)) |
849 | $(BOARD_SIZE_CHECK) | 849 | $(BOARD_SIZE_CHECK) |
850 | 850 | ||
851 | u-boot.ldr: u-boot | 851 | u-boot.ldr: u-boot |
852 | $(CREATE_LDR_ENV) | 852 | $(CREATE_LDR_ENV) |
853 | $(LDR) -T $(CONFIG_CPU) -c $@ $< $(LDR_FLAGS) | 853 | $(LDR) -T $(CONFIG_CPU) -c $@ $< $(LDR_FLAGS) |
854 | $(BOARD_SIZE_CHECK) | 854 | $(BOARD_SIZE_CHECK) |
855 | 855 | ||
856 | OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex | 856 | OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex |
857 | 857 | ||
858 | OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec | 858 | OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec |
859 | 859 | ||
860 | u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE | 860 | u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE |
861 | $(call if_changed,objcopy) | 861 | $(call if_changed,objcopy) |
862 | 862 | ||
863 | # | 863 | # |
864 | # U-Boot entry point, needed for booting of full-blown U-Boot | 864 | # U-Boot entry point, needed for booting of full-blown U-Boot |
865 | # from the SPL U-Boot version. | 865 | # from the SPL U-Boot version. |
866 | # | 866 | # |
867 | ifndef CONFIG_SYS_UBOOT_START | 867 | ifndef CONFIG_SYS_UBOOT_START |
868 | CONFIG_SYS_UBOOT_START := 0 | 868 | CONFIG_SYS_UBOOT_START := 0 |
869 | endif | 869 | endif |
870 | 870 | ||
871 | MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \ | 871 | MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \ |
872 | -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ | 872 | -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ |
873 | -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" | 873 | -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" |
874 | 874 | ||
875 | MKIMAGEFLAGS_u-boot.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \ | 875 | MKIMAGEFLAGS_u-boot.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \ |
876 | -T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) | 876 | -T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) |
877 | 877 | ||
878 | MKIMAGEFLAGS_u-boot-spl.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \ | 878 | MKIMAGEFLAGS_u-boot-spl.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \ |
879 | -T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) | 879 | -T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) |
880 | 880 | ||
881 | MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \ | 881 | MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \ |
882 | -R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage | 882 | -R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage |
883 | 883 | ||
884 | u-boot.img u-boot.kwb u-boot.pbl: u-boot.bin FORCE | 884 | u-boot.img u-boot.kwb u-boot.pbl: u-boot.bin FORCE |
885 | $(call if_changed,mkimage) | 885 | $(call if_changed,mkimage) |
886 | 886 | ||
887 | u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE | 887 | u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE |
888 | $(call if_changed,mkimage) | 888 | $(call if_changed,mkimage) |
889 | 889 | ||
890 | MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img) | 890 | MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img) |
891 | 891 | ||
892 | u-boot-dtb.img: u-boot-dtb.bin FORCE | 892 | u-boot-dtb.img: u-boot-dtb.bin FORCE |
893 | $(call if_changed,mkimage) | 893 | $(call if_changed,mkimage) |
894 | 894 | ||
895 | u-boot.sha1: u-boot.bin | 895 | u-boot.sha1: u-boot.bin |
896 | tools/ubsha1 u-boot.bin | 896 | tools/ubsha1 u-boot.bin |
897 | 897 | ||
898 | u-boot.dis: u-boot | 898 | u-boot.dis: u-boot |
899 | $(OBJDUMP) -d $< > $@ | 899 | $(OBJDUMP) -d $< > $@ |
900 | 900 | ||
901 | ifdef CONFIG_TPL | 901 | ifdef CONFIG_TPL |
902 | SPL_PAYLOAD := tpl/u-boot-with-tpl.bin | 902 | SPL_PAYLOAD := tpl/u-boot-with-tpl.bin |
903 | else | 903 | else |
904 | SPL_PAYLOAD := u-boot.bin | 904 | SPL_PAYLOAD := u-boot.bin |
905 | endif | 905 | endif |
906 | 906 | ||
907 | OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \ | 907 | OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \ |
908 | --pad-to=$(CONFIG_SPL_PAD_TO) | 908 | --pad-to=$(CONFIG_SPL_PAD_TO) |
909 | u-boot-with-spl.bin: spl/u-boot-spl.bin $(SPL_PAYLOAD) FORCE | 909 | u-boot-with-spl.bin: spl/u-boot-spl.bin $(SPL_PAYLOAD) FORCE |
910 | $(call if_changed,pad_cat) | 910 | $(call if_changed,pad_cat) |
911 | 911 | ||
912 | MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE) | ||
913 | |||
914 | lpc32xx-spl.img: spl/u-boot-spl.bin FORCE | ||
915 | $(call if_changed,mkimage) | ||
916 | |||
917 | OBJCOPYFLAGS_lpc32xx-boot-0.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) | ||
918 | |||
919 | lpc32xx-boot-0.bin: lpc32xx-spl.img | ||
920 | $(call if_changed,objcopy) | ||
921 | |||
922 | OBJCOPYFLAGS_lpc32xx-boot-1.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) | ||
923 | |||
924 | lpc32xx-boot-1.bin: lpc32xx-spl.img | ||
925 | $(call if_changed,objcopy) | ||
926 | |||
927 | lpc32xx-full.bin: lpc32xx-boot-0.bin lpc32xx-boot-1.bin u-boot.img | ||
928 | $(call if_changed,cat) | ||
929 | |||
930 | CLEAN_FILES += lpc32xx-* | ||
931 | |||
912 | OBJCOPYFLAGS_u-boot-with-tpl.bin = -I binary -O binary \ | 932 | OBJCOPYFLAGS_u-boot-with-tpl.bin = -I binary -O binary \ |
913 | --pad-to=$(CONFIG_TPL_PAD_TO) | 933 | --pad-to=$(CONFIG_TPL_PAD_TO) |
914 | tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin FORCE | 934 | tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin FORCE |
915 | $(call if_changed,pad_cat) | 935 | $(call if_changed,pad_cat) |
916 | 936 | ||
917 | SPL: spl/u-boot-spl.bin FORCE | 937 | SPL: spl/u-boot-spl.bin FORCE |
918 | $(Q)$(MAKE) $(build)=arch/arm/imx-common $@ | 938 | $(Q)$(MAKE) $(build)=arch/arm/imx-common $@ |
919 | 939 | ||
920 | u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL u-boot.bin FORCE | 940 | u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL u-boot.bin FORCE |
921 | $(Q)$(MAKE) $(build)=arch/arm/imx-common $@ | 941 | $(Q)$(MAKE) $(build)=arch/arm/imx-common $@ |
922 | 942 | ||
923 | MKIMAGEFLAGS_u-boot.ubl = -n $(UBL_CONFIG) -T ublimage -e $(CONFIG_SYS_TEXT_BASE) | 943 | MKIMAGEFLAGS_u-boot.ubl = -n $(UBL_CONFIG) -T ublimage -e $(CONFIG_SYS_TEXT_BASE) |
924 | 944 | ||
925 | u-boot.ubl: u-boot-with-spl.bin FORCE | 945 | u-boot.ubl: u-boot-with-spl.bin FORCE |
926 | $(call if_changed,mkimage) | 946 | $(call if_changed,mkimage) |
927 | 947 | ||
928 | MKIMAGEFLAGS_u-boot-spl.ais = -s -n $(if $(CONFIG_AIS_CONFIG_FILE), \ | 948 | MKIMAGEFLAGS_u-boot-spl.ais = -s -n $(if $(CONFIG_AIS_CONFIG_FILE), \ |
929 | $(srctree)/$(CONFIG_AIS_CONFIG_FILE:"%"=%),"/dev/null") \ | 949 | $(srctree)/$(CONFIG_AIS_CONFIG_FILE:"%"=%),"/dev/null") \ |
930 | -T aisimage -e $(CONFIG_SPL_TEXT_BASE) | 950 | -T aisimage -e $(CONFIG_SPL_TEXT_BASE) |
931 | spl/u-boot-spl.ais: spl/u-boot-spl.bin FORCE | 951 | spl/u-boot-spl.ais: spl/u-boot-spl.bin FORCE |
932 | $(call if_changed,mkimage) | 952 | $(call if_changed,mkimage) |
933 | 953 | ||
934 | OBJCOPYFLAGS_u-boot.ais = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) | 954 | OBJCOPYFLAGS_u-boot.ais = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) |
935 | u-boot.ais: spl/u-boot-spl.ais u-boot.img FORCE | 955 | u-boot.ais: spl/u-boot-spl.ais u-boot.img FORCE |
936 | $(call if_changed,pad_cat) | 956 | $(call if_changed,pad_cat) |
937 | 957 | ||
938 | u-boot-signed.sb: u-boot.bin spl/u-boot-spl.bin | 958 | u-boot-signed.sb: u-boot.bin spl/u-boot-spl.bin |
939 | $(Q)$(MAKE) $(build)=arch/arm/cpu/arm926ejs/mxs u-boot-signed.sb | 959 | $(Q)$(MAKE) $(build)=arch/arm/cpu/arm926ejs/mxs u-boot-signed.sb |
940 | u-boot.sb: u-boot.bin spl/u-boot-spl.bin | 960 | u-boot.sb: u-boot.bin spl/u-boot-spl.bin |
941 | $(Q)$(MAKE) $(build)=arch/arm/cpu/arm926ejs/mxs u-boot.sb | 961 | $(Q)$(MAKE) $(build)=arch/arm/cpu/arm926ejs/mxs u-boot.sb |
942 | 962 | ||
943 | # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. | 963 | # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. |
944 | # Both images are created using mkimage (crc etc), so that the ROM | 964 | # Both images are created using mkimage (crc etc), so that the ROM |
945 | # bootloader can check its integrity. Padding needs to be done to the | 965 | # bootloader can check its integrity. Padding needs to be done to the |
946 | # SPL image (with mkimage header) and not the binary. Otherwise the resulting image | 966 | # SPL image (with mkimage header) and not the binary. Otherwise the resulting image |
947 | # which is loaded/copied by the ROM bootloader to SRAM doesn't fit. | 967 | # which is loaded/copied by the ROM bootloader to SRAM doesn't fit. |
948 | # The resulting image containing both U-Boot images is called u-boot.spr | 968 | # The resulting image containing both U-Boot images is called u-boot.spr |
949 | MKIMAGEFLAGS_u-boot-spl.img = -A $(ARCH) -T firmware -C none \ | 969 | MKIMAGEFLAGS_u-boot-spl.img = -A $(ARCH) -T firmware -C none \ |
950 | -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) -n XLOADER | 970 | -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) -n XLOADER |
951 | spl/u-boot-spl.img: spl/u-boot-spl.bin FORCE | 971 | spl/u-boot-spl.img: spl/u-boot-spl.bin FORCE |
952 | $(call if_changed,mkimage) | 972 | $(call if_changed,mkimage) |
953 | 973 | ||
954 | OBJCOPYFLAGS_u-boot.spr = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \ | 974 | OBJCOPYFLAGS_u-boot.spr = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \ |
955 | --gap-fill=0xff | 975 | --gap-fill=0xff |
956 | u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE | 976 | u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE |
957 | $(call if_changed,pad_cat) | 977 | $(call if_changed,pad_cat) |
958 | 978 | ||
959 | MKIMAGEFLAGS_u-boot-spl.gph = -A $(ARCH) -T gpimage -C none \ | 979 | MKIMAGEFLAGS_u-boot-spl.gph = -A $(ARCH) -T gpimage -C none \ |
960 | -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) -n SPL | 980 | -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) -n SPL |
961 | spl/u-boot-spl.gph: spl/u-boot-spl.bin FORCE | 981 | spl/u-boot-spl.gph: spl/u-boot-spl.bin FORCE |
962 | $(call if_changed,mkimage) | 982 | $(call if_changed,mkimage) |
963 | 983 | ||
964 | OBJCOPYFLAGS_u-boot-spi.gph = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \ | 984 | OBJCOPYFLAGS_u-boot-spi.gph = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \ |
965 | --gap-fill=0 | 985 | --gap-fill=0 |
966 | u-boot-spi.gph: spl/u-boot-spl.gph u-boot.img FORCE | 986 | u-boot-spi.gph: spl/u-boot-spl.gph u-boot.img FORCE |
967 | $(call if_changed,pad_cat) | 987 | $(call if_changed,pad_cat) |
968 | 988 | ||
969 | MKIMAGEFLAGS_u-boot-nand.gph = -A $(ARCH) -T gpimage -C none \ | 989 | MKIMAGEFLAGS_u-boot-nand.gph = -A $(ARCH) -T gpimage -C none \ |
970 | -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -n U-Boot | 990 | -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -n U-Boot |
971 | u-boot-nand.gph: u-boot.bin FORCE | 991 | u-boot-nand.gph: u-boot.bin FORCE |
972 | $(call if_changed,mkimage) | 992 | $(call if_changed,mkimage) |
973 | @dd if=/dev/zero bs=8 count=1 2>/dev/null >> $@ | 993 | @dd if=/dev/zero bs=8 count=1 2>/dev/null >> $@ |
974 | 994 | ||
975 | # x86 uses a large ROM. We fill it with 0xff, put the 16-bit stuff (including | 995 | # x86 uses a large ROM. We fill it with 0xff, put the 16-bit stuff (including |
976 | # reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in | 996 | # reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in |
977 | # the middle. | 997 | # the middle. |
978 | ifneq ($(CONFIG_X86_RESET_VECTOR),) | 998 | ifneq ($(CONFIG_X86_RESET_VECTOR),) |
979 | rom: u-boot.rom FORCE | 999 | rom: u-boot.rom FORCE |
980 | 1000 | ||
981 | IFDTOOL=$(objtree)/tools/ifdtool | 1001 | IFDTOOL=$(objtree)/tools/ifdtool |
982 | IFDTOOL_FLAGS = -f 0:$(objtree)/u-boot.dtb | 1002 | IFDTOOL_FLAGS = -f 0:$(objtree)/u-boot.dtb |
983 | IFDTOOL_FLAGS += -m 0x$(shell $(NM) u-boot |grep _dt_ucode_base_size |cut -d' ' -f1) | 1003 | IFDTOOL_FLAGS += -m 0x$(shell $(NM) u-boot |grep _dt_ucode_base_size |cut -d' ' -f1) |
984 | IFDTOOL_FLAGS += -U $(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot.bin | 1004 | IFDTOOL_FLAGS += -U $(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot.bin |
985 | IFDTOOL_FLAGS += -w $(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin | 1005 | IFDTOOL_FLAGS += -w $(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin |
986 | 1006 | ||
987 | ifneq ($(CONFIG_HAVE_INTEL_ME),) | 1007 | ifneq ($(CONFIG_HAVE_INTEL_ME),) |
988 | IFDTOOL_ME_FLAGS = -D $(srctree)/board/$(BOARDDIR)/descriptor.bin | 1008 | IFDTOOL_ME_FLAGS = -D $(srctree)/board/$(BOARDDIR)/descriptor.bin |
989 | IFDTOOL_ME_FLAGS += -i ME:$(srctree)/board/$(BOARDDIR)/me.bin | 1009 | IFDTOOL_ME_FLAGS += -i ME:$(srctree)/board/$(BOARDDIR)/me.bin |
990 | endif | 1010 | endif |
991 | 1011 | ||
992 | ifneq ($(CONFIG_HAVE_MRC),) | 1012 | ifneq ($(CONFIG_HAVE_MRC),) |
993 | IFDTOOL_FLAGS += -w $(CONFIG_X86_MRC_ADDR):$(srctree)/board/$(BOARDDIR)/mrc.bin | 1013 | IFDTOOL_FLAGS += -w $(CONFIG_X86_MRC_ADDR):$(srctree)/board/$(BOARDDIR)/mrc.bin |
994 | endif | 1014 | endif |
995 | 1015 | ||
996 | ifneq ($(CONFIG_HAVE_FSP),) | 1016 | ifneq ($(CONFIG_HAVE_FSP),) |
997 | IFDTOOL_FLAGS += -w $(CONFIG_FSP_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_FSP_FILE) | 1017 | IFDTOOL_FLAGS += -w $(CONFIG_FSP_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_FSP_FILE) |
998 | endif | 1018 | endif |
999 | 1019 | ||
1000 | ifneq ($(CONFIG_HAVE_CMC),) | 1020 | ifneq ($(CONFIG_HAVE_CMC),) |
1001 | IFDTOOL_FLAGS += -w $(CONFIG_CMC_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_CMC_FILE) | 1021 | IFDTOOL_FLAGS += -w $(CONFIG_CMC_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_CMC_FILE) |
1002 | endif | 1022 | endif |
1003 | 1023 | ||
1004 | ifneq ($(CONFIG_X86_OPTION_ROM_ADDR),) | 1024 | ifneq ($(CONFIG_X86_OPTION_ROM_ADDR),) |
1005 | IFDTOOL_FLAGS += -w $(CONFIG_X86_OPTION_ROM_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_X86_OPTION_ROM_FILE) | 1025 | IFDTOOL_FLAGS += -w $(CONFIG_X86_OPTION_ROM_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_X86_OPTION_ROM_FILE) |
1006 | endif | 1026 | endif |
1007 | 1027 | ||
1008 | quiet_cmd_ifdtool = IFDTOOL $@ | 1028 | quiet_cmd_ifdtool = IFDTOOL $@ |
1009 | cmd_ifdtool = $(IFDTOOL) -c -r $(CONFIG_ROM_SIZE) u-boot.tmp; | 1029 | cmd_ifdtool = $(IFDTOOL) -c -r $(CONFIG_ROM_SIZE) u-boot.tmp; |
1010 | ifneq ($(CONFIG_HAVE_INTEL_ME),) | 1030 | ifneq ($(CONFIG_HAVE_INTEL_ME),) |
1011 | cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_ME_FLAGS) u-boot.tmp; | 1031 | cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_ME_FLAGS) u-boot.tmp; |
1012 | endif | 1032 | endif |
1013 | cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_FLAGS) u-boot.tmp; | 1033 | cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_FLAGS) u-boot.tmp; |
1014 | cmd_ifdtool += mv u-boot.tmp $@ | 1034 | cmd_ifdtool += mv u-boot.tmp $@ |
1015 | 1035 | ||
1016 | u-boot.rom: u-boot-x86-16bit.bin u-boot-dtb.bin | 1036 | u-boot.rom: u-boot-x86-16bit.bin u-boot-dtb.bin |
1017 | $(call if_changed,ifdtool) | 1037 | $(call if_changed,ifdtool) |
1018 | 1038 | ||
1019 | OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec | 1039 | OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec |
1020 | u-boot-x86-16bit.bin: u-boot FORCE | 1040 | u-boot-x86-16bit.bin: u-boot FORCE |
1021 | $(call if_changed,objcopy) | 1041 | $(call if_changed,objcopy) |
1022 | endif | 1042 | endif |
1023 | 1043 | ||
1024 | ifneq ($(CONFIG_SUNXI),) | 1044 | ifneq ($(CONFIG_SUNXI),) |
1025 | OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \ | 1045 | OBJCOPYFLAGS_u-boot-sunxi-with-spl.bin = -I binary -O binary \ |
1026 | --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff | 1046 | --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff |
1027 | u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin \ | 1047 | u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin \ |
1028 | u-boot$(if $(CONFIG_OF_CONTROL),-dtb,).img FORCE | 1048 | u-boot$(if $(CONFIG_OF_CONTROL),-dtb,).img FORCE |
1029 | $(call if_changed,pad_cat) | 1049 | $(call if_changed,pad_cat) |
1030 | endif | 1050 | endif |
1031 | 1051 | ||
1032 | ifneq ($(CONFIG_TEGRA),) | 1052 | ifneq ($(CONFIG_TEGRA),) |
1033 | OBJCOPYFLAGS_u-boot-nodtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE) | 1053 | OBJCOPYFLAGS_u-boot-nodtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE) |
1034 | u-boot-nodtb-tegra.bin: spl/u-boot-spl u-boot.bin FORCE | 1054 | u-boot-nodtb-tegra.bin: spl/u-boot-spl u-boot.bin FORCE |
1035 | $(call if_changed,pad_cat) | 1055 | $(call if_changed,pad_cat) |
1036 | 1056 | ||
1037 | ifeq ($(CONFIG_OF_SEPARATE),y) | 1057 | ifeq ($(CONFIG_OF_SEPARATE),y) |
1038 | u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin dts/dt.dtb FORCE | 1058 | u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin dts/dt.dtb FORCE |
1039 | $(call if_changed,cat) | 1059 | $(call if_changed,cat) |
1040 | endif | 1060 | endif |
1041 | endif | 1061 | endif |
1042 | 1062 | ||
1043 | u-boot-img.bin: spl/u-boot-spl.bin u-boot.img FORCE | 1063 | u-boot-img.bin: spl/u-boot-spl.bin u-boot.img FORCE |
1044 | $(call if_changed,cat) | 1064 | $(call if_changed,cat) |
1045 | 1065 | ||
1046 | #Add a target to create boot binary having SPL binary in PBI format | 1066 | #Add a target to create boot binary having SPL binary in PBI format |
1047 | #concatenated with u-boot binary. It is need by PowerPC SoC having | 1067 | #concatenated with u-boot binary. It is need by PowerPC SoC having |
1048 | #internal SRAM <= 512KB. | 1068 | #internal SRAM <= 512KB. |
1049 | MKIMAGEFLAGS_u-boot-spl.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \ | 1069 | MKIMAGEFLAGS_u-boot-spl.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \ |
1050 | -R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage \ | 1070 | -R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage \ |
1051 | -A $(ARCH) -a $(CONFIG_SPL_TEXT_BASE) | 1071 | -A $(ARCH) -a $(CONFIG_SPL_TEXT_BASE) |
1052 | 1072 | ||
1053 | spl/u-boot-spl.pbl: spl/u-boot-spl.bin FORCE | 1073 | spl/u-boot-spl.pbl: spl/u-boot-spl.bin FORCE |
1054 | $(call if_changed,mkimage) | 1074 | $(call if_changed,mkimage) |
1055 | 1075 | ||
1056 | ifeq ($(ARCH),arm) | 1076 | ifeq ($(ARCH),arm) |
1057 | UBOOT_BINLOAD := u-boot.img | 1077 | UBOOT_BINLOAD := u-boot.img |
1058 | else | 1078 | else |
1059 | UBOOT_BINLOAD := u-boot.bin | 1079 | UBOOT_BINLOAD := u-boot.bin |
1060 | endif | 1080 | endif |
1061 | 1081 | ||
1062 | OBJCOPYFLAGS_u-boot-with-spl-pbl.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \ | 1082 | OBJCOPYFLAGS_u-boot-with-spl-pbl.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \ |
1063 | --gap-fill=0xff | 1083 | --gap-fill=0xff |
1064 | 1084 | ||
1065 | u-boot-with-spl-pbl.bin: spl/u-boot-spl.pbl $(UBOOT_BINLOAD) FORCE | 1085 | u-boot-with-spl-pbl.bin: spl/u-boot-spl.pbl $(UBOOT_BINLOAD) FORCE |
1066 | $(call if_changed,pad_cat) | 1086 | $(call if_changed,pad_cat) |
1067 | 1087 | ||
1068 | # PPC4xx needs the SPL at the end of the image, since the reset vector | 1088 | # PPC4xx needs the SPL at the end of the image, since the reset vector |
1069 | # is located at 0xfffffffc. So we can't use the "u-boot-img.bin" target | 1089 | # is located at 0xfffffffc. So we can't use the "u-boot-img.bin" target |
1070 | # and need to introduce a new build target with the full blown U-Boot | 1090 | # and need to introduce a new build target with the full blown U-Boot |
1071 | # at the start padded up to the start of the SPL image. And then concat | 1091 | # at the start padded up to the start of the SPL image. And then concat |
1072 | # the SPL image to the end. | 1092 | # the SPL image to the end. |
1073 | 1093 | ||
1074 | OBJCOPYFLAGS_u-boot-img-spl-at-end.bin := -I binary -O binary \ | 1094 | OBJCOPYFLAGS_u-boot-img-spl-at-end.bin := -I binary -O binary \ |
1075 | --pad-to=$(CONFIG_UBOOT_PAD_TO) --gap-fill=0xff | 1095 | --pad-to=$(CONFIG_UBOOT_PAD_TO) --gap-fill=0xff |
1076 | u-boot-img-spl-at-end.bin: u-boot.img spl/u-boot-spl.bin FORCE | 1096 | u-boot-img-spl-at-end.bin: u-boot.img spl/u-boot-spl.bin FORCE |
1077 | $(call if_changed,pad_cat) | 1097 | $(call if_changed,pad_cat) |
1078 | 1098 | ||
1079 | # Create a new ELF from a raw binary file. This is useful for arm64 | 1099 | # Create a new ELF from a raw binary file. This is useful for arm64 |
1080 | # where static relocation needs to be performed on the raw binary, | 1100 | # where static relocation needs to be performed on the raw binary, |
1081 | # but certain simulators only accept an ELF file (but don't do the | 1101 | # but certain simulators only accept an ELF file (but don't do the |
1082 | # relocation). | 1102 | # relocation). |
1083 | # FIXME refactor dts/Makefile to share target/arch detection | 1103 | # FIXME refactor dts/Makefile to share target/arch detection |
1084 | u-boot.elf: u-boot.bin | 1104 | u-boot.elf: u-boot.bin |
1085 | @$(OBJCOPY) -B aarch64 -I binary -O elf64-littleaarch64 \ | 1105 | @$(OBJCOPY) -B aarch64 -I binary -O elf64-littleaarch64 \ |
1086 | $< u-boot-elf.o | 1106 | $< u-boot-elf.o |
1087 | @$(LD) u-boot-elf.o -o $@ \ | 1107 | @$(LD) u-boot-elf.o -o $@ \ |
1088 | --defsym=_start=$(CONFIG_SYS_TEXT_BASE) \ | 1108 | --defsym=_start=$(CONFIG_SYS_TEXT_BASE) \ |
1089 | -Ttext=$(CONFIG_SYS_TEXT_BASE) | 1109 | -Ttext=$(CONFIG_SYS_TEXT_BASE) |
1090 | 1110 | ||
1091 | # Rule to link u-boot | 1111 | # Rule to link u-boot |
1092 | # May be overridden by arch/$(ARCH)/config.mk | 1112 | # May be overridden by arch/$(ARCH)/config.mk |
1093 | quiet_cmd_u-boot__ ?= LD $@ | 1113 | quiet_cmd_u-boot__ ?= LD $@ |
1094 | cmd_u-boot__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_u-boot) -o $@ \ | 1114 | cmd_u-boot__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_u-boot) -o $@ \ |
1095 | -T u-boot.lds $(u-boot-init) \ | 1115 | -T u-boot.lds $(u-boot-init) \ |
1096 | --start-group $(u-boot-main) --end-group \ | 1116 | --start-group $(u-boot-main) --end-group \ |
1097 | $(PLATFORM_LIBS) -Map u-boot.map | 1117 | $(PLATFORM_LIBS) -Map u-boot.map |
1098 | 1118 | ||
1099 | quiet_cmd_smap = GEN common/system_map.o | 1119 | quiet_cmd_smap = GEN common/system_map.o |
1100 | cmd_smap = \ | 1120 | cmd_smap = \ |
1101 | smap=`$(call SYSTEM_MAP,u-boot) | \ | 1121 | smap=`$(call SYSTEM_MAP,u-boot) | \ |
1102 | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ | 1122 | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ |
1103 | $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \ | 1123 | $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \ |
1104 | -c $(srctree)/common/system_map.c -o common/system_map.o | 1124 | -c $(srctree)/common/system_map.c -o common/system_map.o |
1105 | 1125 | ||
1106 | u-boot: $(u-boot-init) $(u-boot-main) u-boot.lds | 1126 | u-boot: $(u-boot-init) $(u-boot-main) u-boot.lds |
1107 | $(call if_changed,u-boot__) | 1127 | $(call if_changed,u-boot__) |
1108 | ifeq ($(CONFIG_KALLSYMS),y) | 1128 | ifeq ($(CONFIG_KALLSYMS),y) |
1109 | $(call cmd,smap) | 1129 | $(call cmd,smap) |
1110 | $(call cmd,u-boot__) common/system_map.o | 1130 | $(call cmd,u-boot__) common/system_map.o |
1111 | endif | 1131 | endif |
1112 | 1132 | ||
1113 | # The actual objects are generated when descending, | 1133 | # The actual objects are generated when descending, |
1114 | # make sure no implicit rule kicks in | 1134 | # make sure no implicit rule kicks in |
1115 | $(sort $(u-boot-init) $(u-boot-main)): $(u-boot-dirs) ; | 1135 | $(sort $(u-boot-init) $(u-boot-main)): $(u-boot-dirs) ; |
1116 | 1136 | ||
1117 | # Handle descending into subdirectories listed in $(vmlinux-dirs) | 1137 | # Handle descending into subdirectories listed in $(vmlinux-dirs) |
1118 | # Preset locale variables to speed up the build process. Limit locale | 1138 | # Preset locale variables to speed up the build process. Limit locale |
1119 | # tweaks to this spot to avoid wrong language settings when running | 1139 | # tweaks to this spot to avoid wrong language settings when running |
1120 | # make menuconfig etc. | 1140 | # make menuconfig etc. |
1121 | # Error messages still appears in the original language | 1141 | # Error messages still appears in the original language |
1122 | 1142 | ||
1123 | PHONY += $(u-boot-dirs) | 1143 | PHONY += $(u-boot-dirs) |
1124 | $(u-boot-dirs): prepare scripts | 1144 | $(u-boot-dirs): prepare scripts |
1125 | $(Q)$(MAKE) $(build)=$@ | 1145 | $(Q)$(MAKE) $(build)=$@ |
1126 | 1146 | ||
1127 | tools: prepare | 1147 | tools: prepare |
1128 | # The "tools" are needed early | 1148 | # The "tools" are needed early |
1129 | $(filter-out tools, $(u-boot-dirs)): tools | 1149 | $(filter-out tools, $(u-boot-dirs)): tools |
1130 | # The "examples" conditionally depend on U-Boot (say, when USE_PRIVATE_LIBGCC | 1150 | # The "examples" conditionally depend on U-Boot (say, when USE_PRIVATE_LIBGCC |
1131 | # is "yes"), so compile examples after U-Boot is compiled. | 1151 | # is "yes"), so compile examples after U-Boot is compiled. |
1132 | examples: $(filter-out examples, $(u-boot-dirs)) | 1152 | examples: $(filter-out examples, $(u-boot-dirs)) |
1133 | 1153 | ||
1134 | define filechk_uboot.release | 1154 | define filechk_uboot.release |
1135 | echo "$(UBOOTVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" | 1155 | echo "$(UBOOTVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" |
1136 | endef | 1156 | endef |
1137 | 1157 | ||
1138 | # Store (new) UBOOTRELEASE string in include/config/uboot.release | 1158 | # Store (new) UBOOTRELEASE string in include/config/uboot.release |
1139 | include/config/uboot.release: include/config/auto.conf FORCE | 1159 | include/config/uboot.release: include/config/auto.conf FORCE |
1140 | $(call filechk,uboot.release) | 1160 | $(call filechk,uboot.release) |
1141 | 1161 | ||
1142 | 1162 | ||
1143 | # Things we need to do before we recursively start building the kernel | 1163 | # Things we need to do before we recursively start building the kernel |
1144 | # or the modules are listed in "prepare". | 1164 | # or the modules are listed in "prepare". |
1145 | # A multi level approach is used. prepareN is processed before prepareN-1. | 1165 | # A multi level approach is used. prepareN is processed before prepareN-1. |
1146 | # archprepare is used in arch Makefiles and when processed asm symlink, | 1166 | # archprepare is used in arch Makefiles and when processed asm symlink, |
1147 | # version.h and scripts_basic is processed / created. | 1167 | # version.h and scripts_basic is processed / created. |
1148 | 1168 | ||
1149 | # Listed in dependency order | 1169 | # Listed in dependency order |
1150 | PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 | 1170 | PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 |
1151 | 1171 | ||
1152 | # prepare3 is used to check if we are building in a separate output directory, | 1172 | # prepare3 is used to check if we are building in a separate output directory, |
1153 | # and if so do: | 1173 | # and if so do: |
1154 | # 1) Check that make has not been executed in the kernel src $(srctree) | 1174 | # 1) Check that make has not been executed in the kernel src $(srctree) |
1155 | prepare3: include/config/uboot.release | 1175 | prepare3: include/config/uboot.release |
1156 | ifneq ($(KBUILD_SRC),) | 1176 | ifneq ($(KBUILD_SRC),) |
1157 | @$(kecho) ' Using $(srctree) as source for U-Boot' | 1177 | @$(kecho) ' Using $(srctree) as source for U-Boot' |
1158 | $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ | 1178 | $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \ |
1159 | echo >&2 " $(srctree) is not clean, please run 'make mrproper'"; \ | 1179 | echo >&2 " $(srctree) is not clean, please run 'make mrproper'"; \ |
1160 | echo >&2 " in the '$(srctree)' directory.";\ | 1180 | echo >&2 " in the '$(srctree)' directory.";\ |
1161 | /bin/false; \ | 1181 | /bin/false; \ |
1162 | fi; | 1182 | fi; |
1163 | endif | 1183 | endif |
1164 | 1184 | ||
1165 | # prepare2 creates a makefile if using a separate output directory | 1185 | # prepare2 creates a makefile if using a separate output directory |
1166 | prepare2: prepare3 outputmakefile | 1186 | prepare2: prepare3 outputmakefile |
1167 | 1187 | ||
1168 | prepare1: prepare2 $(version_h) $(timestamp_h) \ | 1188 | prepare1: prepare2 $(version_h) $(timestamp_h) \ |
1169 | include/config/auto.conf | 1189 | include/config/auto.conf |
1170 | ifeq ($(CONFIG_HAVE_GENERIC_BOARD),) | 1190 | ifeq ($(CONFIG_HAVE_GENERIC_BOARD),) |
1171 | ifeq ($(CONFIG_SYS_GENERIC_BOARD),y) | 1191 | ifeq ($(CONFIG_SYS_GENERIC_BOARD),y) |
1172 | @echo >&2 " Your architecture does not support generic board." | 1192 | @echo >&2 " Your architecture does not support generic board." |
1173 | @echo >&2 " Please undefine CONFIG_SYS_GENERIC_BOARD in your board config file." | 1193 | @echo >&2 " Please undefine CONFIG_SYS_GENERIC_BOARD in your board config file." |
1174 | @/bin/false | 1194 | @/bin/false |
1175 | endif | 1195 | endif |
1176 | endif | 1196 | endif |
1177 | ifeq ($(wildcard $(LDSCRIPT)),) | 1197 | ifeq ($(wildcard $(LDSCRIPT)),) |
1178 | @echo >&2 " Could not find linker script." | 1198 | @echo >&2 " Could not find linker script." |
1179 | @/bin/false | 1199 | @/bin/false |
1180 | endif | 1200 | endif |
1181 | 1201 | ||
1182 | archprepare: prepare1 scripts_basic | 1202 | archprepare: prepare1 scripts_basic |
1183 | 1203 | ||
1184 | prepare0: archprepare FORCE | 1204 | prepare0: archprepare FORCE |
1185 | $(Q)$(MAKE) $(build)=. | 1205 | $(Q)$(MAKE) $(build)=. |
1186 | 1206 | ||
1187 | # All the preparing.. | 1207 | # All the preparing.. |
1188 | prepare: prepare0 | 1208 | prepare: prepare0 |
1189 | 1209 | ||
1190 | # Generate some files | 1210 | # Generate some files |
1191 | # --------------------------------------------------------------------------- | 1211 | # --------------------------------------------------------------------------- |
1192 | 1212 | ||
1193 | define filechk_version.h | 1213 | define filechk_version.h |
1194 | (echo \#define PLAIN_VERSION \"$(UBOOTRELEASE)\"; \ | 1214 | (echo \#define PLAIN_VERSION \"$(UBOOTRELEASE)\"; \ |
1195 | echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; \ | 1215 | echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; \ |
1196 | echo \#define CC_VERSION_STRING \"$$($(CC) --version | head -n 1)\"; \ | 1216 | echo \#define CC_VERSION_STRING \"$$($(CC) --version | head -n 1)\"; \ |
1197 | echo \#define LD_VERSION_STRING \"$$($(LD) --version | head -n 1)\"; ) | 1217 | echo \#define LD_VERSION_STRING \"$$($(LD) --version | head -n 1)\"; ) |
1198 | endef | 1218 | endef |
1199 | 1219 | ||
1200 | define filechk_timestamp.h | 1220 | define filechk_timestamp.h |
1201 | (LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \ | 1221 | (LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \ |
1202 | LC_ALL=C date +'#define U_BOOT_TIME "%T"') | 1222 | LC_ALL=C date +'#define U_BOOT_TIME "%T"') |
1203 | endef | 1223 | endef |
1204 | 1224 | ||
1205 | $(version_h): include/config/uboot.release FORCE | 1225 | $(version_h): include/config/uboot.release FORCE |
1206 | $(call filechk,version.h) | 1226 | $(call filechk,version.h) |
1207 | 1227 | ||
1208 | $(timestamp_h): $(srctree)/Makefile FORCE | 1228 | $(timestamp_h): $(srctree)/Makefile FORCE |
1209 | $(call filechk,timestamp.h) | 1229 | $(call filechk,timestamp.h) |
1210 | 1230 | ||
1211 | # --------------------------------------------------------------------------- | 1231 | # --------------------------------------------------------------------------- |
1212 | 1232 | ||
1213 | PHONY += depend dep | 1233 | PHONY += depend dep |
1214 | depend dep: | 1234 | depend dep: |
1215 | @echo '*** Warning: make $@ is unnecessary now.' | 1235 | @echo '*** Warning: make $@ is unnecessary now.' |
1216 | 1236 | ||
1217 | # --------------------------------------------------------------------------- | 1237 | # --------------------------------------------------------------------------- |
1218 | quiet_cmd_cpp_lds = LDS $@ | 1238 | quiet_cmd_cpp_lds = LDS $@ |
1219 | cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \ | 1239 | cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \ |
1220 | -D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $< | 1240 | -D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $< |
1221 | 1241 | ||
1222 | u-boot.lds: $(LDSCRIPT) prepare FORCE | 1242 | u-boot.lds: $(LDSCRIPT) prepare FORCE |
1223 | $(call if_changed_dep,cpp_lds) | 1243 | $(call if_changed_dep,cpp_lds) |
1224 | 1244 | ||
1225 | spl/u-boot-spl.bin: spl/u-boot-spl | 1245 | spl/u-boot-spl.bin: spl/u-boot-spl |
1226 | @: | 1246 | @: |
1227 | spl/u-boot-spl: tools prepare | 1247 | spl/u-boot-spl: tools prepare |
1228 | $(Q)$(MAKE) obj=spl -f $(srctree)/scripts/Makefile.spl all | 1248 | $(Q)$(MAKE) obj=spl -f $(srctree)/scripts/Makefile.spl all |
1229 | 1249 | ||
1230 | spl/sunxi-spl.bin: spl/u-boot-spl | 1250 | spl/sunxi-spl.bin: spl/u-boot-spl |
1231 | @: | 1251 | @: |
1232 | 1252 | ||
1233 | tpl/u-boot-tpl.bin: tools prepare | 1253 | tpl/u-boot-tpl.bin: tools prepare |
1234 | $(Q)$(MAKE) obj=tpl -f $(srctree)/scripts/Makefile.spl all | 1254 | $(Q)$(MAKE) obj=tpl -f $(srctree)/scripts/Makefile.spl all |
1235 | 1255 | ||
1236 | TAG_SUBDIRS := $(patsubst %,$(srctree)/%,$(u-boot-dirs) include) | 1256 | TAG_SUBDIRS := $(patsubst %,$(srctree)/%,$(u-boot-dirs) include) |
1237 | 1257 | ||
1238 | FIND := find | 1258 | FIND := find |
1239 | FINDFLAGS := -L | 1259 | FINDFLAGS := -L |
1240 | 1260 | ||
1241 | tags ctags: | 1261 | tags ctags: |
1242 | ctags -w -o ctags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ | 1262 | ctags -w -o ctags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ |
1243 | -name '*.[chS]' -print` | 1263 | -name '*.[chS]' -print` |
1244 | 1264 | ||
1245 | etags: | 1265 | etags: |
1246 | etags -a -o etags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ | 1266 | etags -a -o etags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ |
1247 | -name '*.[chS]' -print` | 1267 | -name '*.[chS]' -print` |
1248 | cscope: | 1268 | cscope: |
1249 | $(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) -name '*.[chS]' -print > \ | 1269 | $(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) -name '*.[chS]' -print > \ |
1250 | cscope.files | 1270 | cscope.files |
1251 | cscope -b -q -k | 1271 | cscope -b -q -k |
1252 | 1272 | ||
1253 | SYSTEM_MAP = \ | 1273 | SYSTEM_MAP = \ |
1254 | $(NM) $1 | \ | 1274 | $(NM) $1 | \ |
1255 | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ | 1275 | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ |
1256 | LC_ALL=C sort | 1276 | LC_ALL=C sort |
1257 | System.map: u-boot | 1277 | System.map: u-boot |
1258 | @$(call SYSTEM_MAP,$<) > $@ | 1278 | @$(call SYSTEM_MAP,$<) > $@ |
1259 | 1279 | ||
1260 | checkdtc: | 1280 | checkdtc: |
1261 | @if test $(call dtc-version) -lt 0104; then \ | 1281 | @if test $(call dtc-version) -lt 0104; then \ |
1262 | echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \ | 1282 | echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \ |
1263 | false; \ | 1283 | false; \ |
1264 | fi | 1284 | fi |
1265 | 1285 | ||
1266 | ######################################################################### | 1286 | ######################################################################### |
1267 | 1287 | ||
1268 | # ARM relocations should all be R_ARM_RELATIVE (32-bit) or | 1288 | # ARM relocations should all be R_ARM_RELATIVE (32-bit) or |
1269 | # R_AARCH64_RELATIVE (64-bit). | 1289 | # R_AARCH64_RELATIVE (64-bit). |
1270 | checkarmreloc: u-boot | 1290 | checkarmreloc: u-boot |
1271 | @RELOC="`$(CROSS_COMPILE)readelf -r -W $< | cut -d ' ' -f 4 | \ | 1291 | @RELOC="`$(CROSS_COMPILE)readelf -r -W $< | cut -d ' ' -f 4 | \ |
1272 | grep R_A | sort -u`"; \ | 1292 | grep R_A | sort -u`"; \ |
1273 | if test "$$RELOC" != "R_ARM_RELATIVE" -a \ | 1293 | if test "$$RELOC" != "R_ARM_RELATIVE" -a \ |
1274 | "$$RELOC" != "R_AARCH64_RELATIVE"; then \ | 1294 | "$$RELOC" != "R_AARCH64_RELATIVE"; then \ |
1275 | echo "$< contains unexpected relocations: $$RELOC"; \ | 1295 | echo "$< contains unexpected relocations: $$RELOC"; \ |
1276 | false; \ | 1296 | false; \ |
1277 | fi | 1297 | fi |
1278 | 1298 | ||
1279 | env: scripts_basic | 1299 | env: scripts_basic |
1280 | $(Q)$(MAKE) $(build)=tools/$@ | 1300 | $(Q)$(MAKE) $(build)=tools/$@ |
1281 | 1301 | ||
1282 | tools-only: scripts_basic $(version_h) $(timestamp_h) | 1302 | tools-only: scripts_basic $(version_h) $(timestamp_h) |
1283 | $(Q)$(MAKE) $(build)=tools | 1303 | $(Q)$(MAKE) $(build)=tools |
1284 | 1304 | ||
1285 | tools-all: export HOST_TOOLS_ALL=y | 1305 | tools-all: export HOST_TOOLS_ALL=y |
1286 | tools-all: env tools ; | 1306 | tools-all: env tools ; |
1287 | 1307 | ||
1288 | cross_tools: export CROSS_BUILD_TOOLS=y | 1308 | cross_tools: export CROSS_BUILD_TOOLS=y |
1289 | cross_tools: tools ; | 1309 | cross_tools: tools ; |
1290 | 1310 | ||
1291 | .PHONY : CHANGELOG | 1311 | .PHONY : CHANGELOG |
1292 | CHANGELOG: | 1312 | CHANGELOG: |
1293 | git log --no-merges U-Boot-1_1_5.. | \ | 1313 | git log --no-merges U-Boot-1_1_5.. | \ |
1294 | unexpand -a | sed -e 's/\s\s*$$//' > $@ | 1314 | unexpand -a | sed -e 's/\s\s*$$//' > $@ |
1295 | 1315 | ||
1296 | include/license.h: tools/bin2header COPYING | 1316 | include/license.h: tools/bin2header COPYING |
1297 | cat COPYING | gzip -9 -c | ./tools/bin2header license_gzip > include/license.h | 1317 | cat COPYING | gzip -9 -c | ./tools/bin2header license_gzip > include/license.h |
1298 | ######################################################################### | 1318 | ######################################################################### |
1299 | 1319 | ||
1300 | ### | 1320 | ### |
1301 | # Cleaning is done on three levels. | 1321 | # Cleaning is done on three levels. |
1302 | # make clean Delete most generated files | 1322 | # make clean Delete most generated files |
1303 | # Leave enough to build external modules | 1323 | # Leave enough to build external modules |
1304 | # make mrproper Delete the current configuration, and all generated files | 1324 | # make mrproper Delete the current configuration, and all generated files |
1305 | # make distclean Remove editor backup files, patch leftover files and the like | 1325 | # make distclean Remove editor backup files, patch leftover files and the like |
1306 | 1326 | ||
1307 | # Directories & files removed with 'make clean' | 1327 | # Directories & files removed with 'make clean' |
1308 | CLEAN_DIRS += $(MODVERDIR) \ | 1328 | CLEAN_DIRS += $(MODVERDIR) \ |
1309 | $(foreach d, spl tpl, $(patsubst %,$d/%, \ | 1329 | $(foreach d, spl tpl, $(patsubst %,$d/%, \ |
1310 | $(filter-out include, $(shell ls -1 $d 2>/dev/null)))) | 1330 | $(filter-out include, $(shell ls -1 $d 2>/dev/null)))) |
1311 | 1331 | ||
1312 | CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \ | 1332 | CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \ |
1313 | boot* u-boot* MLO* SPL System.map | 1333 | boot* u-boot* MLO* SPL System.map |
1314 | 1334 | ||
1315 | # Directories & files removed with 'make mrproper' | 1335 | # Directories & files removed with 'make mrproper' |
1316 | MRPROPER_DIRS += include/config include/generated spl tpl \ | 1336 | MRPROPER_DIRS += include/config include/generated spl tpl \ |
1317 | .tmp_objdiff | 1337 | .tmp_objdiff |
1318 | MRPROPER_FILES += .config .config.old include/autoconf.mk* include/config.h \ | 1338 | MRPROPER_FILES += .config .config.old include/autoconf.mk* include/config.h \ |
1319 | ctags etags TAGS cscope* GPATH GTAGS GRTAGS GSYMS | 1339 | ctags etags TAGS cscope* GPATH GTAGS GRTAGS GSYMS |
1320 | 1340 | ||
1321 | # clean - Delete most, but leave enough to build external modules | 1341 | # clean - Delete most, but leave enough to build external modules |
1322 | # | 1342 | # |
1323 | clean: rm-dirs := $(CLEAN_DIRS) | 1343 | clean: rm-dirs := $(CLEAN_DIRS) |
1324 | clean: rm-files := $(CLEAN_FILES) | 1344 | clean: rm-files := $(CLEAN_FILES) |
1325 | 1345 | ||
1326 | clean-dirs := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $(srctree)/$f/Makefile),$f)) | 1346 | clean-dirs := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $(srctree)/$f/Makefile),$f)) |
1327 | 1347 | ||
1328 | clean-dirs := $(addprefix _clean_, $(clean-dirs) doc/DocBook) | 1348 | clean-dirs := $(addprefix _clean_, $(clean-dirs) doc/DocBook) |
1329 | 1349 | ||
1330 | PHONY += $(clean-dirs) clean archclean | 1350 | PHONY += $(clean-dirs) clean archclean |
1331 | $(clean-dirs): | 1351 | $(clean-dirs): |
1332 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1352 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
1333 | 1353 | ||
1334 | # TODO: Do not use *.cfgtmp | 1354 | # TODO: Do not use *.cfgtmp |
1335 | clean: $(clean-dirs) | 1355 | clean: $(clean-dirs) |
1336 | $(call cmd,rmdirs) | 1356 | $(call cmd,rmdirs) |
1337 | $(call cmd,rmfiles) | 1357 | $(call cmd,rmfiles) |
1338 | @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ | 1358 | @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ |
1339 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | 1359 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ |
1340 | -o -name '*.ko.*' -o -name '*.su' -o -name '*.cfgtmp' \ | 1360 | -o -name '*.ko.*' -o -name '*.su' -o -name '*.cfgtmp' \ |
1341 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | 1361 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ |
1342 | -o -name '*.symtypes' -o -name 'modules.order' \ | 1362 | -o -name '*.symtypes' -o -name 'modules.order' \ |
1343 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ | 1363 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ |
1344 | -o -name '*.gcno' \) -type f -print | xargs rm -f | 1364 | -o -name '*.gcno' \) -type f -print | xargs rm -f |
1345 | 1365 | ||
1346 | # mrproper - Delete all generated files, including .config | 1366 | # mrproper - Delete all generated files, including .config |
1347 | # | 1367 | # |
1348 | mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) | 1368 | mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) |
1349 | mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) | 1369 | mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) |
1350 | mrproper-dirs := $(addprefix _mrproper_,scripts) | 1370 | mrproper-dirs := $(addprefix _mrproper_,scripts) |
1351 | 1371 | ||
1352 | PHONY += $(mrproper-dirs) mrproper archmrproper | 1372 | PHONY += $(mrproper-dirs) mrproper archmrproper |
1353 | $(mrproper-dirs): | 1373 | $(mrproper-dirs): |
1354 | $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) | 1374 | $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) |
1355 | 1375 | ||
1356 | mrproper: clean $(mrproper-dirs) | 1376 | mrproper: clean $(mrproper-dirs) |
1357 | $(call cmd,rmdirs) | 1377 | $(call cmd,rmdirs) |
1358 | $(call cmd,rmfiles) | 1378 | $(call cmd,rmfiles) |
1359 | @rm -f arch/*/include/asm/arch | 1379 | @rm -f arch/*/include/asm/arch |
1360 | 1380 | ||
1361 | # distclean | 1381 | # distclean |
1362 | # | 1382 | # |
1363 | PHONY += distclean | 1383 | PHONY += distclean |
1364 | 1384 | ||
1365 | distclean: mrproper | 1385 | distclean: mrproper |
1366 | @find $(srctree) $(RCS_FIND_IGNORE) \ | 1386 | @find $(srctree) $(RCS_FIND_IGNORE) \ |
1367 | \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ | 1387 | \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ |
1368 | -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ | 1388 | -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ |
1369 | -o -name '.*.rej' -o -name '*%' -o -name 'core' \ | 1389 | -o -name '.*.rej' -o -name '*%' -o -name 'core' \ |
1370 | -o -name '*.pyc' \) \ | 1390 | -o -name '*.pyc' \) \ |
1371 | -type f -print | xargs rm -f | 1391 | -type f -print | xargs rm -f |
1372 | @rm -f boards.cfg | 1392 | @rm -f boards.cfg |
1373 | 1393 | ||
1374 | backup: | 1394 | backup: |
1375 | F=`basename $(srctree)` ; cd .. ; \ | 1395 | F=`basename $(srctree)` ; cd .. ; \ |
1376 | gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F | 1396 | gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F |
1377 | 1397 | ||
1378 | help: | 1398 | help: |
1379 | @echo 'Cleaning targets:' | 1399 | @echo 'Cleaning targets:' |
1380 | @echo ' clean - Remove most generated files but keep the config' | 1400 | @echo ' clean - Remove most generated files but keep the config' |
1381 | @echo ' mrproper - Remove all generated files + config + various backup files' | 1401 | @echo ' mrproper - Remove all generated files + config + various backup files' |
1382 | @echo ' distclean - mrproper + remove editor backup and patch files' | 1402 | @echo ' distclean - mrproper + remove editor backup and patch files' |
1383 | @echo '' | 1403 | @echo '' |
1384 | @echo 'Configuration targets:' | 1404 | @echo 'Configuration targets:' |
1385 | @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help | 1405 | @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help |
1386 | @echo '' | 1406 | @echo '' |
1387 | @echo 'Other generic targets:' | 1407 | @echo 'Other generic targets:' |
1388 | @echo ' all - Build all necessary images depending on configuration' | 1408 | @echo ' all - Build all necessary images depending on configuration' |
1389 | @echo '* u-boot - Build the bare u-boot' | 1409 | @echo '* u-boot - Build the bare u-boot' |
1390 | @echo ' dir/ - Build all files in dir and below' | 1410 | @echo ' dir/ - Build all files in dir and below' |
1391 | @echo ' dir/file.[oisS] - Build specified target only' | 1411 | @echo ' dir/file.[oisS] - Build specified target only' |
1392 | @echo ' dir/file.lst - Build specified mixed source/assembly target only' | 1412 | @echo ' dir/file.lst - Build specified mixed source/assembly target only' |
1393 | @echo ' (requires a recent binutils and recent build (System.map))' | 1413 | @echo ' (requires a recent binutils and recent build (System.map))' |
1394 | @echo ' tags/ctags - Generate ctags file for editors' | 1414 | @echo ' tags/ctags - Generate ctags file for editors' |
1395 | @echo ' etags - Generate etags file for editors' | 1415 | @echo ' etags - Generate etags file for editors' |
1396 | @echo ' cscope - Generate cscope index' | 1416 | @echo ' cscope - Generate cscope index' |
1397 | @echo ' ubootrelease - Output the release version string (use with make -s)' | 1417 | @echo ' ubootrelease - Output the release version string (use with make -s)' |
1398 | @echo ' ubootversion - Output the version stored in Makefile (use with make -s)' | 1418 | @echo ' ubootversion - Output the version stored in Makefile (use with make -s)' |
1399 | @echo '' | 1419 | @echo '' |
1400 | @echo 'Static analysers' | 1420 | @echo 'Static analysers' |
1401 | @echo ' checkstack - Generate a list of stack hogs' | 1421 | @echo ' checkstack - Generate a list of stack hogs' |
1402 | @echo '' | 1422 | @echo '' |
1403 | @echo 'Documentation targets:' | 1423 | @echo 'Documentation targets:' |
1404 | @$(MAKE) -f $(srctree)/doc/DocBook/Makefile dochelp | 1424 | @$(MAKE) -f $(srctree)/doc/DocBook/Makefile dochelp |
1405 | @echo '' | 1425 | @echo '' |
1406 | @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' | 1426 | @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' |
1407 | @echo ' make V=2 [targets] 2 => give reason for rebuild of target' | 1427 | @echo ' make V=2 [targets] 2 => give reason for rebuild of target' |
1408 | @echo ' make O=dir [targets] Locate all output files in "dir", including .config' | 1428 | @echo ' make O=dir [targets] Locate all output files in "dir", including .config' |
1409 | @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' | 1429 | @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' |
1410 | @echo ' make C=2 [targets] Force check of all c source with $$CHECK' | 1430 | @echo ' make C=2 [targets] Force check of all c source with $$CHECK' |
1411 | @echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections' | 1431 | @echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections' |
1412 | @echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where' | 1432 | @echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where' |
1413 | @echo ' 1: warnings which may be relevant and do not occur too often' | 1433 | @echo ' 1: warnings which may be relevant and do not occur too often' |
1414 | @echo ' 2: warnings which occur quite often but may still be relevant' | 1434 | @echo ' 2: warnings which occur quite often but may still be relevant' |
1415 | @echo ' 3: more obscure warnings, can most likely be ignored' | 1435 | @echo ' 3: more obscure warnings, can most likely be ignored' |
1416 | @echo ' Multiple levels can be combined with W=12 or W=123' | 1436 | @echo ' Multiple levels can be combined with W=12 or W=123' |
1417 | @echo '' | 1437 | @echo '' |
1418 | @echo 'Execute "make" or "make all" to build all targets marked with [*] ' | 1438 | @echo 'Execute "make" or "make all" to build all targets marked with [*] ' |
1419 | @echo 'For further info see the ./README file' | 1439 | @echo 'For further info see the ./README file' |
1420 | 1440 | ||
1421 | 1441 | ||
1422 | # Documentation targets | 1442 | # Documentation targets |
1423 | # --------------------------------------------------------------------------- | 1443 | # --------------------------------------------------------------------------- |
1424 | %docs: scripts_basic FORCE | 1444 | %docs: scripts_basic FORCE |
1425 | $(Q)$(MAKE) $(build)=scripts build_docproc | 1445 | $(Q)$(MAKE) $(build)=scripts build_docproc |
1426 | $(Q)$(MAKE) $(build)=doc/DocBook $@ | 1446 | $(Q)$(MAKE) $(build)=doc/DocBook $@ |
1427 | 1447 | ||
1428 | # Dummies... | 1448 | # Dummies... |
1429 | PHONY += prepare scripts | 1449 | PHONY += prepare scripts |
1430 | prepare: ; | 1450 | prepare: ; |
1431 | scripts: ; | 1451 | scripts: ; |
1432 | 1452 | ||
1433 | endif #ifeq ($(config-targets),1) | 1453 | endif #ifeq ($(config-targets),1) |
1434 | endif #ifeq ($(mixed-targets),1) | 1454 | endif #ifeq ($(mixed-targets),1) |
1435 | 1455 | ||
1436 | PHONY += checkstack ubootrelease ubootversion | 1456 | PHONY += checkstack ubootrelease ubootversion |
1437 | 1457 | ||
1438 | checkstack: | 1458 | checkstack: |
1439 | $(OBJDUMP) -d u-boot $$(find . -name u-boot-spl) | \ | 1459 | $(OBJDUMP) -d u-boot $$(find . -name u-boot-spl) | \ |
1440 | $(PERL) $(src)/scripts/checkstack.pl $(ARCH) | 1460 | $(PERL) $(src)/scripts/checkstack.pl $(ARCH) |
1441 | 1461 | ||
1442 | ubootrelease: | 1462 | ubootrelease: |
1443 | @echo "$(UBOOTVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" | 1463 | @echo "$(UBOOTVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" |
1444 | 1464 | ||
1445 | ubootversion: | 1465 | ubootversion: |
1446 | @echo $(UBOOTVERSION) | 1466 | @echo $(UBOOTVERSION) |
1447 | 1467 | ||
1448 | # Single targets | 1468 | # Single targets |
1449 | # --------------------------------------------------------------------------- | 1469 | # --------------------------------------------------------------------------- |
1450 | # Single targets are compatible with: | 1470 | # Single targets are compatible with: |
1451 | # - build with mixed source and output | 1471 | # - build with mixed source and output |
1452 | # - build with separate output dir 'make O=...' | 1472 | # - build with separate output dir 'make O=...' |
1453 | # - external modules | 1473 | # - external modules |
1454 | # | 1474 | # |
1455 | # target-dir => where to store outputfile | 1475 | # target-dir => where to store outputfile |
1456 | # build-dir => directory in kernel source tree to use | 1476 | # build-dir => directory in kernel source tree to use |
1457 | 1477 | ||
1458 | ifeq ($(KBUILD_EXTMOD),) | 1478 | ifeq ($(KBUILD_EXTMOD),) |
1459 | build-dir = $(patsubst %/,%,$(dir $@)) | 1479 | build-dir = $(patsubst %/,%,$(dir $@)) |
1460 | target-dir = $(dir $@) | 1480 | target-dir = $(dir $@) |
1461 | else | 1481 | else |
1462 | zap-slash=$(filter-out .,$(patsubst %/,%,$(dir $@))) | 1482 | zap-slash=$(filter-out .,$(patsubst %/,%,$(dir $@))) |
1463 | build-dir = $(KBUILD_EXTMOD)$(if $(zap-slash),/$(zap-slash)) | 1483 | build-dir = $(KBUILD_EXTMOD)$(if $(zap-slash),/$(zap-slash)) |
1464 | target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@)) | 1484 | target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@)) |
1465 | endif | 1485 | endif |
1466 | 1486 | ||
1467 | %.s: %.c prepare scripts FORCE | 1487 | %.s: %.c prepare scripts FORCE |
1468 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) | 1488 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) |
1469 | %.i: %.c prepare scripts FORCE | 1489 | %.i: %.c prepare scripts FORCE |
1470 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) | 1490 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) |
1471 | %.o: %.c prepare scripts FORCE | 1491 | %.o: %.c prepare scripts FORCE |
1472 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) | 1492 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) |
1473 | %.lst: %.c prepare scripts FORCE | 1493 | %.lst: %.c prepare scripts FORCE |
1474 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) | 1494 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) |
1475 | %.s: %.S prepare scripts FORCE | 1495 | %.s: %.S prepare scripts FORCE |
1476 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) | 1496 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) |
1477 | %.o: %.S prepare scripts FORCE | 1497 | %.o: %.S prepare scripts FORCE |
1478 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) | 1498 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) |
1479 | %.symtypes: %.c prepare scripts FORCE | 1499 | %.symtypes: %.c prepare scripts FORCE |
1480 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) | 1500 | $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) |
1481 | 1501 | ||
1482 | # Modules | 1502 | # Modules |
1483 | /: prepare scripts FORCE | 1503 | /: prepare scripts FORCE |
1484 | $(cmd_crmodverdir) | 1504 | $(cmd_crmodverdir) |
1485 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ | 1505 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ |
1486 | $(build)=$(build-dir) | 1506 | $(build)=$(build-dir) |
1487 | %/: prepare scripts FORCE | 1507 | %/: prepare scripts FORCE |
1488 | $(cmd_crmodverdir) | 1508 | $(cmd_crmodverdir) |
1489 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ | 1509 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ |
1490 | $(build)=$(build-dir) | 1510 | $(build)=$(build-dir) |
1491 | %.ko: prepare scripts FORCE | 1511 | %.ko: prepare scripts FORCE |
1492 | $(cmd_crmodverdir) | 1512 | $(cmd_crmodverdir) |
1493 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ | 1513 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ |
1494 | $(build)=$(build-dir) $(@:.ko=.o) | 1514 | $(build)=$(build-dir) $(@:.ko=.o) |
1495 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost | 1515 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost |
1496 | 1516 | ||
1497 | # FIXME Should go into a make.lib or something | 1517 | # FIXME Should go into a make.lib or something |
1498 | # =========================================================================== | 1518 | # =========================================================================== |
1499 | 1519 | ||
1500 | quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) | 1520 | quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) |
1501 | cmd_rmdirs = rm -rf $(rm-dirs) | 1521 | cmd_rmdirs = rm -rf $(rm-dirs) |
1502 | 1522 | ||
1503 | quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) | 1523 | quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) |
1504 | cmd_rmfiles = rm -f $(rm-files) | 1524 | cmd_rmfiles = rm -f $(rm-files) |
1505 | 1525 | ||
1506 | # read all saved command lines | 1526 | # read all saved command lines |
1507 | 1527 | ||
1508 | targets := $(wildcard $(sort $(targets))) | 1528 | targets := $(wildcard $(sort $(targets))) |
1509 | cmd_files := $(wildcard .*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) | 1529 | cmd_files := $(wildcard .*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) |
1510 | 1530 | ||
1511 | ifneq ($(cmd_files),) | 1531 | ifneq ($(cmd_files),) |
1512 | $(cmd_files): ; # Do not try to update included dependency files | 1532 | $(cmd_files): ; # Do not try to update included dependency files |
1513 | include $(cmd_files) | 1533 | include $(cmd_files) |
1514 | endif | 1534 | endif |
1515 | 1535 | ||
1516 | # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir | 1536 | # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir |
1517 | # Usage: | 1537 | # Usage: |
1518 | # $(Q)$(MAKE) $(clean)=dir | 1538 | # $(Q)$(MAKE) $(clean)=dir |
1519 | clean := -f $(srctree)/scripts/Makefile.clean obj | 1539 | clean := -f $(srctree)/scripts/Makefile.clean obj |
1520 | 1540 | ||
1521 | endif # skip-makefile | 1541 | endif # skip-makefile |
1522 | 1542 | ||
1523 | PHONY += FORCE | 1543 | PHONY += FORCE |
1524 | FORCE: | 1544 | FORCE: |
1525 | 1545 | ||
1526 | # Declare the contents of the .PHONY variable as phony. We keep that | 1546 | # Declare the contents of the .PHONY variable as phony. We keep that |
1527 | # information in a variable so we can use it in if_changed and friends. | 1547 | # information in a variable so we can use it in if_changed and friends. |
1528 | .PHONY: $(PHONY) | 1548 | .PHONY: $(PHONY) |
1529 | 1549 |
arch/arm/Kconfig
1 | menu "ARM architecture" | 1 | menu "ARM architecture" |
2 | depends on ARM | 2 | depends on ARM |
3 | 3 | ||
4 | config SYS_ARCH | 4 | config SYS_ARCH |
5 | default "arm" | 5 | default "arm" |
6 | 6 | ||
7 | config ARM64 | 7 | config ARM64 |
8 | bool | 8 | bool |
9 | 9 | ||
10 | config HAS_VBAR | 10 | config HAS_VBAR |
11 | bool | 11 | bool |
12 | 12 | ||
13 | config CPU_ARM720T | 13 | config CPU_ARM720T |
14 | bool | 14 | bool |
15 | 15 | ||
16 | config CPU_ARM920T | 16 | config CPU_ARM920T |
17 | bool | 17 | bool |
18 | 18 | ||
19 | config CPU_ARM926EJS | 19 | config CPU_ARM926EJS |
20 | bool | 20 | bool |
21 | 21 | ||
22 | config CPU_ARM946ES | 22 | config CPU_ARM946ES |
23 | bool | 23 | bool |
24 | 24 | ||
25 | config CPU_ARM1136 | 25 | config CPU_ARM1136 |
26 | bool | 26 | bool |
27 | 27 | ||
28 | config CPU_ARM1176 | 28 | config CPU_ARM1176 |
29 | bool | 29 | bool |
30 | select HAS_VBAR | 30 | select HAS_VBAR |
31 | 31 | ||
32 | config CPU_V7 | 32 | config CPU_V7 |
33 | bool | 33 | bool |
34 | select HAS_VBAR | 34 | select HAS_VBAR |
35 | 35 | ||
36 | config CPU_PXA | 36 | config CPU_PXA |
37 | bool | 37 | bool |
38 | 38 | ||
39 | config CPU_SA1100 | 39 | config CPU_SA1100 |
40 | bool | 40 | bool |
41 | 41 | ||
42 | config SYS_CPU | 42 | config SYS_CPU |
43 | default "arm720t" if CPU_ARM720T | 43 | default "arm720t" if CPU_ARM720T |
44 | default "arm920t" if CPU_ARM920T | 44 | default "arm920t" if CPU_ARM920T |
45 | default "arm926ejs" if CPU_ARM926EJS | 45 | default "arm926ejs" if CPU_ARM926EJS |
46 | default "arm946es" if CPU_ARM946ES | 46 | default "arm946es" if CPU_ARM946ES |
47 | default "arm1136" if CPU_ARM1136 | 47 | default "arm1136" if CPU_ARM1136 |
48 | default "arm1176" if CPU_ARM1176 | 48 | default "arm1176" if CPU_ARM1176 |
49 | default "armv7" if CPU_V7 | 49 | default "armv7" if CPU_V7 |
50 | default "pxa" if CPU_PXA | 50 | default "pxa" if CPU_PXA |
51 | default "sa1100" if CPU_SA1100 | 51 | default "sa1100" if CPU_SA1100 |
52 | default "armv8" if ARM64 | 52 | default "armv8" if ARM64 |
53 | 53 | ||
54 | config SEMIHOSTING | 54 | config SEMIHOSTING |
55 | bool "support boot from semihosting" | 55 | bool "support boot from semihosting" |
56 | help | 56 | help |
57 | In emulated environments, semihosting is a way for | 57 | In emulated environments, semihosting is a way for |
58 | the hosted environment to call out to the emulator to | 58 | the hosted environment to call out to the emulator to |
59 | retrieve files from the host machine. | 59 | retrieve files from the host machine. |
60 | 60 | ||
61 | choice | 61 | choice |
62 | prompt "Target select" | 62 | prompt "Target select" |
63 | 63 | ||
64 | config TARGET_INTEGRATORAP_CM720T | 64 | config TARGET_INTEGRATORAP_CM720T |
65 | bool "Support integratorap_cm720t" | 65 | bool "Support integratorap_cm720t" |
66 | select CPU_ARM720T | 66 | select CPU_ARM720T |
67 | 67 | ||
68 | config TARGET_INTEGRATORAP_CM920T | 68 | config TARGET_INTEGRATORAP_CM920T |
69 | bool "Support integratorap_cm920t" | 69 | bool "Support integratorap_cm920t" |
70 | select CPU_ARM920T | 70 | select CPU_ARM920T |
71 | 71 | ||
72 | config TARGET_INTEGRATORCP_CM920T | 72 | config TARGET_INTEGRATORCP_CM920T |
73 | bool "Support integratorcp_cm920t" | 73 | bool "Support integratorcp_cm920t" |
74 | select CPU_ARM920T | 74 | select CPU_ARM920T |
75 | 75 | ||
76 | config ARCH_AT91 | 76 | config ARCH_AT91 |
77 | bool "Atmel AT91" | 77 | bool "Atmel AT91" |
78 | 78 | ||
79 | config TARGET_EDB93XX | 79 | config TARGET_EDB93XX |
80 | bool "Support edb93xx" | 80 | bool "Support edb93xx" |
81 | select CPU_ARM920T | 81 | select CPU_ARM920T |
82 | 82 | ||
83 | config TARGET_SCB9328 | 83 | config TARGET_SCB9328 |
84 | bool "Support scb9328" | 84 | bool "Support scb9328" |
85 | select CPU_ARM920T | 85 | select CPU_ARM920T |
86 | 86 | ||
87 | config TARGET_VCMA9 | 87 | config TARGET_VCMA9 |
88 | bool "Support VCMA9" | 88 | bool "Support VCMA9" |
89 | select CPU_ARM920T | 89 | select CPU_ARM920T |
90 | 90 | ||
91 | config TARGET_SMDK2410 | 91 | config TARGET_SMDK2410 |
92 | bool "Support smdk2410" | 92 | bool "Support smdk2410" |
93 | select CPU_ARM920T | 93 | select CPU_ARM920T |
94 | 94 | ||
95 | config TARGET_INTEGRATORAP_CM926EJS | 95 | config TARGET_INTEGRATORAP_CM926EJS |
96 | bool "Support integratorap_cm926ejs" | 96 | bool "Support integratorap_cm926ejs" |
97 | select CPU_ARM926EJS | 97 | select CPU_ARM926EJS |
98 | 98 | ||
99 | config TARGET_INTEGRATORCP_CM926EJS | 99 | config TARGET_INTEGRATORCP_CM926EJS |
100 | bool "Support integratorcp_cm926ejs" | 100 | bool "Support integratorcp_cm926ejs" |
101 | select CPU_ARM926EJS | 101 | select CPU_ARM926EJS |
102 | 102 | ||
103 | config TARGET_ASPENITE | 103 | config TARGET_ASPENITE |
104 | bool "Support aspenite" | 104 | bool "Support aspenite" |
105 | select CPU_ARM926EJS | 105 | select CPU_ARM926EJS |
106 | 106 | ||
107 | config TARGET_GPLUGD | 107 | config TARGET_GPLUGD |
108 | bool "Support gplugd" | 108 | bool "Support gplugd" |
109 | select CPU_ARM926EJS | 109 | select CPU_ARM926EJS |
110 | 110 | ||
111 | config ARCH_DAVINCI | 111 | config ARCH_DAVINCI |
112 | bool "TI DaVinci" | 112 | bool "TI DaVinci" |
113 | select CPU_ARM926EJS | 113 | select CPU_ARM926EJS |
114 | help | 114 | help |
115 | Support for TI's DaVinci platform. | 115 | Support for TI's DaVinci platform. |
116 | 116 | ||
117 | config KIRKWOOD | 117 | config KIRKWOOD |
118 | bool "Marvell Kirkwood" | 118 | bool "Marvell Kirkwood" |
119 | select CPU_ARM926EJS | 119 | select CPU_ARM926EJS |
120 | 120 | ||
121 | config TARGET_DB_MV784MP_GP | 121 | config TARGET_DB_MV784MP_GP |
122 | bool "Support db-mv784mp-gp" | 122 | bool "Support db-mv784mp-gp" |
123 | select CPU_V7 | 123 | select CPU_V7 |
124 | select SUPPORT_SPL | 124 | select SUPPORT_SPL |
125 | 125 | ||
126 | config TARGET_MAXBCM | 126 | config TARGET_MAXBCM |
127 | bool "Support maxbcm" | 127 | bool "Support maxbcm" |
128 | select CPU_V7 | 128 | select CPU_V7 |
129 | select SUPPORT_SPL | 129 | select SUPPORT_SPL |
130 | 130 | ||
131 | config TARGET_DEVKIT3250 | 131 | config TARGET_DEVKIT3250 |
132 | bool "Support devkit3250" | 132 | bool "Support devkit3250" |
133 | select CPU_ARM926EJS | 133 | select CPU_ARM926EJS |
134 | 134 | ||
135 | config TARGET_WORK_92105 | ||
136 | bool "Support work_92105" | ||
137 | select CPU_ARM926EJS | ||
138 | select SUPPORT_SPL | ||
139 | |||
135 | config TARGET_MX25PDK | 140 | config TARGET_MX25PDK |
136 | bool "Support mx25pdk" | 141 | bool "Support mx25pdk" |
137 | select CPU_ARM926EJS | 142 | select CPU_ARM926EJS |
138 | 143 | ||
139 | config TARGET_TX25 | 144 | config TARGET_TX25 |
140 | bool "Support tx25" | 145 | bool "Support tx25" |
141 | select CPU_ARM926EJS | 146 | select CPU_ARM926EJS |
142 | select SUPPORT_SPL | 147 | select SUPPORT_SPL |
143 | 148 | ||
144 | config TARGET_ZMX25 | 149 | config TARGET_ZMX25 |
145 | bool "Support zmx25" | 150 | bool "Support zmx25" |
146 | select CPU_ARM926EJS | 151 | select CPU_ARM926EJS |
147 | 152 | ||
148 | config TARGET_APF27 | 153 | config TARGET_APF27 |
149 | bool "Support apf27" | 154 | bool "Support apf27" |
150 | select CPU_ARM926EJS | 155 | select CPU_ARM926EJS |
151 | select SUPPORT_SPL | 156 | select SUPPORT_SPL |
152 | 157 | ||
153 | config TARGET_IMX27LITE | 158 | config TARGET_IMX27LITE |
154 | bool "Support imx27lite" | 159 | bool "Support imx27lite" |
155 | select CPU_ARM926EJS | 160 | select CPU_ARM926EJS |
156 | 161 | ||
157 | config TARGET_MAGNESIUM | 162 | config TARGET_MAGNESIUM |
158 | bool "Support magnesium" | 163 | bool "Support magnesium" |
159 | select CPU_ARM926EJS | 164 | select CPU_ARM926EJS |
160 | 165 | ||
161 | config TARGET_APX4DEVKIT | 166 | config TARGET_APX4DEVKIT |
162 | bool "Support apx4devkit" | 167 | bool "Support apx4devkit" |
163 | select CPU_ARM926EJS | 168 | select CPU_ARM926EJS |
164 | select SUPPORT_SPL | 169 | select SUPPORT_SPL |
165 | 170 | ||
166 | config TARGET_XFI3 | 171 | config TARGET_XFI3 |
167 | bool "Support xfi3" | 172 | bool "Support xfi3" |
168 | select CPU_ARM926EJS | 173 | select CPU_ARM926EJS |
169 | select SUPPORT_SPL | 174 | select SUPPORT_SPL |
170 | 175 | ||
171 | config TARGET_M28EVK | 176 | config TARGET_M28EVK |
172 | bool "Support m28evk" | 177 | bool "Support m28evk" |
173 | select CPU_ARM926EJS | 178 | select CPU_ARM926EJS |
174 | select SUPPORT_SPL | 179 | select SUPPORT_SPL |
175 | 180 | ||
176 | config TARGET_MX23EVK | 181 | config TARGET_MX23EVK |
177 | bool "Support mx23evk" | 182 | bool "Support mx23evk" |
178 | select CPU_ARM926EJS | 183 | select CPU_ARM926EJS |
179 | select SUPPORT_SPL | 184 | select SUPPORT_SPL |
180 | 185 | ||
181 | config TARGET_MX28EVK | 186 | config TARGET_MX28EVK |
182 | bool "Support mx28evk" | 187 | bool "Support mx28evk" |
183 | select CPU_ARM926EJS | 188 | select CPU_ARM926EJS |
184 | select SUPPORT_SPL | 189 | select SUPPORT_SPL |
185 | 190 | ||
186 | config TARGET_MX23_OLINUXINO | 191 | config TARGET_MX23_OLINUXINO |
187 | bool "Support mx23_olinuxino" | 192 | bool "Support mx23_olinuxino" |
188 | select CPU_ARM926EJS | 193 | select CPU_ARM926EJS |
189 | select SUPPORT_SPL | 194 | select SUPPORT_SPL |
190 | 195 | ||
191 | config TARGET_BG0900 | 196 | config TARGET_BG0900 |
192 | bool "Support bg0900" | 197 | bool "Support bg0900" |
193 | select CPU_ARM926EJS | 198 | select CPU_ARM926EJS |
194 | select SUPPORT_SPL | 199 | select SUPPORT_SPL |
195 | 200 | ||
196 | config TARGET_SANSA_FUZE_PLUS | 201 | config TARGET_SANSA_FUZE_PLUS |
197 | bool "Support sansa_fuze_plus" | 202 | bool "Support sansa_fuze_plus" |
198 | select CPU_ARM926EJS | 203 | select CPU_ARM926EJS |
199 | select SUPPORT_SPL | 204 | select SUPPORT_SPL |
200 | 205 | ||
201 | config TARGET_SC_SPS_1 | 206 | config TARGET_SC_SPS_1 |
202 | bool "Support sc_sps_1" | 207 | bool "Support sc_sps_1" |
203 | select CPU_ARM926EJS | 208 | select CPU_ARM926EJS |
204 | select SUPPORT_SPL | 209 | select SUPPORT_SPL |
205 | 210 | ||
206 | config ARCH_NOMADIK | 211 | config ARCH_NOMADIK |
207 | bool "ST-Ericsson Nomadik" | 212 | bool "ST-Ericsson Nomadik" |
208 | select CPU_ARM926EJS | 213 | select CPU_ARM926EJS |
209 | 214 | ||
210 | config ORION5X | 215 | config ORION5X |
211 | bool "Marvell Orion" | 216 | bool "Marvell Orion" |
212 | select CPU_ARM926EJS | 217 | select CPU_ARM926EJS |
213 | 218 | ||
214 | config TARGET_SPEAR300 | 219 | config TARGET_SPEAR300 |
215 | bool "Support spear300" | 220 | bool "Support spear300" |
216 | select CPU_ARM926EJS | 221 | select CPU_ARM926EJS |
217 | 222 | ||
218 | config TARGET_SPEAR310 | 223 | config TARGET_SPEAR310 |
219 | bool "Support spear310" | 224 | bool "Support spear310" |
220 | select CPU_ARM926EJS | 225 | select CPU_ARM926EJS |
221 | 226 | ||
222 | config TARGET_SPEAR320 | 227 | config TARGET_SPEAR320 |
223 | bool "Support spear320" | 228 | bool "Support spear320" |
224 | select CPU_ARM926EJS | 229 | select CPU_ARM926EJS |
225 | 230 | ||
226 | config TARGET_SPEAR600 | 231 | config TARGET_SPEAR600 |
227 | bool "Support spear600" | 232 | bool "Support spear600" |
228 | select CPU_ARM926EJS | 233 | select CPU_ARM926EJS |
229 | 234 | ||
230 | config TARGET_STV0991 | 235 | config TARGET_STV0991 |
231 | bool "Support stv0991" | 236 | bool "Support stv0991" |
232 | select CPU_V7 | 237 | select CPU_V7 |
233 | 238 | ||
234 | config TARGET_X600 | 239 | config TARGET_X600 |
235 | bool "Support x600" | 240 | bool "Support x600" |
236 | select CPU_ARM926EJS | 241 | select CPU_ARM926EJS |
237 | select SUPPORT_SPL | 242 | select SUPPORT_SPL |
238 | 243 | ||
239 | config ARCH_VERSATILE | 244 | config ARCH_VERSATILE |
240 | bool "ARM Ltd. Versatile family" | 245 | bool "ARM Ltd. Versatile family" |
241 | select CPU_ARM926EJS | 246 | select CPU_ARM926EJS |
242 | 247 | ||
243 | config TARGET_INTEGRATORCP_CM1136 | 248 | config TARGET_INTEGRATORCP_CM1136 |
244 | bool "Support integratorcp_cm1136" | 249 | bool "Support integratorcp_cm1136" |
245 | select CPU_ARM1136 | 250 | select CPU_ARM1136 |
246 | 251 | ||
247 | config TARGET_IMX31_PHYCORE | 252 | config TARGET_IMX31_PHYCORE |
248 | bool "Support imx31_phycore" | 253 | bool "Support imx31_phycore" |
249 | select CPU_ARM1136 | 254 | select CPU_ARM1136 |
250 | 255 | ||
251 | config TARGET_QONG | 256 | config TARGET_QONG |
252 | bool "Support qong" | 257 | bool "Support qong" |
253 | select CPU_ARM1136 | 258 | select CPU_ARM1136 |
254 | 259 | ||
255 | config TARGET_MX31ADS | 260 | config TARGET_MX31ADS |
256 | bool "Support mx31ads" | 261 | bool "Support mx31ads" |
257 | select CPU_ARM1136 | 262 | select CPU_ARM1136 |
258 | 263 | ||
259 | config TARGET_MX31PDK | 264 | config TARGET_MX31PDK |
260 | bool "Support mx31pdk" | 265 | bool "Support mx31pdk" |
261 | select CPU_ARM1136 | 266 | select CPU_ARM1136 |
262 | select SUPPORT_SPL | 267 | select SUPPORT_SPL |
263 | 268 | ||
264 | config TARGET_TT01 | 269 | config TARGET_TT01 |
265 | bool "Support tt01" | 270 | bool "Support tt01" |
266 | select CPU_ARM1136 | 271 | select CPU_ARM1136 |
267 | 272 | ||
268 | config TARGET_IMX31_LITEKIT | 273 | config TARGET_IMX31_LITEKIT |
269 | bool "Support imx31_litekit" | 274 | bool "Support imx31_litekit" |
270 | select CPU_ARM1136 | 275 | select CPU_ARM1136 |
271 | 276 | ||
272 | config TARGET_WOODBURN | 277 | config TARGET_WOODBURN |
273 | bool "Support woodburn" | 278 | bool "Support woodburn" |
274 | select CPU_ARM1136 | 279 | select CPU_ARM1136 |
275 | 280 | ||
276 | config TARGET_WOODBURN_SD | 281 | config TARGET_WOODBURN_SD |
277 | bool "Support woodburn_sd" | 282 | bool "Support woodburn_sd" |
278 | select CPU_ARM1136 | 283 | select CPU_ARM1136 |
279 | select SUPPORT_SPL | 284 | select SUPPORT_SPL |
280 | 285 | ||
281 | config TARGET_FLEA3 | 286 | config TARGET_FLEA3 |
282 | bool "Support flea3" | 287 | bool "Support flea3" |
283 | select CPU_ARM1136 | 288 | select CPU_ARM1136 |
284 | 289 | ||
285 | config TARGET_MX35PDK | 290 | config TARGET_MX35PDK |
286 | bool "Support mx35pdk" | 291 | bool "Support mx35pdk" |
287 | select CPU_ARM1136 | 292 | select CPU_ARM1136 |
288 | 293 | ||
289 | config ARCH_BCM283X | 294 | config ARCH_BCM283X |
290 | bool "Broadcom BCM283X family" | 295 | bool "Broadcom BCM283X family" |
291 | 296 | ||
292 | config TARGET_INTEGRATORAP_CM946ES | 297 | config TARGET_INTEGRATORAP_CM946ES |
293 | bool "Support integratorap_cm946es" | 298 | bool "Support integratorap_cm946es" |
294 | select CPU_ARM946ES | 299 | select CPU_ARM946ES |
295 | 300 | ||
296 | config TARGET_INTEGRATORCP_CM946ES | 301 | config TARGET_INTEGRATORCP_CM946ES |
297 | bool "Support integratorcp_cm946es" | 302 | bool "Support integratorcp_cm946es" |
298 | select CPU_ARM946ES | 303 | select CPU_ARM946ES |
299 | 304 | ||
300 | config TARGET_VEXPRESS_CA15_TC2 | 305 | config TARGET_VEXPRESS_CA15_TC2 |
301 | bool "Support vexpress_ca15_tc2" | 306 | bool "Support vexpress_ca15_tc2" |
302 | select CPU_V7 | 307 | select CPU_V7 |
303 | select CPU_V7_HAS_NONSEC | 308 | select CPU_V7_HAS_NONSEC |
304 | select CPU_V7_HAS_VIRT | 309 | select CPU_V7_HAS_VIRT |
305 | 310 | ||
306 | config TARGET_VEXPRESS_CA5X2 | 311 | config TARGET_VEXPRESS_CA5X2 |
307 | bool "Support vexpress_ca5x2" | 312 | bool "Support vexpress_ca5x2" |
308 | select CPU_V7 | 313 | select CPU_V7 |
309 | 314 | ||
310 | config TARGET_VEXPRESS_CA9X4 | 315 | config TARGET_VEXPRESS_CA9X4 |
311 | bool "Support vexpress_ca9x4" | 316 | bool "Support vexpress_ca9x4" |
312 | select CPU_V7 | 317 | select CPU_V7 |
313 | 318 | ||
314 | config TARGET_KWB | 319 | config TARGET_KWB |
315 | bool "Support kwb" | 320 | bool "Support kwb" |
316 | select CPU_V7 | 321 | select CPU_V7 |
317 | select SUPPORT_SPL | 322 | select SUPPORT_SPL |
318 | 323 | ||
319 | config TARGET_TSERIES | 324 | config TARGET_TSERIES |
320 | bool "Support tseries" | 325 | bool "Support tseries" |
321 | select CPU_V7 | 326 | select CPU_V7 |
322 | select SUPPORT_SPL | 327 | select SUPPORT_SPL |
323 | 328 | ||
324 | config TARGET_CM_T335 | 329 | config TARGET_CM_T335 |
325 | bool "Support cm_t335" | 330 | bool "Support cm_t335" |
326 | select CPU_V7 | 331 | select CPU_V7 |
327 | select SUPPORT_SPL | 332 | select SUPPORT_SPL |
328 | 333 | ||
329 | config TARGET_PEPPER | 334 | config TARGET_PEPPER |
330 | bool "Support pepper" | 335 | bool "Support pepper" |
331 | select CPU_V7 | 336 | select CPU_V7 |
332 | select SUPPORT_SPL | 337 | select SUPPORT_SPL |
333 | 338 | ||
334 | config TARGET_AM335X_IGEP0033 | 339 | config TARGET_AM335X_IGEP0033 |
335 | bool "Support am335x_igep0033" | 340 | bool "Support am335x_igep0033" |
336 | select CPU_V7 | 341 | select CPU_V7 |
337 | select SUPPORT_SPL | 342 | select SUPPORT_SPL |
338 | 343 | ||
339 | config TARGET_PCM051 | 344 | config TARGET_PCM051 |
340 | bool "Support pcm051" | 345 | bool "Support pcm051" |
341 | select CPU_V7 | 346 | select CPU_V7 |
342 | select SUPPORT_SPL | 347 | select SUPPORT_SPL |
343 | 348 | ||
344 | config TARGET_DRACO | 349 | config TARGET_DRACO |
345 | bool "Support draco" | 350 | bool "Support draco" |
346 | select CPU_V7 | 351 | select CPU_V7 |
347 | select SUPPORT_SPL | 352 | select SUPPORT_SPL |
348 | 353 | ||
349 | config TARGET_DXR2 | 354 | config TARGET_DXR2 |
350 | bool "Support dxr2" | 355 | bool "Support dxr2" |
351 | select CPU_V7 | 356 | select CPU_V7 |
352 | select SUPPORT_SPL | 357 | select SUPPORT_SPL |
353 | 358 | ||
354 | config TARGET_PXM2 | 359 | config TARGET_PXM2 |
355 | bool "Support pxm2" | 360 | bool "Support pxm2" |
356 | select CPU_V7 | 361 | select CPU_V7 |
357 | select SUPPORT_SPL | 362 | select SUPPORT_SPL |
358 | 363 | ||
359 | config TARGET_RUT | 364 | config TARGET_RUT |
360 | bool "Support rut" | 365 | bool "Support rut" |
361 | select CPU_V7 | 366 | select CPU_V7 |
362 | select SUPPORT_SPL | 367 | select SUPPORT_SPL |
363 | 368 | ||
364 | config TARGET_PENGWYN | 369 | config TARGET_PENGWYN |
365 | bool "Support pengwyn" | 370 | bool "Support pengwyn" |
366 | select CPU_V7 | 371 | select CPU_V7 |
367 | select SUPPORT_SPL | 372 | select SUPPORT_SPL |
368 | 373 | ||
369 | config TARGET_AM335X_EVM | 374 | config TARGET_AM335X_EVM |
370 | bool "Support am335x_evm" | 375 | bool "Support am335x_evm" |
371 | select CPU_V7 | 376 | select CPU_V7 |
372 | select SUPPORT_SPL | 377 | select SUPPORT_SPL |
373 | 378 | ||
374 | config TARGET_AM43XX_EVM | 379 | config TARGET_AM43XX_EVM |
375 | bool "Support am43xx_evm" | 380 | bool "Support am43xx_evm" |
376 | select CPU_V7 | 381 | select CPU_V7 |
377 | select SUPPORT_SPL | 382 | select SUPPORT_SPL |
378 | 383 | ||
379 | config TARGET_BAV335X | 384 | config TARGET_BAV335X |
380 | bool "Support bav335x" | 385 | bool "Support bav335x" |
381 | select CPU_V7 | 386 | select CPU_V7 |
382 | select SUPPORT_SPL | 387 | select SUPPORT_SPL |
383 | help | 388 | help |
384 | The BAV335x OEM Network Processor integrates all the functions of an | 389 | The BAV335x OEM Network Processor integrates all the functions of an |
385 | embedded network computer in a small, easy to use SODIMM module which | 390 | embedded network computer in a small, easy to use SODIMM module which |
386 | incorporates the popular Texas Instruments Sitara 32bit ARM Coretex-A8 | 391 | incorporates the popular Texas Instruments Sitara 32bit ARM Coretex-A8 |
387 | processor, with fast DDR3 512MB SDRAM, 4GB of embedded MMC and a Gigabit | 392 | processor, with fast DDR3 512MB SDRAM, 4GB of embedded MMC and a Gigabit |
388 | ethernet with simple connection to external connectors. | 393 | ethernet with simple connection to external connectors. |
389 | 394 | ||
390 | For more information, visit: http://birdland.com/oem | 395 | For more information, visit: http://birdland.com/oem |
391 | 396 | ||
392 | config TARGET_TI814X_EVM | 397 | config TARGET_TI814X_EVM |
393 | bool "Support ti814x_evm" | 398 | bool "Support ti814x_evm" |
394 | select CPU_V7 | 399 | select CPU_V7 |
395 | select SUPPORT_SPL | 400 | select SUPPORT_SPL |
396 | 401 | ||
397 | config TARGET_TI816X_EVM | 402 | config TARGET_TI816X_EVM |
398 | bool "Support ti816x_evm" | 403 | bool "Support ti816x_evm" |
399 | select CPU_V7 | 404 | select CPU_V7 |
400 | select SUPPORT_SPL | 405 | select SUPPORT_SPL |
401 | 406 | ||
402 | config TARGET_BCM28155_AP | 407 | config TARGET_BCM28155_AP |
403 | bool "Support bcm28155_ap" | 408 | bool "Support bcm28155_ap" |
404 | select CPU_V7 | 409 | select CPU_V7 |
405 | 410 | ||
406 | config TARGET_BCMCYGNUS | 411 | config TARGET_BCMCYGNUS |
407 | bool "Support bcmcygnus" | 412 | bool "Support bcmcygnus" |
408 | select CPU_V7 | 413 | select CPU_V7 |
409 | 414 | ||
410 | config TARGET_BCMNSP | 415 | config TARGET_BCMNSP |
411 | bool "Support bcmnsp" | 416 | bool "Support bcmnsp" |
412 | select CPU_V7 | 417 | select CPU_V7 |
413 | 418 | ||
414 | config ARCH_EXYNOS | 419 | config ARCH_EXYNOS |
415 | bool "Samsung EXYNOS" | 420 | bool "Samsung EXYNOS" |
416 | select CPU_V7 | 421 | select CPU_V7 |
417 | 422 | ||
418 | config ARCH_S5PC1XX | 423 | config ARCH_S5PC1XX |
419 | bool "Samsung S5PC1XX" | 424 | bool "Samsung S5PC1XX" |
420 | select CPU_V7 | 425 | select CPU_V7 |
421 | 426 | ||
422 | config ARCH_HIGHBANK | 427 | config ARCH_HIGHBANK |
423 | bool "Calxeda Highbank" | 428 | bool "Calxeda Highbank" |
424 | select CPU_V7 | 429 | select CPU_V7 |
425 | 430 | ||
426 | config ARCH_KEYSTONE | 431 | config ARCH_KEYSTONE |
427 | bool "TI Keystone" | 432 | bool "TI Keystone" |
428 | select CPU_V7 | 433 | select CPU_V7 |
429 | select SUPPORT_SPL | 434 | select SUPPORT_SPL |
430 | 435 | ||
431 | config ARCH_MX6 | 436 | config ARCH_MX6 |
432 | bool "Freescale MX6" | 437 | bool "Freescale MX6" |
433 | select CPU_V7 | 438 | select CPU_V7 |
434 | 439 | ||
435 | config TARGET_M53EVK | 440 | config TARGET_M53EVK |
436 | bool "Support m53evk" | 441 | bool "Support m53evk" |
437 | select CPU_V7 | 442 | select CPU_V7 |
438 | select SUPPORT_SPL | 443 | select SUPPORT_SPL |
439 | 444 | ||
440 | config TARGET_IMA3_MX53 | 445 | config TARGET_IMA3_MX53 |
441 | bool "Support ima3-mx53" | 446 | bool "Support ima3-mx53" |
442 | select CPU_V7 | 447 | select CPU_V7 |
443 | 448 | ||
444 | config TARGET_MX51EVK | 449 | config TARGET_MX51EVK |
445 | bool "Support mx51evk" | 450 | bool "Support mx51evk" |
446 | select CPU_V7 | 451 | select CPU_V7 |
447 | 452 | ||
448 | config TARGET_MX53ARD | 453 | config TARGET_MX53ARD |
449 | bool "Support mx53ard" | 454 | bool "Support mx53ard" |
450 | select CPU_V7 | 455 | select CPU_V7 |
451 | 456 | ||
452 | config TARGET_MX53EVK | 457 | config TARGET_MX53EVK |
453 | bool "Support mx53evk" | 458 | bool "Support mx53evk" |
454 | select CPU_V7 | 459 | select CPU_V7 |
455 | 460 | ||
456 | config TARGET_MX53LOCO | 461 | config TARGET_MX53LOCO |
457 | bool "Support mx53loco" | 462 | bool "Support mx53loco" |
458 | select CPU_V7 | 463 | select CPU_V7 |
459 | 464 | ||
460 | config TARGET_MX53SMD | 465 | config TARGET_MX53SMD |
461 | bool "Support mx53smd" | 466 | bool "Support mx53smd" |
462 | select CPU_V7 | 467 | select CPU_V7 |
463 | 468 | ||
464 | config TARGET_MX51_EFIKAMX | 469 | config TARGET_MX51_EFIKAMX |
465 | bool "Support mx51_efikamx" | 470 | bool "Support mx51_efikamx" |
466 | select CPU_V7 | 471 | select CPU_V7 |
467 | 472 | ||
468 | config TARGET_VISION2 | 473 | config TARGET_VISION2 |
469 | bool "Support vision2" | 474 | bool "Support vision2" |
470 | select CPU_V7 | 475 | select CPU_V7 |
471 | 476 | ||
472 | config TARGET_UDOO | 477 | config TARGET_UDOO |
473 | bool "Support udoo" | 478 | bool "Support udoo" |
474 | select CPU_V7 | 479 | select CPU_V7 |
475 | 480 | ||
476 | config TARGET_WANDBOARD | 481 | config TARGET_WANDBOARD |
477 | bool "Support wandboard" | 482 | bool "Support wandboard" |
478 | select CPU_V7 | 483 | select CPU_V7 |
479 | 484 | ||
480 | config TARGET_WARP | 485 | config TARGET_WARP |
481 | bool "Support WaRP" | 486 | bool "Support WaRP" |
482 | select CPU_V7 | 487 | select CPU_V7 |
483 | 488 | ||
484 | config TARGET_TITANIUM | 489 | config TARGET_TITANIUM |
485 | bool "Support titanium" | 490 | bool "Support titanium" |
486 | select CPU_V7 | 491 | select CPU_V7 |
487 | 492 | ||
488 | config TARGET_NITROGEN6X | 493 | config TARGET_NITROGEN6X |
489 | bool "Support nitrogen6x" | 494 | bool "Support nitrogen6x" |
490 | select CPU_V7 | 495 | select CPU_V7 |
491 | 496 | ||
492 | config TARGET_CGTQMX6EVAL | 497 | config TARGET_CGTQMX6EVAL |
493 | bool "Support cgtqmx6eval" | 498 | bool "Support cgtqmx6eval" |
494 | select CPU_V7 | 499 | select CPU_V7 |
495 | 500 | ||
496 | config TARGET_EMBESTMX6BOARDS | 501 | config TARGET_EMBESTMX6BOARDS |
497 | bool "Support embestmx6boards" | 502 | bool "Support embestmx6boards" |
498 | select CPU_V7 | 503 | select CPU_V7 |
499 | 504 | ||
500 | config TARGET_ARISTAINETOS | 505 | config TARGET_ARISTAINETOS |
501 | bool "Support aristainetos" | 506 | bool "Support aristainetos" |
502 | select CPU_V7 | 507 | select CPU_V7 |
503 | 508 | ||
504 | config TARGET_MX6QARM2 | 509 | config TARGET_MX6QARM2 |
505 | bool "Support mx6qarm2" | 510 | bool "Support mx6qarm2" |
506 | select CPU_V7 | 511 | select CPU_V7 |
507 | 512 | ||
508 | config TARGET_MX6QSABREAUTO | 513 | config TARGET_MX6QSABREAUTO |
509 | bool "Support mx6qsabreauto" | 514 | bool "Support mx6qsabreauto" |
510 | select CPU_V7 | 515 | select CPU_V7 |
511 | 516 | ||
512 | config TARGET_MX6SABRESD | 517 | config TARGET_MX6SABRESD |
513 | bool "Support mx6sabresd" | 518 | bool "Support mx6sabresd" |
514 | select CPU_V7 | 519 | select CPU_V7 |
515 | select SUPPORT_SPL | 520 | select SUPPORT_SPL |
516 | 521 | ||
517 | config TARGET_MX6SLEVK | 522 | config TARGET_MX6SLEVK |
518 | bool "Support mx6slevk" | 523 | bool "Support mx6slevk" |
519 | select CPU_V7 | 524 | select CPU_V7 |
520 | 525 | ||
521 | config TARGET_MX6SXSABRESD | 526 | config TARGET_MX6SXSABRESD |
522 | bool "Support mx6sxsabresd" | 527 | bool "Support mx6sxsabresd" |
523 | select CPU_V7 | 528 | select CPU_V7 |
524 | select SUPPORT_SPL | 529 | select SUPPORT_SPL |
525 | 530 | ||
526 | config TARGET_GW_VENTANA | 531 | config TARGET_GW_VENTANA |
527 | bool "Support gw_ventana" | 532 | bool "Support gw_ventana" |
528 | select CPU_V7 | 533 | select CPU_V7 |
529 | select SUPPORT_SPL | 534 | select SUPPORT_SPL |
530 | 535 | ||
531 | config TARGET_HUMMINGBOARD | 536 | config TARGET_HUMMINGBOARD |
532 | bool "Support hummingboard" | 537 | bool "Support hummingboard" |
533 | select CPU_V7 | 538 | select CPU_V7 |
534 | 539 | ||
535 | config TARGET_KOSAGI_NOVENA | 540 | config TARGET_KOSAGI_NOVENA |
536 | bool "Support Kosagi Novena" | 541 | bool "Support Kosagi Novena" |
537 | select CPU_V7 | 542 | select CPU_V7 |
538 | select SUPPORT_SPL | 543 | select SUPPORT_SPL |
539 | 544 | ||
540 | config TARGET_TBS2910 | 545 | config TARGET_TBS2910 |
541 | bool "Support tbs2910" | 546 | bool "Support tbs2910" |
542 | select CPU_V7 | 547 | select CPU_V7 |
543 | 548 | ||
544 | config TARGET_TQMA6 | 549 | config TARGET_TQMA6 |
545 | bool "TQ Systems TQMa6 board" | 550 | bool "TQ Systems TQMa6 board" |
546 | select CPU_V7 | 551 | select CPU_V7 |
547 | 552 | ||
548 | config TARGET_OT1200 | 553 | config TARGET_OT1200 |
549 | bool "Bachmann OT1200" | 554 | bool "Bachmann OT1200" |
550 | select CPU_V7 | 555 | select CPU_V7 |
551 | select SUPPORT_SPL | 556 | select SUPPORT_SPL |
552 | 557 | ||
553 | config TARGET_PLATINUM_PICON | 558 | config TARGET_PLATINUM_PICON |
554 | bool "Support platinum-picon" | 559 | bool "Support platinum-picon" |
555 | select CPU_V7 | 560 | select CPU_V7 |
556 | select SUPPORT_SPL | 561 | select SUPPORT_SPL |
557 | 562 | ||
558 | config TARGET_PLATINUM_TITANIUM | 563 | config TARGET_PLATINUM_TITANIUM |
559 | bool "Support platinum-titanium" | 564 | bool "Support platinum-titanium" |
560 | select CPU_V7 | 565 | select CPU_V7 |
561 | select SUPPORT_SPL | 566 | select SUPPORT_SPL |
562 | 567 | ||
563 | config OMAP34XX | 568 | config OMAP34XX |
564 | bool "OMAP34XX SoC" | 569 | bool "OMAP34XX SoC" |
565 | select CPU_V7 | 570 | select CPU_V7 |
566 | 571 | ||
567 | config OMAP44XX | 572 | config OMAP44XX |
568 | bool "OMAP44XX SoC" | 573 | bool "OMAP44XX SoC" |
569 | select CPU_V7 | 574 | select CPU_V7 |
570 | select SUPPORT_SPL | 575 | select SUPPORT_SPL |
571 | 576 | ||
572 | config OMAP54XX | 577 | config OMAP54XX |
573 | bool "OMAP54XX SoC" | 578 | bool "OMAP54XX SoC" |
574 | select CPU_V7 | 579 | select CPU_V7 |
575 | select SUPPORT_SPL | 580 | select SUPPORT_SPL |
576 | 581 | ||
577 | config RMOBILE | 582 | config RMOBILE |
578 | bool "Renesas ARM SoCs" | 583 | bool "Renesas ARM SoCs" |
579 | select CPU_V7 | 584 | select CPU_V7 |
580 | 585 | ||
581 | config TARGET_CM_FX6 | 586 | config TARGET_CM_FX6 |
582 | bool "Support cm_fx6" | 587 | bool "Support cm_fx6" |
583 | select CPU_V7 | 588 | select CPU_V7 |
584 | select SUPPORT_SPL | 589 | select SUPPORT_SPL |
585 | 590 | ||
586 | config TARGET_SOCFPGA_ARRIA5 | 591 | config TARGET_SOCFPGA_ARRIA5 |
587 | bool "Support socfpga_arria5" | 592 | bool "Support socfpga_arria5" |
588 | select CPU_V7 | 593 | select CPU_V7 |
589 | select SUPPORT_SPL | 594 | select SUPPORT_SPL |
590 | 595 | ||
591 | config TARGET_SOCFPGA_CYCLONE5 | 596 | config TARGET_SOCFPGA_CYCLONE5 |
592 | bool "Support socfpga_cyclone5" | 597 | bool "Support socfpga_cyclone5" |
593 | select CPU_V7 | 598 | select CPU_V7 |
594 | select SUPPORT_SPL | 599 | select SUPPORT_SPL |
595 | 600 | ||
596 | config ARCH_SUNXI | 601 | config ARCH_SUNXI |
597 | bool "Support sunxi (Allwinner) SoCs" | 602 | bool "Support sunxi (Allwinner) SoCs" |
598 | 603 | ||
599 | config TARGET_SNOWBALL | 604 | config TARGET_SNOWBALL |
600 | bool "Support snowball" | 605 | bool "Support snowball" |
601 | select CPU_V7 | 606 | select CPU_V7 |
602 | 607 | ||
603 | config TARGET_U8500_HREF | 608 | config TARGET_U8500_HREF |
604 | bool "Support u8500_href" | 609 | bool "Support u8500_href" |
605 | select CPU_V7 | 610 | select CPU_V7 |
606 | 611 | ||
607 | config TARGET_VF610TWR | 612 | config TARGET_VF610TWR |
608 | bool "Support vf610twr" | 613 | bool "Support vf610twr" |
609 | select CPU_V7 | 614 | select CPU_V7 |
610 | 615 | ||
611 | config ZYNQ | 616 | config ZYNQ |
612 | bool "Xilinx Zynq Platform" | 617 | bool "Xilinx Zynq Platform" |
613 | select CPU_V7 | 618 | select CPU_V7 |
614 | select SUPPORT_SPL | 619 | select SUPPORT_SPL |
615 | 620 | ||
616 | config TARGET_XILINX_ZYNQMP | 621 | config TARGET_XILINX_ZYNQMP |
617 | bool "Support Xilinx ZynqMP Platform" | 622 | bool "Support Xilinx ZynqMP Platform" |
618 | select ARM64 | 623 | select ARM64 |
619 | 624 | ||
620 | config TEGRA | 625 | config TEGRA |
621 | bool "NVIDIA Tegra" | 626 | bool "NVIDIA Tegra" |
622 | select SUPPORT_SPL | 627 | select SUPPORT_SPL |
623 | select SPL | 628 | select SPL |
624 | select OF_CONTROL | 629 | select OF_CONTROL |
625 | select CPU_V7 | 630 | select CPU_V7 |
626 | 631 | ||
627 | config TARGET_VEXPRESS64_AEMV8A | 632 | config TARGET_VEXPRESS64_AEMV8A |
628 | bool "Support vexpress_aemv8a" | 633 | bool "Support vexpress_aemv8a" |
629 | select ARM64 | 634 | select ARM64 |
630 | 635 | ||
631 | config TARGET_VEXPRESS64_BASE_FVP | 636 | config TARGET_VEXPRESS64_BASE_FVP |
632 | bool "Support Versatile Express ARMv8a FVP BASE model" | 637 | bool "Support Versatile Express ARMv8a FVP BASE model" |
633 | select ARM64 | 638 | select ARM64 |
634 | select SEMIHOSTING | 639 | select SEMIHOSTING |
635 | 640 | ||
636 | config TARGET_VEXPRESS64_JUNO | 641 | config TARGET_VEXPRESS64_JUNO |
637 | bool "Support Versatile Express Juno Development Platform" | 642 | bool "Support Versatile Express Juno Development Platform" |
638 | select ARM64 | 643 | select ARM64 |
639 | 644 | ||
640 | config TARGET_LS2085A_EMU | 645 | config TARGET_LS2085A_EMU |
641 | bool "Support ls2085a_emu" | 646 | bool "Support ls2085a_emu" |
642 | select ARM64 | 647 | select ARM64 |
643 | select ARMV8_MULTIENTRY | 648 | select ARMV8_MULTIENTRY |
644 | 649 | ||
645 | config TARGET_LS2085A_SIMU | 650 | config TARGET_LS2085A_SIMU |
646 | bool "Support ls2085a_simu" | 651 | bool "Support ls2085a_simu" |
647 | select ARM64 | 652 | select ARM64 |
648 | select ARMV8_MULTIENTRY | 653 | select ARMV8_MULTIENTRY |
649 | 654 | ||
650 | config TARGET_LS1021AQDS | 655 | config TARGET_LS1021AQDS |
651 | bool "Support ls1021aqds" | 656 | bool "Support ls1021aqds" |
652 | select CPU_V7 | 657 | select CPU_V7 |
653 | select SUPPORT_SPL | 658 | select SUPPORT_SPL |
654 | 659 | ||
655 | config TARGET_LS1021ATWR | 660 | config TARGET_LS1021ATWR |
656 | bool "Support ls1021atwr" | 661 | bool "Support ls1021atwr" |
657 | select CPU_V7 | 662 | select CPU_V7 |
658 | select SUPPORT_SPL | 663 | select SUPPORT_SPL |
659 | 664 | ||
660 | config TARGET_BALLOON3 | 665 | config TARGET_BALLOON3 |
661 | bool "Support balloon3" | 666 | bool "Support balloon3" |
662 | select CPU_PXA | 667 | select CPU_PXA |
663 | 668 | ||
664 | config TARGET_H2200 | 669 | config TARGET_H2200 |
665 | bool "Support h2200" | 670 | bool "Support h2200" |
666 | select CPU_PXA | 671 | select CPU_PXA |
667 | 672 | ||
668 | config TARGET_PALMLD | 673 | config TARGET_PALMLD |
669 | bool "Support palmld" | 674 | bool "Support palmld" |
670 | select CPU_PXA | 675 | select CPU_PXA |
671 | 676 | ||
672 | config TARGET_PALMTC | 677 | config TARGET_PALMTC |
673 | bool "Support palmtc" | 678 | bool "Support palmtc" |
674 | select CPU_PXA | 679 | select CPU_PXA |
675 | 680 | ||
676 | config TARGET_PALMTREO680 | 681 | config TARGET_PALMTREO680 |
677 | bool "Support palmtreo680" | 682 | bool "Support palmtreo680" |
678 | select CPU_PXA | 683 | select CPU_PXA |
679 | select SUPPORT_SPL | 684 | select SUPPORT_SPL |
680 | 685 | ||
681 | config TARGET_PXA255_IDP | 686 | config TARGET_PXA255_IDP |
682 | bool "Support pxa255_idp" | 687 | bool "Support pxa255_idp" |
683 | select CPU_PXA | 688 | select CPU_PXA |
684 | 689 | ||
685 | config TARGET_TRIZEPSIV | 690 | config TARGET_TRIZEPSIV |
686 | bool "Support trizepsiv" | 691 | bool "Support trizepsiv" |
687 | select CPU_PXA | 692 | select CPU_PXA |
688 | 693 | ||
689 | config TARGET_VPAC270 | 694 | config TARGET_VPAC270 |
690 | bool "Support vpac270" | 695 | bool "Support vpac270" |
691 | select CPU_PXA | 696 | select CPU_PXA |
692 | select SUPPORT_SPL | 697 | select SUPPORT_SPL |
693 | 698 | ||
694 | config TARGET_XAENIAX | 699 | config TARGET_XAENIAX |
695 | bool "Support xaeniax" | 700 | bool "Support xaeniax" |
696 | select CPU_PXA | 701 | select CPU_PXA |
697 | 702 | ||
698 | config TARGET_ZIPITZ2 | 703 | config TARGET_ZIPITZ2 |
699 | bool "Support zipitz2" | 704 | bool "Support zipitz2" |
700 | select CPU_PXA | 705 | select CPU_PXA |
701 | 706 | ||
702 | config TARGET_LP8X4X | 707 | config TARGET_LP8X4X |
703 | bool "Support lp8x4x" | 708 | bool "Support lp8x4x" |
704 | select CPU_PXA | 709 | select CPU_PXA |
705 | 710 | ||
706 | config TARGET_COLIBRI_PXA270 | 711 | config TARGET_COLIBRI_PXA270 |
707 | bool "Support colibri_pxa270" | 712 | bool "Support colibri_pxa270" |
708 | select CPU_PXA | 713 | select CPU_PXA |
709 | 714 | ||
710 | config TARGET_JORNADA | 715 | config TARGET_JORNADA |
711 | bool "Support jornada" | 716 | bool "Support jornada" |
712 | select CPU_SA1100 | 717 | select CPU_SA1100 |
713 | 718 | ||
714 | config ARCH_UNIPHIER | 719 | config ARCH_UNIPHIER |
715 | bool "Panasonic UniPhier platform" | 720 | bool "Panasonic UniPhier platform" |
716 | select CPU_V7 | 721 | select CPU_V7 |
717 | select SUPPORT_SPL | 722 | select SUPPORT_SPL |
718 | select SPL | 723 | select SPL |
719 | select OF_CONTROL | 724 | select OF_CONTROL |
720 | 725 | ||
721 | endchoice | 726 | endchoice |
722 | 727 | ||
723 | source "arch/arm/mach-at91/Kconfig" | 728 | source "arch/arm/mach-at91/Kconfig" |
724 | 729 | ||
725 | source "arch/arm/mach-bcm283x/Kconfig" | 730 | source "arch/arm/mach-bcm283x/Kconfig" |
726 | 731 | ||
727 | source "arch/arm/mach-davinci/Kconfig" | 732 | source "arch/arm/mach-davinci/Kconfig" |
728 | 733 | ||
729 | source "arch/arm/cpu/armv7/exynos/Kconfig" | 734 | source "arch/arm/cpu/armv7/exynos/Kconfig" |
730 | 735 | ||
731 | source "arch/arm/mach-highbank/Kconfig" | 736 | source "arch/arm/mach-highbank/Kconfig" |
732 | 737 | ||
733 | source "arch/arm/mach-keystone/Kconfig" | 738 | source "arch/arm/mach-keystone/Kconfig" |
734 | 739 | ||
735 | source "arch/arm/mach-kirkwood/Kconfig" | 740 | source "arch/arm/mach-kirkwood/Kconfig" |
736 | 741 | ||
737 | source "arch/arm/cpu/armv7/mx6/Kconfig" | 742 | source "arch/arm/cpu/armv7/mx6/Kconfig" |
738 | 743 | ||
739 | source "arch/arm/mach-nomadik/Kconfig" | 744 | source "arch/arm/mach-nomadik/Kconfig" |
740 | 745 | ||
741 | source "arch/arm/cpu/armv7/omap3/Kconfig" | 746 | source "arch/arm/cpu/armv7/omap3/Kconfig" |
742 | 747 | ||
743 | source "arch/arm/cpu/armv7/omap4/Kconfig" | 748 | source "arch/arm/cpu/armv7/omap4/Kconfig" |
744 | 749 | ||
745 | source "arch/arm/cpu/armv7/omap5/Kconfig" | 750 | source "arch/arm/cpu/armv7/omap5/Kconfig" |
746 | 751 | ||
747 | source "arch/arm/mach-orion5x/Kconfig" | 752 | source "arch/arm/mach-orion5x/Kconfig" |
748 | 753 | ||
749 | source "arch/arm/cpu/armv7/rmobile/Kconfig" | 754 | source "arch/arm/cpu/armv7/rmobile/Kconfig" |
750 | 755 | ||
751 | source "arch/arm/cpu/armv7/s5pc1xx/Kconfig" | 756 | source "arch/arm/cpu/armv7/s5pc1xx/Kconfig" |
752 | 757 | ||
753 | source "arch/arm/mach-tegra/Kconfig" | 758 | source "arch/arm/mach-tegra/Kconfig" |
754 | 759 | ||
755 | source "arch/arm/mach-uniphier/Kconfig" | 760 | source "arch/arm/mach-uniphier/Kconfig" |
756 | 761 | ||
757 | source "arch/arm/mach-versatile/Kconfig" | 762 | source "arch/arm/mach-versatile/Kconfig" |
758 | 763 | ||
759 | source "arch/arm/cpu/armv7/zynq/Kconfig" | 764 | source "arch/arm/cpu/armv7/zynq/Kconfig" |
760 | 765 | ||
761 | source "arch/arm/cpu/armv7/Kconfig" | 766 | source "arch/arm/cpu/armv7/Kconfig" |
762 | 767 | ||
763 | source "arch/arm/cpu/armv8/Kconfig" | 768 | source "arch/arm/cpu/armv8/Kconfig" |
764 | 769 | ||
765 | source "arch/arm/imx-common/Kconfig" | 770 | source "arch/arm/imx-common/Kconfig" |
766 | 771 | ||
767 | source "board/aristainetos/Kconfig" | 772 | source "board/aristainetos/Kconfig" |
768 | source "board/BuR/kwb/Kconfig" | 773 | source "board/BuR/kwb/Kconfig" |
769 | source "board/BuR/tseries/Kconfig" | 774 | source "board/BuR/tseries/Kconfig" |
770 | source "board/CarMediaLab/flea3/Kconfig" | 775 | source "board/CarMediaLab/flea3/Kconfig" |
771 | source "board/Marvell/aspenite/Kconfig" | 776 | source "board/Marvell/aspenite/Kconfig" |
772 | source "board/Marvell/db-mv784mp-gp/Kconfig" | 777 | source "board/Marvell/db-mv784mp-gp/Kconfig" |
773 | source "board/Marvell/gplugd/Kconfig" | 778 | source "board/Marvell/gplugd/Kconfig" |
774 | source "board/altera/socfpga/Kconfig" | 779 | source "board/altera/socfpga/Kconfig" |
775 | source "board/armadeus/apf27/Kconfig" | 780 | source "board/armadeus/apf27/Kconfig" |
776 | source "board/armltd/integrator/Kconfig" | 781 | source "board/armltd/integrator/Kconfig" |
777 | source "board/armltd/vexpress/Kconfig" | 782 | source "board/armltd/vexpress/Kconfig" |
778 | source "board/armltd/vexpress64/Kconfig" | 783 | source "board/armltd/vexpress64/Kconfig" |
779 | source "board/bachmann/ot1200/Kconfig" | 784 | source "board/bachmann/ot1200/Kconfig" |
780 | source "board/balloon3/Kconfig" | 785 | source "board/balloon3/Kconfig" |
781 | source "board/barco/platinum/Kconfig" | 786 | source "board/barco/platinum/Kconfig" |
782 | source "board/barco/titanium/Kconfig" | 787 | source "board/barco/titanium/Kconfig" |
783 | source "board/bluegiga/apx4devkit/Kconfig" | 788 | source "board/bluegiga/apx4devkit/Kconfig" |
784 | source "board/boundary/nitrogen6x/Kconfig" | 789 | source "board/boundary/nitrogen6x/Kconfig" |
785 | source "board/broadcom/bcm28155_ap/Kconfig" | 790 | source "board/broadcom/bcm28155_ap/Kconfig" |
786 | source "board/broadcom/bcmcygnus/Kconfig" | 791 | source "board/broadcom/bcmcygnus/Kconfig" |
787 | source "board/broadcom/bcmnsp/Kconfig" | 792 | source "board/broadcom/bcmnsp/Kconfig" |
788 | source "board/cirrus/edb93xx/Kconfig" | 793 | source "board/cirrus/edb93xx/Kconfig" |
789 | source "board/compulab/cm_t335/Kconfig" | 794 | source "board/compulab/cm_t335/Kconfig" |
790 | source "board/compulab/cm_fx6/Kconfig" | 795 | source "board/compulab/cm_fx6/Kconfig" |
791 | source "board/congatec/cgtqmx6eval/Kconfig" | 796 | source "board/congatec/cgtqmx6eval/Kconfig" |
792 | source "board/creative/xfi3/Kconfig" | 797 | source "board/creative/xfi3/Kconfig" |
793 | source "board/davedenx/qong/Kconfig" | 798 | source "board/davedenx/qong/Kconfig" |
794 | source "board/denx/m28evk/Kconfig" | 799 | source "board/denx/m28evk/Kconfig" |
795 | source "board/denx/m53evk/Kconfig" | 800 | source "board/denx/m53evk/Kconfig" |
796 | source "board/embest/mx6boards/Kconfig" | 801 | source "board/embest/mx6boards/Kconfig" |
797 | source "board/esg/ima3-mx53/Kconfig" | 802 | source "board/esg/ima3-mx53/Kconfig" |
798 | source "board/freescale/ls2085a/Kconfig" | 803 | source "board/freescale/ls2085a/Kconfig" |
799 | source "board/freescale/ls1021aqds/Kconfig" | 804 | source "board/freescale/ls1021aqds/Kconfig" |
800 | source "board/freescale/ls1021atwr/Kconfig" | 805 | source "board/freescale/ls1021atwr/Kconfig" |
801 | source "board/freescale/mx23evk/Kconfig" | 806 | source "board/freescale/mx23evk/Kconfig" |
802 | source "board/freescale/mx25pdk/Kconfig" | 807 | source "board/freescale/mx25pdk/Kconfig" |
803 | source "board/freescale/mx28evk/Kconfig" | 808 | source "board/freescale/mx28evk/Kconfig" |
804 | source "board/freescale/mx31ads/Kconfig" | 809 | source "board/freescale/mx31ads/Kconfig" |
805 | source "board/freescale/mx31pdk/Kconfig" | 810 | source "board/freescale/mx31pdk/Kconfig" |
806 | source "board/freescale/mx35pdk/Kconfig" | 811 | source "board/freescale/mx35pdk/Kconfig" |
807 | source "board/freescale/mx51evk/Kconfig" | 812 | source "board/freescale/mx51evk/Kconfig" |
808 | source "board/freescale/mx53ard/Kconfig" | 813 | source "board/freescale/mx53ard/Kconfig" |
809 | source "board/freescale/mx53evk/Kconfig" | 814 | source "board/freescale/mx53evk/Kconfig" |
810 | source "board/freescale/mx53loco/Kconfig" | 815 | source "board/freescale/mx53loco/Kconfig" |
811 | source "board/freescale/mx53smd/Kconfig" | 816 | source "board/freescale/mx53smd/Kconfig" |
812 | source "board/freescale/mx6qarm2/Kconfig" | 817 | source "board/freescale/mx6qarm2/Kconfig" |
813 | source "board/freescale/mx6qsabreauto/Kconfig" | 818 | source "board/freescale/mx6qsabreauto/Kconfig" |
814 | source "board/freescale/mx6sabresd/Kconfig" | 819 | source "board/freescale/mx6sabresd/Kconfig" |
815 | source "board/freescale/mx6slevk/Kconfig" | 820 | source "board/freescale/mx6slevk/Kconfig" |
816 | source "board/freescale/mx6sxsabresd/Kconfig" | 821 | source "board/freescale/mx6sxsabresd/Kconfig" |
817 | source "board/freescale/vf610twr/Kconfig" | 822 | source "board/freescale/vf610twr/Kconfig" |
818 | source "board/gateworks/gw_ventana/Kconfig" | 823 | source "board/gateworks/gw_ventana/Kconfig" |
819 | source "board/genesi/mx51_efikamx/Kconfig" | 824 | source "board/genesi/mx51_efikamx/Kconfig" |
820 | source "board/gumstix/pepper/Kconfig" | 825 | source "board/gumstix/pepper/Kconfig" |
821 | source "board/h2200/Kconfig" | 826 | source "board/h2200/Kconfig" |
822 | source "board/hale/tt01/Kconfig" | 827 | source "board/hale/tt01/Kconfig" |
823 | source "board/icpdas/lp8x4x/Kconfig" | 828 | source "board/icpdas/lp8x4x/Kconfig" |
824 | source "board/imx31_phycore/Kconfig" | 829 | source "board/imx31_phycore/Kconfig" |
825 | source "board/isee/igep0033/Kconfig" | 830 | source "board/isee/igep0033/Kconfig" |
826 | source "board/jornada/Kconfig" | 831 | source "board/jornada/Kconfig" |
827 | source "board/karo/tx25/Kconfig" | 832 | source "board/karo/tx25/Kconfig" |
828 | source "board/kosagi/novena/Kconfig" | 833 | source "board/kosagi/novena/Kconfig" |
829 | source "board/logicpd/imx27lite/Kconfig" | 834 | source "board/logicpd/imx27lite/Kconfig" |
830 | source "board/logicpd/imx31_litekit/Kconfig" | 835 | source "board/logicpd/imx31_litekit/Kconfig" |
831 | source "board/maxbcm/Kconfig" | 836 | source "board/maxbcm/Kconfig" |
832 | source "board/mpl/vcma9/Kconfig" | 837 | source "board/mpl/vcma9/Kconfig" |
833 | source "board/olimex/mx23_olinuxino/Kconfig" | 838 | source "board/olimex/mx23_olinuxino/Kconfig" |
834 | source "board/palmld/Kconfig" | 839 | source "board/palmld/Kconfig" |
835 | source "board/palmtc/Kconfig" | 840 | source "board/palmtc/Kconfig" |
836 | source "board/palmtreo680/Kconfig" | 841 | source "board/palmtreo680/Kconfig" |
837 | source "board/phytec/pcm051/Kconfig" | 842 | source "board/phytec/pcm051/Kconfig" |
838 | source "board/ppcag/bg0900/Kconfig" | 843 | source "board/ppcag/bg0900/Kconfig" |
839 | source "board/pxa255_idp/Kconfig" | 844 | source "board/pxa255_idp/Kconfig" |
840 | source "board/samsung/smdk2410/Kconfig" | 845 | source "board/samsung/smdk2410/Kconfig" |
841 | source "board/sandisk/sansa_fuze_plus/Kconfig" | 846 | source "board/sandisk/sansa_fuze_plus/Kconfig" |
842 | source "board/scb9328/Kconfig" | 847 | source "board/scb9328/Kconfig" |
843 | source "board/schulercontrol/sc_sps_1/Kconfig" | 848 | source "board/schulercontrol/sc_sps_1/Kconfig" |
844 | source "board/siemens/draco/Kconfig" | 849 | source "board/siemens/draco/Kconfig" |
845 | source "board/siemens/pxm2/Kconfig" | 850 | source "board/siemens/pxm2/Kconfig" |
846 | source "board/siemens/rut/Kconfig" | 851 | source "board/siemens/rut/Kconfig" |
847 | source "board/silica/pengwyn/Kconfig" | 852 | source "board/silica/pengwyn/Kconfig" |
848 | source "board/solidrun/hummingboard/Kconfig" | 853 | source "board/solidrun/hummingboard/Kconfig" |
849 | source "board/spear/spear300/Kconfig" | 854 | source "board/spear/spear300/Kconfig" |
850 | source "board/spear/spear310/Kconfig" | 855 | source "board/spear/spear310/Kconfig" |
851 | source "board/spear/spear320/Kconfig" | 856 | source "board/spear/spear320/Kconfig" |
852 | source "board/spear/spear600/Kconfig" | 857 | source "board/spear/spear600/Kconfig" |
853 | source "board/spear/x600/Kconfig" | 858 | source "board/spear/x600/Kconfig" |
854 | source "board/st-ericsson/snowball/Kconfig" | 859 | source "board/st-ericsson/snowball/Kconfig" |
855 | source "board/st-ericsson/u8500/Kconfig" | 860 | source "board/st-ericsson/u8500/Kconfig" |
856 | source "board/st/stv0991/Kconfig" | 861 | source "board/st/stv0991/Kconfig" |
857 | source "board/sunxi/Kconfig" | 862 | source "board/sunxi/Kconfig" |
858 | source "board/syteco/zmx25/Kconfig" | 863 | source "board/syteco/zmx25/Kconfig" |
859 | source "board/tbs/tbs2910/Kconfig" | 864 | source "board/tbs/tbs2910/Kconfig" |
860 | source "board/ti/am335x/Kconfig" | 865 | source "board/ti/am335x/Kconfig" |
861 | source "board/ti/am43xx/Kconfig" | 866 | source "board/ti/am43xx/Kconfig" |
862 | source "board/birdland/bav335x/Kconfig" | 867 | source "board/birdland/bav335x/Kconfig" |
863 | source "board/ti/ti814x/Kconfig" | 868 | source "board/ti/ti814x/Kconfig" |
864 | source "board/ti/ti816x/Kconfig" | 869 | source "board/ti/ti816x/Kconfig" |
865 | source "board/timll/devkit3250/Kconfig" | 870 | source "board/timll/devkit3250/Kconfig" |
866 | source "board/toradex/colibri_pxa270/Kconfig" | 871 | source "board/toradex/colibri_pxa270/Kconfig" |
867 | source "board/tqc/tqma6/Kconfig" | 872 | source "board/tqc/tqma6/Kconfig" |
868 | source "board/trizepsiv/Kconfig" | 873 | source "board/trizepsiv/Kconfig" |
869 | source "board/ttcontrol/vision2/Kconfig" | 874 | source "board/ttcontrol/vision2/Kconfig" |
870 | source "board/udoo/Kconfig" | 875 | source "board/udoo/Kconfig" |
871 | source "board/vpac270/Kconfig" | 876 | source "board/vpac270/Kconfig" |
872 | source "board/wandboard/Kconfig" | 877 | source "board/wandboard/Kconfig" |
873 | source "board/warp/Kconfig" | 878 | source "board/warp/Kconfig" |
874 | source "board/woodburn/Kconfig" | 879 | source "board/woodburn/Kconfig" |
880 | source "board/work-microwave/work_92105/Kconfig" | ||
875 | source "board/xaeniax/Kconfig" | 881 | source "board/xaeniax/Kconfig" |
876 | source "board/xilinx/zynqmp/Kconfig" | 882 | source "board/xilinx/zynqmp/Kconfig" |
877 | source "board/zipitz2/Kconfig" | 883 | source "board/zipitz2/Kconfig" |
878 | 884 | ||
879 | source "arch/arm/Kconfig.debug" | 885 | source "arch/arm/Kconfig.debug" |
880 | 886 | ||
881 | endmenu | 887 | endmenu |
882 | 888 |
arch/arm/cpu/arm926ejs/lpc32xx/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000-2006 | 2 | # (C) Copyright 2000-2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | obj-y = cpu.o clk.o devices.o timer.o | 8 | obj-y = cpu.o clk.o devices.o timer.o |
9 | |||
10 | obj-$(CONFIG_SPL_BUILD) += dram.o lowlevel_init.o | ||
9 | 11 |
arch/arm/cpu/arm926ejs/lpc32xx/clk.c
1 | /* | 1 | /* |
2 | * Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com> | 2 | * Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: GPL-2.0+ | 4 | * SPDX-License-Identifier: GPL-2.0+ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <common.h> | 7 | #include <common.h> |
8 | #include <div64.h> | 8 | #include <div64.h> |
9 | #include <asm/arch/cpu.h> | 9 | #include <asm/arch/cpu.h> |
10 | #include <asm/arch/clk.h> | 10 | #include <asm/arch/clk.h> |
11 | #include <asm/io.h> | 11 | #include <asm/io.h> |
12 | 12 | ||
13 | static struct clk_pm_regs *clk = (struct clk_pm_regs *)CLK_PM_BASE; | 13 | static struct clk_pm_regs *clk = (struct clk_pm_regs *)CLK_PM_BASE; |
14 | 14 | ||
15 | unsigned int get_sys_clk_rate(void) | 15 | unsigned int get_sys_clk_rate(void) |
16 | { | 16 | { |
17 | if (readl(&clk->sysclk_ctrl) & CLK_SYSCLK_PLL397) | 17 | if (readl(&clk->sysclk_ctrl) & CLK_SYSCLK_PLL397) |
18 | return RTC_CLK_FREQUENCY * 397; | 18 | return RTC_CLK_FREQUENCY * 397; |
19 | else | 19 | else |
20 | return OSC_CLK_FREQUENCY; | 20 | return OSC_CLK_FREQUENCY; |
21 | } | 21 | } |
22 | 22 | ||
23 | unsigned int get_hclk_pll_rate(void) | 23 | unsigned int get_hclk_pll_rate(void) |
24 | { | 24 | { |
25 | unsigned long long fin, fref, fcco, fout; | 25 | unsigned long long fin, fref, fcco, fout; |
26 | u32 val, m_div, n_div, p_div; | 26 | u32 val, m_div, n_div, p_div; |
27 | 27 | ||
28 | /* | 28 | /* |
29 | * Valid frequency ranges: | 29 | * Valid frequency ranges: |
30 | * 1 * 10^6 <= Fin <= 20 * 10^6 | 30 | * 1 * 10^6 <= Fin <= 20 * 10^6 |
31 | * 1 * 10^6 <= Fref <= 27 * 10^6 | 31 | * 1 * 10^6 <= Fref <= 27 * 10^6 |
32 | * 156 * 10^6 <= Fcco <= 320 * 10^6 | 32 | * 156 * 10^6 <= Fcco <= 320 * 10^6 |
33 | */ | 33 | */ |
34 | 34 | ||
35 | fref = fin = get_sys_clk_rate(); | 35 | fref = fin = get_sys_clk_rate(); |
36 | if (fin > 20000000ULL || fin < 1000000ULL) | 36 | if (fin > 20000000ULL || fin < 1000000ULL) |
37 | return 0; | 37 | return 0; |
38 | 38 | ||
39 | val = readl(&clk->hclkpll_ctrl); | 39 | val = readl(&clk->hclkpll_ctrl); |
40 | m_div = ((val & CLK_HCLK_PLL_FEEDBACK_DIV_MASK) >> 1) + 1; | 40 | m_div = ((val & CLK_HCLK_PLL_FEEDBACK_DIV_MASK) >> 1) + 1; |
41 | n_div = ((val & CLK_HCLK_PLL_PREDIV_MASK) >> 9) + 1; | 41 | n_div = ((val & CLK_HCLK_PLL_PREDIV_MASK) >> 9) + 1; |
42 | if (val & CLK_HCLK_PLL_DIRECT) | 42 | if (val & CLK_HCLK_PLL_DIRECT) |
43 | p_div = 0; | 43 | p_div = 0; |
44 | else | 44 | else |
45 | p_div = ((val & CLK_HCLK_PLL_POSTDIV_MASK) >> 11) + 1; | 45 | p_div = ((val & CLK_HCLK_PLL_POSTDIV_MASK) >> 11) + 1; |
46 | p_div = 1 << p_div; | 46 | p_div = 1 << p_div; |
47 | 47 | ||
48 | if (val & CLK_HCLK_PLL_BYPASS) { | 48 | if (val & CLK_HCLK_PLL_BYPASS) { |
49 | do_div(fin, p_div); | 49 | do_div(fin, p_div); |
50 | return fin; | 50 | return fin; |
51 | } | 51 | } |
52 | 52 | ||
53 | do_div(fref, n_div); | 53 | do_div(fref, n_div); |
54 | if (fref > 27000000ULL || fref < 1000000ULL) | 54 | if (fref > 27000000ULL || fref < 1000000ULL) |
55 | return 0; | 55 | return 0; |
56 | 56 | ||
57 | fout = fref * m_div; | 57 | fout = fref * m_div; |
58 | if (val & CLK_HCLK_PLL_FEEDBACK) { | 58 | if (val & CLK_HCLK_PLL_FEEDBACK) { |
59 | fcco = fout; | 59 | fcco = fout; |
60 | do_div(fout, p_div); | 60 | do_div(fout, p_div); |
61 | } else | 61 | } else |
62 | fcco = fout * p_div; | 62 | fcco = fout * p_div; |
63 | 63 | ||
64 | if (fcco > 320000000ULL || fcco < 156000000ULL) | 64 | if (fcco > 320000000ULL || fcco < 156000000ULL) |
65 | return 0; | 65 | return 0; |
66 | 66 | ||
67 | return fout; | 67 | return fout; |
68 | } | 68 | } |
69 | 69 | ||
70 | unsigned int get_hclk_clk_div(void) | 70 | unsigned int get_hclk_clk_div(void) |
71 | { | 71 | { |
72 | u32 val; | 72 | u32 val; |
73 | 73 | ||
74 | val = readl(&clk->hclkdiv_ctrl) & CLK_HCLK_ARM_PLL_DIV_MASK; | 74 | val = readl(&clk->hclkdiv_ctrl) & CLK_HCLK_ARM_PLL_DIV_MASK; |
75 | 75 | ||
76 | return 1 << val; | 76 | return 1 << val; |
77 | } | 77 | } |
78 | 78 | ||
79 | unsigned int get_hclk_clk_rate(void) | 79 | unsigned int get_hclk_clk_rate(void) |
80 | { | 80 | { |
81 | return get_hclk_pll_rate() / get_hclk_clk_div(); | 81 | return get_hclk_pll_rate() / get_hclk_clk_div(); |
82 | } | 82 | } |
83 | 83 | ||
84 | unsigned int get_periph_clk_div(void) | 84 | unsigned int get_periph_clk_div(void) |
85 | { | 85 | { |
86 | u32 val; | 86 | u32 val; |
87 | 87 | ||
88 | val = readl(&clk->hclkdiv_ctrl) & CLK_HCLK_PERIPH_DIV_MASK; | 88 | val = readl(&clk->hclkdiv_ctrl) & CLK_HCLK_PERIPH_DIV_MASK; |
89 | 89 | ||
90 | return (val >> 2) + 1; | 90 | return (val >> 2) + 1; |
91 | } | 91 | } |
92 | 92 | ||
93 | unsigned int get_periph_clk_rate(void) | 93 | unsigned int get_periph_clk_rate(void) |
94 | { | 94 | { |
95 | if (!(readl(&clk->pwr_ctrl) & CLK_PWR_NORMAL_RUN)) | 95 | if (!(readl(&clk->pwr_ctrl) & CLK_PWR_NORMAL_RUN)) |
96 | return get_sys_clk_rate(); | 96 | return get_sys_clk_rate(); |
97 | 97 | ||
98 | return get_hclk_pll_rate() / get_periph_clk_div(); | 98 | return get_hclk_pll_rate() / get_periph_clk_div(); |
99 | } | 99 | } |
100 | 100 | ||
101 | unsigned int get_sdram_clk_rate(void) | ||
102 | { | ||
103 | unsigned int src_clk; | ||
104 | |||
105 | if (!(readl(&clk->pwr_ctrl) & CLK_PWR_NORMAL_RUN)) | ||
106 | return get_sys_clk_rate(); | ||
107 | |||
108 | src_clk = get_hclk_pll_rate(); | ||
109 | |||
110 | if (readl(&clk->sdramclk_ctrl) & CLK_SDRAM_DDR_SEL) { | ||
111 | /* using DDR */ | ||
112 | switch (readl(&clk->hclkdiv_ctrl) & CLK_HCLK_DDRAM_MASK) { | ||
113 | case CLK_HCLK_DDRAM_HALF: | ||
114 | return src_clk/2; | ||
115 | case CLK_HCLK_DDRAM_NOMINAL: | ||
116 | return src_clk; | ||
117 | default: | ||
118 | return 0; | ||
119 | } | ||
120 | } else { | ||
121 | /* using SDR */ | ||
122 | switch (readl(&clk->hclkdiv_ctrl) & CLK_HCLK_ARM_PLL_DIV_MASK) { | ||
123 | case CLK_HCLK_ARM_PLL_DIV_4: | ||
124 | return src_clk/4; | ||
125 | case CLK_HCLK_ARM_PLL_DIV_2: | ||
126 | return src_clk/2; | ||
127 | case CLK_HCLK_ARM_PLL_DIV_1: | ||
128 | return src_clk; | ||
129 | default: | ||
130 | return 0; | ||
131 | } | ||
132 | } | ||
133 | } | ||
134 | |||
101 | int get_serial_clock(void) | 135 | int get_serial_clock(void) |
102 | { | 136 | { |
103 | return get_periph_clk_rate(); | 137 | return get_periph_clk_rate(); |
104 | } | 138 | } |
105 | 139 |
arch/arm/cpu/arm926ejs/lpc32xx/cpu.c
1 | /* | 1 | /* |
2 | * Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com> | 2 | * Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: GPL-2.0+ | 4 | * SPDX-License-Identifier: GPL-2.0+ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <common.h> | 7 | #include <common.h> |
8 | #include <netdev.h> | 8 | #include <netdev.h> |
9 | #include <asm/arch/cpu.h> | 9 | #include <asm/arch/cpu.h> |
10 | #include <asm/arch/clk.h> | 10 | #include <asm/arch/clk.h> |
11 | #include <asm/arch/wdt.h> | 11 | #include <asm/arch/wdt.h> |
12 | #include <asm/arch/sys_proto.h> | ||
12 | #include <asm/io.h> | 13 | #include <asm/io.h> |
13 | 14 | ||
14 | static struct clk_pm_regs *clk = (struct clk_pm_regs *)CLK_PM_BASE; | 15 | static struct clk_pm_regs *clk = (struct clk_pm_regs *)CLK_PM_BASE; |
15 | static struct wdt_regs *wdt = (struct wdt_regs *)WDT_BASE; | 16 | static struct wdt_regs *wdt = (struct wdt_regs *)WDT_BASE; |
16 | 17 | ||
17 | void reset_cpu(ulong addr) | 18 | void reset_cpu(ulong addr) |
18 | { | 19 | { |
19 | /* Enable watchdog clock */ | 20 | /* Enable watchdog clock */ |
20 | setbits_le32(&clk->timclk_ctrl, CLK_TIMCLK_WATCHDOG); | 21 | setbits_le32(&clk->timclk_ctrl, CLK_TIMCLK_WATCHDOG); |
21 | 22 | ||
22 | /* Reset pulse length is 13005 peripheral clock frames */ | 23 | /* Reset pulse length is 13005 peripheral clock frames */ |
23 | writel(13000, &wdt->pulse); | 24 | writel(13000, &wdt->pulse); |
24 | 25 | ||
25 | /* Force WDOG_RESET2 and RESOUT_N signal active */ | 26 | /* Force WDOG_RESET2 and RESOUT_N signal active */ |
26 | writel(WDTIM_MCTRL_RESFRC2 | WDTIM_MCTRL_RESFRC1 | WDTIM_MCTRL_M_RES2, | 27 | writel(WDTIM_MCTRL_RESFRC2 | WDTIM_MCTRL_RESFRC1 | WDTIM_MCTRL_M_RES2, |
27 | &wdt->mctrl); | 28 | &wdt->mctrl); |
28 | 29 | ||
29 | while (1) | 30 | while (1) |
30 | /* NOP */; | 31 | /* NOP */; |
31 | } | 32 | } |
32 | 33 | ||
33 | #if defined(CONFIG_ARCH_CPU_INIT) | 34 | #if defined(CONFIG_ARCH_CPU_INIT) |
34 | int arch_cpu_init(void) | 35 | int arch_cpu_init(void) |
35 | { | 36 | { |
36 | /* | 37 | /* |
37 | * It might be necessary to flush data cache, if U-boot is loaded | 38 | * It might be necessary to flush data cache, if U-boot is loaded |
38 | * from kickstart bootloader, e.g. from S1L loader | 39 | * from kickstart bootloader, e.g. from S1L loader |
39 | */ | 40 | */ |
40 | flush_dcache_all(); | 41 | flush_dcache_all(); |
41 | 42 | ||
42 | return 0; | 43 | return 0; |
43 | } | 44 | } |
44 | #else | 45 | #else |
45 | #error "You have to select CONFIG_ARCH_CPU_INIT" | 46 | #error "You have to select CONFIG_ARCH_CPU_INIT" |
46 | #endif | 47 | #endif |
47 | 48 | ||
48 | #if defined(CONFIG_DISPLAY_CPUINFO) | 49 | #if defined(CONFIG_DISPLAY_CPUINFO) |
49 | int print_cpuinfo(void) | 50 | int print_cpuinfo(void) |
50 | { | 51 | { |
51 | printf("CPU: NXP LPC32XX\n"); | 52 | printf("CPU: NXP LPC32XX\n"); |
52 | printf("CPU clock: %uMHz\n", get_hclk_pll_rate() / 1000000); | 53 | printf("CPU clock: %uMHz\n", get_hclk_pll_rate() / 1000000); |
53 | printf("AHB bus clock: %uMHz\n", get_hclk_clk_rate() / 1000000); | 54 | printf("AHB bus clock: %uMHz\n", get_hclk_clk_rate() / 1000000); |
54 | printf("Peripheral clock: %uMHz\n", get_periph_clk_rate() / 1000000); | 55 | printf("Peripheral clock: %uMHz\n", get_periph_clk_rate() / 1000000); |
55 | 56 | ||
56 | return 0; | 57 | return 0; |
57 | } | 58 | } |
58 | #endif | 59 | #endif |
59 | 60 | ||
60 | #ifdef CONFIG_LPC32XX_ETH | 61 | #ifdef CONFIG_LPC32XX_ETH |
61 | int cpu_eth_init(bd_t *bis) | 62 | int cpu_eth_init(bd_t *bis) |
62 | { | 63 | { |
63 | lpc32xx_eth_initialize(bis); | 64 | lpc32xx_eth_initialize(bis); |
64 | return 0; | 65 | return 0; |
65 | } | 66 | } |
66 | #endif | 67 | #endif |
67 | 68 |
arch/arm/cpu/arm926ejs/lpc32xx/dram.c
File was created | 1 | /* | |
2 | * LPC32xx dram init | ||
3 | * | ||
4 | * (C) Copyright 2014 DENX Software Engineering GmbH | ||
5 | * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr> | ||
6 | * | ||
7 | * This is called by SPL to gain access to the SDR DRAM. | ||
8 | * | ||
9 | * This code runs from SRAM. | ||
10 | * | ||
11 | * Actual CONFIG_LPC32XX_SDRAM_* parameters must be provided | ||
12 | * by the board configuration file. | ||
13 | * | ||
14 | * SPDX-License-Identifier: GPL-2.0+ | ||
15 | */ | ||
16 | |||
17 | #include <common.h> | ||
18 | #include <netdev.h> | ||
19 | #include <asm/arch/cpu.h> | ||
20 | #include <asm/arch/clk.h> | ||
21 | #include <asm/arch/wdt.h> | ||
22 | #include <asm/arch/emc.h> | ||
23 | #include <asm/io.h> | ||
24 | |||
25 | static struct clk_pm_regs *clk = (struct clk_pm_regs *)CLK_PM_BASE; | ||
26 | static struct emc_regs *emc = (struct emc_regs *)EMC_BASE; | ||
27 | |||
28 | void ddr_init(struct emc_dram_settings *dram) | ||
29 | { | ||
30 | uint32_t ck; | ||
31 | |||
32 | /* Enable EMC interface and choose little endian mode */ | ||
33 | writel(1, &emc->ctrl); | ||
34 | writel(0, &emc->config); | ||
35 | /* Select maximum EMC Dynamic Memory Refresh Time */ | ||
36 | writel(0x7FF, &emc->refresh); | ||
37 | /* Determine CLK */ | ||
38 | ck = get_sdram_clk_rate(); | ||
39 | /* Configure SDRAM */ | ||
40 | writel(dram->cmddelay, &clk->sdramclk_ctrl); | ||
41 | writel(dram->config0, &emc->config0); | ||
42 | writel(dram->rascas0, &emc->rascas0); | ||
43 | writel(dram->rdconfig, &emc->read_config); | ||
44 | /* Set timings */ | ||
45 | writel((ck / dram->trp) & 0x0000000F, &emc->t_rp); | ||
46 | writel((ck / dram->tras) & 0x0000000F, &emc->t_ras); | ||
47 | writel((ck / dram->tsrex) & 0x0000007F, &emc->t_srex); | ||
48 | writel((ck / dram->twr) & 0x0000000F, &emc->t_wr); | ||
49 | writel((ck / dram->trc) & 0x0000001F, &emc->t_rc); | ||
50 | writel((ck / dram->trfc) & 0x0000001F, &emc->t_rfc); | ||
51 | writel((ck / dram->txsr) & 0x000000FF, &emc->t_xsr); | ||
52 | writel(dram->trrd, &emc->t_rrd); | ||
53 | writel(dram->tmrd, &emc->t_mrd); | ||
54 | writel(dram->tcdlr, &emc->t_cdlr); | ||
55 | /* Dynamic refresh */ | ||
56 | writel((((ck / dram->refresh) >> 4) & 0x7FF), &emc->refresh); | ||
57 | udelay(10); | ||
58 | /* Force all clocks, enable inverted ck, issue NOP command */ | ||
59 | writel(0x00000193, &emc->control); | ||
60 | udelay(100); | ||
61 | /* Keep all clocks enabled, issue a PRECHARGE ALL command */ | ||
62 | writel(0x00000113, &emc->control); | ||
63 | /* Fast dynamic refresh for at least a few SDRAM ck cycles */ | ||
64 | writel((((128) >> 4) & 0x7FF), &emc->refresh); | ||
65 | udelay(10); | ||
66 | /* set correct dynamic refresh timing */ | ||
67 | writel((((ck / dram->refresh) >> 4) & 0x7FF), &emc->refresh); | ||
68 | udelay(10); | ||
69 | /* set normal mode to CAS=3 */ | ||
70 | writel(0x00000093, &emc->control); | ||
71 | readl(EMC_DYCS0_BASE | dram->mode); | ||
72 | /* set extended mode to all zeroes */ | ||
73 | writel(0x00000093, &emc->control); | ||
74 | readl(EMC_DYCS0_BASE | dram->emode); | ||
75 | /* stop forcing clocks, keep inverted clock, issue normal mode */ | ||
76 | writel(0x00000010, &emc->control); | ||
77 | } | ||
78 |
arch/arm/cpu/arm926ejs/lpc32xx/lowlevel_init.S
File was created | 1 | /* | |
2 | * WORK Microwave work_92105 board low level init | ||
3 | * | ||
4 | * (C) Copyright 2014 DENX Software Engineering GmbH | ||
5 | * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr> | ||
6 | * | ||
7 | * Low level init is called from SPL to set up the clocks. | ||
8 | * On entry, the LPC3250 is in Direct Run mode with all clocks | ||
9 | * running at 13 MHz; on exit, ARM clock is 208 MHz, HCLK is | ||
10 | * 104 MHz and PCLK is 13 MHz. | ||
11 | * | ||
12 | * This code must run from SRAM so that the clock changes do | ||
13 | * not prevent it from executing. | ||
14 | * | ||
15 | * SPDX-License-Identifier: GPL-2.0+ | ||
16 | */ | ||
17 | |||
18 | .globl lowlevel_init | ||
19 | |||
20 | lowlevel_init: | ||
21 | |||
22 | /* Set ARM, HCLK, PCLK dividers for normal mode */ | ||
23 | ldr r0, =0x0000003D | ||
24 | ldr r1, =0x40004040 | ||
25 | str r0, [r1] | ||
26 | |||
27 | /* Start HCLK PLL for 208 MHz */ | ||
28 | ldr r0, =0x0001401E | ||
29 | ldr r1, =0x40004058 | ||
30 | str r0, [r1] | ||
31 | |||
32 | /* wait for HCLK PLL to lock */ | ||
33 | 1: | ||
34 | ldr r0, [r1] | ||
35 | ands r0, r0, #1 | ||
36 | beq 1b | ||
37 | |||
38 | /* switch to normal mode */ | ||
39 | ldr r1, =0x40004044 | ||
40 | ldr r0, [r1] | ||
41 | orr r0, #0x00000004 | ||
42 | str r0, [r1] | ||
43 | |||
44 | /* Return to U-boot via saved link register */ | ||
45 | mov pc, lr | ||
46 |
arch/arm/include/asm/arch-lpc32xx/clk.h
1 | /* | 1 | /* |
2 | * Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com> | 2 | * Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: GPL-2.0+ | 4 | * SPDX-License-Identifier: GPL-2.0+ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef _LPC32XX_CLK_H | 7 | #ifndef _LPC32XX_CLK_H |
8 | #define _LPC32XX_CLK_H | 8 | #define _LPC32XX_CLK_H |
9 | 9 | ||
10 | #include <asm/types.h> | 10 | #include <asm/types.h> |
11 | 11 | ||
12 | #define OSC_CLK_FREQUENCY 13000000 | 12 | #define OSC_CLK_FREQUENCY 13000000 |
13 | #define RTC_CLK_FREQUENCY 32768 | 13 | #define RTC_CLK_FREQUENCY 32768 |
14 | 14 | ||
15 | /* Clocking and Power Control Registers */ | 15 | /* Clocking and Power Control Registers */ |
16 | struct clk_pm_regs { | 16 | struct clk_pm_regs { |
17 | u32 reserved0[5]; | 17 | u32 reserved0[5]; |
18 | u32 boot_map; /* Boot Map Control Register */ | 18 | u32 boot_map; /* Boot Map Control Register */ |
19 | u32 p0_intr_er; /* Port 0/1 Start and Interrupt Enable */ | 19 | u32 p0_intr_er; /* Port 0/1 Start and Interrupt Enable */ |
20 | u32 usbdiv_ctrl; /* USB Clock Pre-Divide Register */ | 20 | u32 usbdiv_ctrl; /* USB Clock Pre-Divide Register */ |
21 | /* Internal Start Signal Sources Registers */ | 21 | /* Internal Start Signal Sources Registers */ |
22 | u32 start_er_int; /* Start Enable Register */ | 22 | u32 start_er_int; /* Start Enable Register */ |
23 | u32 start_rsr_int; /* Start Raw Status Register */ | 23 | u32 start_rsr_int; /* Start Raw Status Register */ |
24 | u32 start_sr_int; /* Start Status Register */ | 24 | u32 start_sr_int; /* Start Status Register */ |
25 | u32 start_apr_int; /* Start Activation Polarity Register */ | 25 | u32 start_apr_int; /* Start Activation Polarity Register */ |
26 | /* Device Pin Start Signal Sources Registers */ | 26 | /* Device Pin Start Signal Sources Registers */ |
27 | u32 start_er_pin; /* Start Enable Register */ | 27 | u32 start_er_pin; /* Start Enable Register */ |
28 | u32 start_rsr_pin; /* Start Raw Status Register */ | 28 | u32 start_rsr_pin; /* Start Raw Status Register */ |
29 | u32 start_sr_pin; /* Start Status Register */ | 29 | u32 start_sr_pin; /* Start Status Register */ |
30 | u32 start_apr_pin; /* Start Activation Polarity Register */ | 30 | u32 start_apr_pin; /* Start Activation Polarity Register */ |
31 | /* Clock Control Registers */ | 31 | /* Clock Control Registers */ |
32 | u32 hclkdiv_ctrl; /* HCLK Divider Control Register */ | 32 | u32 hclkdiv_ctrl; /* HCLK Divider Control Register */ |
33 | u32 pwr_ctrl; /* Power Control Register */ | 33 | u32 pwr_ctrl; /* Power Control Register */ |
34 | u32 pll397_ctrl; /* PLL397 Control Register */ | 34 | u32 pll397_ctrl; /* PLL397 Control Register */ |
35 | u32 osc_ctrl; /* Main Oscillator Control Register */ | 35 | u32 osc_ctrl; /* Main Oscillator Control Register */ |
36 | u32 sysclk_ctrl; /* SYSCLK Control Register */ | 36 | u32 sysclk_ctrl; /* SYSCLK Control Register */ |
37 | u32 lcdclk_ctrl; /* LCD Clock Control Register */ | 37 | u32 lcdclk_ctrl; /* LCD Clock Control Register */ |
38 | u32 hclkpll_ctrl; /* HCLK PLL Control Register */ | 38 | u32 hclkpll_ctrl; /* HCLK PLL Control Register */ |
39 | u32 reserved1; | 39 | u32 reserved1; |
40 | u32 adclk_ctrl1; /* ADC Clock Control1 Register */ | 40 | u32 adclk_ctrl1; /* ADC Clock Control1 Register */ |
41 | u32 usb_ctrl; /* USB Control Register */ | 41 | u32 usb_ctrl; /* USB Control Register */ |
42 | u32 sdramclk_ctrl; /* SDRAM Clock Control Register */ | 42 | u32 sdramclk_ctrl; /* SDRAM Clock Control Register */ |
43 | u32 ddr_lap_nom; /* DDR Calibration Nominal Value */ | 43 | u32 ddr_lap_nom; /* DDR Calibration Nominal Value */ |
44 | u32 ddr_lap_count; /* DDR Calibration Measured Value */ | 44 | u32 ddr_lap_count; /* DDR Calibration Measured Value */ |
45 | u32 ddr_cal_delay; /* DDR Calibration Delay Value */ | 45 | u32 ddr_cal_delay; /* DDR Calibration Delay Value */ |
46 | u32 ssp_ctrl; /* SSP Control Register */ | 46 | u32 ssp_ctrl; /* SSP Control Register */ |
47 | u32 i2s_ctrl; /* I2S Clock Control Register */ | 47 | u32 i2s_ctrl; /* I2S Clock Control Register */ |
48 | u32 ms_ctrl; /* Memory Card Control Register */ | 48 | u32 ms_ctrl; /* Memory Card Control Register */ |
49 | u32 reserved2[3]; | 49 | u32 reserved2[3]; |
50 | u32 macclk_ctrl; /* Ethernet MAC Clock Control Register */ | 50 | u32 macclk_ctrl; /* Ethernet MAC Clock Control Register */ |
51 | u32 reserved3[4]; | 51 | u32 reserved3[4]; |
52 | u32 test_clk; /* Test Clock Selection Register */ | 52 | u32 test_clk; /* Test Clock Selection Register */ |
53 | u32 sw_int; /* Software Interrupt Register */ | 53 | u32 sw_int; /* Software Interrupt Register */ |
54 | u32 i2cclk_ctrl; /* I2C Clock Control Register */ | 54 | u32 i2cclk_ctrl; /* I2C Clock Control Register */ |
55 | u32 keyclk_ctrl; /* Keyboard Scan Clock Control Register */ | 55 | u32 keyclk_ctrl; /* Keyboard Scan Clock Control Register */ |
56 | u32 adclk_ctrl; /* ADC Clock Control Register */ | 56 | u32 adclk_ctrl; /* ADC Clock Control Register */ |
57 | u32 pwmclk_ctrl; /* PWM Clock Control Register */ | 57 | u32 pwmclk_ctrl; /* PWM Clock Control Register */ |
58 | u32 timclk_ctrl; /* Watchdog and Highspeed Timer Control */ | 58 | u32 timclk_ctrl; /* Watchdog and Highspeed Timer Control */ |
59 | u32 timclk_ctrl1; /* Motor and Timer Clock Control */ | 59 | u32 timclk_ctrl1; /* Motor and Timer Clock Control */ |
60 | u32 spi_ctrl; /* SPI Control Register */ | 60 | u32 spi_ctrl; /* SPI Control Register */ |
61 | u32 flashclk_ctrl; /* NAND Flash Clock Control Register */ | 61 | u32 flashclk_ctrl; /* NAND Flash Clock Control Register */ |
62 | u32 reserved4; | 62 | u32 reserved4; |
63 | u32 u3clk; /* UART 3 Clock Control Register */ | 63 | u32 u3clk; /* UART 3 Clock Control Register */ |
64 | u32 u4clk; /* UART 4 Clock Control Register */ | 64 | u32 u4clk; /* UART 4 Clock Control Register */ |
65 | u32 u5clk; /* UART 5 Clock Control Register */ | 65 | u32 u5clk; /* UART 5 Clock Control Register */ |
66 | u32 u6clk; /* UART 6 Clock Control Register */ | 66 | u32 u6clk; /* UART 6 Clock Control Register */ |
67 | u32 irdaclk; /* IrDA Clock Control Register */ | 67 | u32 irdaclk; /* IrDA Clock Control Register */ |
68 | u32 uartclk_ctrl; /* UART Clock Control Register */ | 68 | u32 uartclk_ctrl; /* UART Clock Control Register */ |
69 | u32 dmaclk_ctrl; /* DMA Clock Control Register */ | 69 | u32 dmaclk_ctrl; /* DMA Clock Control Register */ |
70 | u32 autoclk_ctrl; /* Autoclock Control Register */ | 70 | u32 autoclk_ctrl; /* Autoclock Control Register */ |
71 | }; | 71 | }; |
72 | 72 | ||
73 | /* HCLK Divider Control Register bits */ | 73 | /* HCLK Divider Control Register bits */ |
74 | #define CLK_HCLK_DDRAM_MASK (0x3 << 7) | ||
74 | #define CLK_HCLK_DDRAM_HALF (0x2 << 7) | 75 | #define CLK_HCLK_DDRAM_HALF (0x2 << 7) |
75 | #define CLK_HCLK_DDRAM_NOMINAL (0x1 << 7) | 76 | #define CLK_HCLK_DDRAM_NOMINAL (0x1 << 7) |
76 | #define CLK_HCLK_DDRAM_STOPPED (0x0 << 7) | 77 | #define CLK_HCLK_DDRAM_STOPPED (0x0 << 7) |
77 | #define CLK_HCLK_PERIPH_DIV_MASK (0x1F << 2) | 78 | #define CLK_HCLK_PERIPH_DIV_MASK (0x1F << 2) |
78 | #define CLK_HCLK_PERIPH_DIV(n) ((((n) - 1) & 0x1F) << 2) | 79 | #define CLK_HCLK_PERIPH_DIV(n) ((((n) - 1) & 0x1F) << 2) |
79 | #define CLK_HCLK_ARM_PLL_DIV_MASK (0x3 << 0) | 80 | #define CLK_HCLK_ARM_PLL_DIV_MASK (0x3 << 0) |
80 | #define CLK_HCLK_ARM_PLL_DIV_4 (0x2 << 0) | 81 | #define CLK_HCLK_ARM_PLL_DIV_4 (0x2 << 0) |
81 | #define CLK_HCLK_ARM_PLL_DIV_2 (0x1 << 0) | 82 | #define CLK_HCLK_ARM_PLL_DIV_2 (0x1 << 0) |
82 | #define CLK_HCLK_ARM_PLL_DIV_1 (0x0 << 0) | 83 | #define CLK_HCLK_ARM_PLL_DIV_1 (0x0 << 0) |
83 | 84 | ||
84 | /* Power Control Register bits */ | 85 | /* Power Control Register bits */ |
85 | #define CLK_PWR_HCLK_RUN_PERIPH (1 << 10) | 86 | #define CLK_PWR_HCLK_RUN_PERIPH (1 << 10) |
86 | #define CLK_PWR_EMC_SREFREQ (1 << 9) | 87 | #define CLK_PWR_EMC_SREFREQ (1 << 9) |
87 | #define CLK_PWR_EMC_SREFREQ_UPDATE (1 << 8) | 88 | #define CLK_PWR_EMC_SREFREQ_UPDATE (1 << 8) |
88 | #define CLK_PWR_SDRAM_SREFREQ (1 << 7) | 89 | #define CLK_PWR_SDRAM_SREFREQ (1 << 7) |
89 | #define CLK_PWR_HIGHCORE_LEVEL (1 << 5) | 90 | #define CLK_PWR_HIGHCORE_LEVEL (1 << 5) |
90 | #define CLK_PWR_SYSCLKEN_LEVEL (1 << 4) | 91 | #define CLK_PWR_SYSCLKEN_LEVEL (1 << 4) |
91 | #define CLK_PWR_SYSCLKEN_CTRL (1 << 3) | 92 | #define CLK_PWR_SYSCLKEN_CTRL (1 << 3) |
92 | #define CLK_PWR_NORMAL_RUN (1 << 2) | 93 | #define CLK_PWR_NORMAL_RUN (1 << 2) |
93 | #define CLK_PWR_HIGHCORE_CTRL (1 << 1) | 94 | #define CLK_PWR_HIGHCORE_CTRL (1 << 1) |
94 | #define CLK_PWR_STOP_MODE (1 << 0) | 95 | #define CLK_PWR_STOP_MODE (1 << 0) |
95 | 96 | ||
96 | /* SYSCLK Control Register bits */ | 97 | /* SYSCLK Control Register bits */ |
97 | #define CLK_SYSCLK_PLL397 (1 << 1) | 98 | #define CLK_SYSCLK_PLL397 (1 << 1) |
98 | #define CLK_SYSCLK_MUX (1 << 0) | 99 | #define CLK_SYSCLK_MUX (1 << 0) |
99 | 100 | ||
100 | /* HCLK PLL Control Register bits */ | 101 | /* HCLK PLL Control Register bits */ |
101 | #define CLK_HCLK_PLL_OPERATING (1 << 16) | 102 | #define CLK_HCLK_PLL_OPERATING (1 << 16) |
102 | #define CLK_HCLK_PLL_BYPASS (1 << 15) | 103 | #define CLK_HCLK_PLL_BYPASS (1 << 15) |
103 | #define CLK_HCLK_PLL_DIRECT (1 << 14) | 104 | #define CLK_HCLK_PLL_DIRECT (1 << 14) |
104 | #define CLK_HCLK_PLL_FEEDBACK (1 << 13) | 105 | #define CLK_HCLK_PLL_FEEDBACK (1 << 13) |
105 | #define CLK_HCLK_PLL_POSTDIV_MASK (0x3 << 11) | 106 | #define CLK_HCLK_PLL_POSTDIV_MASK (0x3 << 11) |
106 | #define CLK_HCLK_PLL_POSTDIV_16 (0x3 << 11) | 107 | #define CLK_HCLK_PLL_POSTDIV_16 (0x3 << 11) |
107 | #define CLK_HCLK_PLL_POSTDIV_8 (0x2 << 11) | 108 | #define CLK_HCLK_PLL_POSTDIV_8 (0x2 << 11) |
108 | #define CLK_HCLK_PLL_POSTDIV_4 (0x1 << 11) | 109 | #define CLK_HCLK_PLL_POSTDIV_4 (0x1 << 11) |
109 | #define CLK_HCLK_PLL_POSTDIV_2 (0x0 << 11) | 110 | #define CLK_HCLK_PLL_POSTDIV_2 (0x0 << 11) |
110 | #define CLK_HCLK_PLL_PREDIV_MASK (0x3 << 9) | 111 | #define CLK_HCLK_PLL_PREDIV_MASK (0x3 << 9) |
111 | #define CLK_HCLK_PLL_PREDIV_4 (0x3 << 9) | 112 | #define CLK_HCLK_PLL_PREDIV_4 (0x3 << 9) |
112 | #define CLK_HCLK_PLL_PREDIV_3 (0x2 << 9) | 113 | #define CLK_HCLK_PLL_PREDIV_3 (0x2 << 9) |
113 | #define CLK_HCLK_PLL_PREDIV_2 (0x1 << 9) | 114 | #define CLK_HCLK_PLL_PREDIV_2 (0x1 << 9) |
114 | #define CLK_HCLK_PLL_PREDIV_1 (0x0 << 9) | 115 | #define CLK_HCLK_PLL_PREDIV_1 (0x0 << 9) |
115 | #define CLK_HCLK_PLL_FEEDBACK_DIV_MASK (0xFF << 1) | 116 | #define CLK_HCLK_PLL_FEEDBACK_DIV_MASK (0xFF << 1) |
116 | #define CLK_HCLK_PLL_FEEDBACK_DIV(n) ((((n) - 1) & 0xFF) << 1) | 117 | #define CLK_HCLK_PLL_FEEDBACK_DIV(n) ((((n) - 1) & 0xFF) << 1) |
117 | #define CLK_HCLK_PLL_LOCKED (1 << 0) | 118 | #define CLK_HCLK_PLL_LOCKED (1 << 0) |
118 | 119 | ||
119 | /* Ethernet MAC Clock Control Register bits */ | 120 | /* Ethernet MAC Clock Control Register bits */ |
120 | #define CLK_MAC_RMII (0x3 << 3) | 121 | #define CLK_MAC_RMII (0x3 << 3) |
121 | #define CLK_MAC_MII (0x1 << 3) | 122 | #define CLK_MAC_MII (0x1 << 3) |
122 | #define CLK_MAC_MASTER (1 << 2) | 123 | #define CLK_MAC_MASTER (1 << 2) |
123 | #define CLK_MAC_SLAVE (1 << 1) | 124 | #define CLK_MAC_SLAVE (1 << 1) |
124 | #define CLK_MAC_REG (1 << 0) | 125 | #define CLK_MAC_REG (1 << 0) |
125 | 126 | ||
126 | /* I2C Clock Control Register bits */ | 127 | /* I2C Clock Control Register bits */ |
127 | #define CLK_I2C2_ENABLE (1 << 1) | 128 | #define CLK_I2C2_ENABLE (1 << 1) |
128 | #define CLK_I2C1_ENABLE (1 << 0) | 129 | #define CLK_I2C1_ENABLE (1 << 0) |
129 | 130 | ||
130 | /* Timer Clock Control1 Register bits */ | 131 | /* Timer Clock Control1 Register bits */ |
131 | #define CLK_TIMCLK_MOTOR (1 << 6) | 132 | #define CLK_TIMCLK_MOTOR (1 << 6) |
132 | #define CLK_TIMCLK_TIMER3 (1 << 5) | 133 | #define CLK_TIMCLK_TIMER3 (1 << 5) |
133 | #define CLK_TIMCLK_TIMER2 (1 << 4) | 134 | #define CLK_TIMCLK_TIMER2 (1 << 4) |
134 | #define CLK_TIMCLK_TIMER1 (1 << 3) | 135 | #define CLK_TIMCLK_TIMER1 (1 << 3) |
135 | #define CLK_TIMCLK_TIMER0 (1 << 2) | 136 | #define CLK_TIMCLK_TIMER0 (1 << 2) |
136 | #define CLK_TIMCLK_TIMER5 (1 << 1) | 137 | #define CLK_TIMCLK_TIMER5 (1 << 1) |
137 | #define CLK_TIMCLK_TIMER4 (1 << 0) | 138 | #define CLK_TIMCLK_TIMER4 (1 << 0) |
138 | 139 | ||
139 | /* Timer Clock Control Register bits */ | 140 | /* Timer Clock Control Register bits */ |
140 | #define CLK_TIMCLK_HSTIMER (1 << 1) | 141 | #define CLK_TIMCLK_HSTIMER (1 << 1) |
141 | #define CLK_TIMCLK_WATCHDOG (1 << 0) | 142 | #define CLK_TIMCLK_WATCHDOG (1 << 0) |
142 | 143 | ||
143 | /* UART Clock Control Register bits */ | 144 | /* UART Clock Control Register bits */ |
144 | #define CLK_UART(n) (1 << ((n) - 3)) | 145 | #define CLK_UART(n) (1 << ((n) - 3)) |
145 | 146 | ||
146 | /* UARTn Clock Select Registers bits */ | 147 | /* UARTn Clock Select Registers bits */ |
147 | #define CLK_UART_HCLK (1 << 16) | 148 | #define CLK_UART_HCLK (1 << 16) |
148 | #define CLK_UART_X_DIV(n) (((n) & 0xFF) << 8) | 149 | #define CLK_UART_X_DIV(n) (((n) & 0xFF) << 8) |
149 | #define CLK_UART_Y_DIV(n) (((n) & 0xFF) << 0) | 150 | #define CLK_UART_Y_DIV(n) (((n) & 0xFF) << 0) |
150 | 151 | ||
151 | /* DMA Clock Control Register bits */ | 152 | /* DMA Clock Control Register bits */ |
152 | #define CLK_DMA_ENABLE (1 << 0) | 153 | #define CLK_DMA_ENABLE (1 << 0) |
153 | 154 | ||
154 | /* NAND Clock Control Register bits */ | 155 | /* NAND Clock Control Register bits */ |
155 | #define CLK_NAND_MLC (1 << 1) | 156 | #define CLK_NAND_MLC (1 << 1) |
156 | #define CLK_NAND_MLC_INT (1 << 5) | 157 | #define CLK_NAND_MLC_INT (1 << 5) |
157 | 158 | ||
158 | /* SSP Clock Control Register bits */ | 159 | /* SSP Clock Control Register bits */ |
159 | #define CLK_SSP0_ENABLE_CLOCK (1 << 0) | 160 | #define CLK_SSP0_ENABLE_CLOCK (1 << 0) |
160 | 161 | ||
162 | /* SDRAMCLK register bits */ | ||
163 | #define CLK_SDRAM_DDR_SEL (1 << 1) | ||
164 | |||
161 | unsigned int get_sys_clk_rate(void); | 165 | unsigned int get_sys_clk_rate(void); |
162 | unsigned int get_hclk_pll_rate(void); | 166 | unsigned int get_hclk_pll_rate(void); |
163 | unsigned int get_hclk_clk_div(void); | 167 | unsigned int get_hclk_clk_div(void); |
164 | unsigned int get_hclk_clk_rate(void); | 168 | unsigned int get_hclk_clk_rate(void); |
165 | unsigned int get_periph_clk_div(void); | 169 | unsigned int get_periph_clk_div(void); |
166 | unsigned int get_periph_clk_rate(void); | 170 | unsigned int get_periph_clk_rate(void); |
171 | unsigned int get_sdram_clk_rate(void); | ||
167 | 172 | ||
168 | #endif /* _LPC32XX_CLK_H */ | 173 | #endif /* _LPC32XX_CLK_H */ |
169 | 174 |
arch/arm/include/asm/arch-lpc32xx/cpu.h
1 | /* | 1 | /* |
2 | * Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com> | 2 | * Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: GPL-2.0+ | 4 | * SPDX-License-Identifier: GPL-2.0+ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef _LPC32XX_CPU_H | 7 | #ifndef _LPC32XX_CPU_H |
8 | #define _LPC32XX_CPU_H | 8 | #define _LPC32XX_CPU_H |
9 | 9 | ||
10 | /* LPC32XX Memory map */ | 10 | /* LPC32XX Memory map */ |
11 | 11 | ||
12 | /* AHB physical base addresses */ | 12 | /* AHB physical base addresses */ |
13 | #define SLC_NAND_BASE 0x20020000 /* SLC NAND Flash registers base */ | 13 | #define SLC_NAND_BASE 0x20020000 /* SLC NAND Flash registers base */ |
14 | #define SSP0_BASE 0x20084000 /* SSP0 registers base */ | 14 | #define SSP0_BASE 0x20084000 /* SSP0 registers base */ |
15 | #define SD_CARD_BASE 0x20098000 /* SD card interface registers base */ | 15 | #define SD_CARD_BASE 0x20098000 /* SD card interface registers base */ |
16 | #define MLC_NAND_BASE 0x200A8000 /* MLC NAND Flash registers base */ | 16 | #define MLC_NAND_BASE 0x200A8000 /* MLC NAND Flash registers base */ |
17 | #define DMA_BASE 0x31000000 /* DMA controller registers base */ | 17 | #define DMA_BASE 0x31000000 /* DMA controller registers base */ |
18 | #define USB_BASE 0x31020000 /* USB registers base */ | 18 | #define USB_BASE 0x31020000 /* USB registers base */ |
19 | #define LCD_BASE 0x31040000 /* LCD registers base */ | 19 | #define LCD_BASE 0x31040000 /* LCD registers base */ |
20 | #define ETHERNET_BASE 0x31060000 /* Ethernet registers base */ | 20 | #define ETHERNET_BASE 0x31060000 /* Ethernet registers base */ |
21 | #define EMC_BASE 0x31080000 /* EMC configuration registers base */ | 21 | #define EMC_BASE 0x31080000 /* EMC configuration registers base */ |
22 | 22 | ||
23 | /* FAB peripherals base addresses */ | 23 | /* FAB peripherals base addresses */ |
24 | #define CLK_PM_BASE 0x40004000 /* System control registers base */ | 24 | #define CLK_PM_BASE 0x40004000 /* System control registers base */ |
25 | #define HS_UART1_BASE 0x40014000 /* High speed UART 1 registers base */ | 25 | #define HS_UART1_BASE 0x40014000 /* High speed UART 1 registers base */ |
26 | #define HS_UART2_BASE 0x40018000 /* High speed UART 2 registers base */ | 26 | #define HS_UART2_BASE 0x40018000 /* High speed UART 2 registers base */ |
27 | #define HS_UART7_BASE 0x4001C000 /* High speed UART 7 registers base */ | 27 | #define HS_UART7_BASE 0x4001C000 /* High speed UART 7 registers base */ |
28 | #define RTC_BASE 0x40024000 /* RTC registers base */ | 28 | #define RTC_BASE 0x40024000 /* RTC registers base */ |
29 | #define GPIO_BASE 0x40028000 /* GPIO registers base */ | 29 | #define GPIO_BASE 0x40028000 /* GPIO registers base */ |
30 | #define MUX_BASE 0x40028100 /* MUX registers base */ | ||
30 | #define WDT_BASE 0x4003C000 /* Watchdog timer registers base */ | 31 | #define WDT_BASE 0x4003C000 /* Watchdog timer registers base */ |
31 | #define TIMER0_BASE 0x40044000 /* Timer0 registers base */ | 32 | #define TIMER0_BASE 0x40044000 /* Timer0 registers base */ |
32 | #define TIMER1_BASE 0x4004C000 /* Timer1 registers base */ | 33 | #define TIMER1_BASE 0x4004C000 /* Timer1 registers base */ |
33 | #define UART_CTRL_BASE 0x40054000 /* UART control regsisters base */ | 34 | #define UART_CTRL_BASE 0x40054000 /* UART control regsisters base */ |
34 | 35 | ||
35 | /* APB peripherals base addresses */ | 36 | /* APB peripherals base addresses */ |
36 | #define UART3_BASE 0x40080000 /* UART 3 registers base */ | 37 | #define UART3_BASE 0x40080000 /* UART 3 registers base */ |
37 | #define UART4_BASE 0x40088000 /* UART 4 registers base */ | 38 | #define UART4_BASE 0x40088000 /* UART 4 registers base */ |
38 | #define UART5_BASE 0x40090000 /* UART 5 registers base */ | 39 | #define UART5_BASE 0x40090000 /* UART 5 registers base */ |
39 | #define UART6_BASE 0x40098000 /* UART 6 registers base */ | 40 | #define UART6_BASE 0x40098000 /* UART 6 registers base */ |
40 | #define I2C1_BASE 0x400A0000 /* I2C 1 registers base */ | 41 | #define I2C1_BASE 0x400A0000 /* I2C 1 registers base */ |
41 | #define I2C2_BASE 0x400A8000 /* I2C 2 registers base */ | 42 | #define I2C2_BASE 0x400A8000 /* I2C 2 registers base */ |
42 | 43 | ||
43 | /* External SDRAM Memory Bank base addresses */ | 44 | /* External SDRAM Memory Bank base addresses */ |
44 | #define EMC_DYCS0_BASE 0x80000000 /* SDRAM DYCS0 base address */ | 45 | #define EMC_DYCS0_BASE 0x80000000 /* SDRAM DYCS0 base address */ |
45 | #define EMC_DYCS1_BASE 0xA0000000 /* SDRAM DYCS1 base address */ | 46 | #define EMC_DYCS1_BASE 0xA0000000 /* SDRAM DYCS1 base address */ |
46 | 47 | ||
47 | /* External Static Memory Bank base addresses */ | 48 | /* External Static Memory Bank base addresses */ |
48 | #define EMC_CS0_BASE 0xE0000000 | 49 | #define EMC_CS0_BASE 0xE0000000 |
49 | #define EMC_CS1_BASE 0xE1000000 | 50 | #define EMC_CS1_BASE 0xE1000000 |
50 | #define EMC_CS2_BASE 0xE2000000 | 51 | #define EMC_CS2_BASE 0xE2000000 |
51 | #define EMC_CS3_BASE 0xE3000000 | 52 | #define EMC_CS3_BASE 0xE3000000 |
52 | 53 | ||
53 | #endif /* _LPC32XX_CPU_H */ | 54 | #endif /* _LPC32XX_CPU_H */ |
54 | 55 |
arch/arm/include/asm/arch-lpc32xx/emc.h
1 | /* | 1 | /* |
2 | * Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com> | 2 | * Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: GPL-2.0+ | 4 | * SPDX-License-Identifier: GPL-2.0+ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef _LPC32XX_EMC_H | 7 | #ifndef _LPC32XX_EMC_H |
8 | #define _LPC32XX_EMC_H | 8 | #define _LPC32XX_EMC_H |
9 | 9 | ||
10 | #include <asm/types.h> | 10 | #include <asm/types.h> |
11 | 11 | ||
12 | /* EMC Registers */ | 12 | /* EMC Registers */ |
13 | struct emc_regs { | 13 | struct emc_regs { |
14 | u32 ctrl; /* Controls operation of the EMC */ | 14 | u32 ctrl; /* Controls operation of the EMC */ |
15 | u32 status; /* Provides EMC status information */ | 15 | u32 status; /* Provides EMC status information */ |
16 | u32 config; /* Configures operation of the EMC */ | 16 | u32 config; /* Configures operation of the EMC */ |
17 | u32 reserved0[5]; | 17 | u32 reserved0[5]; |
18 | u32 control; /* Controls dyn memory operation */ | 18 | u32 control; /* Controls dyn memory operation */ |
19 | u32 refresh; /* Configures dyn memory refresh operation */ | 19 | u32 refresh; /* Configures dyn memory refresh operation */ |
20 | u32 read_config; /* Configures the dyn memory read strategy */ | 20 | u32 read_config; /* Configures the dyn memory read strategy */ |
21 | u32 reserved1; | 21 | u32 reserved1; |
22 | u32 t_rp; /* Precharge command period */ | 22 | u32 t_rp; /* Precharge command period */ |
23 | u32 t_ras; /* Active to precharge command period */ | 23 | u32 t_ras; /* Active to precharge command period */ |
24 | u32 t_srex; /* Self-refresh exit time */ | 24 | u32 t_srex; /* Self-refresh exit time */ |
25 | u32 reserved2[2]; | 25 | u32 reserved2[2]; |
26 | u32 t_wr; /* Write recovery time */ | 26 | u32 t_wr; /* Write recovery time */ |
27 | u32 t_rc; /* Active to active command period */ | 27 | u32 t_rc; /* Active to active command period */ |
28 | u32 t_rfc; /* Auto-refresh period */ | 28 | u32 t_rfc; /* Auto-refresh period */ |
29 | u32 t_xsr; /* Exit self-refresh to active command time */ | 29 | u32 t_xsr; /* Exit self-refresh to active command time */ |
30 | u32 t_rrd; /* Active bank A to active bank B latency */ | 30 | u32 t_rrd; /* Active bank A to active bank B latency */ |
31 | u32 t_mrd; /* Load mode register to active command time */ | 31 | u32 t_mrd; /* Load mode register to active command time */ |
32 | u32 t_cdlr; /* Last data in to read command time */ | 32 | u32 t_cdlr; /* Last data in to read command time */ |
33 | u32 reserved3[8]; | 33 | u32 reserved3[8]; |
34 | u32 extended_wait; /* time for static memory rd/wr transfers */ | 34 | u32 extended_wait; /* time for static memory rd/wr transfers */ |
35 | u32 reserved4[31]; | 35 | u32 reserved4[31]; |
36 | u32 config0; /* Configuration information for the SDRAM */ | 36 | u32 config0; /* Configuration information for the SDRAM */ |
37 | u32 rascas0; /* RAS and CAS latencies for the SDRAM */ | 37 | u32 rascas0; /* RAS and CAS latencies for the SDRAM */ |
38 | u32 reserved5[6]; | 38 | u32 reserved5[6]; |
39 | u32 config1; /* Configuration information for the SDRAM */ | 39 | u32 config1; /* Configuration information for the SDRAM */ |
40 | u32 rascas1; /* RAS and CAS latencies for the SDRAM */ | 40 | u32 rascas1; /* RAS and CAS latencies for the SDRAM */ |
41 | u32 reserved6[54]; | 41 | u32 reserved6[54]; |
42 | struct emc_stat_t { | 42 | struct emc_stat_t { |
43 | u32 config; /* Static memory configuration */ | 43 | u32 config; /* Static memory configuration */ |
44 | u32 waitwen; /* Delay from chip select to write enable */ | 44 | u32 waitwen; /* Delay from chip select to write enable */ |
45 | u32 waitoen; /* Delay to output enable */ | 45 | u32 waitoen; /* Delay to output enable */ |
46 | u32 waitrd; /* Delay to a read access */ | 46 | u32 waitrd; /* Delay to a read access */ |
47 | u32 waitpage; /* Delay for async page mode read */ | 47 | u32 waitpage; /* Delay for async page mode read */ |
48 | u32 waitwr; /* Delay to a write access */ | 48 | u32 waitwr; /* Delay to a write access */ |
49 | u32 waitturn; /* Number of bus turnaround cycles */ | 49 | u32 waitturn; /* Number of bus turnaround cycles */ |
50 | u32 reserved; | 50 | u32 reserved; |
51 | } stat[4]; | 51 | } stat[4]; |
52 | u32 reserved7[96]; | 52 | u32 reserved7[96]; |
53 | struct emc_ahb_t { | 53 | struct emc_ahb_t { |
54 | u32 control; /* Control register for AHB */ | 54 | u32 control; /* Control register for AHB */ |
55 | u32 status; /* Status register for AHB */ | 55 | u32 status; /* Status register for AHB */ |
56 | u32 timeout; /* Timeout register for AHB */ | 56 | u32 timeout; /* Timeout register for AHB */ |
57 | u32 reserved[5]; | 57 | u32 reserved[5]; |
58 | } ahb[5]; | 58 | } ahb[5]; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | /* Static Memory Configuration Register bits */ | 61 | /* Static Memory Configuration Register bits */ |
62 | #define EMC_STAT_CONFIG_WP (1 << 20) | 62 | #define EMC_STAT_CONFIG_WP (1 << 20) |
63 | #define EMC_STAT_CONFIG_EW (1 << 8) | 63 | #define EMC_STAT_CONFIG_EW (1 << 8) |
64 | #define EMC_STAT_CONFIG_PB (1 << 7) | 64 | #define EMC_STAT_CONFIG_PB (1 << 7) |
65 | #define EMC_STAT_CONFIG_PC (1 << 6) | 65 | #define EMC_STAT_CONFIG_PC (1 << 6) |
66 | #define EMC_STAT_CONFIG_PM (1 << 3) | 66 | #define EMC_STAT_CONFIG_PM (1 << 3) |
67 | #define EMC_STAT_CONFIG_32BIT (2 << 0) | 67 | #define EMC_STAT_CONFIG_32BIT (2 << 0) |
68 | #define EMC_STAT_CONFIG_16BIT (1 << 0) | 68 | #define EMC_STAT_CONFIG_16BIT (1 << 0) |
69 | #define EMC_STAT_CONFIG_8BIT (0 << 0) | 69 | #define EMC_STAT_CONFIG_8BIT (0 << 0) |
70 | 70 | ||
71 | /* Static Memory Delay Registers */ | 71 | /* Static Memory Delay Registers */ |
72 | #define EMC_STAT_WAITWEN(n) (((n) - 1) & 0x0F) | 72 | #define EMC_STAT_WAITWEN(n) (((n) - 1) & 0x0F) |
73 | #define EMC_STAT_WAITOEN(n) (((n) - 1) & 0x0F) | 73 | #define EMC_STAT_WAITOEN(n) (((n) - 1) & 0x0F) |
74 | #define EMC_STAT_WAITRD(n) (((n) - 1) & 0x1F) | 74 | #define EMC_STAT_WAITRD(n) (((n) - 1) & 0x1F) |
75 | #define EMC_STAT_WAITPAGE(n) (((n) - 1) & 0x1F) | 75 | #define EMC_STAT_WAITPAGE(n) (((n) - 1) & 0x1F) |
76 | #define EMC_STAT_WAITWR(n) (((n) - 2) & 0x1F) | 76 | #define EMC_STAT_WAITWR(n) (((n) - 2) & 0x1F) |
77 | #define EMC_STAT_WAITTURN(n) (((n) - 1) & 0x0F) | 77 | #define EMC_STAT_WAITTURN(n) (((n) - 1) & 0x0F) |
78 | 78 | ||
79 | /* EMC settings for DRAM */ | ||
80 | struct emc_dram_settings { | ||
81 | u32 cmddelay; | ||
82 | u32 config0; | ||
83 | u32 rascas0; | ||
84 | u32 rdconfig; | ||
85 | u32 trp; | ||
86 | u32 tras; | ||
87 | u32 tsrex; | ||
88 | u32 twr; | ||
89 | u32 trc; | ||
90 | u32 trfc; | ||
91 | u32 txsr; | ||
92 | u32 trrd; | ||
93 | u32 tmrd; | ||
94 | u32 tcdlr; | ||
95 | u32 refresh; | ||
96 | u32 mode; | ||
97 | u32 emode; | ||
98 | }; | ||
99 | |||
79 | #endif /* _LPC32XX_EMC_H */ | 100 | #endif /* _LPC32XX_EMC_H */ |
80 | 101 |
arch/arm/include/asm/arch-lpc32xx/mux.h
File was created | 1 | /* | |
2 | * LPC32xx MUX interface | ||
3 | * | ||
4 | * (C) Copyright 2015 DENX Software Engineering GmbH | ||
5 | * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr> | ||
6 | * | ||
7 | * SPDX-License-Identifier: GPL-2.0+ | ||
8 | */ | ||
9 | |||
10 | /** | ||
11 | * MUX register map for LPC32xx | ||
12 | */ | ||
13 | |||
14 | struct mux_regs { | ||
15 | u32 p_mux_set; | ||
16 | u32 p_mux_clr; | ||
17 | u32 p_mux_state; | ||
18 | }; | ||
19 |
arch/arm/include/asm/arch-lpc32xx/sys_proto.h
1 | /* | 1 | /* |
2 | * Copyright (C) 2011 Vladimir Zapolskiy <vz@mleia.com> | 2 | * Copyright (C) 2011 Vladimir Zapolskiy <vz@mleia.com> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: GPL-2.0+ | 4 | * SPDX-License-Identifier: GPL-2.0+ |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef _LPC32XX_SYS_PROTO_H | 7 | #ifndef _LPC32XX_SYS_PROTO_H |
8 | #define _LPC32XX_SYS_PROTO_H | 8 | #define _LPC32XX_SYS_PROTO_H |
9 | 9 | ||
10 | #include <asm/arch/emc.h> | ||
11 | |||
10 | void lpc32xx_uart_init(unsigned int uart_id); | 12 | void lpc32xx_uart_init(unsigned int uart_id); |
11 | void lpc32xx_mac_init(void); | 13 | void lpc32xx_mac_init(void); |
12 | void lpc32xx_mlc_nand_init(void); | 14 | void lpc32xx_mlc_nand_init(void); |
13 | void lpc32xx_i2c_init(unsigned int devnum); | 15 | void lpc32xx_i2c_init(unsigned int devnum); |
14 | void lpc32xx_ssp_init(void); | 16 | void lpc32xx_ssp_init(void); |
15 | 17 | #if defined(CONFIG_SPL_BUILD) | |
18 | void ddr_init(const struct emc_dram_settings *dram); | ||
19 | #endif | ||
16 | #endif /* _LPC32XX_SYS_PROTO_H */ | 20 | #endif /* _LPC32XX_SYS_PROTO_H */ |
17 | 21 |
board/work-microwave/work_92105/Kconfig
File was created | 1 | if TARGET_WORK_92105 | |
2 | |||
3 | config SYS_BOARD | ||
4 | default "work_92105" | ||
5 | |||
6 | config SYS_VENDOR | ||
7 | default "work-microwave" | ||
8 | |||
9 | config SYS_SOC | ||
10 | default "lpc32xx" | ||
11 | |||
12 | config SYS_CONFIG_NAME | ||
13 | default "work_92105" | ||
14 | |||
15 | endif | ||
16 |
board/work-microwave/work_92105/MAINTAINERS
File was created | 1 | WORK_92105 BOARD | |
2 | M: Albert ARIBAUD <albert.aribaud@3adev.fr> | ||
3 | S: Maintained | ||
4 | F: board/work-microwave/work_92105/ | ||
5 | F: include/configs/work_92105.h | ||
6 | F: configs/work_92105_defconfig | ||
7 |
board/work-microwave/work_92105/Makefile
File was created | 1 | # | |
2 | # (C) Copyright 2014 DENX Software Engineering GmbH | ||
3 | # Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr> | ||
4 | # | ||
5 | # SPDX-License-Identifier: GPL-2.0+ | ||
6 | # | ||
7 | |||
8 | obj-y := work_92105.o work_92105_display.o | ||
9 | |||
10 | obj-$(CONFIG_SPL_BUILD) += work_92105_spl.o | ||
11 |
board/work-microwave/work_92105/README
File was created | 1 | Work_92105 from Work Microwave is an LPC3250- based board with the | |
2 | following features: | ||
3 | |||
4 | - 64MB SDR DRAM | ||
5 | - 1 GB SLC NAND, managed through MLC controller. | ||
6 | - Ethernet | ||
7 | - Ethernet + PHY SMSC8710 | ||
8 | - I2C: | ||
9 | - EEPROM (24M01-compatible) | ||
10 | - RTC (DS1374-compatible) | ||
11 | - Temperature sensor (DS620) | ||
12 | - DACs (2 x MAX518) | ||
13 | - SPI (through SSP interface) | ||
14 | - Port expander MAX6957 | ||
15 | - LCD display (HD44780-compatible), controlled | ||
16 | through the port expander and DACs | ||
17 | |||
18 | Standard SPL and U-Boot binaries | ||
19 | -------------------------------- | ||
20 | |||
21 | The default 'make' (or the 'make all') command will produce the | ||
22 | following files: | ||
23 | |||
24 | 1. spl/u-boot-spl.bin SPL, intended to run from SRAM at address 0. | ||
25 | This file can be loaded in SRAM through a JTAG | ||
26 | debugger or through the LPC32XX Service Boot | ||
27 | mechanism. | ||
28 | |||
29 | 2. u-boot.bin The raw U-Boot image, which can be loaded in | ||
30 | DDR through a JTAG debugger (for instance by | ||
31 | breaking SPL after DDR init), or by a running | ||
32 | U-Boot through e.g. 'loady' or 'tftp' and then | ||
33 | executed with 'go'. | ||
34 | |||
35 | 3. u-boot.img A U-Boot image with a mkimage header prepended. | ||
36 | SPL assumes (even when loaded through JTAG or | ||
37 | Service Boot) that such an image will be found | ||
38 | at offset 0x00040000 in NAND. | ||
39 | |||
40 | NAND cold-boot binaries | ||
41 | ----------------------- | ||
42 | |||
43 | The board can boot entirely from power-on with only SPL and U-Boot in | ||
44 | NAND. The LPC32XX-specific 'make lpc32xx-full.bin' command will produce | ||
45 | (in addition to spl/u-boot-spl.bin and u-boot.img if they were not made | ||
46 | already) the following files: | ||
47 | |||
48 | 4. lpc32xx-spl.img spl/u-boot-spl.bin, with a LPC32XX boot header | ||
49 | prepended. This header is required for the ROM | ||
50 | code to load SPL into SRAM and branch into it. | ||
51 | The content of this file is expected to reside | ||
52 | in NAND at addresses 0x00000000 and 0x00020000 | ||
53 | (two copies). | ||
54 | |||
55 | 5. lpc32xx-boot-0.bin lpc32xx-spl.img, padded with 0xFF bytes to a | ||
56 | size of 0x20000 bytes. This file covers exactly | ||
57 | the reserved area for the first bootloader copy | ||
58 | in NAND. | ||
59 | |||
60 | 6. lpc32xx-boot-1.bin Same as lpc32xx-boot-0.bin. This is intended to | ||
61 | be used as the second bootloader copy. | ||
62 | |||
63 | 7. lpc32xx-full.bin lpc32xx-boot-0.bin, lpc32xx-boot-1.bin and | ||
64 | u-boot.img concatenated. This file represents | ||
65 | the content of whole bootloader as present in | ||
66 | NAND at offset 00x00000000. | ||
67 | |||
68 | Flashing instructions | ||
69 | --------------------- | ||
70 | |||
71 | The following assumes a working U-Boot on the target, with the ability | ||
72 | to load files into DDR. | ||
73 | |||
74 | To update the whole bootloader: | ||
75 | |||
76 | nand erase 0x00000000 0x80000 | ||
77 | (load lpc32xx-full.bin at location $loadaddr) | ||
78 | nand write $loadaddr 0x00000000 $filesize | ||
79 | |||
80 | To update SPL only (note the double nand write) : | ||
81 | |||
82 | nand erase 0x00000000 0x40000 | ||
83 | (load lpc32xx-spl.img or lpc32xx-boot-N.bin at location $loadaddr) | ||
84 | nand write $loadaddr 0x00000000 $filesize | ||
85 | nand write $loadaddr 0x00020000 $filesize | ||
86 | |||
87 | To update U-Boot only: | ||
88 | |||
89 | nand erase 0x00040000 0x40000 | ||
90 | (load u-boot.img at location $loadaddr) | ||
91 | nand write $loadaddr 0x00040000 $filesize | ||
92 |
board/work-microwave/work_92105/work_92105.c
File was created | 1 | /* | |
2 | * WORK Microwave work_92105 board support | ||
3 | * | ||
4 | * (C) Copyright 2014 DENX Software Engineering GmbH | ||
5 | * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr> | ||
6 | * | ||
7 | * SPDX-License-Identifier: GPL-2.0+ | ||
8 | */ | ||
9 | |||
10 | #include <common.h> | ||
11 | #include <asm/io.h> | ||
12 | #include <asm/arch/sys_proto.h> | ||
13 | #include <asm/arch/cpu.h> | ||
14 | #include <asm/arch/clk.h> | ||
15 | #include <asm/arch/emc.h> | ||
16 | #include <asm/arch/wdt.h> | ||
17 | #include <asm/gpio.h> | ||
18 | #include <spl.h> | ||
19 | #include "work_92105_display.h" | ||
20 | |||
21 | DECLARE_GLOBAL_DATA_PTR; | ||
22 | |||
23 | static struct clk_pm_regs *clk = (struct clk_pm_regs *)CLK_PM_BASE; | ||
24 | static struct wdt_regs *wdt = (struct wdt_regs *)WDT_BASE; | ||
25 | |||
26 | void reset_periph(void) | ||
27 | { | ||
28 | setbits_le32(&clk->timclk_ctrl, CLK_TIMCLK_WATCHDOG); | ||
29 | writel(WDTIM_MCTRL_RESFRC1, &wdt->mctrl); | ||
30 | udelay(150); | ||
31 | writel(0, &wdt->mctrl); | ||
32 | clrbits_le32(&clk->timclk_ctrl, CLK_TIMCLK_WATCHDOG); | ||
33 | } | ||
34 | |||
35 | int board_early_init_f(void) | ||
36 | { | ||
37 | /* initialize serial port for console */ | ||
38 | lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART); | ||
39 | /* enable I2C, SSP, MAC, NAND */ | ||
40 | lpc32xx_i2c_init(1); /* only I2C1 has devices, I2C2 has none */ | ||
41 | lpc32xx_ssp_init(); | ||
42 | lpc32xx_mac_init(); | ||
43 | lpc32xx_mlc_nand_init(); | ||
44 | /* Display must wait until after relocation and devices init */ | ||
45 | return 0; | ||
46 | } | ||
47 | |||
48 | #define GPO_19 115 | ||
49 | |||
50 | int board_early_init_r(void) | ||
51 | { | ||
52 | /* Set NAND !WP to 1 through GPO_19 */ | ||
53 | gpio_request(GPO_19, "NAND_nWP"); | ||
54 | gpio_direction_output(GPO_19, 1); | ||
55 | |||
56 | /* initialize display */ | ||
57 | work_92105_display_init(); | ||
58 | |||
59 | return 0; | ||
60 | } | ||
61 | |||
62 | int board_init(void) | ||
63 | { | ||
64 | reset_periph(); | ||
65 | /* adress of boot parameters */ | ||
66 | gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; | ||
67 | |||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | int dram_init(void) | ||
72 | { | ||
73 | gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE, | ||
74 | CONFIG_SYS_SDRAM_SIZE); | ||
75 | |||
76 | return 0; | ||
77 | } | ||
78 |
board/work-microwave/work_92105/work_92105_display.c
File was created | 1 | /* | |
2 | * work_92105 display support | ||
3 | * | ||
4 | * (C) Copyright 2014 DENX Software Engineering GmbH | ||
5 | * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr> | ||
6 | * | ||
7 | * The work_92105 display is a HD44780-compatible module | ||
8 | * controlled through a MAX6957AAX SPI port expander, two | ||
9 | * MAX518 I2C DACs and native LPC32xx GPO 15. | ||
10 | * | ||
11 | * SPDX-License-Identifier: GPL-2.0+ | ||
12 | */ | ||
13 | |||
14 | #include <common.h> | ||
15 | #include <asm/arch/sys_proto.h> | ||
16 | #include <asm/arch/cpu.h> | ||
17 | #include <asm/arch/emc.h> | ||
18 | #include <asm/gpio.h> | ||
19 | #include <spi.h> | ||
20 | #include <i2c.h> | ||
21 | #include <version.h> | ||
22 | #include <vsprintf.h> | ||
23 | |||
24 | /* | ||
25 | * GPO 15 in port 3 is gpio 3*32+15 = 111 | ||
26 | */ | ||
27 | |||
28 | #define GPO_15 111 | ||
29 | |||
30 | /** | ||
31 | * MAX6957AAX registers that we will be using | ||
32 | */ | ||
33 | |||
34 | #define MAX6957_CONF 0x04 | ||
35 | |||
36 | #define MAX6957_CONF_08_11 0x0A | ||
37 | #define MAX6957_CONF_12_15 0x0B | ||
38 | #define MAX6957_CONF_16_19 0x0C | ||
39 | |||
40 | /** | ||
41 | * Individual gpio ports (one per gpio) to HD44780 | ||
42 | */ | ||
43 | |||
44 | #define MAX6957AAX_HD44780_RS 0x29 | ||
45 | #define MAX6957AAX_HD44780_R_W 0x2A | ||
46 | #define MAX6957AAX_HD44780_EN 0x2B | ||
47 | #define MAX6957AAX_HD44780_DATA 0x4C | ||
48 | |||
49 | /** | ||
50 | * Display controller instructions | ||
51 | */ | ||
52 | |||
53 | /* Function set: eight bits, two lines, 8-dot font */ | ||
54 | #define HD44780_FUNCTION_SET 0x38 | ||
55 | |||
56 | /* Display ON / OFF: turn display on */ | ||
57 | #define HD44780_DISPLAY_ON_OFF_CONTROL 0x0C | ||
58 | |||
59 | /* Entry mode: increment */ | ||
60 | #define HD44780_ENTRY_MODE_SET 0x06 | ||
61 | |||
62 | /* Clear */ | ||
63 | #define HD44780_CLEAR_DISPLAY 0x01 | ||
64 | |||
65 | /* Set DDRAM addr (to be ORed with exact address) */ | ||
66 | #define HD44780_SET_DDRAM_ADDR 0x80 | ||
67 | |||
68 | /* Set CGRAM addr (to be ORed with exact address) */ | ||
69 | #define HD44780_SET_CGRAM_ADDR 0x40 | ||
70 | |||
71 | /** | ||
72 | * Default value for contrats | ||
73 | */ | ||
74 | |||
75 | #define CONTRAST_DEFAULT 25 | ||
76 | |||
77 | /** | ||
78 | * Define slave as a module-wide local to save passing it around, | ||
79 | * plus we will need it after init for the "hd44780" command. | ||
80 | */ | ||
81 | |||
82 | static struct spi_slave *slave; | ||
83 | |||
84 | /* | ||
85 | * Write a value into a MAX6957AAX register. | ||
86 | */ | ||
87 | |||
88 | static void max6957aax_write(uint8_t reg, uint8_t value) | ||
89 | { | ||
90 | uint8_t dout[2]; | ||
91 | |||
92 | dout[0] = reg; | ||
93 | dout[1] = value; | ||
94 | gpio_set_value(GPO_15, 0); | ||
95 | /* do SPI read/write (passing din==dout is OK) */ | ||
96 | spi_xfer(slave, 16, dout, dout, SPI_XFER_BEGIN | SPI_XFER_END); | ||
97 | gpio_set_value(GPO_15, 1); | ||
98 | } | ||
99 | |||
100 | /* | ||
101 | * Read a value from a MAX6957AAX register. | ||
102 | * | ||
103 | * According to the MAX6957AAX datasheet, we should release the chip | ||
104 | * select halfway through the read sequence, when the actual register | ||
105 | * value is read; but the WORK_92105 hardware prevents the MAX6957AAX | ||
106 | * SPI OUT from reaching the LPC32XX SIP MISO if chip is not selected. | ||
107 | * so let's release the CS an hold it again while reading the result. | ||
108 | */ | ||
109 | |||
110 | static uint8_t max6957aax_read(uint8_t reg) | ||
111 | { | ||
112 | uint8_t dout[2], din[2]; | ||
113 | |||
114 | /* send read command */ | ||
115 | dout[0] = reg | 0x80; /* set bit 7 to indicate read */ | ||
116 | dout[1] = 0; | ||
117 | gpio_set_value(GPO_15, 0); | ||
118 | /* do SPI read/write (passing din==dout is OK) */ | ||
119 | spi_xfer(slave, 16, dout, dout, SPI_XFER_BEGIN | SPI_XFER_END); | ||
120 | /* latch read command */ | ||
121 | gpio_set_value(GPO_15, 1); | ||
122 | /* read register -- din = noop on xmit, din[1] = reg on recv */ | ||
123 | din[0] = 0; | ||
124 | din[1] = 0; | ||
125 | gpio_set_value(GPO_15, 0); | ||
126 | /* do SPI read/write (passing din==dout is OK) */ | ||
127 | spi_xfer(slave, 16, din, din, SPI_XFER_BEGIN | SPI_XFER_END); | ||
128 | /* end of read. */ | ||
129 | gpio_set_value(GPO_15, 1); | ||
130 | return din[1]; | ||
131 | } | ||
132 | |||
133 | static void hd44780_instruction(unsigned long instruction) | ||
134 | { | ||
135 | max6957aax_write(MAX6957AAX_HD44780_RS, 0); | ||
136 | max6957aax_write(MAX6957AAX_HD44780_R_W, 0); | ||
137 | max6957aax_write(MAX6957AAX_HD44780_EN, 1); | ||
138 | max6957aax_write(MAX6957AAX_HD44780_DATA, instruction); | ||
139 | max6957aax_write(MAX6957AAX_HD44780_EN, 0); | ||
140 | /* HD44780 takes 37 us for most instructions, 1520 for clear */ | ||
141 | if (instruction == HD44780_CLEAR_DISPLAY) | ||
142 | udelay(2000); | ||
143 | else | ||
144 | udelay(100); | ||
145 | } | ||
146 | |||
147 | static void hd44780_write_char(char c) | ||
148 | { | ||
149 | max6957aax_write(MAX6957AAX_HD44780_RS, 1); | ||
150 | max6957aax_write(MAX6957AAX_HD44780_R_W, 0); | ||
151 | max6957aax_write(MAX6957AAX_HD44780_EN, 1); | ||
152 | max6957aax_write(MAX6957AAX_HD44780_DATA, c); | ||
153 | max6957aax_write(MAX6957AAX_HD44780_EN, 0); | ||
154 | /* HD44780 takes 37 us to write to DDRAM or CGRAM */ | ||
155 | udelay(100); | ||
156 | } | ||
157 | |||
158 | static void hd44780_write_str(char *s) | ||
159 | { | ||
160 | max6957aax_write(MAX6957AAX_HD44780_RS, 1); | ||
161 | max6957aax_write(MAX6957AAX_HD44780_R_W, 0); | ||
162 | while (*s) { | ||
163 | max6957aax_write(MAX6957AAX_HD44780_EN, 1); | ||
164 | max6957aax_write(MAX6957AAX_HD44780_DATA, *s); | ||
165 | max6957aax_write(MAX6957AAX_HD44780_EN, 0); | ||
166 | s++; | ||
167 | /* HD44780 takes 37 us to write to DDRAM or CGRAM */ | ||
168 | udelay(100); | ||
169 | } | ||
170 | } | ||
171 | |||
172 | /* | ||
173 | * Existing user code might expect these custom characters to be | ||
174 | * recognized and displayed on the LCD | ||
175 | */ | ||
176 | |||
177 | static u8 char_gen_chars[] = { | ||
178 | /* #8, empty rectangle */ | ||
179 | 0x1F, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x1F, | ||
180 | /* #9, filled right arrow */ | ||
181 | 0x10, 0x18, 0x1C, 0x1E, 0x1C, 0x18, 0x10, 0x00, | ||
182 | /* #10, filled left arrow */ | ||
183 | 0x01, 0x03, 0x07, 0x0F, 0x07, 0x03, 0x01, 0x00, | ||
184 | /* #11, up and down arrow */ | ||
185 | 0x04, 0x0E, 0x1F, 0x00, 0x00, 0x1F, 0x0E, 0x04, | ||
186 | /* #12, plus/minus */ | ||
187 | 0x04, 0x04, 0x1F, 0x04, 0x04, 0x00, 0x1F, 0x00, | ||
188 | /* #13, fat exclamation mark */ | ||
189 | 0x06, 0x06, 0x06, 0x06, 0x00, 0x06, 0x06, 0x00, | ||
190 | /* #14, empty square */ | ||
191 | 0x00, 0x1F, 0x11, 0x11, 0x11, 0x1F, 0x00, 0x00, | ||
192 | /* #15, struck out square */ | ||
193 | 0x00, 0x1F, 0x19, 0x15, 0x13, 0x1F, 0x00, 0x00, | ||
194 | }; | ||
195 | |||
196 | static void hd44780_init_char_gen(void) | ||
197 | { | ||
198 | int i; | ||
199 | |||
200 | hd44780_instruction(HD44780_SET_CGRAM_ADDR); | ||
201 | |||
202 | for (i = 0; i < sizeof(char_gen_chars); i++) | ||
203 | hd44780_write_char(char_gen_chars[i]); | ||
204 | |||
205 | hd44780_instruction(HD44780_SET_DDRAM_ADDR); | ||
206 | } | ||
207 | |||
208 | void work_92105_display_init(void) | ||
209 | { | ||
210 | int claim_err; | ||
211 | char *display_contrast_str; | ||
212 | uint8_t display_contrast = CONTRAST_DEFAULT; | ||
213 | uint8_t enable_backlight = 0x96; | ||
214 | |||
215 | slave = spi_setup_slave(0, 0, 500000, 0); | ||
216 | |||
217 | if (!slave) { | ||
218 | printf("Failed to set up SPI slave\n"); | ||
219 | return; | ||
220 | } | ||
221 | |||
222 | claim_err = spi_claim_bus(slave); | ||
223 | |||
224 | if (claim_err) | ||
225 | debug("Failed to claim SPI bus: %d\n", claim_err); | ||
226 | |||
227 | /* enable backlight */ | ||
228 | i2c_write(0x2c, 0x01, 1, &enable_backlight, 1); | ||
229 | |||
230 | /* set display contrast */ | ||
231 | display_contrast_str = getenv("fwopt_dispcontrast"); | ||
232 | if (display_contrast_str) | ||
233 | display_contrast = simple_strtoul(display_contrast_str, | ||
234 | NULL, 10); | ||
235 | i2c_write(0x2c, 0x00, 1, &display_contrast, 1); | ||
236 | |||
237 | /* request GPO_15 as an output initially set to 1 */ | ||
238 | gpio_request(GPO_15, "MAX6957_nCS"); | ||
239 | gpio_direction_output(GPO_15, 1); | ||
240 | |||
241 | /* enable MAX6957 portexpander */ | ||
242 | max6957aax_write(MAX6957_CONF, 0x01); | ||
243 | /* configure pin 8 as input, pins 9..19 as outputs */ | ||
244 | max6957aax_write(MAX6957_CONF_08_11, 0x56); | ||
245 | max6957aax_write(MAX6957_CONF_12_15, 0x55); | ||
246 | max6957aax_write(MAX6957_CONF_16_19, 0x55); | ||
247 | |||
248 | /* initialize HD44780 */ | ||
249 | max6957aax_write(MAX6957AAX_HD44780_EN, 0); | ||
250 | hd44780_instruction(HD44780_FUNCTION_SET); | ||
251 | hd44780_instruction(HD44780_DISPLAY_ON_OFF_CONTROL); | ||
252 | hd44780_instruction(HD44780_ENTRY_MODE_SET); | ||
253 | |||
254 | /* write custom character glyphs */ | ||
255 | hd44780_init_char_gen(); | ||
256 | |||
257 | /* Show U-Boot version, date and time as a sign-of-life */ | ||
258 | hd44780_instruction(HD44780_CLEAR_DISPLAY); | ||
259 | hd44780_instruction(HD44780_SET_DDRAM_ADDR | 0); | ||
260 | hd44780_write_str(U_BOOT_VERSION); | ||
261 | hd44780_instruction(HD44780_SET_DDRAM_ADDR | 64); | ||
262 | hd44780_write_str(U_BOOT_DATE); | ||
263 | hd44780_instruction(HD44780_SET_DDRAM_ADDR | 64 | 20); | ||
264 | hd44780_write_str(U_BOOT_TIME); | ||
265 | } | ||
266 | |||
267 | #ifdef CONFIG_CMD_MAX6957 | ||
268 | |||
269 | static int do_max6957aax(cmd_tbl_t *cmdtp, int flag, int argc, | ||
270 | char *const argv[]) | ||
271 | { | ||
272 | int reg, val; | ||
273 | |||
274 | if (argc != 3) | ||
275 | return CMD_RET_USAGE; | ||
276 | switch (argv[1][0]) { | ||
277 | case 'r': | ||
278 | case 'R': | ||
279 | reg = simple_strtoul(argv[2], NULL, 0); | ||
280 | val = max6957aax_read(reg); | ||
281 | printf("MAX6957 reg 0x%02x read 0x%02x\n", reg, val); | ||
282 | return 0; | ||
283 | default: | ||
284 | reg = simple_strtoul(argv[1], NULL, 0); | ||
285 | val = simple_strtoul(argv[2], NULL, 0); | ||
286 | max6957aax_write(reg, val); | ||
287 | printf("MAX6957 reg 0x%02x wrote 0x%02x\n", reg, val); | ||
288 | return 0; | ||
289 | } | ||
290 | return 1; | ||
291 | } | ||
292 | |||
293 | #ifdef CONFIG_SYS_LONGHELP | ||
294 | static char max6957aax_help_text[] = | ||
295 | "max6957aax - write or read display register:\n" | ||
296 | "\tmax6957aax R|r reg - read display register;\n" | ||
297 | "\tmax6957aax reg val - write display register."; | ||
298 | #endif | ||
299 | |||
300 | U_BOOT_CMD( | ||
301 | max6957aax, 6, 1, do_max6957aax, | ||
302 | "SPI MAX6957 display write/read", | ||
303 | max6957aax_help_text | ||
304 | ); | ||
305 | #endif /* CONFIG_CMD_MAX6957 */ | ||
306 | |||
307 | #ifdef CONFIG_CMD_HD44760 | ||
308 | |||
309 | /* | ||
310 | * We need the HUSH parser because we need string arguments, and | ||
311 | * only HUSH can understand them. | ||
312 | */ | ||
313 | |||
314 | #if !defined(CONFIG_SYS_HUSH_PARSER) | ||
315 | #error CONFIG_CMD_HD44760 requires CONFIG_SYS_HUSH_PARSER | ||
316 | #endif | ||
317 | |||
318 | static int do_hd44780(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) | ||
319 | { | ||
320 | char *cmd; | ||
321 | |||
322 | if (argc != 3) | ||
323 | return CMD_RET_USAGE; | ||
324 | |||
325 | cmd = argv[1]; | ||
326 | |||
327 | if (strcasecmp(cmd, "cmd") == 0) | ||
328 | hd44780_instruction(simple_strtol(argv[2], NULL, 0)); | ||
329 | else if (strcasecmp(cmd, "data") == 0) | ||
330 | hd44780_write_char(simple_strtol(argv[2], NULL, 0)); | ||
331 | else if (strcasecmp(cmd, "str") == 0) | ||
332 | hd44780_write_str(argv[2]); | ||
333 | return 0; | ||
334 | } | ||
335 | |||
336 | #ifdef CONFIG_SYS_LONGHELP | ||
337 | static char hd44780_help_text[] = | ||
338 | "hd44780 - control LCD driver:\n" | ||
339 | "\thd44780 cmd <val> - send command <val> to driver;\n" | ||
340 | "\thd44780 data <val> - send data <val> to driver;\n" | ||
341 | "\thd44780 str \"<text>\" - send \"<text>\" to driver."; | ||
342 | #endif | ||
343 | |||
344 | U_BOOT_CMD( | ||
345 | hd44780, 6, 1, do_hd44780, | ||
346 | "HD44780 LCD driver control", | ||
347 | hd44780_help_text | ||
348 | ); | ||
349 | #endif /* CONFIG_CMD_HD44780 */ | ||
350 |
board/work-microwave/work_92105/work_92105_display.h
File was created | 1 | /* | |
2 | * work_92105 display support interface | ||
3 | * | ||
4 | * (C) Copyright 2014 DENX Software Engineering GmbH | ||
5 | * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr> | ||
6 | * | ||
7 | * The work_92105 display is a HD44780-compatible module | ||
8 | * controlled through a MAX6957AAX SPI port expander, two | ||
9 | * MAX518 I2C DACs and native LPC32xx GPO 15. | ||
10 | * | ||
11 | * SPDX-License-Identifier: GPL-2.0+ | ||
12 | */ | ||
13 | |||
14 | void work_92105_display_init(void); | ||
15 |
board/work-microwave/work_92105/work_92105_spl.c
File was created | 1 | /* | |
2 | * WORK Microwave work_92105 board support | ||
3 | * | ||
4 | * (C) Copyright 2014 DENX Software Engineering GmbH | ||
5 | * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr> | ||
6 | * | ||
7 | * SPDX-License-Identifier: GPL-2.0+ | ||
8 | */ | ||
9 | |||
10 | #include <common.h> | ||
11 | #include <asm/io.h> | ||
12 | #include <asm/arch/sys_proto.h> | ||
13 | #include <asm/arch/cpu.h> | ||
14 | #include <asm/arch/emc.h> | ||
15 | #include <asm/gpio.h> | ||
16 | #include <spl.h> | ||
17 | #include "work_92105_display.h" | ||
18 | |||
19 | struct emc_dram_settings dram_64mb = { | ||
20 | .cmddelay = 0x0001C000, | ||
21 | .config0 = 0x00005682, | ||
22 | .rascas0 = 0x00000302, | ||
23 | .rdconfig = 0x00000011, | ||
24 | .trp = 52631578, | ||
25 | .tras = 20833333, | ||
26 | .tsrex = 12500000, | ||
27 | .twr = 66666666, | ||
28 | .trc = 13888888, | ||
29 | .trfc = 10256410, | ||
30 | .txsr = 12500000, | ||
31 | .trrd = 1, | ||
32 | .tmrd = 1, | ||
33 | .tcdlr = 0, | ||
34 | .refresh = 128000, | ||
35 | .mode = 0x00018000, | ||
36 | .emode = 0x02000000 | ||
37 | }; | ||
38 | |||
39 | const struct emc_dram_settings dram_128mb = { | ||
40 | .cmddelay = 0x0001C000, | ||
41 | .config0 = 0x00005882, | ||
42 | .rascas0 = 0x00000302, | ||
43 | .rdconfig = 0x00000011, | ||
44 | .trp = 52631578, | ||
45 | .tras = 22222222, | ||
46 | .tsrex = 8333333, | ||
47 | .twr = 66666666, | ||
48 | .trc = 14814814, | ||
49 | .trfc = 10256410, | ||
50 | .txsr = 8333333, | ||
51 | .trrd = 1, | ||
52 | .tmrd = 1, | ||
53 | .tcdlr = 0, | ||
54 | .refresh = 128000, | ||
55 | .mode = 0x00030000, | ||
56 | .emode = 0x02000000 | ||
57 | }; | ||
58 | |||
59 | void spl_board_init(void) | ||
60 | { | ||
61 | /* initialize serial port for console */ | ||
62 | lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART); | ||
63 | /* initialize console */ | ||
64 | preloader_console_init(); | ||
65 | /* init DDR and NAND to chainload U-Boot */ | ||
66 | ddr_init(&dram_128mb); | ||
67 | /* | ||
68 | * If this is actually a 64MB module, then the highest column | ||
69 | * bit in any address will be ignored, and thus address 0x80000000 | ||
70 | * should be mirrored at address 0x80000800. Test this. | ||
71 | */ | ||
72 | writel(0x31415926, 0x80000000); /* write Pi at 0x80000000 */ | ||
73 | writel(0x16180339, 0x80000800); /* write Phi at 0x80000800 */ | ||
74 | if (readl(0x80000000) == 0x16180339) /* check 0x80000000 */ { | ||
75 | /* actually 64MB mirrored: reconfigure controller */ | ||
76 | ddr_init(&dram_64mb); | ||
77 | } | ||
78 | /* initialize NAND controller to load U-Boot from NAND */ | ||
79 | lpc32xx_mlc_nand_init(); | ||
80 | } | ||
81 | |||
82 | u32 spl_boot_device(void) | ||
83 | { | ||
84 | return BOOT_DEVICE_NAND; | ||
85 | } | ||
86 |
configs/work_92105_defconfig
File was created | 1 | CONFIG_ARM=y | |
2 | CONFIG_TARGET_WORK_92105=y | ||
3 | CONFIG_DM=y | ||
4 | CONFIG_DM_GPIO=y | ||
5 | CONFIG_SPL=y | ||
6 | CONFIG_SYS_EXTRA_OPTIONS="" | ||
7 |
include/configs/work_92105.h
File was created | 1 | /* | |
2 | * WORK Microwave work_92105 board configuration file | ||
3 | * | ||
4 | * (C) Copyright 2014 DENX Software Engineering GmbH | ||
5 | * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr> | ||
6 | * | ||
7 | * SPDX-License-Identifier: GPL-2.0+ | ||
8 | */ | ||
9 | |||
10 | #ifndef __CONFIG_WORK_92105_H__ | ||
11 | #define __CONFIG_WORK_92105_H__ | ||
12 | |||
13 | /* SoC and board defines */ | ||
14 | #include <linux/sizes.h> | ||
15 | #include <asm/arch/cpu.h> | ||
16 | |||
17 | /* | ||
18 | * Define work_92105 machine type by hand -- done only for compatibility | ||
19 | * with original board code | ||
20 | */ | ||
21 | #define MACH_TYPE_WORK_92105 736 | ||
22 | #define CONFIG_MACH_TYPE MACH_TYPE_WORK_92105 | ||
23 | |||
24 | #define CONFIG_SYS_ICACHE_OFF | ||
25 | #define CONFIG_SYS_DCACHE_OFF | ||
26 | #if !defined(CONFIG_SPL_BUILD) | ||
27 | #define CONFIG_SKIP_LOWLEVEL_INIT | ||
28 | #endif | ||
29 | #define CONFIG_BOARD_EARLY_INIT_F | ||
30 | #define CONFIG_BOARD_EARLY_INIT_R | ||
31 | |||
32 | /* generate LPC32XX-specific SPL image */ | ||
33 | #define CONFIG_LPC32XX_SPL | ||
34 | |||
35 | /* | ||
36 | * Memory configurations | ||
37 | */ | ||
38 | #define CONFIG_NR_DRAM_BANKS 1 | ||
39 | #define CONFIG_SYS_MALLOC_LEN SZ_1M | ||
40 | #define CONFIG_SYS_SDRAM_BASE EMC_DYCS0_BASE | ||
41 | #define CONFIG_SYS_SDRAM_SIZE SZ_128M | ||
42 | #define CONFIG_SYS_TEXT_BASE 0x80100000 | ||
43 | #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + SZ_32K) | ||
44 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_TEXT_BASE - SZ_1M) | ||
45 | |||
46 | #define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_32K) | ||
47 | |||
48 | #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_512K \ | ||
49 | - GENERATED_GBL_DATA_SIZE) | ||
50 | |||
51 | /* | ||
52 | * Serial Driver | ||
53 | */ | ||
54 | #define CONFIG_SYS_LPC32XX_UART 5 /* UART5 - NS16550 */ | ||
55 | #define CONFIG_BAUDRATE 115200 | ||
56 | |||
57 | /* | ||
58 | * Ethernet Driver | ||
59 | */ | ||
60 | |||
61 | #define CONFIG_PHY_SMSC | ||
62 | #define CONFIG_LPC32XX_ETH | ||
63 | #define CONFIG_PHYLIB | ||
64 | #define CONFIG_PHY_ADDR 0 | ||
65 | #define CONFIG_SYS_FAULT_ECHO_LINK_DOWN | ||
66 | #define CONFIG_CMD_MII | ||
67 | #define CONFIG_CMD_PING | ||
68 | #define CONFIG_CMD_DHCP | ||
69 | /* FIXME: remove "Waiting for PHY auto negotiation to complete..." message */ | ||
70 | |||
71 | /* | ||
72 | * I2C driver | ||
73 | */ | ||
74 | |||
75 | #define CONFIG_SYS_I2C_LPC32XX | ||
76 | #define CONFIG_SYS_I2C | ||
77 | #define CONFIG_CMD_I2C | ||
78 | #define CONFIG_SYS_I2C_SPEED 350000 | ||
79 | |||
80 | /* | ||
81 | * I2C EEPROM | ||
82 | */ | ||
83 | |||
84 | #define CONFIG_CMD_EEPROM | ||
85 | #define CONFIG_SYS_I2C_EEPROM_ADDR 0x56 | ||
86 | #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 | ||
87 | |||
88 | /* | ||
89 | * I2C RTC | ||
90 | */ | ||
91 | |||
92 | #define CONFIG_CMD_DATE | ||
93 | #define CONFIG_RTC_DS1374 | ||
94 | |||
95 | /* | ||
96 | * I2C Temperature Sensor (DTT) | ||
97 | */ | ||
98 | |||
99 | #define CONFIG_CMD_DTT | ||
100 | #define CONFIG_DTT_SENSORS { 0, 1 } | ||
101 | #define CONFIG_DTT_DS620 | ||
102 | |||
103 | /* | ||
104 | * U-Boot General Configurations | ||
105 | */ | ||
106 | #define CONFIG_SYS_GENERIC_BOARD | ||
107 | #define CONFIG_SYS_LONGHELP | ||
108 | #define CONFIG_SYS_CBSIZE 1024 | ||
109 | #define CONFIG_SYS_PBSIZE \ | ||
110 | (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) | ||
111 | #define CONFIG_SYS_MAXARGS 16 | ||
112 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE | ||
113 | |||
114 | #define CONFIG_SYS_HUSH_PARSER | ||
115 | |||
116 | #define CONFIG_AUTO_COMPLETE | ||
117 | #define CONFIG_CMDLINE_EDITING | ||
118 | #define CONFIG_VERSION_VARIABLE | ||
119 | #define CONFIG_DISPLAY_CPUINFO | ||
120 | #define CONFIG_DOS_PARTITION | ||
121 | |||
122 | /* | ||
123 | * No NOR | ||
124 | */ | ||
125 | |||
126 | #define CONFIG_SYS_NO_FLASH | ||
127 | |||
128 | /* | ||
129 | * NAND chip timings for FIXME: which one? | ||
130 | */ | ||
131 | |||
132 | #define CONFIG_LPC32XX_NAND_MLC_TCEA_DELAY 333333333 | ||
133 | #define CONFIG_LPC32XX_NAND_MLC_BUSY_DELAY 10000000 | ||
134 | #define CONFIG_LPC32XX_NAND_MLC_NAND_TA 18181818 | ||
135 | #define CONFIG_LPC32XX_NAND_MLC_RD_HIGH 31250000 | ||
136 | #define CONFIG_LPC32XX_NAND_MLC_RD_LOW 45454545 | ||
137 | #define CONFIG_LPC32XX_NAND_MLC_WR_HIGH 40000000 | ||
138 | #define CONFIG_LPC32XX_NAND_MLC_WR_LOW 83333333 | ||
139 | |||
140 | /* | ||
141 | * NAND | ||
142 | */ | ||
143 | |||
144 | /* driver configuration */ | ||
145 | #define CONFIG_SYS_NAND_SELF_INIT | ||
146 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 | ||
147 | #define CONFIG_SYS_MAX_NAND_CHIPS 1 | ||
148 | #define CONFIG_SYS_NAND_BASE MLC_NAND_BASE | ||
149 | #define CONFIG_NAND_LPC32XX_MLC | ||
150 | |||
151 | #define CONFIG_CMD_NAND | ||
152 | |||
153 | /* | ||
154 | * GPIO | ||
155 | */ | ||
156 | |||
157 | #define CONFIG_CMD_GPIO | ||
158 | #define CONFIG_LPC32XX_GPIO | ||
159 | |||
160 | /* | ||
161 | * SSP/SPI/DISPLAY | ||
162 | */ | ||
163 | |||
164 | #define CONFIG_CMD_SPI | ||
165 | #define CONFIG_LPC32XX_SSP | ||
166 | #define CONFIG_LPC32XX_SSP_TIMEOUT 100000 | ||
167 | #define CONFIG_CMD_MAX6957 | ||
168 | #define CONFIG_CMD_HD44760 | ||
169 | /* | ||
170 | * Environment | ||
171 | */ | ||
172 | |||
173 | #define CONFIG_ENV_IS_IN_NAND 1 | ||
174 | #define CONFIG_ENV_SIZE 0x00020000 | ||
175 | #define CONFIG_ENV_OFFSET 0x00100000 | ||
176 | #define CONFIG_ENV_OFFSET_REDUND 0x00120000 | ||
177 | #define CONFIG_ENV_ADDR 0x80000100 | ||
178 | |||
179 | /* | ||
180 | * Provide default ethernet address | ||
181 | * | ||
182 | * THIS IS NORMALLY NOT DONE. HERE WE KEEP WHAT WAS IN THE PORTED | ||
183 | * BOARD CONFIG IN CASE SOME PROVISIONING PROCESS OUT THERE EXPECTS | ||
184 | * THIS MAC ADDRESS WHEN THE DEVICE HAS STILL ITS DEFAULT CONFIG. | ||
185 | */ | ||
186 | |||
187 | #define CONFIG_ETHADDR 00:12:B4:00:AF:FE | ||
188 | #define CONFIG_OVERWRITE_ETHADDR_ONCE | ||
189 | |||
190 | /* | ||
191 | * U-Boot Commands | ||
192 | */ | ||
193 | #include <config_cmd_default.h> | ||
194 | |||
195 | /* | ||
196 | * Boot Linux | ||
197 | */ | ||
198 | #define CONFIG_CMDLINE_TAG | ||
199 | #define CONFIG_SETUP_MEMORY_TAGS | ||
200 | #define CONFIG_INITRD_TAG | ||
201 | |||
202 | #define CONFIG_ZERO_BOOTDELAY_CHECK | ||
203 | #define CONFIG_BOOTDELAY 3 | ||
204 | |||
205 | #define CONFIG_BOOTFILE "uImage" | ||
206 | #define CONFIG_BOOTARGS "console=ttyS2,115200n8" | ||
207 | #define CONFIG_LOADADDR 0x80008000 | ||
208 | |||
209 | /* | ||
210 | * SPL | ||
211 | */ | ||
212 | |||
213 | /* SPL will be executed at offset 0 */ | ||
214 | #define CONFIG_SPL_TEXT_BASE 0x00000000 | ||
215 | /* SPL will use SRAM as stack */ | ||
216 | #define CONFIG_SPL_STACK 0x0000FFF8 | ||
217 | #define CONFIG_SPL_BOARD_INIT | ||
218 | /* Use the framework and generic lib */ | ||
219 | #define CONFIG_SPL_FRAMEWORK | ||
220 | #define CONFIG_SPL_LIBGENERIC_SUPPORT | ||
221 | #define CONFIG_SPL_LIBCOMMON_SUPPORT | ||
222 | /* SPL will use serial */ | ||
223 | #define CONFIG_SPL_SERIAL_SUPPORT | ||
224 | /* SPL will load U-Boot from NAND offset 0x40000 */ | ||
225 | #define CONFIG_SPL_NAND_SUPPORT | ||
226 | #define CONFIG_SPL_NAND_DRIVERS | ||
227 | #define CONFIG_SPL_NAND_BASE | ||
228 | #define CONFIG_SPL_NAND_BOOT | ||
229 | #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x00040000 | ||
230 | #define CONFIG_SPL_PAD_TO 0x20000 | ||
231 | /* U-Boot will be 0x40000 bytes, loaded and run at CONFIG_SYS_TEXT_BASE */ | ||
232 | #define CONFIG_SYS_MONITOR_LEN 0x40000 /* actually, MAX size */ | ||
233 | #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE | ||
234 | #define CONFIG_SYS_NAND_U_BOOT_DST CONFIG_SYS_TEXT_BASE | ||
235 | |||
236 | /* | ||
237 | * Include SoC specific configuration | ||
238 | */ | ||
239 | #include <asm/arch/config.h> | ||
240 | |||
241 | #endif /* __CONFIG_WORK_92105_H__*/ | ||
242 |