1 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/Makefile u-boot-2009.03/Makefile
|
2 |
|
|
--- u-boot-2009.03_orig/Makefile 2009-03-21 14:04:41.000000000 -0700
|
3 |
|
|
+++ u-boot-2009.03/Makefile 2009-04-15 18:02:26.232734800 -0700
|
4 |
|
|
@@ -182,7 +182,10 @@
|
5 |
|
|
endif
|
6 |
|
|
ifeq ($(ARCH),sparc)
|
7 |
|
|
CROSS_COMPILE = sparc-elf-
|
8 |
|
|
-endif # sparc
|
9 |
|
|
+endif
|
10 |
|
|
+ifeq ($(ARCH),or1200)
|
11 |
|
|
+CROSS_COMPILE = or32-uclinux-
|
12 |
|
|
+endif # or1200
|
13 |
|
|
endif # HOSTARCH,ARCH
|
14 |
|
|
endif # CROSS_COMPILE
|
15 |
|
|
|
16 |
|
|
@@ -279,7 +282,7 @@
|
17 |
|
|
# The "tools" are needed early, so put this first
|
18 |
|
|
# Don't include stuff already done in $(LIBS)
|
19 |
|
|
SUBDIRS = tools \
|
20 |
|
|
- examples \
|
21 |
|
|
+# examples \
|
22 |
|
|
api_examples
|
23 |
|
|
|
24 |
|
|
.PHONY : $(SUBDIRS)
|
25 |
|
|
@@ -336,7 +339,7 @@
|
26 |
|
|
$(obj)tools/ubsha1 $(obj)u-boot.bin
|
27 |
|
|
|
28 |
|
|
$(obj)u-boot.dis: $(obj)u-boot
|
29 |
|
|
- $(OBJDUMP) -d $< > $@
|
30 |
|
|
+ $(OBJDUMP) -D $< > $@
|
31 |
|
|
|
32 |
|
|
$(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
|
33 |
|
|
UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
|
34 |
|
|
@@ -3457,6 +3460,21 @@
|
35 |
|
|
grsim_leon2_config : unconfig
|
36 |
|
|
@$(MKCONFIG) $(@:_config=) sparc leon2 grsim_leon2 gaisler
|
37 |
|
|
|
38 |
|
|
+
|
39 |
|
|
+#========================================================================
|
40 |
|
|
+# qaz
|
41 |
|
|
+#========================================================================
|
42 |
|
|
+de1_or1k_config: unconfig
|
43 |
|
|
+ @mkdir -p $(obj)include
|
44 |
|
|
+ @echo "#define CONFIG_DE1_OR1K" > $(obj)include/config.h
|
45 |
|
|
+ @$(MKCONFIG) -a $(@:_config=) or1200 or1200 de1_or1k qaz
|
46 |
|
|
+
|
47 |
|
|
+Dev_Kit_060804_config: unconfig
|
48 |
|
|
+ @mkdir -p $(obj)include
|
49 |
|
|
+ @echo "#define CONFIG_DEV_KIT_060804" > $(obj)include/config.h
|
50 |
|
|
+ @$(MKCONFIG) -a $(@:_config=) or1200 or1200 Dev_Kit_060804 qaz
|
51 |
|
|
+
|
52 |
|
|
+
|
53 |
|
|
#########################################################################
|
54 |
|
|
#########################################################################
|
55 |
|
|
#########################################################################
|
56 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/board/qaz/Dev_Kit_060804/Dev_Kit_060804.c u-boot-2009.03/board/qaz/Dev_Kit_060804/Dev_Kit_060804.c
|
57 |
|
|
--- u-boot-2009.03_orig/board/qaz/Dev_Kit_060804/Dev_Kit_060804.c 1969-12-31 16:00:00.000000000 -0800
|
58 |
|
|
+++ u-boot-2009.03/board/qaz/Dev_Kit_060804/Dev_Kit_060804.c 2009-03-24 13:34:53.471013000 -0700
|
59 |
|
|
@@ -0,0 +1,100 @@
|
60 |
18 |
qaztronic |
+/*
|
61 |
|
|
+ * (C) Copyright ????
|
62 |
|
|
+ * XXX, XXX@XXX.org
|
63 |
|
|
+ *
|
64 |
|
|
+ *
|
65 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
66 |
|
|
+ * project.
|
67 |
|
|
+ *
|
68 |
|
|
+ * This program is free software; you can redistribute it and/or
|
69 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
70 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
71 |
|
|
+ * the License, or (at your option) any later version.
|
72 |
|
|
+ *
|
73 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
74 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
75 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
76 |
|
|
+ * GNU General Public License for more details.
|
77 |
|
|
+ *
|
78 |
|
|
+ * You should have received a copy of the GNU General Public License
|
79 |
|
|
+ * along with this program; if not, write to the Free Software
|
80 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
81 |
|
|
+ * MA 02111-1307 USA
|
82 |
|
|
+ */
|
83 |
|
|
+
|
84 |
|
|
+#include
|
85 |
|
|
+#include
|
86 |
|
|
+#include
|
87 |
|
|
+
|
88 |
|
|
+
|
89 |
|
|
+DECLARE_GLOBAL_DATA_PTR;
|
90 |
|
|
+
|
91 |
|
|
+// extern unsigned int _data_start, _data_lma_start, _data_end;
|
92 |
|
|
+// extern unsigned int _bss_start, _bss_end;
|
93 |
|
|
+
|
94 |
|
|
+int board_early_init_f (void)
|
95 |
|
|
+{
|
96 |
|
|
+// memcpy( (void *)_data_start, (void *)_data_lma_start, (_data_end - _data_start) );
|
97 |
|
|
+
|
98 |
|
|
+// memset ( (void *)_bss_start, 0, ( _bss_end - _bss_start ) );
|
99 |
|
|
+
|
100 |
|
|
+ return 0;
|
101 |
|
|
+}
|
102 |
|
|
+
|
103 |
|
|
+
|
104 |
|
|
+/*
|
105 |
|
|
+ * Check Board Identity:
|
106 |
|
|
+ */
|
107 |
|
|
+int checkboard (void)
|
108 |
|
|
+{
|
109 |
|
|
+ char str[64];
|
110 |
|
|
+ int i = getenv_r ("serial#", str, sizeof(str));
|
111 |
|
|
+
|
112 |
|
|
+ puts ("Board: ");
|
113 |
|
|
+
|
114 |
|
|
+ if (i == -1) {
|
115 |
|
|
+ puts ("### No HW ID - assuming ???");
|
116 |
|
|
+ } else {
|
117 |
|
|
+ puts(str);
|
118 |
|
|
+ }
|
119 |
|
|
+
|
120 |
|
|
+ putc ('\n');
|
121 |
|
|
+
|
122 |
|
|
+ return 0;
|
123 |
|
|
+}
|
124 |
|
|
+
|
125 |
|
|
+
|
126 |
|
|
+
|
127 |
|
|
+/*
|
128 |
|
|
+ * post code for de1 board
|
129 |
|
|
+ */
|
130 |
|
|
+void set_de1_post( unsigned int post_code )
|
131 |
|
|
+{
|
132 |
|
|
+ gd->bd->post_code = post_code;
|
133 |
|
|
+
|
134 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = gd->bd->post_code;
|
135 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = 0xcea5e0ff;
|
136 |
|
|
+}
|
137 |
|
|
+
|
138 |
|
|
+
|
139 |
|
|
+void init_de1_post( void )
|
140 |
|
|
+{
|
141 |
|
|
+ gd->bd->post_code = 0;
|
142 |
|
|
+
|
143 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = gd->bd->post_code;
|
144 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = 0xcea5e0ff;
|
145 |
|
|
+}
|
146 |
|
|
+
|
147 |
|
|
+
|
148 |
|
|
+int de1_post_incr( void )
|
149 |
|
|
+{
|
150 |
|
|
+ gd->bd->post_code++;
|
151 |
|
|
+
|
152 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = gd->bd->post_code;
|
153 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = 0xcea5e0ff;
|
154 |
|
|
+
|
155 |
|
|
+ return(0);
|
156 |
|
|
+}
|
157 |
|
|
+
|
158 |
|
|
+
|
159 |
|
|
+
|
160 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/board/qaz/Dev_Kit_060804/Makefile u-boot-2009.03/board/qaz/Dev_Kit_060804/Makefile
|
161 |
|
|
--- u-boot-2009.03_orig/board/qaz/Dev_Kit_060804/Makefile 1969-12-31 16:00:00.000000000 -0800
|
162 |
|
|
+++ u-boot-2009.03/board/qaz/Dev_Kit_060804/Makefile 2009-03-24 13:34:53.471013000 -0700
|
163 |
|
|
@@ -0,0 +1,50 @@
|
164 |
18 |
qaztronic |
+#
|
165 |
|
|
+# (C) Copyright 2000-2006
|
166 |
|
|
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
167 |
|
|
+#
|
168 |
|
|
+# See file CREDITS for list of people who contributed to this
|
169 |
|
|
+# project.
|
170 |
|
|
+#
|
171 |
|
|
+# This program is free software; you can redistribute it and/or
|
172 |
|
|
+# modify it under the terms of the GNU General Public License as
|
173 |
|
|
+# published by the Free Software Foundation; either version 2 of
|
174 |
|
|
+# the License, or (at your option) any later version.
|
175 |
|
|
+#
|
176 |
|
|
+# This program is distributed in the hope that it will be useful,
|
177 |
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
178 |
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
179 |
|
|
+# GNU General Public License for more details.
|
180 |
|
|
+#
|
181 |
|
|
+# You should have received a copy of the GNU General Public License
|
182 |
|
|
+# along with this program; if not, write to the Free Software
|
183 |
|
|
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
184 |
|
|
+# MA 02111-1307 USA
|
185 |
|
|
+#
|
186 |
|
|
+
|
187 |
|
|
+include $(TOPDIR)/config.mk
|
188 |
|
|
+
|
189 |
|
|
+LIB = $(obj)lib$(BOARD).a
|
190 |
|
|
+
|
191 |
|
|
+COBJS := Dev_Kit_060804.o
|
192 |
|
|
+
|
193 |
|
|
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
194 |
|
|
+OBJS := $(addprefix $(obj),$(COBJS))
|
195 |
|
|
+SOBJS := $(addprefix $(obj),$(SOBJS))
|
196 |
|
|
+
|
197 |
|
|
+$(LIB): $(obj).depend $(OBJS)
|
198 |
|
|
+ $(AR) $(ARFLAGS) $@ $(OBJS)
|
199 |
|
|
+
|
200 |
|
|
+clean:
|
201 |
|
|
+ rm -f $(SOBJS) $(OBJS)
|
202 |
|
|
+
|
203 |
|
|
+distclean: clean
|
204 |
|
|
+ rm -f $(LIB) core *.bak $(obj).depend
|
205 |
|
|
+
|
206 |
|
|
+#########################################################################
|
207 |
|
|
+
|
208 |
|
|
+# defines $(obj).depend target
|
209 |
|
|
+include $(SRCTREE)/rules.mk
|
210 |
|
|
+
|
211 |
|
|
+sinclude $(obj).depend
|
212 |
|
|
+
|
213 |
|
|
+#########################################################################
|
214 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/board/qaz/Dev_Kit_060804/u-boot.lds u-boot-2009.03/board/qaz/Dev_Kit_060804/u-boot.lds
|
215 |
|
|
--- u-boot-2009.03_orig/board/qaz/Dev_Kit_060804/u-boot.lds 1969-12-31 16:00:00.000000000 -0800
|
216 |
|
|
+++ u-boot-2009.03/board/qaz/Dev_Kit_060804/u-boot.lds 2009-03-24 13:34:53.455424000 -0700
|
217 |
|
|
@@ -0,0 +1,67 @@
|
218 |
18 |
qaztronic |
+/* ------------------------------ */
|
219 |
|
|
+/* link script */
|
220 |
|
|
+/* ------------------------------ */
|
221 |
|
|
+
|
222 |
|
|
+MEMORY
|
223 |
|
|
+ {
|
224 |
|
|
+ boot_rom_1 : ORIGIN = 0x00000000, LENGTH = 0x00020000
|
225 |
|
|
+ mem_bank_3 : ORIGIN = 0x30000000, LENGTH = 0x00010000
|
226 |
|
|
+ }
|
227 |
|
|
+
|
228 |
|
|
+ENTRY(_start)
|
229 |
|
|
+
|
230 |
|
|
+SECTIONS
|
231 |
|
|
+{
|
232 |
|
|
+ .text ALIGN(0x4):
|
233 |
|
|
+ {
|
234 |
|
|
+ . = 0x100;
|
235 |
|
|
+ *(.vectors)
|
236 |
|
|
+ __text_start = .;
|
237 |
|
|
+ . = 0x2000;
|
238 |
|
|
+ *(.text)
|
239 |
|
|
+ __text_end = .;
|
240 |
|
|
+ } > boot_rom_1
|
241 |
|
|
+
|
242 |
|
|
+ .rodata ALIGN(0x4):
|
243 |
|
|
+ {
|
244 |
|
|
+ __rodata_start = .;
|
245 |
|
|
+ *(.rodata)
|
246 |
|
|
+ *(.rodata.*)
|
247 |
|
|
+ __rodata_end = .;
|
248 |
|
|
+ } > boot_rom_1
|
249 |
|
|
+
|
250 |
|
|
+ .u_boot_cmd ALIGN(0x4):
|
251 |
|
|
+ {
|
252 |
|
|
+ . = .;
|
253 |
|
|
+ ___u_boot_cmd_start = .;
|
254 |
|
|
+ *(.u_boot_cmd)
|
255 |
|
|
+ ___u_boot_cmd_end = .;
|
256 |
|
|
+ } > boot_rom_1
|
257 |
|
|
+
|
258 |
|
|
+ . = ALIGN(4);
|
259 |
|
|
+ __data_lma_start = .;
|
260 |
|
|
+ .data :
|
261 |
|
|
+ {
|
262 |
|
|
+ __data_start = .;
|
263 |
|
|
+ *(.data)
|
264 |
|
|
+ __data_end = .;
|
265 |
|
|
+ } > boot_rom_1
|
266 |
|
|
+
|
267 |
|
|
+ . = ALIGN(4);
|
268 |
|
|
+ .bss (NOLOAD):
|
269 |
|
|
+ {
|
270 |
|
|
+ __bss_start = .;
|
271 |
|
|
+ *(.bss)
|
272 |
|
|
+ __bss_end = .;
|
273 |
|
|
+ } > mem_bank_3
|
274 |
|
|
+
|
275 |
|
|
+ . = ALIGN(4);
|
276 |
|
|
+ .stack (NOLOAD) :
|
277 |
|
|
+ {
|
278 |
|
|
+ __stack_start = .;
|
279 |
|
|
+ *(.stack)
|
280 |
|
|
+ __stack_end = .;
|
281 |
|
|
+ } > mem_bank_3
|
282 |
|
|
+
|
283 |
|
|
+ __end = . ;
|
284 |
|
|
+}
|
285 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/board/qaz/de1_or1k/Makefile u-boot-2009.03/board/qaz/de1_or1k/Makefile
|
286 |
|
|
--- u-boot-2009.03_orig/board/qaz/de1_or1k/Makefile 1969-12-31 16:00:00.000000000 -0800
|
287 |
|
|
+++ u-boot-2009.03/board/qaz/de1_or1k/Makefile 2009-03-24 13:34:53.096877000 -0700
|
288 |
|
|
@@ -0,0 +1,50 @@
|
289 |
18 |
qaztronic |
+#
|
290 |
|
|
+# (C) Copyright 2000-2006
|
291 |
|
|
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
292 |
|
|
+#
|
293 |
|
|
+# See file CREDITS for list of people who contributed to this
|
294 |
|
|
+# project.
|
295 |
|
|
+#
|
296 |
|
|
+# This program is free software; you can redistribute it and/or
|
297 |
|
|
+# modify it under the terms of the GNU General Public License as
|
298 |
|
|
+# published by the Free Software Foundation; either version 2 of
|
299 |
|
|
+# the License, or (at your option) any later version.
|
300 |
|
|
+#
|
301 |
|
|
+# This program is distributed in the hope that it will be useful,
|
302 |
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
303 |
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
304 |
|
|
+# GNU General Public License for more details.
|
305 |
|
|
+#
|
306 |
|
|
+# You should have received a copy of the GNU General Public License
|
307 |
|
|
+# along with this program; if not, write to the Free Software
|
308 |
|
|
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
309 |
|
|
+# MA 02111-1307 USA
|
310 |
|
|
+#
|
311 |
|
|
+
|
312 |
|
|
+include $(TOPDIR)/config.mk
|
313 |
|
|
+
|
314 |
|
|
+LIB = $(obj)lib$(BOARD).a
|
315 |
|
|
+
|
316 |
|
|
+COBJS := de1_or1k.o
|
317 |
|
|
+
|
318 |
|
|
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
319 |
|
|
+OBJS := $(addprefix $(obj),$(COBJS))
|
320 |
|
|
+SOBJS := $(addprefix $(obj),$(SOBJS))
|
321 |
|
|
+
|
322 |
|
|
+$(LIB): $(obj).depend $(OBJS)
|
323 |
|
|
+ $(AR) $(ARFLAGS) $@ $(OBJS)
|
324 |
|
|
+
|
325 |
|
|
+clean:
|
326 |
|
|
+ rm -f $(SOBJS) $(OBJS)
|
327 |
|
|
+
|
328 |
|
|
+distclean: clean
|
329 |
|
|
+ rm -f $(LIB) core *.bak $(obj).depend
|
330 |
|
|
+
|
331 |
|
|
+#########################################################################
|
332 |
|
|
+
|
333 |
|
|
+# defines $(obj).depend target
|
334 |
|
|
+include $(SRCTREE)/rules.mk
|
335 |
|
|
+
|
336 |
|
|
+sinclude $(obj).depend
|
337 |
|
|
+
|
338 |
|
|
+#########################################################################
|
339 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/board/qaz/de1_or1k/de1_or1k.c u-boot-2009.03/board/qaz/de1_or1k/de1_or1k.c
|
340 |
|
|
--- u-boot-2009.03_orig/board/qaz/de1_or1k/de1_or1k.c 1969-12-31 16:00:00.000000000 -0800
|
341 |
|
|
+++ u-boot-2009.03/board/qaz/de1_or1k/de1_or1k.c 2009-04-15 16:16:19.652035300 -0700
|
342 |
|
|
@@ -0,0 +1,100 @@
|
343 |
|
|
+/*
|
344 |
|
|
+ * (C) Copyright ????
|
345 |
|
|
+ * XXX, XXX@XXX.org
|
346 |
|
|
+ *
|
347 |
|
|
+ *
|
348 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
349 |
|
|
+ * project.
|
350 |
|
|
+ *
|
351 |
|
|
+ * This program is free software; you can redistribute it and/or
|
352 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
353 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
354 |
|
|
+ * the License, or (at your option) any later version.
|
355 |
|
|
+ *
|
356 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
357 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
358 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
359 |
|
|
+ * GNU General Public License for more details.
|
360 |
|
|
+ *
|
361 |
|
|
+ * You should have received a copy of the GNU General Public License
|
362 |
|
|
+ * along with this program; if not, write to the Free Software
|
363 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
364 |
|
|
+ * MA 02111-1307 USA
|
365 |
|
|
+ */
|
366 |
|
|
+
|
367 |
|
|
+#include
|
368 |
|
|
+#include
|
369 |
|
|
+#include
|
370 |
|
|
+
|
371 |
|
|
+
|
372 |
|
|
+DECLARE_GLOBAL_DATA_PTR;
|
373 |
|
|
+
|
374 |
|
|
+// extern unsigned int _data_start, _data_lma_start, _data_end;
|
375 |
|
|
+// extern unsigned int _bss_start, _bss_end;
|
376 |
|
|
+
|
377 |
|
|
+int board_early_init_f (void)
|
378 |
|
|
+{
|
379 |
|
|
+// memcpy( (void *)_data_start, (void *)_data_lma_start, (_data_end - _data_start) );
|
380 |
|
|
+
|
381 |
|
|
+// memset ( (void *)_bss_start, 0, ( _bss_end - _bss_start ) );
|
382 |
|
|
+
|
383 |
|
|
+ return 0;
|
384 |
|
|
+}
|
385 |
|
|
+
|
386 |
|
|
+
|
387 |
|
|
+/*
|
388 |
|
|
+ * Check Board Identity:
|
389 |
|
|
+ */
|
390 |
|
|
+int checkboard (void)
|
391 |
|
|
+{
|
392 |
|
|
+ char str[64];
|
393 |
|
|
+ int i = getenv_r ("serial#", str, sizeof(str));
|
394 |
|
|
+
|
395 |
|
|
+ puts ("Board: ");
|
396 |
|
|
+
|
397 |
|
|
+ if (i == -1) {
|
398 |
|
|
+ puts ("### No HW ID - assuming DE1_OR1k");
|
399 |
|
|
+ } else {
|
400 |
|
|
+ puts(str);
|
401 |
|
|
+ }
|
402 |
|
|
+
|
403 |
|
|
+ putc ('\n');
|
404 |
|
|
+
|
405 |
|
|
+ return 0;
|
406 |
|
|
+}
|
407 |
|
|
+
|
408 |
|
|
+
|
409 |
|
|
+
|
410 |
|
|
+/*
|
411 |
|
|
+ * post code for de1 board
|
412 |
|
|
+ */
|
413 |
|
|
+void set_de1_post( unsigned int post_code )
|
414 |
|
|
+{
|
415 |
|
|
+ gd->bd->post_code = post_code;
|
416 |
|
|
+
|
417 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = gd->bd->post_code;
|
418 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = 0xcea5e0ff;
|
419 |
|
|
+}
|
420 |
|
|
+
|
421 |
|
|
+
|
422 |
|
|
+void init_de1_post( void )
|
423 |
|
|
+{
|
424 |
|
|
+ gd->bd->post_code = 0;
|
425 |
|
|
+
|
426 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = gd->bd->post_code;
|
427 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = 0xcea5e0ff;
|
428 |
|
|
+}
|
429 |
|
|
+
|
430 |
|
|
+
|
431 |
|
|
+int de1_post_incr( void )
|
432 |
|
|
+{
|
433 |
|
|
+ gd->bd->post_code++;
|
434 |
|
|
+
|
435 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = gd->bd->post_code;
|
436 |
|
|
+ *((volatile unsigned int *)(0x5ffffffc)) = 0xcea5e0ff;
|
437 |
|
|
+
|
438 |
|
|
+ return(0);
|
439 |
|
|
+}
|
440 |
|
|
+
|
441 |
|
|
+
|
442 |
|
|
+
|
443 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/board/qaz/de1_or1k/u-boot.lds u-boot-2009.03/board/qaz/de1_or1k/u-boot.lds
|
444 |
|
|
--- u-boot-2009.03_orig/board/qaz/de1_or1k/u-boot.lds 1969-12-31 16:00:00.000000000 -0800
|
445 |
|
|
+++ u-boot-2009.03/board/qaz/de1_or1k/u-boot.lds 2009-03-24 13:34:53.455424000 -0700
|
446 |
|
|
@@ -0,0 +1,67 @@
|
447 |
18 |
qaztronic |
+/* ------------------------------ */
|
448 |
|
|
+/* link script */
|
449 |
|
|
+/* ------------------------------ */
|
450 |
|
|
+
|
451 |
|
|
+MEMORY
|
452 |
|
|
+ {
|
453 |
|
|
+ boot_rom_1 : ORIGIN = 0x00000000, LENGTH = 0x00020000
|
454 |
|
|
+ mem_bank_3 : ORIGIN = 0x30000000, LENGTH = 0x00010000
|
455 |
|
|
+ }
|
456 |
|
|
+
|
457 |
|
|
+ENTRY(_start)
|
458 |
|
|
+
|
459 |
|
|
+SECTIONS
|
460 |
|
|
+{
|
461 |
|
|
+ .text ALIGN(0x4):
|
462 |
|
|
+ {
|
463 |
|
|
+ . = 0x100;
|
464 |
|
|
+ *(.vectors)
|
465 |
|
|
+ __text_start = .;
|
466 |
|
|
+ . = 0x2000;
|
467 |
|
|
+ *(.text)
|
468 |
|
|
+ __text_end = .;
|
469 |
|
|
+ } > boot_rom_1
|
470 |
|
|
+
|
471 |
|
|
+ .rodata ALIGN(0x4):
|
472 |
|
|
+ {
|
473 |
|
|
+ __rodata_start = .;
|
474 |
|
|
+ *(.rodata)
|
475 |
|
|
+ *(.rodata.*)
|
476 |
|
|
+ __rodata_end = .;
|
477 |
|
|
+ } > boot_rom_1
|
478 |
|
|
+
|
479 |
|
|
+ .u_boot_cmd ALIGN(0x4):
|
480 |
|
|
+ {
|
481 |
|
|
+ . = .;
|
482 |
|
|
+ ___u_boot_cmd_start = .;
|
483 |
|
|
+ *(.u_boot_cmd)
|
484 |
|
|
+ ___u_boot_cmd_end = .;
|
485 |
|
|
+ } > boot_rom_1
|
486 |
|
|
+
|
487 |
|
|
+ . = ALIGN(4);
|
488 |
|
|
+ __data_lma_start = .;
|
489 |
|
|
+ .data :
|
490 |
|
|
+ {
|
491 |
|
|
+ __data_start = .;
|
492 |
|
|
+ *(.data)
|
493 |
|
|
+ __data_end = .;
|
494 |
|
|
+ } > boot_rom_1
|
495 |
|
|
+
|
496 |
|
|
+ . = ALIGN(4);
|
497 |
|
|
+ .bss (NOLOAD):
|
498 |
|
|
+ {
|
499 |
|
|
+ __bss_start = .;
|
500 |
|
|
+ *(.bss)
|
501 |
|
|
+ __bss_end = .;
|
502 |
|
|
+ } > mem_bank_3
|
503 |
|
|
+
|
504 |
|
|
+ . = ALIGN(4);
|
505 |
|
|
+ .stack (NOLOAD) :
|
506 |
|
|
+ {
|
507 |
|
|
+ __stack_start = .;
|
508 |
|
|
+ *(.stack)
|
509 |
|
|
+ __stack_end = .;
|
510 |
|
|
+ } > mem_bank_3
|
511 |
|
|
+
|
512 |
|
|
+ __end = . ;
|
513 |
|
|
+}
|
514 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/common/cmd_bootm.c u-boot-2009.03/common/cmd_bootm.c
|
515 |
|
|
--- u-boot-2009.03_orig/common/cmd_bootm.c 2009-03-21 14:04:41.000000000 -0700
|
516 |
|
|
+++ u-boot-2009.03/common/cmd_bootm.c 2009-03-25 16:25:04.705123000 -0700
|
517 |
|
|
@@ -191,6 +191,8 @@
|
518 |
|
|
#define IH_INITRD_ARCH IH_ARCH_SH
|
519 |
|
|
#elif defined(__sparc__)
|
520 |
|
|
#define IH_INITRD_ARCH IH_ARCH_SPARC
|
521 |
|
|
+#elif defined(__or1200__)
|
522 |
|
|
+ #define IH_INITRD_ARCH IH_ARCH_INVALID
|
523 |
|
|
#else
|
524 |
|
|
# error Unknown CPU type
|
525 |
|
|
#endif
|
526 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/cpu/or1200/Makefile u-boot-2009.03/cpu/or1200/Makefile
|
527 |
|
|
--- u-boot-2009.03_orig/cpu/or1200/Makefile 1969-12-31 16:00:00.000000000 -0800
|
528 |
|
|
+++ u-boot-2009.03/cpu/or1200/Makefile 2009-03-24 13:32:29.713725000 -0700
|
529 |
|
|
@@ -0,0 +1,57 @@
|
530 |
18 |
qaztronic |
+#
|
531 |
|
|
+# (C) Copyright 2000-2006
|
532 |
|
|
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
533 |
|
|
+#
|
534 |
|
|
+# (C) Copyright 2007
|
535 |
|
|
+# Nobuhiro Iwamatsu
|
536 |
|
|
+#
|
537 |
|
|
+# (C) Copyright 2007
|
538 |
|
|
+# Yoshihiro Shimoda
|
539 |
|
|
+#
|
540 |
|
|
+# See file CREDITS for list of people who contributed to this
|
541 |
|
|
+# project.
|
542 |
|
|
+#
|
543 |
|
|
+# This program is free software; you can redistribute it and/or
|
544 |
|
|
+# modify it under the terms of the GNU General Public License as
|
545 |
|
|
+# published by the Free Software Foundation; either version 2 of
|
546 |
|
|
+# the License, or (at your option) any later version.
|
547 |
|
|
+#
|
548 |
|
|
+# This program is distributed in the hope that it will be useful,
|
549 |
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
550 |
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
551 |
|
|
+# GNU General Public License for more details.
|
552 |
|
|
+#
|
553 |
|
|
+# You should have received a copy of the GNU General Public License
|
554 |
|
|
+# along with this program; if not, write to the Free Software
|
555 |
|
|
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
556 |
|
|
+# MA 02111-1307 USA
|
557 |
|
|
+#
|
558 |
|
|
+
|
559 |
|
|
+include $(TOPDIR)/config.mk
|
560 |
|
|
+
|
561 |
|
|
+LIB = $(obj)lib$(CPU).a
|
562 |
|
|
+
|
563 |
|
|
+SOBJS = start.o
|
564 |
|
|
+COBJS = interrupts.o watchdog.o time.o cpu.o
|
565 |
|
|
+
|
566 |
|
|
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
567 |
|
|
+OBJS := $(addprefix $(obj),$(COBJS))
|
568 |
|
|
+SOBJS := $(addprefix $(obj),$(SOBJS))
|
569 |
|
|
+
|
570 |
|
|
+$(LIB): $(OBJS) $(SOBJS)
|
571 |
|
|
+ $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
|
572 |
|
|
+
|
573 |
|
|
+clean:
|
574 |
|
|
+ rm -f $(SOBJS) $(OBJS)
|
575 |
|
|
+
|
576 |
|
|
+distclean: clean
|
577 |
|
|
+ rm -f $(LIB) core *.bak $(obj).depend
|
578 |
|
|
+
|
579 |
|
|
+#########################################################################
|
580 |
|
|
+
|
581 |
|
|
+# defines $(obj).depend target
|
582 |
|
|
+include $(SRCTREE)/rules.mk
|
583 |
|
|
+
|
584 |
|
|
+sinclude $(obj).depend
|
585 |
|
|
+
|
586 |
|
|
+#########################################################################
|
587 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/cpu/or1200/cpu.c u-boot-2009.03/cpu/or1200/cpu.c
|
588 |
|
|
--- u-boot-2009.03_orig/cpu/or1200/cpu.c 1969-12-31 16:00:00.000000000 -0800
|
589 |
|
|
+++ u-boot-2009.03/cpu/or1200/cpu.c 2009-03-24 13:32:29.713725000 -0700
|
590 |
|
|
@@ -0,0 +1,35 @@
|
591 |
18 |
qaztronic |
+/*
|
592 |
|
|
+ * (C) Copyright 2004, Psyent Corporation
|
593 |
|
|
+ * Scott McNutt
|
594 |
|
|
+ *
|
595 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
596 |
|
|
+ * project.
|
597 |
|
|
+ *
|
598 |
|
|
+ * This program is free software; you can redistribute it and/or
|
599 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
600 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
601 |
|
|
+ * the License, or (at your option) any later version.
|
602 |
|
|
+ *
|
603 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
604 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
605 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
606 |
|
|
+ * GNU General Public License for more details.
|
607 |
|
|
+ *
|
608 |
|
|
+ * You should have received a copy of the GNU General Public License
|
609 |
|
|
+ * along with this program; if not, write to the Free Software
|
610 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
611 |
|
|
+ * MA 02111-1307 USA
|
612 |
|
|
+ */
|
613 |
|
|
+
|
614 |
|
|
+#include
|
615 |
|
|
+
|
616 |
|
|
+
|
617 |
|
|
+
|
618 |
|
|
+int do_reset (void)
|
619 |
|
|
+{
|
620 |
|
|
+ void (*rst)(void) = (void(*)(void))0x00000000;
|
621 |
|
|
+// void (*rst)(void) = (void(*)(void))CFG_RESET_ADDR;
|
622 |
|
|
+ disable_interrupts ();
|
623 |
|
|
+ rst();
|
624 |
|
|
+ return(0);
|
625 |
|
|
+}
|
626 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/cpu/or1200/interrupts.c u-boot-2009.03/cpu/or1200/interrupts.c
|
627 |
|
|
--- u-boot-2009.03_orig/cpu/or1200/interrupts.c 1969-12-31 16:00:00.000000000 -0800
|
628 |
|
|
+++ u-boot-2009.03/cpu/or1200/interrupts.c 2009-03-24 13:32:29.698200000 -0700
|
629 |
|
|
@@ -0,0 +1,42 @@
|
630 |
18 |
qaztronic |
+/*
|
631 |
|
|
+ * (C) Copyright 2007
|
632 |
|
|
+ * Yoshihiro Shimoda
|
633 |
|
|
+ *
|
634 |
|
|
+ * (C) Copyright 2007
|
635 |
|
|
+ * Nobuhiro Iwamatsu
|
636 |
|
|
+ *
|
637 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
638 |
|
|
+ * project.
|
639 |
|
|
+ *
|
640 |
|
|
+ * This program is free software; you can redistribute it and/or
|
641 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
642 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
643 |
|
|
+ * the License, or (at your option) any later version.
|
644 |
|
|
+ *
|
645 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
646 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
647 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
648 |
|
|
+ * GNU General Public License for more details.
|
649 |
|
|
+ *
|
650 |
|
|
+ * You should have received a copy of the GNU General Public License
|
651 |
|
|
+ * along with this program; if not, write to the Free Software
|
652 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
653 |
|
|
+ * MA 02111-1307 USA
|
654 |
|
|
+ */
|
655 |
|
|
+
|
656 |
|
|
+#include
|
657 |
|
|
+
|
658 |
|
|
+int interrupt_init(void)
|
659 |
|
|
+{
|
660 |
|
|
+ return 0;
|
661 |
|
|
+}
|
662 |
|
|
+
|
663 |
|
|
+void enable_interrupts(void)
|
664 |
|
|
+{
|
665 |
|
|
+
|
666 |
|
|
+}
|
667 |
|
|
+
|
668 |
|
|
+int disable_interrupts(void)
|
669 |
|
|
+{
|
670 |
|
|
+ return 0;
|
671 |
|
|
+}
|
672 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/cpu/or1200/start.S u-boot-2009.03/cpu/or1200/start.S
|
673 |
|
|
--- u-boot-2009.03_orig/cpu/or1200/start.S 1969-12-31 16:00:00.000000000 -0800
|
674 |
|
|
+++ u-boot-2009.03/cpu/or1200/start.S 2009-03-24 13:32:29.713725000 -0700
|
675 |
|
|
@@ -0,0 +1,27 @@
|
676 |
18 |
qaztronic |
+/* */
|
677 |
|
|
+/* */
|
678 |
|
|
+
|
679 |
|
|
+#include
|
680 |
|
|
+
|
681 |
|
|
+.section .stack, "aw", @nobits
|
682 |
|
|
+.space 0x8000
|
683 |
|
|
+_stack:
|
684 |
|
|
+
|
685 |
|
|
+.section .vectors, "ax"
|
686 |
|
|
+
|
687 |
|
|
+ .global _start
|
688 |
|
|
+_start:
|
689 |
|
|
+
|
690 |
|
|
+ /* Set stack pointer */
|
691 |
|
|
+ l.movhi r1,hi(_stack)
|
692 |
|
|
+ l.ori r1,r1,lo(_stack)
|
693 |
|
|
+
|
694 |
|
|
+ /* Jump to main */
|
695 |
|
|
+ l.movhi r2,hi(_board_init)
|
696 |
|
|
+ l.ori r2,r2,lo(_board_init)
|
697 |
|
|
+ l.jr r2
|
698 |
|
|
+ l.nop
|
699 |
|
|
+
|
700 |
|
|
+
|
701 |
|
|
+
|
702 |
22 |
qaztronic |
+
|
703 |
|
|
\ No newline at end of file
|
704 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/cpu/or1200/time.c u-boot-2009.03/cpu/or1200/time.c
|
705 |
|
|
--- u-boot-2009.03_orig/cpu/or1200/time.c 1969-12-31 16:00:00.000000000 -0800
|
706 |
|
|
+++ u-boot-2009.03/cpu/or1200/time.c 2009-03-25 17:31:06.263350000 -0700
|
707 |
|
|
@@ -0,0 +1,39 @@
|
708 |
18 |
qaztronic |
+/*
|
709 |
22 |
qaztronic |
+ * (C) Copyright 2007 Michal Simek
|
710 |
|
|
+ * (C) Copyright 2004 Atmark Techno, Inc.
|
711 |
|
|
+ *
|
712 |
|
|
+ * Michal SIMEK
|
713 |
|
|
+ * Yasushi SHOJI
|
714 |
|
|
+ *
|
715 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
716 |
|
|
+ * project.
|
717 |
|
|
+ *
|
718 |
|
|
+ * This program is free software; you can redistribute it and/or
|
719 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
720 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
721 |
|
|
+ * the License, or (at your option) any later version.
|
722 |
|
|
+ *
|
723 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
724 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
725 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
726 |
|
|
+ * GNU General Public License for more details.
|
727 |
|
|
+ *
|
728 |
|
|
+ * You should have received a copy of the GNU General Public License
|
729 |
|
|
+ * along with this program; if not, write to the Free Software
|
730 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
731 |
|
|
+ * MA 02111-1307 USA
|
732 |
|
|
+ */
|
733 |
|
|
+
|
734 |
|
|
+#include
|
735 |
|
|
+
|
736 |
|
|
+void udelay (unsigned long usec)
|
737 |
|
|
+{
|
738 |
|
|
+ unsigned int i;
|
739 |
|
|
+ for (i = 0; i < (usec * CONFIG_HZ / 10000000); i++);
|
740 |
|
|
+}
|
741 |
|
|
+
|
742 |
|
|
+
|
743 |
|
|
+ulong get_timer (ulong base_ticks)
|
744 |
|
|
+{
|
745 |
|
|
+ return 0;
|
746 |
|
|
+}
|
747 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/cpu/or1200/watchdog.c u-boot-2009.03/cpu/or1200/watchdog.c
|
748 |
|
|
--- u-boot-2009.03_orig/cpu/or1200/watchdog.c 1969-12-31 16:00:00.000000000 -0800
|
749 |
|
|
+++ u-boot-2009.03/cpu/or1200/watchdog.c 2009-03-24 13:32:29.698200000 -0700
|
750 |
|
|
@@ -0,0 +1,33 @@
|
751 |
|
|
+/*
|
752 |
18 |
qaztronic |
+ * (C) Copyright 2007
|
753 |
|
|
+ * Yoshihiro Shimoda
|
754 |
|
|
+ *
|
755 |
|
|
+ * This program is free software; you can redistribute it and/or
|
756 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
757 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
758 |
|
|
+ * the License, or (at your option) any later version.
|
759 |
|
|
+ *
|
760 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
761 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
762 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
763 |
|
|
+ * GNU General Public License for more details.
|
764 |
|
|
+ *
|
765 |
|
|
+ * You should have received a copy of the GNU General Public License
|
766 |
|
|
+ * along with this program; if not, write to the Free Software
|
767 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
768 |
|
|
+ * MA 02111-1307 USA
|
769 |
|
|
+ */
|
770 |
|
|
+
|
771 |
|
|
+#include
|
772 |
|
|
+#include
|
773 |
|
|
+
|
774 |
|
|
+int watchdog_init(void)
|
775 |
|
|
+{
|
776 |
|
|
+ return 0;
|
777 |
|
|
+}
|
778 |
|
|
+
|
779 |
|
|
+void reset_cpu(unsigned long ignored)
|
780 |
|
|
+{
|
781 |
|
|
+ while (1)
|
782 |
|
|
+ ;
|
783 |
|
|
+}
|
784 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/bitops.h u-boot-2009.03/include/asm-or1200/bitops.h
|
785 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/bitops.h 1969-12-31 16:00:00.000000000 -0800
|
786 |
|
|
+++ u-boot-2009.03/include/asm-or1200/bitops.h 2008-08-26 18:13:42.783673400 -0700
|
787 |
|
|
@@ -0,0 +1,554 @@
|
788 |
|
|
+/* asm/bitops.h for Linux/or32
|
789 |
|
|
+ *
|
790 |
|
|
+ * __PHX__ TODO: asm versions
|
791 |
|
|
+ *
|
792 |
|
|
+ */
|
793 |
|
|
+
|
794 |
|
|
+#ifdef __KERNEL__
|
795 |
|
|
+#ifndef _OR32_BITOPS_H
|
796 |
|
|
+#define _OR32_BITOPS_H
|
797 |
|
|
+
|
798 |
|
|
+#include
|
799 |
|
|
+#include
|
800 |
|
|
+// #include
|
801 |
|
|
+
|
802 |
|
|
+
|
803 |
|
|
+static __inline__ int set_bit(int nr, volatile void * a)
|
804 |
|
|
+{
|
805 |
|
|
+ int * addr = (void *)a;
|
806 |
|
|
+ int mask, retval;
|
807 |
|
|
+ unsigned long flags;
|
808 |
|
|
+
|
809 |
|
|
+ addr += nr >> 5;
|
810 |
|
|
+ mask = 1 << (nr & 0x1f);
|
811 |
|
|
+ local_irq_save(flags);
|
812 |
|
|
+ retval = (mask & *addr) != 0;
|
813 |
|
|
+ *addr |= mask;
|
814 |
|
|
+ local_irq_restore(flags);
|
815 |
|
|
+ return retval;
|
816 |
|
|
+}
|
817 |
|
|
+
|
818 |
|
|
+/*
|
819 |
|
|
+ * non-atomic version
|
820 |
|
|
+ */
|
821 |
|
|
+static __inline__ void __set_bit(int nr, volatile unsigned long *addr)
|
822 |
|
|
+{
|
823 |
|
|
+ unsigned long mask = 1 << (nr & 0x1f);
|
824 |
|
|
+ unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
|
825 |
|
|
+
|
826 |
|
|
+ *p |= mask;
|
827 |
|
|
+}
|
828 |
|
|
+
|
829 |
|
|
+static __inline__ int clear_bit(int nr, volatile void * a)
|
830 |
|
|
+{
|
831 |
|
|
+ int * addr = (void *)a;
|
832 |
|
|
+ int mask, retval;
|
833 |
|
|
+ unsigned long flags;
|
834 |
|
|
+
|
835 |
|
|
+ addr += nr >> 5;
|
836 |
|
|
+ mask = 1 << (nr & 0x1f);
|
837 |
|
|
+ local_irq_save(flags);
|
838 |
|
|
+ retval = (mask & *addr) != 0;
|
839 |
|
|
+ *addr &= ~mask;
|
840 |
|
|
+ local_irq_restore(flags);
|
841 |
|
|
+ return retval;
|
842 |
|
|
+}
|
843 |
|
|
+
|
844 |
|
|
+/*
|
845 |
|
|
+ * non-atomic version
|
846 |
|
|
+ */
|
847 |
|
|
+static __inline__ void __clear_bit(int nr, volatile unsigned long *addr)
|
848 |
|
|
+{
|
849 |
|
|
+ unsigned long mask = 1 << (nr & 0x1f);
|
850 |
|
|
+ unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
|
851 |
|
|
+
|
852 |
|
|
+ *p &= ~mask;
|
853 |
|
|
+}
|
854 |
|
|
+
|
855 |
|
|
+static __inline__ unsigned long change_bit(unsigned long nr, void *addr)
|
856 |
|
|
+{
|
857 |
|
|
+ int mask;
|
858 |
|
|
+ unsigned long flags;
|
859 |
|
|
+ unsigned long *ADDR = (unsigned long *) addr;
|
860 |
|
|
+ unsigned long oldbit;
|
861 |
|
|
+
|
862 |
|
|
+ ADDR += nr >> 5;
|
863 |
|
|
+ mask = 1 << (nr & 31);
|
864 |
|
|
+ local_irq_save(flags);
|
865 |
|
|
+ oldbit = (mask & *ADDR);
|
866 |
|
|
+ *ADDR ^= mask;
|
867 |
|
|
+ local_irq_restore(flags);
|
868 |
|
|
+ return oldbit != 0;
|
869 |
|
|
+}
|
870 |
|
|
+
|
871 |
|
|
+/*
|
872 |
|
|
+ * non-atomic version
|
873 |
|
|
+ */
|
874 |
|
|
+static __inline__ void __change_bit(int nr, volatile unsigned long *addr)
|
875 |
|
|
+{
|
876 |
|
|
+ unsigned long mask = 1 << (nr & 0x1f);
|
877 |
|
|
+ unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
|
878 |
|
|
+
|
879 |
|
|
+ *p ^= mask;
|
880 |
|
|
+}
|
881 |
|
|
+
|
882 |
|
|
+static __inline__ int test_bit(int nr, const void *a)
|
883 |
|
|
+{
|
884 |
|
|
+ unsigned int mask;
|
885 |
|
|
+ unsigned int *adr = (unsigned int *)a;
|
886 |
|
|
+
|
887 |
|
|
+ adr += nr >> 5;
|
888 |
|
|
+ mask = 1 << (nr & 0x1f);
|
889 |
|
|
+ return ((mask & *adr) != 0);
|
890 |
|
|
+}
|
891 |
|
|
+
|
892 |
|
|
+static __inline__ int test_and_set_bit(int nr, void *addr)
|
893 |
|
|
+{
|
894 |
|
|
+ unsigned int mask, retval;
|
895 |
|
|
+ unsigned long flags;
|
896 |
|
|
+ unsigned int *adr = (unsigned int *)addr;
|
897 |
|
|
+
|
898 |
|
|
+ adr += nr >> 5;
|
899 |
|
|
+ mask = 1 << (nr & 0x1f);
|
900 |
|
|
+ local_irq_save(flags);
|
901 |
|
|
+ retval = (mask & *adr) != 0;
|
902 |
|
|
+ *adr |= mask;
|
903 |
|
|
+ local_irq_restore(flags);
|
904 |
|
|
+ return retval;
|
905 |
|
|
+}
|
906 |
|
|
+
|
907 |
|
|
+/*
|
908 |
|
|
+ * non-atomic version
|
909 |
|
|
+ */
|
910 |
|
|
+static __inline__ int __test_and_set_bit(int nr, volatile unsigned long *addr)
|
911 |
|
|
+{
|
912 |
|
|
+ unsigned long mask = 1 << (nr & 0x1f);
|
913 |
|
|
+ unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
|
914 |
|
|
+ unsigned long old = *p;
|
915 |
|
|
+
|
916 |
|
|
+ *p = old | mask;
|
917 |
|
|
+ return (old & mask) != 0;
|
918 |
|
|
+}
|
919 |
|
|
+
|
920 |
|
|
+
|
921 |
|
|
+static __inline__ int test_and_clear_bit(int nr, void *addr)
|
922 |
|
|
+{
|
923 |
|
|
+ unsigned int mask, retval;
|
924 |
|
|
+ unsigned long flags;
|
925 |
|
|
+ unsigned int *adr = (unsigned int *)addr;
|
926 |
|
|
+
|
927 |
|
|
+ adr += nr >> 5;
|
928 |
|
|
+ mask = 1 << (nr & 0x1f);
|
929 |
|
|
+ local_irq_save(flags);
|
930 |
|
|
+ retval = (mask & *adr) != 0;
|
931 |
|
|
+ *adr &= ~mask;
|
932 |
|
|
+ local_irq_restore(flags);
|
933 |
|
|
+ return retval;
|
934 |
|
|
+}
|
935 |
|
|
+
|
936 |
|
|
+/*
|
937 |
|
|
+ * non-atomic version
|
938 |
|
|
+ */
|
939 |
|
|
+static __inline__ int __test_and_clear_bit(int nr, volatile unsigned long *addr)
|
940 |
|
|
+{
|
941 |
|
|
+ unsigned long mask = 1 << (nr & 0x1f);
|
942 |
|
|
+ unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
|
943 |
|
|
+ unsigned long old = *p;
|
944 |
|
|
+
|
945 |
|
|
+ *p = old & ~mask;
|
946 |
|
|
+ return (old & mask) != 0;
|
947 |
|
|
+}
|
948 |
|
|
+
|
949 |
|
|
+static __inline__ int test_and_change_bit(int nr, void *addr)
|
950 |
|
|
+{
|
951 |
|
|
+ unsigned int mask, retval;
|
952 |
|
|
+ unsigned long flags;
|
953 |
|
|
+ unsigned int *adr = (unsigned int *)addr;
|
954 |
|
|
+ adr += nr >> 5;
|
955 |
|
|
+ mask = 1 << (nr & 0x1f);
|
956 |
|
|
+ local_irq_save(flags);
|
957 |
|
|
+ retval = (mask & *adr) != 0;
|
958 |
|
|
+ *adr ^= mask;
|
959 |
|
|
+ local_irq_restore(flags);
|
960 |
|
|
+ return retval;
|
961 |
|
|
+}
|
962 |
|
|
+
|
963 |
|
|
+/*
|
964 |
|
|
+ * non-atomic version
|
965 |
|
|
+ */
|
966 |
|
|
+static __inline__ int __test_and_change_bit(int nr, volatile unsigned long *addr)
|
967 |
|
|
+{
|
968 |
|
|
+ unsigned long mask = 1 << (nr & 0x1f);
|
969 |
|
|
+ unsigned long *p = ((unsigned long *)addr) + (nr >> 5);
|
970 |
|
|
+ unsigned long old = *p;
|
971 |
|
|
+
|
972 |
|
|
+ *p = old ^ mask;
|
973 |
|
|
+ return (old & mask) != 0;
|
974 |
|
|
+}
|
975 |
|
|
+
|
976 |
|
|
+#define __change_bit(nr, addr) (void)__test_and_change_bit(nr, addr)
|
977 |
|
|
+
|
978 |
|
|
+/*
|
979 |
|
|
+ * Find-bit routines..
|
980 |
|
|
+ */
|
981 |
|
|
+
|
982 |
|
|
+/*
|
983 |
|
|
+ * fls: find last bit set.
|
984 |
|
|
+ */
|
985 |
|
|
+
|
986 |
|
|
+#define fls(x) generic_fls(x)
|
987 |
|
|
+
|
988 |
|
|
+/* The easy/cheese version for now. */
|
989 |
|
|
+static __inline__ unsigned long ffz(unsigned long word)
|
990 |
|
|
+{
|
991 |
|
|
+ unsigned long result = 0;
|
992 |
|
|
+
|
993 |
|
|
+ while(word & 1) {
|
994 |
|
|
+ result++;
|
995 |
|
|
+ word >>= 1;
|
996 |
|
|
+ }
|
997 |
|
|
+ return result;
|
998 |
|
|
+}
|
999 |
|
|
+
|
1000 |
|
|
+/*
|
1001 |
|
|
+ * ffs: find first bit set. This is defined the same way as
|
1002 |
|
|
+ * the libc and compiler builtin ffs routines, therefore
|
1003 |
|
|
+ * differs in spirit from the above ffz (man ffs).
|
1004 |
|
|
+ */
|
1005 |
|
|
+
|
1006 |
|
|
+#define ffs(x) generic_ffs(x)
|
1007 |
|
|
+
|
1008 |
|
|
+/*
|
1009 |
|
|
+ * hweightN - returns the hamming weight of a N-bit word
|
1010 |
|
|
+ * @x: the word to weigh
|
1011 |
|
|
+ *
|
1012 |
|
|
+ * The Hamming Weight of a number is the total number of bits set in it.
|
1013 |
|
|
+ */
|
1014 |
|
|
+#if 0 /*RGD*/
|
1015 |
|
|
+#define hweight32(x) generic_hweight32(x)
|
1016 |
|
|
+#define hweight16(x) generic_hweight16(x)
|
1017 |
|
|
+#define hweight8(x) generic_hweight8(x)
|
1018 |
|
|
+#endif
|
1019 |
|
|
+/**
|
1020 |
|
|
+ * __ffs - find first bit in word.
|
1021 |
|
|
+ * @word: The word to search
|
1022 |
|
|
+ *
|
1023 |
|
|
+ * Undefined if no bit exists, so code should check against 0 first.
|
1024 |
|
|
+ */
|
1025 |
|
|
+static __inline__ int __ffs(unsigned long word)
|
1026 |
|
|
+{
|
1027 |
|
|
+ int num = 0;
|
1028 |
|
|
+
|
1029 |
|
|
+ if ((word & 0xffff) == 0) {
|
1030 |
|
|
+ num += 16;
|
1031 |
|
|
+ word >>= 16;
|
1032 |
|
|
+ }
|
1033 |
|
|
+ if ((word & 0xff) == 0) {
|
1034 |
|
|
+ num += 8;
|
1035 |
|
|
+ word >>= 8;
|
1036 |
|
|
+ }
|
1037 |
|
|
+ if ((word & 0xf) == 0) {
|
1038 |
|
|
+ num += 4;
|
1039 |
|
|
+ word >>= 4;
|
1040 |
|
|
+ }
|
1041 |
|
|
+ if ((word & 0x3) == 0) {
|
1042 |
|
|
+ num += 2;
|
1043 |
|
|
+ word >>= 2;
|
1044 |
|
|
+ }
|
1045 |
|
|
+ if ((word & 0x1) == 0)
|
1046 |
|
|
+ num += 1;
|
1047 |
|
|
+ return num;
|
1048 |
|
|
+}
|
1049 |
|
|
+
|
1050 |
|
|
+// /*
|
1051 |
|
|
+// * Every architecture must define this function. It's the fastest
|
1052 |
|
|
+// * way of searching a 140-bit bitmap where the first 100 bits are
|
1053 |
|
|
+// * unlikely to be set. It's guaranteed that at least one of the 140
|
1054 |
|
|
+// * bits is cleared.
|
1055 |
|
|
+// */
|
1056 |
|
|
+// static __inline__ int sched_find_first_bit(unsigned long *b)
|
1057 |
|
|
+// {
|
1058 |
|
|
+
|
1059 |
|
|
+// if (unlikely(b[0]))
|
1060 |
|
|
+// return __ffs(b[0]);
|
1061 |
|
|
+// if (unlikely(b[1]))
|
1062 |
|
|
+// return __ffs(b[1]) + 32;
|
1063 |
|
|
+// if (unlikely(b[2]))
|
1064 |
|
|
+// return __ffs(b[2]) + 64;
|
1065 |
|
|
+// if (b[3])
|
1066 |
|
|
+// return __ffs(b[3]) + 96;
|
1067 |
|
|
+// return __ffs(b[4]) + 128;
|
1068 |
|
|
+// }
|
1069 |
|
|
+
|
1070 |
|
|
+/**
|
1071 |
|
|
+ * * find_next_bit - find the next set bit in a memory region
|
1072 |
|
|
+ * * @addr: The address to base the search on
|
1073 |
|
|
+ * * @offset: The bitnumber to start searching at
|
1074 |
|
|
+ * * @size: The maximum size to search
|
1075 |
|
|
+ * */
|
1076 |
|
|
+static __inline__ unsigned long find_next_bit(const unsigned long *addr,
|
1077 |
|
|
+ unsigned long size, unsigned long offset)
|
1078 |
|
|
+{
|
1079 |
|
|
+ unsigned int *p = ((unsigned int *) addr) + (offset >> 5);
|
1080 |
|
|
+ unsigned int result = offset & ~31UL;
|
1081 |
|
|
+ unsigned int tmp;
|
1082 |
|
|
+
|
1083 |
|
|
+ if (offset >= size)
|
1084 |
|
|
+ return size;
|
1085 |
|
|
+ size -= result;
|
1086 |
|
|
+ offset &= 31UL;
|
1087 |
|
|
+ if (offset) {
|
1088 |
|
|
+ tmp = *p++;
|
1089 |
|
|
+ tmp &= ~0UL << offset;
|
1090 |
|
|
+ if (size < 32)
|
1091 |
|
|
+ goto found_first;
|
1092 |
|
|
+ if (tmp)
|
1093 |
|
|
+ goto found_middle;
|
1094 |
|
|
+ size -= 32;
|
1095 |
|
|
+ result += 32;
|
1096 |
|
|
+ }
|
1097 |
|
|
+ while (size >= 32) {
|
1098 |
|
|
+ if ((tmp = *p++) != 0)
|
1099 |
|
|
+ goto found_middle;
|
1100 |
|
|
+ result += 32;
|
1101 |
|
|
+ size -= 32;
|
1102 |
|
|
+ }
|
1103 |
|
|
+ if (!size)
|
1104 |
|
|
+ return result;
|
1105 |
|
|
+ tmp = *p;
|
1106 |
|
|
+
|
1107 |
|
|
+ found_first:
|
1108 |
|
|
+ tmp &= ~0UL >> (32 - size);
|
1109 |
|
|
+ if (tmp == 0UL) /* Are any bits set? */
|
1110 |
|
|
+ return result + size; /* Nope. */
|
1111 |
|
|
+ found_middle:
|
1112 |
|
|
+ return result + __ffs(tmp);
|
1113 |
|
|
+}
|
1114 |
|
|
+
|
1115 |
|
|
+
|
1116 |
|
|
+/* find_next_zero_bit() finds the first zero bit in a bit string of length
|
1117 |
|
|
+ * 'size' bits, starting the search at bit 'offset'. This is largely based
|
1118 |
|
|
+ * on Linus's ALPHA routines, which are pretty portable BTW.
|
1119 |
|
|
+ */
|
1120 |
|
|
+
|
1121 |
|
|
+static __inline__ unsigned long find_next_zero_bit(const unsigned long *addr,
|
1122 |
|
|
+ unsigned long size,
|
1123 |
|
|
+ unsigned long offset)
|
1124 |
|
|
+{
|
1125 |
|
|
+ unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
|
1126 |
|
|
+ unsigned long result = offset & ~31UL;
|
1127 |
|
|
+ unsigned long tmp;
|
1128 |
|
|
+
|
1129 |
|
|
+ if (offset >= size)
|
1130 |
|
|
+ return size;
|
1131 |
|
|
+ size -= result;
|
1132 |
|
|
+ offset &= 31UL;
|
1133 |
|
|
+ if (offset) {
|
1134 |
|
|
+ tmp = *(p++);
|
1135 |
|
|
+ tmp |= ~0UL >> (32-offset);
|
1136 |
|
|
+ if (size < 32)
|
1137 |
|
|
+ goto found_first;
|
1138 |
|
|
+ if (~tmp)
|
1139 |
|
|
+ goto found_middle;
|
1140 |
|
|
+ size -= 32;
|
1141 |
|
|
+ result += 32;
|
1142 |
|
|
+ }
|
1143 |
|
|
+ while (size & ~31UL) {
|
1144 |
|
|
+ if (~(tmp = *(p++)))
|
1145 |
|
|
+ goto found_middle;
|
1146 |
|
|
+ result += 32;
|
1147 |
|
|
+ size -= 32;
|
1148 |
|
|
+ }
|
1149 |
|
|
+ if (!size)
|
1150 |
|
|
+ return result;
|
1151 |
|
|
+ tmp = *p;
|
1152 |
|
|
+
|
1153 |
|
|
+found_first:
|
1154 |
|
|
+ tmp |= ~0UL >> size;
|
1155 |
|
|
+found_middle:
|
1156 |
|
|
+ return result + ffz(tmp);
|
1157 |
|
|
+}
|
1158 |
|
|
+
|
1159 |
|
|
+/**
|
1160 |
|
|
+ * find_first_bit - find the first set bit in a memory region
|
1161 |
|
|
+ * @addr: The address to start the search at
|
1162 |
|
|
+ * @size: The maximum size to search
|
1163 |
|
|
+ *
|
1164 |
|
|
+ * Returns the bit-number of the first set bit, not the number of the byte
|
1165 |
|
|
+ * containing a bit.
|
1166 |
|
|
+ */
|
1167 |
|
|
+#define find_first_bit(addr, size) \
|
1168 |
|
|
+ find_next_bit((addr), (size), 0)
|
1169 |
|
|
+
|
1170 |
|
|
+
|
1171 |
|
|
+/* Linus sez that gcc can optimize the following correctly, we'll see if this
|
1172 |
|
|
+ * holds on the Sparc as it does for the ALPHA.
|
1173 |
|
|
+ */
|
1174 |
|
|
+
|
1175 |
|
|
+#define find_first_zero_bit(addr, size) \
|
1176 |
|
|
+ find_next_zero_bit((addr), (size), 0)
|
1177 |
|
|
+
|
1178 |
|
|
+/* Now for the ext2 filesystem bit operations and helper routines. */
|
1179 |
|
|
+
|
1180 |
|
|
+static __inline__ int ext2_set_bit(int nr,void * addr)
|
1181 |
|
|
+{
|
1182 |
|
|
+ int mask, retval;
|
1183 |
|
|
+ unsigned long flags;
|
1184 |
|
|
+ unsigned char *ADDR = (unsigned char *) addr;
|
1185 |
|
|
+
|
1186 |
|
|
+ ADDR += nr >> 3;
|
1187 |
|
|
+ mask = 1 << (nr & 0x07);
|
1188 |
|
|
+ local_irq_save(flags);
|
1189 |
|
|
+ retval = (mask & *ADDR) != 0;
|
1190 |
|
|
+ *ADDR |= mask;
|
1191 |
|
|
+ local_irq_restore(flags);
|
1192 |
|
|
+ return retval;
|
1193 |
|
|
+}
|
1194 |
|
|
+
|
1195 |
|
|
+static __inline__ int ext2_clear_bit(int nr, void * addr)
|
1196 |
|
|
+{
|
1197 |
|
|
+ int mask, retval;
|
1198 |
|
|
+ unsigned long flags;
|
1199 |
|
|
+ unsigned char *ADDR = (unsigned char *) addr;
|
1200 |
|
|
+
|
1201 |
|
|
+ ADDR += nr >> 3;
|
1202 |
|
|
+ mask = 1 << (nr & 0x07);
|
1203 |
|
|
+ local_irq_save(flags);
|
1204 |
|
|
+ retval = (mask & *ADDR) != 0;
|
1205 |
|
|
+ *ADDR &= ~mask;
|
1206 |
|
|
+ local_irq_restore(flags);
|
1207 |
|
|
+ return retval;
|
1208 |
|
|
+}
|
1209 |
|
|
+
|
1210 |
|
|
+static __inline__ int ext2_test_bit(int nr, const void * addr)
|
1211 |
|
|
+{
|
1212 |
|
|
+ int mask;
|
1213 |
|
|
+ const unsigned char *ADDR = (const unsigned char *) addr;
|
1214 |
|
|
+
|
1215 |
|
|
+ ADDR += nr >> 3;
|
1216 |
|
|
+ mask = 1 << (nr & 0x07);
|
1217 |
|
|
+ return ((mask & *ADDR) != 0);
|
1218 |
|
|
+}
|
1219 |
|
|
+
|
1220 |
|
|
+#define ext2_find_first_zero_bit(addr, size) \
|
1221 |
|
|
+ ext2_find_next_zero_bit((addr), (size), 0)
|
1222 |
|
|
+
|
1223 |
|
|
+static __inline__ unsigned long ext2_find_next_zero_bit(void *addr, unsigned long size, unsigned long offset)
|
1224 |
|
|
+{
|
1225 |
|
|
+ unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
|
1226 |
|
|
+ unsigned long result = offset & ~31UL;
|
1227 |
|
|
+ unsigned long tmp;
|
1228 |
|
|
+
|
1229 |
|
|
+ if (offset >= size)
|
1230 |
|
|
+ return size;
|
1231 |
|
|
+ size -= result;
|
1232 |
|
|
+ offset &= 31UL;
|
1233 |
|
|
+ if(offset) {
|
1234 |
|
|
+ tmp = *(p++);
|
1235 |
|
|
+ tmp |= ~0UL << (32-offset);
|
1236 |
|
|
+ if(size < 32)
|
1237 |
|
|
+ goto found_first;
|
1238 |
|
|
+ if(~tmp)
|
1239 |
|
|
+ goto found_middle;
|
1240 |
|
|
+ size -= 32;
|
1241 |
|
|
+ result += 32;
|
1242 |
|
|
+ }
|
1243 |
|
|
+ while(size & ~31UL) {
|
1244 |
|
|
+ if(~(tmp = *(p++)))
|
1245 |
|
|
+ goto found_middle;
|
1246 |
|
|
+ result += 32;
|
1247 |
|
|
+ size -= 32;
|
1248 |
|
|
+ }
|
1249 |
|
|
+ if(!size)
|
1250 |
|
|
+ return result;
|
1251 |
|
|
+ tmp = *p;
|
1252 |
|
|
+
|
1253 |
|
|
+found_first:
|
1254 |
|
|
+ tmp |= ~0UL << size;
|
1255 |
|
|
+found_middle:
|
1256 |
|
|
+ tmp = ((tmp>>24) | ((tmp>>8)&0xff00) | ((tmp<<8)&0xff0000) | (tmp<<24));
|
1257 |
|
|
+ return result + ffz(tmp);
|
1258 |
|
|
+}
|
1259 |
|
|
+
|
1260 |
|
|
+#define __ext2_set_bit ext2_set_bit
|
1261 |
|
|
+#define __ext2_clear_bit ext2_clear_bit
|
1262 |
|
|
+
|
1263 |
|
|
+static __inline__ int __ext2_test_bit(int nr, __const__ void * addr)
|
1264 |
|
|
+{
|
1265 |
|
|
+ int mask;
|
1266 |
|
|
+ __const__ unsigned char *ADDR = (__const__ unsigned char *) addr;
|
1267 |
|
|
+
|
1268 |
|
|
+ ADDR += nr >> 3;
|
1269 |
|
|
+ mask = 1 << (nr & 0x07);
|
1270 |
|
|
+ return ((mask & *ADDR) != 0);
|
1271 |
|
|
+}
|
1272 |
|
|
+
|
1273 |
|
|
+#define __ext2_find_first_zero_bit(addr, size) \
|
1274 |
|
|
+ __ext2_find_next_zero_bit((addr), (size), 0)
|
1275 |
|
|
+
|
1276 |
|
|
+static __inline__ unsigned long __ext2_find_next_zero_bit(void *addr, unsigned long size, unsigned long offset)
|
1277 |
|
|
+{
|
1278 |
|
|
+ unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
|
1279 |
|
|
+ unsigned long result = offset & ~31UL;
|
1280 |
|
|
+ unsigned long tmp;
|
1281 |
|
|
+
|
1282 |
|
|
+ if (offset >= size)
|
1283 |
|
|
+ return size;
|
1284 |
|
|
+ size -= result;
|
1285 |
|
|
+ offset &= 31UL;
|
1286 |
|
|
+ if(offset) {
|
1287 |
|
|
+ tmp = *(p++);
|
1288 |
|
|
+ tmp |= __swab32(~0UL >> (32-offset));
|
1289 |
|
|
+ if(size < 32)
|
1290 |
|
|
+ goto found_first;
|
1291 |
|
|
+ if(~tmp)
|
1292 |
|
|
+ goto found_middle;
|
1293 |
|
|
+ size -= 32;
|
1294 |
|
|
+ result += 32;
|
1295 |
|
|
+ }
|
1296 |
|
|
+ while(size & ~31UL) {
|
1297 |
|
|
+ if(~(tmp = *(p++)))
|
1298 |
|
|
+ goto found_middle;
|
1299 |
|
|
+ result += 32;
|
1300 |
|
|
+ size -= 32;
|
1301 |
|
|
+ }
|
1302 |
|
|
+ if(!size)
|
1303 |
|
|
+ return result;
|
1304 |
|
|
+ tmp = *p;
|
1305 |
|
|
+
|
1306 |
|
|
+found_first:
|
1307 |
|
|
+ return result + ffz(__swab32(tmp) | (~0UL << size));
|
1308 |
|
|
+found_middle:
|
1309 |
|
|
+ return result + ffz(__swab32(tmp));
|
1310 |
|
|
+}
|
1311 |
|
|
+
|
1312 |
|
|
+#define ext2_set_bit_atomic(lock, nr, addr) \
|
1313 |
|
|
+ ({ \
|
1314 |
|
|
+ int ret; \
|
1315 |
|
|
+ spin_lock(lock); \
|
1316 |
|
|
+ ret = ext2_set_bit((nr), (unsigned long *)(addr)); \
|
1317 |
|
|
+ spin_unlock(lock); \
|
1318 |
|
|
+ ret; \
|
1319 |
|
|
+ })
|
1320 |
|
|
+
|
1321 |
|
|
+#define ext2_clear_bit_atomic(lock, nr, addr) \
|
1322 |
|
|
+ ({ \
|
1323 |
|
|
+ int ret; \
|
1324 |
|
|
+ spin_lock(lock); \
|
1325 |
|
|
+ ret = ext2_clear_bit((nr), (unsigned long *)(addr)); \
|
1326 |
|
|
+ spin_unlock(lock); \
|
1327 |
|
|
+ ret; \
|
1328 |
|
|
+ })
|
1329 |
|
|
+
|
1330 |
|
|
+/*
|
1331 |
|
|
+ * clear_bit() doesn't provide any barrier for the compiler.
|
1332 |
|
|
+ */
|
1333 |
|
|
+
|
1334 |
|
|
+#define smp_mb__before_clear_bit() barrier()
|
1335 |
|
|
+#define smp_mb__after_clear_bit() barrier()
|
1336 |
|
|
+// #include
|
1337 |
|
|
+// #include
|
1338 |
|
|
+// #include
|
1339 |
|
|
+// #include
|
1340 |
|
|
+#endif /* _OR32_BITOPS_H */
|
1341 |
|
|
+#endif /* __KERNEL__ */
|
1342 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/byteorder.h u-boot-2009.03/include/asm-or1200/byteorder.h
|
1343 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/byteorder.h 1969-12-31 16:00:00.000000000 -0800
|
1344 |
|
|
+++ u-boot-2009.03/include/asm-or1200/byteorder.h 2008-07-02 09:36:01.937500000 -0700
|
1345 |
|
|
@@ -0,0 +1,13 @@
|
1346 |
|
|
+#ifndef _OR32_BYTEORDER_H
|
1347 |
|
|
+#define _OR32_BYTEORDER_H
|
1348 |
|
|
+
|
1349 |
|
|
+#include
|
1350 |
|
|
+
|
1351 |
|
|
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
|
1352 |
|
|
+# define __BYTEORDER_HAS_U64__
|
1353 |
|
|
+# define __SWAB_64_THRU_32__
|
1354 |
|
|
+#endif
|
1355 |
|
|
+
|
1356 |
|
|
+#include
|
1357 |
|
|
+
|
1358 |
|
|
+#endif /* _OR32_BYTEORDER_H */
|
1359 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/config.h u-boot-2009.03/include/asm-or1200/config.h
|
1360 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/config.h 1969-12-31 16:00:00.000000000 -0800
|
1361 |
|
|
+++ u-boot-2009.03/include/asm-or1200/config.h 2009-03-25 15:52:40.248817600 -0700
|
1362 |
|
|
@@ -0,0 +1,5 @@
|
1363 |
|
|
+/*
|
1364 |
|
|
+
|
1365 |
|
|
+*/
|
1366 |
|
|
+
|
1367 |
|
|
+
|
1368 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/global_data.h u-boot-2009.03/include/asm-or1200/global_data.h
|
1369 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/global_data.h 1969-12-31 16:00:00.000000000 -0800
|
1370 |
|
|
+++ u-boot-2009.03/include/asm-or1200/global_data.h 2008-09-05 09:56:50.625000000 -0700
|
1371 |
|
|
@@ -0,0 +1,58 @@
|
1372 |
|
|
+/*
|
1373 |
|
|
+ * (C) Copyright 2004 Atmark Techno, Inc.
|
1374 |
|
|
+ *
|
1375 |
|
|
+ * Yasushi SHOJI
|
1376 |
|
|
+ *
|
1377 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
1378 |
|
|
+ * project.
|
1379 |
|
|
+ *
|
1380 |
|
|
+ * This program is free software; you can redistribute it and/or
|
1381 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
1382 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
1383 |
|
|
+ * the License, or (at your option) any later version.
|
1384 |
|
|
+ *
|
1385 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
1386 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1387 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
1388 |
|
|
+ * GNU General Public License for more details.
|
1389 |
|
|
+ *
|
1390 |
|
|
+ * You should have received a copy of the GNU General Public License
|
1391 |
|
|
+ * along with this program; if not, write to the Free Software
|
1392 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
1393 |
|
|
+ * MA 02111-1307 USA
|
1394 |
|
|
+ */
|
1395 |
|
|
+
|
1396 |
|
|
+#ifndef __ASM_GBL_DATA_H
|
1397 |
|
|
+#define __ASM_GBL_DATA_H
|
1398 |
|
|
+/*
|
1399 |
|
|
+ * The following data structure is placed in some memory wich is
|
1400 |
|
|
+ * available very early after boot (like DPRAM on MPC8xx/MPC82xx, or
|
1401 |
|
|
+ * some locked parts of the data cache) to allow for a minimum set of
|
1402 |
|
|
+ * global variables during system initialization (until we have set
|
1403 |
|
|
+ * up the memory controller so that we can use RAM).
|
1404 |
|
|
+ *
|
1405 |
|
|
+ * Keep it *SMALL* and remember to set CFG_GBL_DATA_SIZE > sizeof(gd_t)
|
1406 |
|
|
+ */
|
1407 |
|
|
+
|
1408 |
|
|
+typedef struct global_data {
|
1409 |
|
|
+ bd_t *bd;
|
1410 |
|
|
+ unsigned long flags;
|
1411 |
|
|
+ unsigned long baudrate;
|
1412 |
|
|
+ unsigned long have_console; /* serial_init() was called */
|
1413 |
|
|
+ unsigned long reloc_off; /* Relocation Offset */
|
1414 |
|
|
+ unsigned long env_addr; /* Address of Environment struct */
|
1415 |
|
|
+ unsigned long env_valid; /* Checksum of Environment valid? */
|
1416 |
|
|
+ unsigned long fb_base; /* base address of frame buffer */
|
1417 |
|
|
+ void **jt; /* jump table */
|
1418 |
|
|
+} gd_t;
|
1419 |
|
|
+
|
1420 |
|
|
+/*
|
1421 |
|
|
+ * Global Data Flags
|
1422 |
|
|
+ */
|
1423 |
|
|
+#define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */
|
1424 |
|
|
+#define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */
|
1425 |
|
|
+#define GD_FLG_SILENT 0x00004 /* Silent mode */
|
1426 |
|
|
+
|
1427 |
|
|
+#define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r30")
|
1428 |
|
|
+
|
1429 |
|
|
+#endif /* __ASM_GBL_DATA_H */
|
1430 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/io.h u-boot-2009.03/include/asm-or1200/io.h
|
1431 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/io.h 1969-12-31 16:00:00.000000000 -0800
|
1432 |
|
|
+++ u-boot-2009.03/include/asm-or1200/io.h 2008-07-02 09:36:02.031250000 -0700
|
1433 |
|
|
@@ -0,0 +1,90 @@
|
1434 |
|
|
+#ifndef _OR32_IO_H
|
1435 |
|
|
+#define _OR32_IO_H
|
1436 |
|
|
+
|
1437 |
|
|
+#include /* for __va, __pa */
|
1438 |
|
|
+
|
1439 |
|
|
+
|
1440 |
|
|
+/*
|
1441 |
|
|
+ * Change virtual addresses to physical addresses and vv.
|
1442 |
|
|
+ */
|
1443 |
|
|
+
|
1444 |
|
|
+static inline unsigned long virt_to_phys(volatile void * address)
|
1445 |
|
|
+{
|
1446 |
|
|
+ return __pa(address);
|
1447 |
|
|
+}
|
1448 |
|
|
+
|
1449 |
|
|
+static inline void * phys_to_virt(unsigned long address)
|
1450 |
|
|
+{
|
1451 |
|
|
+ return __va(address);
|
1452 |
|
|
+}
|
1453 |
|
|
+
|
1454 |
|
|
+extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
|
1455 |
|
|
+
|
1456 |
|
|
+extern inline void * ioremap(unsigned long offset, unsigned long size)
|
1457 |
|
|
+{
|
1458 |
|
|
+ return __ioremap(offset, size, 0);
|
1459 |
|
|
+}
|
1460 |
|
|
+
|
1461 |
|
|
+/* #define _PAGE_CI 0x002 */
|
1462 |
|
|
+extern inline void * ioremap_nocache(unsigned long offset, unsigned long size)
|
1463 |
|
|
+{
|
1464 |
|
|
+ return __ioremap(offset, size, 0x002);
|
1465 |
|
|
+}
|
1466 |
|
|
+
|
1467 |
|
|
+extern void iounmap(void *addr);
|
1468 |
|
|
+
|
1469 |
|
|
+#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
|
1470 |
|
|
+
|
1471 |
|
|
+/*
|
1472 |
|
|
+ * IO bus memory addresses are also 1:1 with the physical address
|
1473 |
|
|
+ */
|
1474 |
|
|
+#define virt_to_bus virt_to_phys
|
1475 |
|
|
+#define bus_to_virt phys_to_virt
|
1476 |
|
|
+
|
1477 |
|
|
+/*
|
1478 |
|
|
+ * readX/writeX() are used to access memory mapped devices. On some
|
1479 |
|
|
+ * architectures the memory mapped IO stuff needs to be accessed
|
1480 |
|
|
+ * differently. On the or32 architecture, we just read/write the
|
1481 |
|
|
+ * memory location directly.
|
1482 |
|
|
+ */
|
1483 |
|
|
+#define readb(addr) (*(volatile unsigned char *) (addr))
|
1484 |
|
|
+#define readw(addr) (*(volatile unsigned short *) (addr))
|
1485 |
|
|
+#define readl(addr) (*(volatile unsigned int *) (addr))
|
1486 |
|
|
+
|
1487 |
|
|
+#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b))
|
1488 |
|
|
+#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b))
|
1489 |
|
|
+#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b))
|
1490 |
|
|
+#define __raw_writel writel /*RGD*/
|
1491 |
|
|
+
|
1492 |
|
|
+#define memset_io(a,b,c) memset((void *)(a),(b),(c))
|
1493 |
|
|
+#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
|
1494 |
|
|
+#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
|
1495 |
|
|
+
|
1496 |
|
|
+/*
|
1497 |
|
|
+ * Again, or32 does not require mem IO specific function.
|
1498 |
|
|
+ */
|
1499 |
|
|
+
|
1500 |
|
|
+#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d))
|
1501 |
|
|
+
|
1502 |
|
|
+#define IO_BASE 0x0
|
1503 |
|
|
+#define IO_SPACE_LIMIT 0xffffffff
|
1504 |
|
|
+
|
1505 |
|
|
+#define inb(port) (*(volatile unsigned char *) (port+IO_BASE))
|
1506 |
|
|
+#define outb(value,port) ((*(volatile unsigned char *) (port+IO_BASE)) = (value))
|
1507 |
|
|
+
|
1508 |
|
|
+#define inb_p(port) inb((port))
|
1509 |
|
|
+#define outb_p(val, port) outb((val), (port))
|
1510 |
|
|
+
|
1511 |
|
|
+/*
|
1512 |
|
|
+ * Convert a physical pointer to a virtual kernel pointer for /dev/mem
|
1513 |
|
|
+ * access
|
1514 |
|
|
+ */
|
1515 |
|
|
+#define xlate_dev_mem_ptr(p) __va(p)
|
1516 |
|
|
+
|
1517 |
|
|
+/*
|
1518 |
|
|
+ * Convert a virtual cached pointer to an uncached pointer
|
1519 |
|
|
+ */
|
1520 |
|
|
+#define xlate_dev_kmem_ptr(p) p
|
1521 |
|
|
+
|
1522 |
|
|
+
|
1523 |
|
|
+#endif
|
1524 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/page.h u-boot-2009.03/include/asm-or1200/page.h
|
1525 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/page.h 1969-12-31 16:00:00.000000000 -0800
|
1526 |
|
|
+++ u-boot-2009.03/include/asm-or1200/page.h 2008-07-02 09:36:02.140625000 -0700
|
1527 |
|
|
@@ -0,0 +1,107 @@
|
1528 |
|
|
+#ifndef _OR32_PAGE_H
|
1529 |
|
|
+#define _OR32_PAGE_H
|
1530 |
|
|
+
|
1531 |
|
|
+
|
1532 |
|
|
+/* PAGE_SHIFT determines the page size */
|
1533 |
|
|
+#define PAGE_SHIFT 13
|
1534 |
|
|
+#define PAGE_SIZE (1UL << PAGE_SHIFT)
|
1535 |
|
|
+#define PAGE_MASK (~(PAGE_SIZE-1))
|
1536 |
|
|
+#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
|
1537 |
|
|
+
|
1538 |
|
|
+#define PAGE_OFFSET 0xc0000000
|
1539 |
|
|
+#define KERNELBASE PAGE_OFFSET
|
1540 |
|
|
+
|
1541 |
|
|
+#ifdef __KERNEL__
|
1542 |
|
|
+
|
1543 |
|
|
+#ifndef __ASSEMBLY__
|
1544 |
|
|
+#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
|
1545 |
|
|
+#define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE)
|
1546 |
|
|
+
|
1547 |
|
|
+#define clear_user_page(page, vaddr, pg) clear_page(page)
|
1548 |
|
|
+#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
|
1549 |
|
|
+
|
1550 |
|
|
+#define STRICT_MM_TYPECHECKS
|
1551 |
|
|
+#ifdef STRICT_MM_TYPECHECKS
|
1552 |
|
|
+/*
|
1553 |
|
|
+ * These are used to make use of C type-checking..
|
1554 |
|
|
+ */
|
1555 |
|
|
+typedef struct { unsigned long pte; } pte_t;
|
1556 |
|
|
+typedef struct { unsigned long pmd; } pmd_t;
|
1557 |
|
|
+typedef struct { unsigned long pgd; } pgd_t;
|
1558 |
|
|
+typedef struct { unsigned long pgprot; } pgprot_t;
|
1559 |
|
|
+
|
1560 |
|
|
+#define pte_val(x) ((x).pte)
|
1561 |
|
|
+#define pmd_val(x) ((x).pmd)
|
1562 |
|
|
+#define pgd_val(x) ((x).pgd)
|
1563 |
|
|
+#define pgprot_val(x) ((x).pgprot)
|
1564 |
|
|
+
|
1565 |
|
|
+#define __pte(x) ((pte_t) { (x) } )
|
1566 |
|
|
+#define __pmd(x) ((pmd_t) { (x) } )
|
1567 |
|
|
+#define __pgd(x) ((pgd_t) { (x) } )
|
1568 |
|
|
+#define __pgprot(x) ((pgprot_t) { (x) } )
|
1569 |
|
|
+
|
1570 |
|
|
+#else /* STRICT_MM_TYPECHECKS */
|
1571 |
|
|
+/*
|
1572 |
|
|
+ * .. while these make it easier on the compiler
|
1573 |
|
|
+ */
|
1574 |
|
|
+typedef unsigned long pte_t;
|
1575 |
|
|
+typedef unsigned long pmd_t;
|
1576 |
|
|
+typedef unsigned long pgd_t;
|
1577 |
|
|
+typedef unsigned long pgprot_t;
|
1578 |
|
|
+
|
1579 |
|
|
+#define pte_val(x) (x)
|
1580 |
|
|
+#define pmd_val(x) (x)
|
1581 |
|
|
+#define pgd_val(x) (x)
|
1582 |
|
|
+#define pgprot_val(x) (x)
|
1583 |
|
|
+
|
1584 |
|
|
+#define __pte(x) (x)
|
1585 |
|
|
+#define __pmd(x) (x)
|
1586 |
|
|
+#define __pgd(x) (x)
|
1587 |
|
|
+#define __pgprot(x) (x)
|
1588 |
|
|
+
|
1589 |
|
|
+#endif /* STRICT_MM_TYPECHECKS */
|
1590 |
|
|
+
|
1591 |
|
|
+
|
1592 |
|
|
+/* Pure 2^n version of get_order */
|
1593 |
|
|
+static __inline__ int get_order(unsigned long size)
|
1594 |
|
|
+{
|
1595 |
|
|
+ int order;
|
1596 |
|
|
+
|
1597 |
|
|
+ size = (size-1) >> (PAGE_SHIFT-1);
|
1598 |
|
|
+ order = -1;
|
1599 |
|
|
+ do {
|
1600 |
|
|
+ size >>= 1;
|
1601 |
|
|
+ order++;
|
1602 |
|
|
+ } while (size);
|
1603 |
|
|
+ return order;
|
1604 |
|
|
+}
|
1605 |
|
|
+
|
1606 |
|
|
+
|
1607 |
|
|
+/* macros to convert between really physical and virtual addresses
|
1608 |
|
|
+ */
|
1609 |
|
|
+
|
1610 |
|
|
+#define __pa(x) ((unsigned long)(x) - PAGE_OFFSET)
|
1611 |
|
|
+#define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET))
|
1612 |
|
|
+
|
1613 |
|
|
+#define pfn_to_page(pfn) (mem_map + (pfn))
|
1614 |
|
|
+#define page_to_pfn(page) ((unsigned long)((page) - mem_map))
|
1615 |
|
|
+
|
1616 |
|
|
+#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
|
1617 |
|
|
+#define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT)
|
1618 |
|
|
+
|
1619 |
|
|
+#define pfn_valid(pfn) ((pfn) < max_mapnr)
|
1620 |
|
|
+#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
|
1621 |
|
|
+
|
1622 |
|
|
+/* from linker script */
|
1623 |
|
|
+
|
1624 |
|
|
+extern unsigned long dram_start, dram_end;
|
1625 |
|
|
+
|
1626 |
|
|
+#endif /* __ASSEMBLY__ */
|
1627 |
|
|
+
|
1628 |
|
|
+#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
|
1629 |
|
|
+ VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
|
1630 |
|
|
+
|
1631 |
|
|
+#endif /* __KERNEL__ */
|
1632 |
|
|
+
|
1633 |
|
|
+#endif /* _OR32_PAGE_H */
|
1634 |
|
|
+
|
1635 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/posix_types.h u-boot-2009.03/include/asm-or1200/posix_types.h
|
1636 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/posix_types.h 1969-12-31 16:00:00.000000000 -0800
|
1637 |
|
|
+++ u-boot-2009.03/include/asm-or1200/posix_types.h 2008-08-26 18:22:31.441162400 -0700
|
1638 |
|
|
@@ -0,0 +1,142 @@
|
1639 |
|
|
+#ifndef _OR32_POSIX_TYPES_H
|
1640 |
|
|
+#define _OR32_POSIX_TYPES_H
|
1641 |
|
|
+
|
1642 |
|
|
+/*
|
1643 |
|
|
+ * This file is generally used by user-level software, so you need to
|
1644 |
|
|
+ * be a little careful about namespace pollution etc. Also, we cannot
|
1645 |
|
|
+ * assume GCC is being used.
|
1646 |
|
|
+ */
|
1647 |
|
|
+
|
1648 |
|
|
+typedef unsigned int __kernel_dev_t;
|
1649 |
|
|
+
|
1650 |
|
|
+typedef unsigned int __kernel_ino_t;
|
1651 |
|
|
+typedef unsigned int __kernel_mode_t;
|
1652 |
|
|
+typedef unsigned short __kernel_nlink_t;
|
1653 |
|
|
+typedef long __kernel_off_t;
|
1654 |
|
|
+typedef int __kernel_pid_t;
|
1655 |
|
|
+typedef unsigned int __kernel_uid_t;
|
1656 |
|
|
+typedef unsigned int __kernel_gid_t;
|
1657 |
|
|
+typedef unsigned int __kernel_size_t;
|
1658 |
|
|
+typedef int __kernel_ssize_t;
|
1659 |
|
|
+typedef long __kernel_ptrdiff_t;
|
1660 |
|
|
+typedef long __kernel_time_t;
|
1661 |
|
|
+typedef long __kernel_suseconds_t;
|
1662 |
|
|
+typedef long __kernel_clock_t;
|
1663 |
|
|
+typedef int __kernel_timer_t;
|
1664 |
|
|
+typedef int __kernel_clockid_t;
|
1665 |
|
|
+typedef int __kernel_daddr_t;
|
1666 |
|
|
+typedef char * __kernel_caddr_t;
|
1667 |
|
|
+typedef short __kernel_ipc_pid_t;
|
1668 |
|
|
+typedef unsigned short __kernel_uid16_t;
|
1669 |
|
|
+typedef unsigned short __kernel_gid16_t;
|
1670 |
|
|
+typedef unsigned int __kernel_uid32_t;
|
1671 |
|
|
+typedef unsigned int __kernel_gid32_t;
|
1672 |
|
|
+
|
1673 |
|
|
+typedef unsigned int __kernel_old_uid_t;
|
1674 |
|
|
+typedef unsigned int __kernel_old_gid_t;
|
1675 |
|
|
+typedef unsigned short __kernel_old_dev_t;
|
1676 |
|
|
+
|
1677 |
|
|
+/* i386, cris version
|
1678 |
|
|
+typedef unsigned long __kernel_ino_t;
|
1679 |
|
|
+typedef unsigned short __kernel_mode_t;
|
1680 |
|
|
+typedef unsigned short __kernel_nlink_t;
|
1681 |
|
|
+typedef long __kernel_off_t;
|
1682 |
|
|
+typedef int __kernel_pid_t;
|
1683 |
|
|
+typedef unsigned short __kernel_ipc_pid_t;
|
1684 |
|
|
+typedef unsigned short __kernel_uid_t;
|
1685 |
|
|
+typedef unsigned short __kernel_gid_t;
|
1686 |
|
|
+typedef unsigned int __kernel_size_t;
|
1687 |
|
|
+typedef long __kernel_ssize_t;
|
1688 |
|
|
+typedef int __kernel_ptrdiff_t;
|
1689 |
|
|
+typedef long __kernel_time_t;
|
1690 |
|
|
+typedef long __kernel_suseconds_t;
|
1691 |
|
|
+typedef long __kernel_clock_t;
|
1692 |
|
|
+typedef int __kernel_timer_t;
|
1693 |
|
|
+typedef int __kernel_clockid_t;
|
1694 |
|
|
+typedef int __kernel_daddr_t;
|
1695 |
|
|
+typedef char * __kernel_caddr_t;
|
1696 |
|
|
+typedef unsigned short __kernel_uid16_t;
|
1697 |
|
|
+typedef unsigned short __kernel_gid16_t;
|
1698 |
|
|
+typedef unsigned int __kernel_uid32_t;
|
1699 |
|
|
+typedef unsigned int __kernel_gid32_t;
|
1700 |
|
|
+
|
1701 |
|
|
+typedef unsigned short __kernel_old_uid_t;
|
1702 |
|
|
+typedef unsigned short __kernel_old_gid_t;
|
1703 |
|
|
+typedef unsigned short __kernel_old_dev_t;
|
1704 |
|
|
+*/
|
1705 |
|
|
+
|
1706 |
|
|
+#ifdef __GNUC__
|
1707 |
|
|
+typedef long long __kernel_loff_t;
|
1708 |
|
|
+#endif
|
1709 |
|
|
+
|
1710 |
|
|
+typedef struct {
|
1711 |
|
|
+ int val[2];
|
1712 |
|
|
+} __kernel_fsid_t;
|
1713 |
|
|
+
|
1714 |
|
|
+#ifndef __GNUC__
|
1715 |
|
|
+
|
1716 |
|
|
+#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d))
|
1717 |
|
|
+#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
|
1718 |
|
|
+#define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d))
|
1719 |
|
|
+#define __FD_ZERO(set) \
|
1720 |
|
|
+ ((void) memset ((__ptr_t) (set), 0, sizeof (__kernel_fd_set)))
|
1721 |
|
|
+
|
1722 |
|
|
+#else /* __GNUC__ */
|
1723 |
|
|
+
|
1724 |
|
|
+#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) \
|
1725 |
|
|
+ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)
|
1726 |
|
|
+/* With GNU C, use inline functions instead so args are evaluated only once: */
|
1727 |
|
|
+
|
1728 |
|
|
+#undef __FD_SET
|
1729 |
|
|
+static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp)
|
1730 |
|
|
+{
|
1731 |
|
|
+ unsigned long _tmp = fd / __NFDBITS;
|
1732 |
|
|
+ unsigned long _rem = fd % __NFDBITS;
|
1733 |
|
|
+ fdsetp->fds_bits[_tmp] |= (1UL<<_rem);
|
1734 |
|
|
+}
|
1735 |
|
|
+
|
1736 |
|
|
+#undef __FD_CLR
|
1737 |
|
|
+static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp)
|
1738 |
|
|
+{
|
1739 |
|
|
+ unsigned long _tmp = fd / __NFDBITS;
|
1740 |
|
|
+ unsigned long _rem = fd % __NFDBITS;
|
1741 |
|
|
+ fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem);
|
1742 |
|
|
+}
|
1743 |
|
|
+
|
1744 |
|
|
+#undef __FD_ISSET
|
1745 |
|
|
+static __inline__ int __FD_ISSET(unsigned long fd, __kernel_fd_set *p)
|
1746 |
|
|
+{
|
1747 |
|
|
+ unsigned long _tmp = fd / __NFDBITS;
|
1748 |
|
|
+ unsigned long _rem = fd % __NFDBITS;
|
1749 |
|
|
+ return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0;
|
1750 |
|
|
+}
|
1751 |
|
|
+
|
1752 |
|
|
+/*
|
1753 |
|
|
+ * This will unroll the loop for the normal constant case (8 ints,
|
1754 |
|
|
+ * for a 256-bit fd_set)
|
1755 |
|
|
+ */
|
1756 |
|
|
+#undef __FD_ZERO
|
1757 |
|
|
+static __inline__ void __FD_ZERO(__kernel_fd_set *p)
|
1758 |
|
|
+{
|
1759 |
|
|
+ unsigned int *tmp = (unsigned int *)p->fds_bits;
|
1760 |
|
|
+ int i;
|
1761 |
|
|
+
|
1762 |
|
|
+ if (__builtin_constant_p(__FDSET_LONGS)) {
|
1763 |
|
|
+ switch (__FDSET_LONGS) {
|
1764 |
|
|
+ case 8:
|
1765 |
|
|
+ tmp[0] = 0; tmp[1] = 0; tmp[2] = 0; tmp[3] = 0;
|
1766 |
|
|
+ tmp[4] = 0; tmp[5] = 0; tmp[6] = 0; tmp[7] = 0;
|
1767 |
|
|
+ return;
|
1768 |
|
|
+ }
|
1769 |
|
|
+ }
|
1770 |
|
|
+ i = __FDSET_LONGS;
|
1771 |
|
|
+ while (i) {
|
1772 |
|
|
+ i--;
|
1773 |
|
|
+ *tmp = 0;
|
1774 |
|
|
+ tmp++;
|
1775 |
|
|
+ }
|
1776 |
|
|
+}
|
1777 |
|
|
+
|
1778 |
|
|
+#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */
|
1779 |
|
|
+#endif /* __GNUC__ */
|
1780 |
|
|
+#endif /* _OR32_POSIX_TYPES_H */
|
1781 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/processor.h u-boot-2009.03/include/asm-or1200/processor.h
|
1782 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/processor.h 1969-12-31 16:00:00.000000000 -0800
|
1783 |
|
|
+++ u-boot-2009.03/include/asm-or1200/processor.h 2008-07-02 09:36:02.187500000 -0700
|
1784 |
|
|
@@ -0,0 +1,119 @@
|
1785 |
|
|
+/*
|
1786 |
|
|
+ * include/asm-or32/processor.h
|
1787 |
|
|
+ *
|
1788 |
|
|
+ * Based on:
|
1789 |
|
|
+ * include/asm-cris/processor.h
|
1790 |
|
|
+ * Copyright (C) 2000, 2001, 2002 Axis Communications AB
|
1791 |
|
|
+ *
|
1792 |
|
|
+ */
|
1793 |
|
|
+
|
1794 |
|
|
+#ifndef _OR32_PROCESSOR_H
|
1795 |
|
|
+#define _OR32_PROCESSOR_H
|
1796 |
|
|
+
|
1797 |
|
|
+#include
|
1798 |
|
|
+#include
|
1799 |
|
|
+#include
|
1800 |
|
|
+
|
1801 |
|
|
+/* Kernel and user SR register setting */
|
1802 |
|
|
+#define KERNEL_SR (SPR_SR_DME | SPR_SR_IME | SPR_SR_ICE | SPR_SR_DCE | SPR_SR_SM)
|
1803 |
|
|
+#define USER_SR (SPR_SR_DME | SPR_SR_IME | SPR_SR_ICE | SPR_SR_DCE | SPR_SR_IEE | SPR_SR_TEE)
|
1804 |
|
|
+/*
|
1805 |
|
|
+ * Default implementation of macro that returns current
|
1806 |
|
|
+ * instruction pointer ("program counter").
|
1807 |
|
|
+ */
|
1808 |
|
|
+#define current_text_addr() ({ __label__ _l; _l: &&_l;})
|
1809 |
|
|
+
|
1810 |
|
|
+/* or32has no problems with write protection */
|
1811 |
|
|
+
|
1812 |
|
|
+#define wp_works_ok 1
|
1813 |
|
|
+
|
1814 |
|
|
+/*
|
1815 |
|
|
+ * User space process size. This is hardcoded into a few places,
|
1816 |
|
|
+ * so don't change it unless you know what you are doing.
|
1817 |
|
|
+ */
|
1818 |
|
|
+
|
1819 |
|
|
+#define TASK_SIZE (0x80000000UL)
|
1820 |
|
|
+
|
1821 |
|
|
+/* This decides where the kernel will search for a free chunk of vm
|
1822 |
|
|
+ * space during mmap's.
|
1823 |
|
|
+ */
|
1824 |
|
|
+#define TASK_UNMAPPED_BASE (TASK_SIZE / 8 * 3)
|
1825 |
|
|
+
|
1826 |
|
|
+/* THREAD_SIZE is the size of the task_struct/kernel_stack combo.
|
1827 |
|
|
+ * normally, the stack is found by doing something like p + THREAD_SIZE
|
1828 |
|
|
+ * in or32, a page is 8192 bytes, which seems like a sane size
|
1829 |
|
|
+ */
|
1830 |
|
|
+
|
1831 |
|
|
+#define THREAD_SIZE PAGE_SIZE
|
1832 |
|
|
+
|
1833 |
|
|
+#ifndef __ASSEMBLY__
|
1834 |
|
|
+
|
1835 |
|
|
+struct task_struct;
|
1836 |
|
|
+
|
1837 |
|
|
+typedef struct {
|
1838 |
|
|
+ unsigned long seg;
|
1839 |
|
|
+} mm_segment_t;
|
1840 |
|
|
+
|
1841 |
|
|
+struct thread_struct {
|
1842 |
|
|
+ unsigned long usp; /* user space pointer */
|
1843 |
|
|
+ unsigned long ksp; /* kernel stack pointer */
|
1844 |
|
|
+ struct pt_regs *regs; /* pointer to saved register state */
|
1845 |
|
|
+ mm_segment_t fs; /* for get_fs() validation */
|
1846 |
|
|
+ signed long last_syscall;
|
1847 |
|
|
+};
|
1848 |
|
|
+
|
1849 |
|
|
+/*
|
1850 |
|
|
+ * At user->kernel entry, the pt_regs struct is stacked on the top of the kernel-stack.
|
1851 |
|
|
+ * This macro allows us to find those regs for a task.
|
1852 |
|
|
+ * Notice that subsequent pt_regs stackings, like recursive interrupts occuring while
|
1853 |
|
|
+ * we're in the kernel, won't affect this - only the first user->kernel transition
|
1854 |
|
|
+ * registers are reached by this.
|
1855 |
|
|
+ */
|
1856 |
|
|
+#define user_regs(thread_info) (((struct pt_regs *)((unsigned long)(thread_info) + THREAD_SIZE)) - 1)
|
1857 |
|
|
+
|
1858 |
|
|
+/*
|
1859 |
|
|
+ * Dito but for the currently running task
|
1860 |
|
|
+ */
|
1861 |
|
|
+
|
1862 |
|
|
+#define current_regs() user_regs(current->thread_info)
|
1863 |
|
|
+
|
1864 |
|
|
+extern inline void prepare_to_copy(struct task_struct *tsk)
|
1865 |
|
|
+{
|
1866 |
|
|
+}
|
1867 |
|
|
+
|
1868 |
|
|
+#define INIT_SP (sizeof(init_stack) + (unsigned long) &init_stack)
|
1869 |
|
|
+
|
1870 |
|
|
+#define INIT_THREAD { \
|
1871 |
|
|
+ 0, INIT_SP, NULL, KERNEL_DS, 0 }
|
1872 |
|
|
+
|
1873 |
|
|
+
|
1874 |
|
|
+#define KSTK_EIP(tsk) ((tsk)->thread.regs? (tsk)->thread.regs->pc: 0)
|
1875 |
|
|
+#define KSTK_ESP(tsk) ((tsk)->thread.regs? (tsk)->thread.regs->sp: 0)
|
1876 |
|
|
+
|
1877 |
|
|
+
|
1878 |
|
|
+extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
|
1879 |
|
|
+
|
1880 |
|
|
+void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp);
|
1881 |
|
|
+void release_thread(struct task_struct *);
|
1882 |
|
|
+unsigned long get_wchan(struct task_struct *p);
|
1883 |
|
|
+
|
1884 |
|
|
+/*
|
1885 |
|
|
+ * Free current thread data structures etc..
|
1886 |
|
|
+ */
|
1887 |
|
|
+
|
1888 |
|
|
+extern inline void exit_thread(void)
|
1889 |
|
|
+{
|
1890 |
|
|
+ /* Nothing needs to be done. */
|
1891 |
|
|
+}
|
1892 |
|
|
+
|
1893 |
|
|
+/*
|
1894 |
|
|
+ * Return saved PC of a blocked thread. For now, this is the "user" PC
|
1895 |
|
|
+ */
|
1896 |
|
|
+extern unsigned long thread_saved_pc(struct task_struct *t);
|
1897 |
|
|
+
|
1898 |
|
|
+#define init_stack (init_thread_union.stack)
|
1899 |
|
|
+
|
1900 |
|
|
+#define cpu_relax() do { } while (0)
|
1901 |
|
|
+
|
1902 |
|
|
+#endif /* __ASSEMBLY__ */
|
1903 |
|
|
+#endif /* _OR32_PROCESSOR_H */
|
1904 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/ptrace.h u-boot-2009.03/include/asm-or1200/ptrace.h
|
1905 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/ptrace.h 1969-12-31 16:00:00.000000000 -0800
|
1906 |
|
|
+++ u-boot-2009.03/include/asm-or1200/ptrace.h 2008-07-02 09:36:02.187500000 -0700
|
1907 |
|
|
@@ -0,0 +1,86 @@
|
1908 |
|
|
+#ifndef _OR32_PTRACE_H
|
1909 |
|
|
+#define _OR32_PTRACE_H
|
1910 |
|
|
+
|
1911 |
|
|
+#include
|
1912 |
|
|
+/*
|
1913 |
|
|
+ * This struct defines the way the registers are stored on the
|
1914 |
|
|
+ * kernel stack during a system call or other kernel entry.
|
1915 |
|
|
+ *
|
1916 |
|
|
+ * this should only contain volatile regs
|
1917 |
|
|
+ * since we can keep non-volatile in the thread_struct
|
1918 |
|
|
+ * should set this up when only volatiles are saved
|
1919 |
|
|
+ * by intr code.
|
1920 |
|
|
+ *
|
1921 |
|
|
+ * Since this is going on the stack, *CARE MUST BE TAKEN* to insure
|
1922 |
|
|
+ * that the overall structure is a multiple of 16 bytes in length.
|
1923 |
|
|
+ *
|
1924 |
|
|
+ * Note that the offsets of the fields in this struct correspond with
|
1925 |
|
|
+ * the values below.
|
1926 |
|
|
+ */
|
1927 |
|
|
+
|
1928 |
|
|
+#ifndef __ASSEMBLY__
|
1929 |
|
|
+
|
1930 |
|
|
+struct pt_regs {
|
1931 |
|
|
+ long pc;
|
1932 |
|
|
+ long sr;
|
1933 |
|
|
+ long sp;
|
1934 |
|
|
+ long gprs[30];
|
1935 |
|
|
+ long orig_gpr3; /* Used for restarting system calls */
|
1936 |
|
|
+ long result; /* Result of a system call */
|
1937 |
|
|
+ long syscallno; /* Syscall no. (used by strace) */
|
1938 |
|
|
+};
|
1939 |
|
|
+#endif /* __ASSEMBLY__ */
|
1940 |
|
|
+
|
1941 |
|
|
+#ifdef __KERNEL__
|
1942 |
|
|
+#define STACK_FRAME_OVERHEAD 0 /* size of minimum stack frame */
|
1943 |
|
|
+
|
1944 |
|
|
+/* Size of stack frame allocated when calling signal handler. */
|
1945 |
|
|
+#define __SIGNAL_FRAMESIZE 64
|
1946 |
|
|
+
|
1947 |
|
|
+#define instruction_pointer(regs) ((regs)->pc)
|
1948 |
|
|
+#define user_mode(regs) (((regs)->sr & SPR_SR_SM) == 0)
|
1949 |
|
|
+#define profile_pc(regs) instruction_pointer(regs)
|
1950 |
|
|
+
|
1951 |
|
|
+#endif /* __KERNEL__ */
|
1952 |
|
|
+
|
1953 |
|
|
+/*
|
1954 |
|
|
+ * Offsets used by 'ptrace' system call interface.
|
1955 |
|
|
+ */
|
1956 |
|
|
+#define PC 0
|
1957 |
|
|
+#define SR 4
|
1958 |
|
|
+#define SP 8
|
1959 |
|
|
+#define GPR2 12
|
1960 |
|
|
+#define GPR3 16
|
1961 |
|
|
+#define GPR4 20
|
1962 |
|
|
+#define GPR5 24
|
1963 |
|
|
+#define GPR6 28
|
1964 |
|
|
+#define GPR7 32
|
1965 |
|
|
+#define GPR8 36
|
1966 |
|
|
+#define GPR9 40
|
1967 |
|
|
+#define GPR10 44
|
1968 |
|
|
+#define GPR11 48
|
1969 |
|
|
+#define GPR12 52
|
1970 |
|
|
+#define GPR13 56
|
1971 |
|
|
+#define GPR14 60
|
1972 |
|
|
+#define GPR15 64
|
1973 |
|
|
+#define GPR16 68
|
1974 |
|
|
+#define GPR17 72
|
1975 |
|
|
+#define GPR18 76
|
1976 |
|
|
+#define GPR19 80
|
1977 |
|
|
+#define GPR20 84
|
1978 |
|
|
+#define GPR21 88
|
1979 |
|
|
+#define GPR22 92
|
1980 |
|
|
+#define GPR23 96
|
1981 |
|
|
+#define GPR24 100
|
1982 |
|
|
+#define GPR25 104
|
1983 |
|
|
+#define GPR26 108
|
1984 |
|
|
+#define GPR27 112
|
1985 |
|
|
+#define GPR28 116
|
1986 |
|
|
+#define GPR29 120
|
1987 |
|
|
+#define GPR30 124
|
1988 |
|
|
+#define GPR31 128
|
1989 |
|
|
+#define ORIG_GPR3 132
|
1990 |
|
|
+#define RESULT 136
|
1991 |
|
|
+#define SYSCALLNO 140
|
1992 |
|
|
+
|
1993 |
|
|
+#endif /* _OR32_PTRACE_H */
|
1994 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/spr_defs.h u-boot-2009.03/include/asm-or1200/spr_defs.h
|
1995 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/spr_defs.h 1969-12-31 16:00:00.000000000 -0800
|
1996 |
|
|
+++ u-boot-2009.03/include/asm-or1200/spr_defs.h 2008-07-02 09:36:02.296875000 -0700
|
1997 |
|
|
@@ -0,0 +1,438 @@
|
1998 |
|
|
+/* spr_defs.h -- Defines OR1K architecture specific special-purpose registers
|
1999 |
|
|
+ Copyright (C) 1999 Damjan Lampret, lampret@opencores.org
|
2000 |
|
|
+
|
2001 |
|
|
+ For more information about OpenRISC processors, licensing and
|
2002 |
|
|
+ design services you may contact Beyond Semiconductor at
|
2003 |
|
|
+ sales@bsemi.com or visit website http://www.bsemi.com.
|
2004 |
|
|
+
|
2005 |
|
|
+This file is part of OpenRISC 1000 Architectural Simulator.
|
2006 |
|
|
+
|
2007 |
|
|
+This program is free software; you can redistribute it and/or modify
|
2008 |
|
|
+it under the terms of the GNU General Public License as published by
|
2009 |
|
|
+the Free Software Foundation; either version 2 of the License, or
|
2010 |
|
|
+(at your option) any later version.
|
2011 |
|
|
+
|
2012 |
|
|
+This program is distributed in the hope that it will be useful,
|
2013 |
|
|
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2014 |
|
|
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2015 |
|
|
+GNU General Public License for more details.
|
2016 |
|
|
+
|
2017 |
|
|
+You should have received a copy of the GNU General Public License
|
2018 |
|
|
+along with this program; if not, write to the Free Software
|
2019 |
|
|
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
2020 |
|
|
+
|
2021 |
|
|
+/* This file is also used by microkernel test bench. Among
|
2022 |
|
|
+others it is also used in assembly file(s). */
|
2023 |
|
|
+
|
2024 |
|
|
+/* Definition of special-purpose registers (SPRs) */
|
2025 |
|
|
+
|
2026 |
|
|
+#ifndef _SPR_DEFS_H
|
2027 |
|
|
+#define _SPR_DEFS_H
|
2028 |
|
|
+
|
2029 |
|
|
+#define MAX_GRPS (32)
|
2030 |
|
|
+#define MAX_SPRS_PER_GRP_BITS (11)
|
2031 |
|
|
+#define MAX_SPRS_PER_GRP (1 << MAX_SPRS_PER_GRP_BITS)
|
2032 |
|
|
+#define MAX_SPRS (0x10000)
|
2033 |
|
|
+
|
2034 |
|
|
+/* Base addresses for the groups */
|
2035 |
|
|
+#define SPRGROUP_SYS (0<< MAX_SPRS_PER_GRP_BITS)
|
2036 |
|
|
+#define SPRGROUP_DMMU (1<< MAX_SPRS_PER_GRP_BITS)
|
2037 |
|
|
+#define SPRGROUP_IMMU (2<< MAX_SPRS_PER_GRP_BITS)
|
2038 |
|
|
+#define SPRGROUP_DC (3<< MAX_SPRS_PER_GRP_BITS)
|
2039 |
|
|
+#define SPRGROUP_IC (4<< MAX_SPRS_PER_GRP_BITS)
|
2040 |
|
|
+#define SPRGROUP_MAC (5<< MAX_SPRS_PER_GRP_BITS)
|
2041 |
|
|
+#define SPRGROUP_D (6<< MAX_SPRS_PER_GRP_BITS)
|
2042 |
|
|
+#define SPRGROUP_PC (7<< MAX_SPRS_PER_GRP_BITS)
|
2043 |
|
|
+#define SPRGROUP_PM (8<< MAX_SPRS_PER_GRP_BITS)
|
2044 |
|
|
+#define SPRGROUP_PIC (9<< MAX_SPRS_PER_GRP_BITS)
|
2045 |
|
|
+#define SPRGROUP_TT (10<< MAX_SPRS_PER_GRP_BITS)
|
2046 |
|
|
+
|
2047 |
|
|
+/* System control and status group */
|
2048 |
|
|
+#define SPR_VR (SPRGROUP_SYS + 0)
|
2049 |
|
|
+#define SPR_UPR (SPRGROUP_SYS + 1)
|
2050 |
|
|
+#define SPR_PC (SPRGROUP_SYS + 16) /* CZ 21/06/01 */
|
2051 |
|
|
+#define SPR_SR (SPRGROUP_SYS + 17) /* CZ 21/06/01 */
|
2052 |
|
|
+#define SPR_EPCR_BASE (SPRGROUP_SYS + 32) /* CZ 21/06/01 */
|
2053 |
|
|
+#define SPR_EPCR_LAST (SPRGROUP_SYS + 47) /* CZ 21/06/01 */
|
2054 |
|
|
+#define SPR_EEAR_BASE (SPRGROUP_SYS + 48)
|
2055 |
|
|
+#define SPR_EEAR_LAST (SPRGROUP_SYS + 63)
|
2056 |
|
|
+#define SPR_ESR_BASE (SPRGROUP_SYS + 64)
|
2057 |
|
|
+#define SPR_ESR_LAST (SPRGROUP_SYS + 79)
|
2058 |
|
|
+
|
2059 |
|
|
+#if 0
|
2060 |
|
|
+/* Data MMU group */
|
2061 |
|
|
+#define SPR_DMMUCR (SPRGROUP_DMMU + 0)
|
2062 |
|
|
+#define SPR_DTLBMR_BASE(WAY) (SPRGROUP_DMMU + 0x200 + (WAY) * 0x200)
|
2063 |
|
|
+#define SPR_DTLBMR_LAST(WAY) (SPRGROUP_DMMU + 0x2ff + (WAY) * 0x200)
|
2064 |
|
|
+#define SPR_DTLBTR_BASE(WAY) (SPRGROUP_DMMU + 0x300 + (WAY) * 0x200)
|
2065 |
|
|
+#define SPR_DTLBTR_LAST(WAY) (SPRGROUP_DMMU + 0x3ff + (WAY) * 0x200)
|
2066 |
|
|
+
|
2067 |
|
|
+/* Instruction MMU group */
|
2068 |
|
|
+#define SPR_IMMUCR (SPRGROUP_IMMU + 0)
|
2069 |
|
|
+#define SPR_ITLBMR_BASE(WAY) (SPRGROUP_IMMU + 0x200 + (WAY) * 0x200)
|
2070 |
|
|
+#define SPR_ITLBMR_LAST(WAY) (SPRGROUP_IMMU + 0x2ff + (WAY) * 0x200)
|
2071 |
|
|
+#define SPR_ITLBTR_BASE(WAY) (SPRGROUP_IMMU + 0x300 + (WAY) * 0x200)
|
2072 |
|
|
+#define SPR_ITLBTR_LAST(WAY) (SPRGROUP_IMMU + 0x3ff + (WAY) * 0x200)
|
2073 |
|
|
+#else
|
2074 |
|
|
+/* Data MMU group */
|
2075 |
|
|
+#define SPR_DMMUCR (SPRGROUP_DMMU + 0)
|
2076 |
|
|
+#define SPR_DTLBMR_BASE(WAY) (SPRGROUP_DMMU + 0x200 + (WAY) * 0x100)
|
2077 |
|
|
+#define SPR_DTLBMR_LAST(WAY) (SPRGROUP_DMMU + 0x27f + (WAY) * 0x100)
|
2078 |
|
|
+#define SPR_DTLBTR_BASE(WAY) (SPRGROUP_DMMU + 0x280 + (WAY) * 0x100)
|
2079 |
|
|
+#define SPR_DTLBTR_LAST(WAY) (SPRGROUP_DMMU + 0x2ff + (WAY) * 0x100)
|
2080 |
|
|
+
|
2081 |
|
|
+/* Instruction MMU group */
|
2082 |
|
|
+#define SPR_IMMUCR (SPRGROUP_IMMU + 0)
|
2083 |
|
|
+#define SPR_ITLBMR_BASE(WAY) (SPRGROUP_IMMU + 0x200 + (WAY) * 0x100)
|
2084 |
|
|
+#define SPR_ITLBMR_LAST(WAY) (SPRGROUP_IMMU + 0x27f + (WAY) * 0x100)
|
2085 |
|
|
+#define SPR_ITLBTR_BASE(WAY) (SPRGROUP_IMMU + 0x280 + (WAY) * 0x100)
|
2086 |
|
|
+#define SPR_ITLBTR_LAST(WAY) (SPRGROUP_IMMU + 0x2ff + (WAY) * 0x100)
|
2087 |
|
|
+#endif
|
2088 |
|
|
+
|
2089 |
|
|
+/* Data cache group */
|
2090 |
|
|
+#define SPR_DCCR (SPRGROUP_DC + 0)
|
2091 |
|
|
+#define SPR_DCBPR (SPRGROUP_DC + 1)
|
2092 |
|
|
+#define SPR_DCBFR (SPRGROUP_DC + 2)
|
2093 |
|
|
+#define SPR_DCBIR (SPRGROUP_DC + 3)
|
2094 |
|
|
+#define SPR_DCBWR (SPRGROUP_DC + 4)
|
2095 |
|
|
+#define SPR_DCBLR (SPRGROUP_DC + 5)
|
2096 |
|
|
+#define SPR_DCR_BASE(WAY) (SPRGROUP_DC + 0x200 + (WAY) * 0x200)
|
2097 |
|
|
+#define SPR_DCR_LAST(WAY) (SPRGROUP_DC + 0x3ff + (WAY) * 0x200)
|
2098 |
|
|
+
|
2099 |
|
|
+/* Instruction cache group */
|
2100 |
|
|
+#define SPR_ICCR (SPRGROUP_IC + 0)
|
2101 |
|
|
+#define SPR_ICBPR (SPRGROUP_IC + 1)
|
2102 |
|
|
+#define SPR_ICBIR (SPRGROUP_IC + 2)
|
2103 |
|
|
+#define SPR_ICBLR (SPRGROUP_IC + 3)
|
2104 |
|
|
+#define SPR_ICR_BASE(WAY) (SPRGROUP_IC + 0x200 + (WAY) * 0x200)
|
2105 |
|
|
+#define SPR_ICR_LAST(WAY) (SPRGROUP_IC + 0x3ff + (WAY) * 0x200)
|
2106 |
|
|
+
|
2107 |
|
|
+/* MAC group */
|
2108 |
|
|
+#define SPR_MACLO (SPRGROUP_MAC + 1)
|
2109 |
|
|
+#define SPR_MACHI (SPRGROUP_MAC + 2)
|
2110 |
|
|
+
|
2111 |
|
|
+/* Debug group */
|
2112 |
|
|
+#define SPR_DVR(N) (SPRGROUP_D + (N))
|
2113 |
|
|
+#define SPR_DCR(N) (SPRGROUP_D + 8 + (N))
|
2114 |
|
|
+#define SPR_DMR1 (SPRGROUP_D + 16)
|
2115 |
|
|
+#define SPR_DMR2 (SPRGROUP_D + 17)
|
2116 |
|
|
+#define SPR_DWCR0 (SPRGROUP_D + 18)
|
2117 |
|
|
+#define SPR_DWCR1 (SPRGROUP_D + 19)
|
2118 |
|
|
+#define SPR_DSR (SPRGROUP_D + 20)
|
2119 |
|
|
+#define SPR_DRR (SPRGROUP_D + 21)
|
2120 |
|
|
+#define SPR_DIR (SPRGROUP_D + 22)
|
2121 |
|
|
+
|
2122 |
|
|
+/* Performance counters group */
|
2123 |
|
|
+#define SPR_PCCR(N) (SPRGROUP_PC + (N))
|
2124 |
|
|
+#define SPR_PCMR(N) (SPRGROUP_PC + 8 + (N))
|
2125 |
|
|
+
|
2126 |
|
|
+/* Power management group */
|
2127 |
|
|
+#define SPR_PMR (SPRGROUP_PM + 0)
|
2128 |
|
|
+
|
2129 |
|
|
+/* PIC group */
|
2130 |
|
|
+#define SPR_PICMR (SPRGROUP_PIC + 0)
|
2131 |
|
|
+#define SPR_PICPR (SPRGROUP_PIC + 1)
|
2132 |
|
|
+#define SPR_PICSR (SPRGROUP_PIC + 2)
|
2133 |
|
|
+
|
2134 |
|
|
+/* Tick Timer group */
|
2135 |
|
|
+#define SPR_TTMR (SPRGROUP_TT + 0)
|
2136 |
|
|
+#define SPR_TTCR (SPRGROUP_TT + 1)
|
2137 |
|
|
+
|
2138 |
|
|
+/*
|
2139 |
|
|
+ * Bit definitions for the Version Register
|
2140 |
|
|
+ *
|
2141 |
|
|
+ */
|
2142 |
|
|
+#define SPR_VR_VER 0xffff0000 /* Processor version */
|
2143 |
|
|
+#define SPR_VR_REV 0x0000003f /* Processor revision */
|
2144 |
|
|
+
|
2145 |
|
|
+/*
|
2146 |
|
|
+ * Bit definitions for the Unit Present Register
|
2147 |
|
|
+ *
|
2148 |
|
|
+ */
|
2149 |
|
|
+#define SPR_UPR_UP 0x00000001 /* UPR present */
|
2150 |
|
|
+#define SPR_UPR_DCP 0x00000002 /* Data cache present */
|
2151 |
|
|
+#define SPR_UPR_ICP 0x00000004 /* Instruction cache present */
|
2152 |
|
|
+#define SPR_UPR_DMP 0x00000008 /* Data MMU present */
|
2153 |
|
|
+#define SPR_UPR_IMP 0x00000010 /* Instruction MMU present */
|
2154 |
|
|
+#define SPR_UPR_OB32P 0x00000020 /* ORBIS32 present */
|
2155 |
|
|
+#define SPR_UPR_OB64P 0x00000040 /* ORBIS64 present */
|
2156 |
|
|
+#define SPR_UPR_OF32P 0x00000080 /* ORFPX32 present */
|
2157 |
|
|
+#define SPR_UPR_OF64P 0x00000100 /* ORFPX64 present */
|
2158 |
|
|
+#define SPR_UPR_OV32P 0x00000200 /* ORVDX32 present */
|
2159 |
|
|
+#define SPR_UPR_OV64P 0x00000400 /* ORVDX64 present */
|
2160 |
|
|
+#define SPR_UPR_DUP 0x00000800 /* Debug unit present */
|
2161 |
|
|
+#define SPR_UPR_PCUP 0x00001000 /* Performance counters unit present */
|
2162 |
|
|
+#define SPR_UPR_PMP 0x00002000 /* Power management present */
|
2163 |
|
|
+#define SPR_UPR_PICP 0x00004000 /* PIC present */
|
2164 |
|
|
+#define SPR_UPR_TTP 0x00008000 /* Tick timer present */
|
2165 |
|
|
+#define SPR_UPR_SRP 0x00010000 /* Shadow registers present */
|
2166 |
|
|
+#define SPR_UPR_RES 0x00fe0000 /* ORVDX32 present */
|
2167 |
|
|
+#define SPR_UPR_CUST 0xff000000 /* Custom units */
|
2168 |
|
|
+
|
2169 |
|
|
+/*
|
2170 |
|
|
+ * Bit definitions for the Supervision Register
|
2171 |
|
|
+ *
|
2172 |
|
|
+ */
|
2173 |
|
|
+#define SPR_SR_CID 0xf0000000 /* Context ID */
|
2174 |
|
|
+#define SPR_SR_FO 0x00008000 /* Fixed one */
|
2175 |
|
|
+#define SPR_SR_EPH 0x00004000 /* Exception Prefixi High */
|
2176 |
|
|
+#define SPR_SR_DSX 0x00002000 /* Delay Slot Exception */
|
2177 |
|
|
+#define SPR_SR_OVE 0x00001000 /* Overflow flag Exception */
|
2178 |
|
|
+#define SPR_SR_OV 0x00000800 /* Overflow flag */
|
2179 |
|
|
+#define SPR_SR_CY 0x00000400 /* Carry flag */
|
2180 |
|
|
+#define SPR_SR_F 0x00000200 /* Condition Flag */
|
2181 |
|
|
+#define SPR_SR_CE 0x00000100 /* CID Enable */
|
2182 |
|
|
+#define SPR_SR_LEE 0x00000080 /* Little Endian Enable */
|
2183 |
|
|
+#define SPR_SR_IME 0x00000040 /* Instruction MMU Enable */
|
2184 |
|
|
+#define SPR_SR_DME 0x00000020 /* Data MMU Enable */
|
2185 |
|
|
+#define SPR_SR_ICE 0x00000010 /* Instruction Cache Enable */
|
2186 |
|
|
+#define SPR_SR_DCE 0x00000008 /* Data Cache Enable */
|
2187 |
|
|
+#define SPR_SR_IEE 0x00000004 /* Interrupt Exception Enable */
|
2188 |
|
|
+#define SPR_SR_TEE 0x00000002 /* Tick timer Exception Enable */
|
2189 |
|
|
+#define SPR_SR_SM 0x00000001 /* Supervisor Mode */
|
2190 |
|
|
+#define SPR_SR_FO_BIT 15
|
2191 |
|
|
+#define SPR_SR_EPH_BIT 14
|
2192 |
|
|
+#define SPR_SR_DSX_BIT 13
|
2193 |
|
|
+#define SPR_SR_OVE_BIT 12
|
2194 |
|
|
+#define SPR_SR_OV_BIT 11
|
2195 |
|
|
+#define SPR_SR_CY_BIT 10
|
2196 |
|
|
+#define SPR_SR_F_BIT 9
|
2197 |
|
|
+#define SPR_SR_CE_BIT 8
|
2198 |
|
|
+#define SPR_SR_LEE_BIT 7
|
2199 |
|
|
+#define SPR_SR_IME_BIT 6
|
2200 |
|
|
+#define SPR_SR_DME_BIT 5
|
2201 |
|
|
+#define SPR_SR_ICE_BIT 4
|
2202 |
|
|
+#define SPR_SR_DCE_BIT 3
|
2203 |
|
|
+#define SPR_SR_IEE_BIT 2
|
2204 |
|
|
+#define SPR_SR_TEE_BIT 1
|
2205 |
|
|
+#define SPR_SR_SM_BIT 0
|
2206 |
|
|
+
|
2207 |
|
|
+
|
2208 |
|
|
+/*
|
2209 |
|
|
+ * Bit definitions for the Data MMU Control Register
|
2210 |
|
|
+ *
|
2211 |
|
|
+ */
|
2212 |
|
|
+#define SPR_DMMUCR_P2S 0x0000003e /* Level 2 Page Size */
|
2213 |
|
|
+#define SPR_DMMUCR_P1S 0x000007c0 /* Level 1 Page Size */
|
2214 |
|
|
+#define SPR_DMMUCR_VADDR_WIDTH 0x0000f800 /* Virtual ADDR Width */
|
2215 |
|
|
+#define SPR_DMMUCR_PADDR_WIDTH 0x000f0000 /* Physical ADDR Width */
|
2216 |
|
|
+
|
2217 |
|
|
+/*
|
2218 |
|
|
+ * Bit definitions for the Instruction MMU Control Register
|
2219 |
|
|
+ *
|
2220 |
|
|
+ */
|
2221 |
|
|
+#define SPR_IMMUCR_P2S 0x0000003e /* Level 2 Page Size */
|
2222 |
|
|
+#define SPR_IMMUCR_P1S 0x000007c0 /* Level 1 Page Size */
|
2223 |
|
|
+#define SPR_IMMUCR_VADDR_WIDTH 0x0000f800 /* Virtual ADDR Width */
|
2224 |
|
|
+#define SPR_IMMUCR_PADDR_WIDTH 0x000f0000 /* Physical ADDR Width */
|
2225 |
|
|
+
|
2226 |
|
|
+/*
|
2227 |
|
|
+ * Bit definitions for the Data TLB Match Register
|
2228 |
|
|
+ *
|
2229 |
|
|
+ */
|
2230 |
|
|
+#define SPR_DTLBMR_V 0x00000001 /* Valid */
|
2231 |
|
|
+#define SPR_DTLBMR_PL1 0x00000002 /* Page Level 1 (if 0 then PL2) */
|
2232 |
|
|
+#define SPR_DTLBMR_CID 0x0000003c /* Context ID */
|
2233 |
|
|
+#define SPR_DTLBMR_LRU 0x000000c0 /* Least Recently Used */
|
2234 |
|
|
+#define SPR_DTLBMR_VPN 0xfffff000 /* Virtual Page Number */
|
2235 |
|
|
+
|
2236 |
|
|
+/*
|
2237 |
|
|
+ * Bit definitions for the Data TLB Translate Register
|
2238 |
|
|
+ *
|
2239 |
|
|
+ */
|
2240 |
|
|
+#define SPR_DTLBTR_CC 0x00000001 /* Cache Coherency */
|
2241 |
|
|
+#define SPR_DTLBTR_CI 0x00000002 /* Cache Inhibit */
|
2242 |
|
|
+#define SPR_DTLBTR_WBC 0x00000004 /* Write-Back Cache */
|
2243 |
|
|
+#define SPR_DTLBTR_WOM 0x00000008 /* Weakly-Ordered Memory */
|
2244 |
|
|
+#define SPR_DTLBTR_A 0x00000010 /* Accessed */
|
2245 |
|
|
+#define SPR_DTLBTR_D 0x00000020 /* Dirty */
|
2246 |
|
|
+#define SPR_DTLBTR_URE 0x00000040 /* User Read Enable */
|
2247 |
|
|
+#define SPR_DTLBTR_UWE 0x00000080 /* User Write Enable */
|
2248 |
|
|
+#define SPR_DTLBTR_SRE 0x00000100 /* Supervisor Read Enable */
|
2249 |
|
|
+#define SPR_DTLBTR_SWE 0x00000200 /* Supervisor Write Enable */
|
2250 |
|
|
+#define SPR_DTLBTR_PPN 0xfffff000 /* Physical Page Number */
|
2251 |
|
|
+#define DTLBTR_NO_LIMIT ( SPR_DTLBTR_URE | \
|
2252 |
|
|
+ SPR_DTLBTR_UWE | \
|
2253 |
|
|
+ SPR_DTLBTR_SRE | \
|
2254 |
|
|
+ SPR_DTLBTR_SWE )
|
2255 |
|
|
+
|
2256 |
|
|
+/*
|
2257 |
|
|
+ * Bit definitions for the Instruction TLB Match Register
|
2258 |
|
|
+ *
|
2259 |
|
|
+ */
|
2260 |
|
|
+#define SPR_ITLBMR_V 0x00000001 /* Valid */
|
2261 |
|
|
+#define SPR_ITLBMR_PL1 0x00000002 /* Page Level 1 (if 0 then PL2) */
|
2262 |
|
|
+#define SPR_ITLBMR_CID 0x0000003c /* Context ID */
|
2263 |
|
|
+#define SPR_ITLBMR_LRU 0x000000c0 /* Least Recently Used */
|
2264 |
|
|
+#define SPR_ITLBMR_VPN 0xfffff000 /* Virtual Page Number */
|
2265 |
|
|
+
|
2266 |
|
|
+/*
|
2267 |
|
|
+ * Bit definitions for the Instruction TLB Translate Register
|
2268 |
|
|
+ *
|
2269 |
|
|
+ */
|
2270 |
|
|
+#define SPR_ITLBTR_CC 0x00000001 /* Cache Coherency */
|
2271 |
|
|
+#define SPR_ITLBTR_CI 0x00000002 /* Cache Inhibit */
|
2272 |
|
|
+#define SPR_ITLBTR_WBC 0x00000004 /* Write-Back Cache */
|
2273 |
|
|
+#define SPR_ITLBTR_WOM 0x00000008 /* Weakly-Ordered Memory */
|
2274 |
|
|
+#define SPR_ITLBTR_A 0x00000010 /* Accessed */
|
2275 |
|
|
+#define SPR_ITLBTR_D 0x00000020 /* Dirty */
|
2276 |
|
|
+#define SPR_ITLBTR_SXE 0x00000040 /* User Read Enable */
|
2277 |
|
|
+#define SPR_ITLBTR_UXE 0x00000080 /* User Write Enable */
|
2278 |
|
|
+#define SPR_ITLBTR_PPN 0xfffff000 /* Physical Page Number */
|
2279 |
|
|
+#define ITLBTR_NO_LIMIT (SPR_ITLBTR_SXE | SPR_ITLBTR_UXE)
|
2280 |
|
|
+
|
2281 |
|
|
+/*
|
2282 |
|
|
+ * Bit definitions for Data Cache Control register
|
2283 |
|
|
+ *
|
2284 |
|
|
+ */
|
2285 |
|
|
+#define SPR_DCCR_EW 0x000000ff /* Enable ways */
|
2286 |
|
|
+
|
2287 |
|
|
+/*
|
2288 |
|
|
+ * Bit definitions for Insn Cache Control register
|
2289 |
|
|
+ *
|
2290 |
|
|
+ */
|
2291 |
|
|
+#define SPR_ICCR_EW 0x000000ff /* Enable ways */
|
2292 |
|
|
+
|
2293 |
|
|
+/*
|
2294 |
|
|
+ * Bit definitions for Debug Control registers
|
2295 |
|
|
+ *
|
2296 |
|
|
+ */
|
2297 |
|
|
+#define SPR_DCR_DP 0x00000001 /* DVR/DCR present */
|
2298 |
|
|
+#define SPR_DCR_CC 0x0000000e /* Compare condition */
|
2299 |
|
|
+#define SPR_DCR_SC 0x00000010 /* Signed compare */
|
2300 |
|
|
+#define SPR_DCR_CT 0x000000e0 /* Compare to */
|
2301 |
|
|
+
|
2302 |
|
|
+/*
|
2303 |
|
|
+ * Bit definitions for Debug Mode 1 register
|
2304 |
|
|
+ *
|
2305 |
|
|
+ */
|
2306 |
|
|
+#define SPR_DMR1_CW0 0x00000003 /* Chain watchpoint 0 */
|
2307 |
|
|
+#define SPR_DMR1_CW1 0x0000000c /* Chain watchpoint 1 */
|
2308 |
|
|
+#define SPR_DMR1_CW2 0x00000030 /* Chain watchpoint 2 */
|
2309 |
|
|
+#define SPR_DMR1_CW3 0x000000c0 /* Chain watchpoint 3 */
|
2310 |
|
|
+#define SPR_DMR1_CW4 0x00000300 /* Chain watchpoint 4 */
|
2311 |
|
|
+#define SPR_DMR1_CW5 0x00000c00 /* Chain watchpoint 5 */
|
2312 |
|
|
+#define SPR_DMR1_CW6 0x00003000 /* Chain watchpoint 6 */
|
2313 |
|
|
+#define SPR_DMR1_CW7 0x0000c000 /* Chain watchpoint 7 */
|
2314 |
|
|
+#define SPR_DMR1_CW8 0x00030000 /* Chain watchpoint 8 */
|
2315 |
|
|
+#define SPR_DMR1_CW9 0x000c0000 /* Chain watchpoint 9 */
|
2316 |
|
|
+#define SPR_DMR1_CW10 0x00300000 /* Chain watchpoint 10 */
|
2317 |
|
|
+#define SPR_DMR1_ST 0x00400000 /* Single-step trace*/
|
2318 |
|
|
+#define SPR_DMR1_BT 0x00800000 /* Branch trace */
|
2319 |
|
|
+#define SPR_DMR1_DXFW 0x01000000 /* Disable external force watchpoint */
|
2320 |
|
|
+
|
2321 |
|
|
+/*
|
2322 |
|
|
+ * Bit definitions for Debug Mode 2 register
|
2323 |
|
|
+ *
|
2324 |
|
|
+ */
|
2325 |
|
|
+#define SPR_DMR2_WCE0 0x00000001 /* Watchpoint counter 0 enable */
|
2326 |
|
|
+#define SPR_DMR2_WCE1 0x00000002 /* Watchpoint counter 0 enable */
|
2327 |
|
|
+#define SPR_DMR2_AWTC 0x00001ffc /* Assign watchpoints to counters */
|
2328 |
|
|
+#define SPR_DMR2_WGB 0x00ffe000 /* Watchpoints generating breakpoint */
|
2329 |
|
|
+
|
2330 |
|
|
+/*
|
2331 |
|
|
+ * Bit definitions for Debug watchpoint counter registers
|
2332 |
|
|
+ *
|
2333 |
|
|
+ */
|
2334 |
|
|
+#define SPR_DWCR_COUNT 0x0000ffff /* Count */
|
2335 |
|
|
+#define SPR_DWCR_MATCH 0xffff0000 /* Match */
|
2336 |
|
|
+
|
2337 |
|
|
+/*
|
2338 |
|
|
+ * Bit definitions for Debug stop register
|
2339 |
|
|
+ *
|
2340 |
|
|
+ */
|
2341 |
|
|
+#define SPR_DSR_RSTE 0x00000001 /* Reset exception */
|
2342 |
|
|
+#define SPR_DSR_BUSEE 0x00000002 /* Bus error exception */
|
2343 |
|
|
+#define SPR_DSR_DPFE 0x00000004 /* Data Page Fault exception */
|
2344 |
|
|
+#define SPR_DSR_IPFE 0x00000008 /* Insn Page Fault exception */
|
2345 |
|
|
+#define SPR_DSR_LPINTE 0x00000010 /* Low priority interrupt exception */
|
2346 |
|
|
+#define SPR_DSR_AE 0x00000020 /* Alignment exception */
|
2347 |
|
|
+#define SPR_DSR_IIE 0x00000040 /* Illegal Instruction exception */
|
2348 |
|
|
+#define SPR_DSR_HPINTE 0x00000080 /* High priority interrupt exception */
|
2349 |
|
|
+#define SPR_DSR_DME 0x00000100 /* DTLB miss exception */
|
2350 |
|
|
+#define SPR_DSR_IME 0x00000200 /* ITLB miss exception */
|
2351 |
|
|
+#define SPR_DSR_RE 0x00000400 /* Range exception */
|
2352 |
|
|
+#define SPR_DSR_SCE 0x00000800 /* System call exception */
|
2353 |
|
|
+#define SPR_DSR_BE 0x00001000 /* Breakpoint exception */
|
2354 |
|
|
+
|
2355 |
|
|
+/*
|
2356 |
|
|
+ * Bit definitions for Debug reason register
|
2357 |
|
|
+ *
|
2358 |
|
|
+ */
|
2359 |
|
|
+#define SPR_DRR_RSTE 0x00000001 /* Reset exception */
|
2360 |
|
|
+#define SPR_DRR_BUSEE 0x00000002 /* Bus error exception */
|
2361 |
|
|
+#define SPR_DRR_DPFE 0x00000004 /* Data Page Fault exception */
|
2362 |
|
|
+#define SPR_DRR_IPFE 0x00000008 /* Insn Page Fault exception */
|
2363 |
|
|
+#define SPR_DRR_LPINTE 0x00000010 /* Low priority interrupt exception */
|
2364 |
|
|
+#define SPR_DRR_AE 0x00000020 /* Alignment exception */
|
2365 |
|
|
+#define SPR_DRR_IIE 0x00000040 /* Illegal Instruction exception */
|
2366 |
|
|
+#define SPR_DRR_HPINTE 0x00000080 /* High priority interrupt exception */
|
2367 |
|
|
+#define SPR_DRR_DME 0x00000100 /* DTLB miss exception */
|
2368 |
|
|
+#define SPR_DRR_IME 0x00000200 /* ITLB miss exception */
|
2369 |
|
|
+#define SPR_DRR_RE 0x00000400 /* Range exception */
|
2370 |
|
|
+#define SPR_DRR_SCE 0x00000800 /* System call exception */
|
2371 |
|
|
+#define SPR_DRR_BE 0x00001000 /* Breakpoint exception */
|
2372 |
|
|
+
|
2373 |
|
|
+/*
|
2374 |
|
|
+ * Bit definitions for Performance counters mode registers
|
2375 |
|
|
+ *
|
2376 |
|
|
+ */
|
2377 |
|
|
+#define SPR_PCMR_CP 0x00000001 /* Counter present */
|
2378 |
|
|
+#define SPR_PCMR_UMRA 0x00000002 /* User mode read access */
|
2379 |
|
|
+#define SPR_PCMR_CISM 0x00000004 /* Count in supervisor mode */
|
2380 |
|
|
+#define SPR_PCMR_CIUM 0x00000008 /* Count in user mode */
|
2381 |
|
|
+#define SPR_PCMR_LA 0x00000010 /* Load access event */
|
2382 |
|
|
+#define SPR_PCMR_SA 0x00000020 /* Store access event */
|
2383 |
|
|
+#define SPR_PCMR_IF 0x00000040 /* Instruction fetch event*/
|
2384 |
|
|
+#define SPR_PCMR_DCM 0x00000080 /* Data cache miss event */
|
2385 |
|
|
+#define SPR_PCMR_ICM 0x00000100 /* Insn cache miss event */
|
2386 |
|
|
+#define SPR_PCMR_IFS 0x00000200 /* Insn fetch stall event */
|
2387 |
|
|
+#define SPR_PCMR_LSUS 0x00000400 /* LSU stall event */
|
2388 |
|
|
+#define SPR_PCMR_BS 0x00000800 /* Branch stall event */
|
2389 |
|
|
+#define SPR_PCMR_DTLBM 0x00001000 /* DTLB miss event */
|
2390 |
|
|
+#define SPR_PCMR_ITLBM 0x00002000 /* ITLB miss event */
|
2391 |
|
|
+#define SPR_PCMR_DDS 0x00004000 /* Data dependency stall event */
|
2392 |
|
|
+#define SPR_PCMR_WPE 0x03ff8000 /* Watchpoint events */
|
2393 |
|
|
+
|
2394 |
|
|
+/*
|
2395 |
|
|
+ * Bit definitions for the Power management register
|
2396 |
|
|
+ *
|
2397 |
|
|
+ */
|
2398 |
|
|
+#define SPR_PMR_SDF 0x00000001 /* Slow down factor */
|
2399 |
|
|
+#define SPR_PMR_DME 0x00000002 /* Doze mode enable */
|
2400 |
|
|
+#define SPR_PMR_SME 0x00000004 /* Sleep mode enable */
|
2401 |
|
|
+#define SPR_PMR_DCGE 0x00000008 /* Dynamic clock gating enable */
|
2402 |
|
|
+#define SPR_PMR_SUME 0x00000010 /* Suspend mode enable */
|
2403 |
|
|
+
|
2404 |
|
|
+/*
|
2405 |
|
|
+ * Bit definitions for PICMR
|
2406 |
|
|
+ *
|
2407 |
|
|
+ */
|
2408 |
|
|
+#define SPR_PICMR_IUM 0xfffffffc /* Interrupt unmask */
|
2409 |
|
|
+
|
2410 |
|
|
+/*
|
2411 |
|
|
+ * Bit definitions for PICPR
|
2412 |
|
|
+ *
|
2413 |
|
|
+ */
|
2414 |
|
|
+#define SPR_PICPR_IPRIO 0xfffffffc /* Interrupt priority */
|
2415 |
|
|
+
|
2416 |
|
|
+/*
|
2417 |
|
|
+ * Bit definitions for PICSR
|
2418 |
|
|
+ *
|
2419 |
|
|
+ */
|
2420 |
|
|
+#define SPR_PICSR_IS 0xffffffff /* Interrupt status */
|
2421 |
|
|
+
|
2422 |
|
|
+/*
|
2423 |
|
|
+ * Bit definitions for Tick Timer Control Register
|
2424 |
|
|
+ *
|
2425 |
|
|
+ */
|
2426 |
|
|
+#define SPR_TTCR_PERIOD 0x0fffffff /* Time Period */
|
2427 |
|
|
+#define SPR_TTMR_PERIOD SPR_TTCR_PERIOD
|
2428 |
|
|
+#define SPR_TTMR_IP 0x10000000 /* Interrupt Pending */
|
2429 |
|
|
+#define SPR_TTMR_IE 0x20000000 /* Interrupt Enable */
|
2430 |
|
|
+#define SPR_TTMR_RT 0x40000000 /* Restart tick */
|
2431 |
|
|
+#define SPR_TTMR_SR 0x80000000 /* Single run */
|
2432 |
|
|
+#define SPR_TTMR_CR 0xc0000000 /* Continuous run */
|
2433 |
|
|
+#define SPR_TTMR_M 0xc0000000 /* Tick mode */
|
2434 |
|
|
+
|
2435 |
|
|
+#endif
|
2436 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/string.h u-boot-2009.03/include/asm-or1200/string.h
|
2437 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/string.h 1969-12-31 16:00:00.000000000 -0800
|
2438 |
|
|
+++ u-boot-2009.03/include/asm-or1200/string.h 2008-07-02 09:36:02.312500000 -0700
|
2439 |
|
|
@@ -0,0 +1,18 @@
|
2440 |
|
|
+#ifndef _OR32_STRING_H
|
2441 |
|
|
+#define _OR32_STRING_H
|
2442 |
|
|
+
|
2443 |
|
|
+
|
2444 |
|
|
+/* __PHX_TODO__: these are optimizations, will do later */
|
2445 |
|
|
+#if 0
|
2446 |
|
|
+
|
2447 |
|
|
+#define __HAVE_ARCH_MEMCPY
|
2448 |
|
|
+extern void *memcpy(void *, const void *, size_t);
|
2449 |
|
|
+
|
2450 |
|
|
+/* New and improved. In arch/cris/lib/memset.c */
|
2451 |
|
|
+
|
2452 |
|
|
+#define __HAVE_ARCH_MEMSET
|
2453 |
|
|
+extern void *memset(void *, int, size_t);
|
2454 |
|
|
+
|
2455 |
|
|
+#endif
|
2456 |
|
|
+
|
2457 |
|
|
+#endif
|
2458 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/system.h u-boot-2009.03/include/asm-or1200/system.h
|
2459 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/system.h 1969-12-31 16:00:00.000000000 -0800
|
2460 |
|
|
+++ u-boot-2009.03/include/asm-or1200/system.h 2008-07-02 09:36:02.312500000 -0700
|
2461 |
|
|
@@ -0,0 +1,124 @@
|
2462 |
|
|
+/*
|
2463 |
|
|
+ * Based on:
|
2464 |
|
|
+ * include/asm-ppc/system.h
|
2465 |
|
|
+ * Copyright (C) 1999 Cort Dougan
|
2466 |
|
|
+ */
|
2467 |
|
|
+#ifndef __OR32_SYSTEM_H
|
2468 |
|
|
+#define __OR32_SYSTEM_H
|
2469 |
|
|
+
|
2470 |
|
|
+#include
|
2471 |
|
|
+
|
2472 |
|
|
+/* Memory bariers */
|
2473 |
|
|
+#define barrier() __asm__ __volatile__("": : :"memory")
|
2474 |
|
|
+#define mb() barrier()
|
2475 |
|
|
+#define rmb() mb()
|
2476 |
|
|
+#define wmb() mb()
|
2477 |
|
|
+#define read_barrier_depends() do { } while(0)
|
2478 |
|
|
+#define set_mb(var, value) do { var = value; mb(); } while (0)
|
2479 |
|
|
+#define set_wmb(var, value) do { var = value; wmb(); } while (0)
|
2480 |
|
|
+
|
2481 |
|
|
+#ifdef CONFIG_SMP
|
2482 |
|
|
+#define smp_mb() mb()
|
2483 |
|
|
+#define smp_rmb() rmb()
|
2484 |
|
|
+#define smp_wmb() wmb()
|
2485 |
|
|
+#define smp_read_barrier_depends() read_barrier_depends()
|
2486 |
|
|
+#else
|
2487 |
|
|
+#define smp_mb() barrier()
|
2488 |
|
|
+#define smp_rmb() barrier()
|
2489 |
|
|
+#define smp_wmb() barrier()
|
2490 |
|
|
+#define smp_read_barrier_depends() do { } while(0)
|
2491 |
|
|
+#endif
|
2492 |
|
|
+
|
2493 |
|
|
+#define nop() __asm__ __volatile__ ("l.nop"::)
|
2494 |
|
|
+
|
2495 |
|
|
+#ifdef __KERNEL__
|
2496 |
|
|
+
|
2497 |
|
|
+struct task_struct;
|
2498 |
|
|
+extern unsigned int rtas_data;
|
2499 |
|
|
+struct pt_regs;
|
2500 |
|
|
+
|
2501 |
|
|
+extern void show_regs(struct pt_regs * regs);
|
2502 |
|
|
+
|
2503 |
|
|
+extern void __save_flags(unsigned long *flags);
|
2504 |
|
|
+extern void __restore_flags(unsigned long flags);
|
2505 |
|
|
+extern void __save_and_cli(unsigned long *flags);
|
2506 |
|
|
+extern void __sti(void);
|
2507 |
|
|
+extern void __cli(void);
|
2508 |
|
|
+
|
2509 |
|
|
+
|
2510 |
|
|
+#define local_irq_disable() __cli()
|
2511 |
|
|
+#define local_irq_enable() __sti()
|
2512 |
|
|
+#define local_irq_save(flags) __save_and_cli(&(flags))
|
2513 |
|
|
+#define local_irq_restore(flags) __restore_flags(flags)
|
2514 |
|
|
+#define local_save_flags(flags) __save_flags(&(flags))
|
2515 |
|
|
+
|
2516 |
|
|
+#define prepare_to_switch() do { } while(0)
|
2517 |
|
|
+#define switch_to(prev,next,last) _switch_to((prev),(next),&(last))
|
2518 |
|
|
+
|
2519 |
|
|
+extern void _switch_to(struct task_struct *, struct task_struct *,
|
2520 |
|
|
+ struct task_struct **);
|
2521 |
|
|
+
|
2522 |
|
|
+struct __xchg_dummy { unsigned long a[100]; };
|
2523 |
|
|
+#define __xg(x) ((volatile struct __xchg_dummy *)(x))
|
2524 |
|
|
+#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
|
2525 |
|
|
+#define tas(ptr) (xchg((ptr),1))
|
2526 |
|
|
+
|
2527 |
|
|
+static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
|
2528 |
|
|
+{
|
2529 |
|
|
+ unsigned long tmp, flags;
|
2530 |
|
|
+
|
2531 |
|
|
+ local_irq_save(flags);
|
2532 |
|
|
+
|
2533 |
|
|
+ switch (size) {
|
2534 |
|
|
+ case 1:
|
2535 |
|
|
+ __asm__ __volatile__
|
2536 |
|
|
+ ("l.lbz %0,%2\n\t"
|
2537 |
|
|
+ "l.sb %2,%1"
|
2538 |
|
|
+ : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory");
|
2539 |
|
|
+ break;
|
2540 |
|
|
+ case 2:
|
2541 |
|
|
+ __asm__ __volatile__
|
2542 |
|
|
+ ("l.lhz %0,%2\n\t"
|
2543 |
|
|
+ "l.sh %2,%1"
|
2544 |
|
|
+ : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory");
|
2545 |
|
|
+ break;
|
2546 |
|
|
+ case 4:
|
2547 |
|
|
+ __asm__ __volatile__
|
2548 |
|
|
+ ("l.lwz %0,%2\n\t"
|
2549 |
|
|
+ "l.sw %2,%1"
|
2550 |
|
|
+ : "=&r" (tmp) : "r" (x), "m" (*__xg(ptr)) : "memory");
|
2551 |
|
|
+ break;
|
2552 |
|
|
+ }
|
2553 |
|
|
+
|
2554 |
|
|
+ local_irq_restore(flags);
|
2555 |
|
|
+ return tmp;
|
2556 |
|
|
+}
|
2557 |
|
|
+
|
2558 |
|
|
+extern inline void * xchg_ptr(void * m, void * val)
|
2559 |
|
|
+{
|
2560 |
|
|
+ return (void *) __xchg((unsigned long)m, val, sizeof(unsigned long));
|
2561 |
|
|
+}
|
2562 |
|
|
+
|
2563 |
|
|
+static inline void mtspr(unsigned long add, unsigned long val)
|
2564 |
|
|
+{
|
2565 |
|
|
+ __asm__ __volatile__ ("l.mtspr %0,%1,0" :: "r" (add), "r" (val));
|
2566 |
|
|
+}
|
2567 |
|
|
+
|
2568 |
|
|
+static inline unsigned long mfspr(unsigned long add)
|
2569 |
|
|
+{
|
2570 |
|
|
+ unsigned long ret;
|
2571 |
|
|
+ __asm__ __volatile__ ("l.mfspr %0,%1,0" : "=r" (ret) : "r" (add));
|
2572 |
|
|
+ return ret;
|
2573 |
|
|
+}
|
2574 |
|
|
+
|
2575 |
|
|
+#define irqs_disabled() ((mfspr(SPR_SR) & (SPR_SR_IEE | SPR_SR_TEE)) == 0)
|
2576 |
|
|
+
|
2577 |
|
|
+#define arch_align_stack(x) (x)
|
2578 |
|
|
+
|
2579 |
|
|
+/*
|
2580 |
|
|
+ * debugging aid
|
2581 |
|
|
+ */
|
2582 |
|
|
+extern void __print(const char *fmt, ...);
|
2583 |
|
|
+
|
2584 |
|
|
+#endif /* __KERNEL__ */
|
2585 |
|
|
+#endif /* __OR32_SYSTEM_H */
|
2586 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/types.h u-boot-2009.03/include/asm-or1200/types.h
|
2587 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/types.h 1969-12-31 16:00:00.000000000 -0800
|
2588 |
|
|
+++ u-boot-2009.03/include/asm-or1200/types.h 2008-08-26 18:29:36.849449500 -0700
|
2589 |
|
|
@@ -0,0 +1,62 @@
|
2590 |
|
|
+#ifndef _ETRAX_TYPES_H
|
2591 |
|
|
+#define _ETRAX_TYPES_H
|
2592 |
|
|
+
|
2593 |
|
|
+#ifndef __ASSEMBLY__
|
2594 |
|
|
+
|
2595 |
|
|
+typedef unsigned short umode_t;
|
2596 |
|
|
+
|
2597 |
|
|
+/*
|
2598 |
|
|
+ * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
|
2599 |
|
|
+ * header files exported to user space
|
2600 |
|
|
+ */
|
2601 |
|
|
+/*typedef unsigned atomic_long_t;RGD I don't get this now using generic*/
|
2602 |
|
|
+typedef __signed__ char __s8;
|
2603 |
|
|
+typedef unsigned char __u8;
|
2604 |
|
|
+
|
2605 |
|
|
+typedef __signed__ short __s16;
|
2606 |
|
|
+typedef unsigned short __u16;
|
2607 |
|
|
+
|
2608 |
|
|
+typedef __signed__ int __s32;
|
2609 |
|
|
+typedef unsigned int __u32;
|
2610 |
|
|
+
|
2611 |
|
|
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
2612 |
|
|
+typedef __signed__ long long __s64;
|
2613 |
|
|
+typedef unsigned long long __u64;
|
2614 |
|
|
+#endif
|
2615 |
|
|
+
|
2616 |
|
|
+#endif /* __ASSEMBLY__ */
|
2617 |
|
|
+
|
2618 |
|
|
+/*
|
2619 |
|
|
+ * These aren't exported outside the kernel to avoid name space clashes
|
2620 |
|
|
+ */
|
2621 |
|
|
+#ifdef __KERNEL__
|
2622 |
|
|
+
|
2623 |
|
|
+#define BITS_PER_LONG 32
|
2624 |
|
|
+
|
2625 |
|
|
+#ifndef __ASSEMBLY__
|
2626 |
|
|
+
|
2627 |
|
|
+typedef signed char s8;
|
2628 |
|
|
+typedef unsigned char u8;
|
2629 |
|
|
+
|
2630 |
|
|
+typedef signed short s16;
|
2631 |
|
|
+typedef unsigned short u16;
|
2632 |
|
|
+
|
2633 |
|
|
+typedef signed int s32;
|
2634 |
|
|
+typedef unsigned int u32;
|
2635 |
|
|
+
|
2636 |
|
|
+typedef signed long long s64;
|
2637 |
|
|
+typedef unsigned long long u64;
|
2638 |
|
|
+
|
2639 |
|
|
+/* Dma addresses are 32-bits wide, just like our other addresses. */
|
2640 |
|
|
+
|
2641 |
|
|
+typedef u32 dma_addr_t;
|
2642 |
|
|
+typedef u32 dma64_addr_t;
|
2643 |
|
|
+
|
2644 |
|
|
+typedef unsigned long phys_addr_t;
|
2645 |
|
|
+typedef unsigned long phys_size_t;
|
2646 |
|
|
+
|
2647 |
|
|
+#endif /* __ASSEMBLY__ */
|
2648 |
|
|
+
|
2649 |
|
|
+#endif /* __KERNEL__ */
|
2650 |
|
|
+
|
2651 |
|
|
+#endif
|
2652 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/asm-or1200/u-boot.h u-boot-2009.03/include/asm-or1200/u-boot.h
|
2653 |
|
|
--- u-boot-2009.03_orig/include/asm-or1200/u-boot.h 1969-12-31 16:00:00.000000000 -0800
|
2654 |
|
|
+++ u-boot-2009.03/include/asm-or1200/u-boot.h 2008-09-05 09:57:00.265625000 -0700
|
2655 |
|
|
@@ -0,0 +1,53 @@
|
2656 |
|
|
+/*
|
2657 |
|
|
+ * (C) Copyright 2004 Atmark Techno, Inc.
|
2658 |
|
|
+ *
|
2659 |
|
|
+ * Yasushi SHOJI
|
2660 |
|
|
+ *
|
2661 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
2662 |
|
|
+ * project.
|
2663 |
|
|
+ *
|
2664 |
|
|
+ * This program is free software; you can redistribute it and/or
|
2665 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
2666 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
2667 |
|
|
+ * the License, or (at your option) any later version.
|
2668 |
|
|
+ *
|
2669 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
2670 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2671 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2672 |
|
|
+ * GNU General Public License for more details.
|
2673 |
|
|
+ *
|
2674 |
|
|
+ * You should have received a copy of the GNU General Public License
|
2675 |
|
|
+ * along with this program; if not, write to the Free Software
|
2676 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
2677 |
|
|
+ * MA 02111-1307 USA
|
2678 |
|
|
+ *
|
2679 |
|
|
+ ********************************************************************
|
2680 |
|
|
+ * NOTE: This header file defines an interface to U-Boot. Including
|
2681 |
|
|
+ * this (unmodified) header file in another file is considered normal
|
2682 |
|
|
+ * use of U-Boot, and does *not* fall under the heading of "derived
|
2683 |
|
|
+ * work".
|
2684 |
|
|
+ ********************************************************************
|
2685 |
|
|
+ */
|
2686 |
|
|
+
|
2687 |
|
|
+#ifndef _U_BOOT_H_
|
2688 |
|
|
+#define _U_BOOT_H_
|
2689 |
|
|
+
|
2690 |
|
|
+typedef struct bd_info {
|
2691 |
|
|
+ unsigned long bi_boot_params; /* start of DRAM memory */
|
2692 |
|
|
+ unsigned long bi_memstart; /* start of DRAM memory */
|
2693 |
|
|
+ unsigned long bi_memsize; /* size of DRAM memory in bytes */
|
2694 |
|
|
+ unsigned long bi_flashstart; /* start of FLASH memory */
|
2695 |
|
|
+ unsigned long bi_flashsize; /* size of FLASH memory */
|
2696 |
|
|
+ unsigned long bi_flashoffset; /* reserved area for startup monitor */
|
2697 |
|
|
+ unsigned long bi_sramstart; /* start of SRAM memory */
|
2698 |
|
|
+ unsigned long bi_sramsize; /* size of SRAM memory */
|
2699 |
|
|
+ unsigned long bi_ip_addr; /* IP Address */
|
2700 |
|
|
+ unsigned char bi_enetaddr[6]; /* Ethernet adress */
|
2701 |
|
|
+ unsigned long bi_baudrate; /* Console Baudrate */
|
2702 |
|
|
+ unsigned long post_code;
|
2703 |
|
|
+} bd_t;
|
2704 |
|
|
+
|
2705 |
|
|
+
|
2706 |
|
|
+#endif /* _U_BOOT_H_ */
|
2707 |
|
|
+
|
2708 |
|
|
+
|
2709 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/configs/Dev_Kit_060804.h u-boot-2009.03/include/configs/Dev_Kit_060804.h
|
2710 |
|
|
--- u-boot-2009.03_orig/include/configs/Dev_Kit_060804.h 1969-12-31 16:00:00.000000000 -0800
|
2711 |
|
|
+++ u-boot-2009.03/include/configs/Dev_Kit_060804.h 2009-03-03 14:14:42.654084000 -0800
|
2712 |
|
|
@@ -0,0 +1,152 @@
|
2713 |
|
|
+/*
|
2714 |
|
|
+ * (C) Copyright 2003
|
2715 |
|
|
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
2716 |
|
|
+ *
|
2717 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
2718 |
|
|
+ * project.
|
2719 |
|
|
+ *
|
2720 |
|
|
+ * This program is free software; you can redistribute it and/or
|
2721 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
2722 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
2723 |
|
|
+ * the License, or (at your option) any later version.
|
2724 |
|
|
+ *
|
2725 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
2726 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2727 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2728 |
|
|
+ * GNU General Public License for more details.
|
2729 |
|
|
+ *
|
2730 |
|
|
+ * You should have received a copy of the GNU General Public License
|
2731 |
|
|
+ * along with this program; if not, write to the Free Software
|
2732 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
2733 |
|
|
+ * MA 02111-1307 USA
|
2734 |
|
|
+ */
|
2735 |
|
|
+
|
2736 |
|
|
+/*
|
2737 |
|
|
+ * This file contains the configuration parameters for the dbau1x00 board.
|
2738 |
|
|
+ */
|
2739 |
|
|
+
|
2740 |
|
|
+#ifndef __CONFIG_H
|
2741 |
|
|
+#define __CONFIG_H
|
2742 |
|
|
+
|
2743 |
|
|
+
|
2744 |
|
|
+/*-----------------------------------------------------------------------
|
2745 |
|
|
+ * misc configuration.
|
2746 |
|
|
+ */
|
2747 |
|
|
+
|
2748 |
|
|
+#undef CONFIG_BZIP2
|
2749 |
|
|
+
|
2750 |
|
|
+#undef CONFIG_WATCHDOG
|
2751 |
|
|
+
|
2752 |
|
|
+#define CFG_MHZ 24
|
2753 |
|
|
+#define CFG_HZ (CFG_MHZ * 1000000)
|
2754 |
|
|
+
|
2755 |
|
|
+
|
2756 |
|
|
+/*-----------------------------------------------------------------------
|
2757 |
|
|
+ * Command line configuration.
|
2758 |
|
|
+ */
|
2759 |
|
|
+#include
|
2760 |
|
|
+
|
2761 |
|
|
+#undef CONFIG_CMD_AUTOSCRIPT /* Autoscript Support */
|
2762 |
|
|
+#undef CONFIG_CMD_BDI /* bdinfo */
|
2763 |
|
|
+#undef CONFIG_CMD_BOOTD /* bootd */
|
2764 |
|
|
+// #undef CONFIG_CMD_CONSOLE /* coninfo */
|
2765 |
|
|
+#undef CONFIG_CMD_ECHO /* echo arguments */
|
2766 |
|
|
+#undef CONFIG_CMD_ENV /* saveenv */
|
2767 |
|
|
+#undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
|
2768 |
|
|
+#undef CONFIG_CMD_FPGA /* FPGA configuration Support */
|
2769 |
|
|
+#undef CONFIG_CMD_IMI /* iminfo */
|
2770 |
|
|
+#undef CONFIG_CMD_IMLS /* List all found images */
|
2771 |
|
|
+#undef CONFIG_CMD_ITEST /* Integer (and string) test */
|
2772 |
|
|
+#undef CONFIG_CMD_LOADB /* loadb */
|
2773 |
|
|
+#undef CONFIG_CMD_LOADS /* loads */
|
2774 |
|
|
+// #undef CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop mtest */
|
2775 |
|
|
+#undef CONFIG_CMD_MISC /* Misc functions like sleep etc*/
|
2776 |
|
|
+#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
|
2777 |
|
|
+#undef CONFIG_CMD_NFS /* NFS support */
|
2778 |
|
|
+#undef CONFIG_CMD_RUN /* run command in env variable */
|
2779 |
|
|
+#undef CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
|
2780 |
|
|
+#undef CONFIG_CMD_XIMG /* Load part of Multi Image */
|
2781 |
|
|
+
|
2782 |
|
|
+
|
2783 |
|
|
+/*-----------------------------------------------------------------------
|
2784 |
|
|
+ * environment data configuration.
|
2785 |
|
|
+ */
|
2786 |
|
|
+#define CFG_ENV_IS_NOWHERE
|
2787 |
|
|
+#define CFG_ENV_SIZE 1024
|
2788 |
|
|
+#define CFG_NO_FLASH
|
2789 |
|
|
+
|
2790 |
|
|
+
|
2791 |
|
|
+/*-----------------------------------------------------------------------
|
2792 |
|
|
+ * boot configuration.
|
2793 |
|
|
+ */
|
2794 |
|
|
+#undef CONFIG_BOOTARGS
|
2795 |
|
|
+
|
2796 |
|
|
+#define CONFIG_BOOTDELAY 10 /* autoboot after 10 seconds */
|
2797 |
|
|
+#define CONFIG_TIMESTAMP /* Print image info with timestamp */
|
2798 |
|
|
+#define CFG_LOAD_ADDR 0x81000000 /* default load address */
|
2799 |
|
|
+
|
2800 |
|
|
+
|
2801 |
|
|
+/*-----------------------------------------------------------------------
|
2802 |
|
|
+ * Console configuration.
|
2803 |
|
|
+ */
|
2804 |
|
|
+#define CFG_PROMPT "Dev_Kit_060804 # " /* Monitor Command Prompt */
|
2805 |
|
|
+
|
2806 |
|
|
+#define CONFIG_AUTO_COMPLETE
|
2807 |
|
|
+#define CONFIG_CMDLINE_EDITING
|
2808 |
|
|
+
|
2809 |
|
|
+// #define CFG_HUSH_PARSER
|
2810 |
|
|
+// #define CFG_PROMPT_HUSH_PS2 "> "
|
2811 |
|
|
+
|
2812 |
|
|
+#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
|
2813 |
|
|
+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
|
2814 |
|
|
+#define CFG_MAXARGS 16 /* max number of command args*/
|
2815 |
|
|
+
|
2816 |
|
|
+
|
2817 |
|
|
+/*-----------------------------------------------------------------------
|
2818 |
|
|
+ * Start addresses for the final memory configuration
|
2819 |
|
|
+ * (Set up by the startup code)
|
2820 |
|
|
+ * Please note that CFG_SDRAM_BASE _must_ start at 0
|
2821 |
|
|
+ */
|
2822 |
|
|
+#define CFG_SDRAM_BASE 0x30000000
|
2823 |
|
|
+#define CFG_SDRAM_SIZE 0x00020000
|
2824 |
|
|
+#define CFG_FLASH_BASE 0x20000000
|
2825 |
|
|
+#define CFG_FLASH_SIZE 0x00400000
|
2826 |
|
|
+
|
2827 |
|
|
+#define CFG_MEMTEST_START CFG_SDRAM_BASE
|
2828 |
|
|
+#define CFG_MEMTEST_END (CFG_SDRAM_BASE + CFG_SDRAM_SIZE)
|
2829 |
|
|
+
|
2830 |
|
|
+#define CFG_MALLOC_BASE 0x30010000
|
2831 |
|
|
+#define CFG_MALLOC_LEN 32*1024
|
2832 |
|
|
+
|
2833 |
|
|
+
|
2834 |
|
|
+/*-----------------------------------------------------------------------
|
2835 |
|
|
+ * Definitions for initial stack pointer and data area
|
2836 |
|
|
+ */
|
2837 |
|
|
+
|
2838 |
|
|
+#define CFG_INIT_RAM_ADDR 0x30000000 /* inside of SDRAM */
|
2839 |
|
|
+#define CFG_INIT_RAM_END (CFG_INIT_RAM_ADDR + CFG_SDRAM_SIZE) /* End of used area in RAM */
|
2840 |
|
|
+#define CFG_INIT_DATA_SIZE 128 /* size in bytes reserved for initial data */
|
2841 |
|
|
+#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_INIT_DATA_SIZE)
|
2842 |
|
|
+#define CFG_INIT_SP_OFFSET CFG_GBL_DATA_OFFSET
|
2843 |
|
|
+
|
2844 |
|
|
+
|
2845 |
|
|
+/*-----------------------------------------------------------------------
|
2846 |
|
|
+ * serial port configuration.
|
2847 |
|
|
+ */
|
2848 |
|
|
+#define CFG_NS16550
|
2849 |
|
|
+#define CFG_NS16550_SERIAL
|
2850 |
|
|
+#define CFG_NS16550_REG_SIZE 1
|
2851 |
|
|
+#define CFG_NS16550_CLK CFG_HZ
|
2852 |
|
|
+#define CFG_NS16550_COM1 (0x50000000)
|
2853 |
|
|
+#define CONFIG_CONS_INDEX 1
|
2854 |
|
|
+
|
2855 |
|
|
+#define CONFIG_BAUDRATE 57600
|
2856 |
|
|
+#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
|
2857 |
|
|
+
|
2858 |
|
|
+
|
2859 |
|
|
+/*-----------------------------------------------------------------------
|
2860 |
|
|
+ * qaz debug
|
2861 |
|
|
+ */
|
2862 |
|
|
+
|
2863 |
|
|
+
|
2864 |
|
|
+#endif /* __CONFIG_H */
|
2865 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/configs/de1_or1k.h u-boot-2009.03/include/configs/de1_or1k.h
|
2866 |
|
|
--- u-boot-2009.03_orig/include/configs/de1_or1k.h 1969-12-31 16:00:00.000000000 -0800
|
2867 |
|
|
+++ u-boot-2009.03/include/configs/de1_or1k.h 2009-03-25 17:39:02.660456000 -0700
|
2868 |
|
|
@@ -0,0 +1,154 @@
|
2869 |
|
|
+/*
|
2870 |
|
|
+ * (C) Copyright 2003
|
2871 |
|
|
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
2872 |
|
|
+ *
|
2873 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
2874 |
|
|
+ * project.
|
2875 |
|
|
+ *
|
2876 |
|
|
+ * This program is free software; you can redistribute it and/or
|
2877 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
2878 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
2879 |
|
|
+ * the License, or (at your option) any later version.
|
2880 |
|
|
+ *
|
2881 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
2882 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2883 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2884 |
|
|
+ * GNU General Public License for more details.
|
2885 |
|
|
+ *
|
2886 |
|
|
+ * You should have received a copy of the GNU General Public License
|
2887 |
|
|
+ * along with this program; if not, write to the Free Software
|
2888 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
2889 |
|
|
+ * MA 02111-1307 USA
|
2890 |
|
|
+ */
|
2891 |
|
|
+
|
2892 |
|
|
+/*
|
2893 |
|
|
+ *
|
2894 |
|
|
+ */
|
2895 |
|
|
+
|
2896 |
|
|
+#ifndef __CONFIG_H
|
2897 |
|
|
+#define __CONFIG_H
|
2898 |
|
|
+
|
2899 |
|
|
+
|
2900 |
|
|
+/*-----------------------------------------------------------------------
|
2901 |
|
|
+ * misc configuration.
|
2902 |
|
|
+ */
|
2903 |
|
|
+
|
2904 |
|
|
+#undef CONFIG_BZIP2
|
2905 |
|
|
+
|
2906 |
|
|
+#undef CONFIG_WATCHDOG
|
2907 |
|
|
+
|
2908 |
|
|
+#define CONFIG_CLOCKS_IN_MHZ 24
|
2909 |
|
|
+#define CONFIG_HZ (CONFIG_CLOCKS_IN_MHZ * 1000000)
|
2910 |
|
|
+
|
2911 |
|
|
+/*-----------------------------------------------------------------------
|
2912 |
|
|
+ * Command line configuration.
|
2913 |
|
|
+ */
|
2914 |
|
|
+#include
|
2915 |
|
|
+
|
2916 |
|
|
+#undef CONFIG_CMD_AUTOSCRIPT /* Autoscript Support */
|
2917 |
|
|
+#undef CONFIG_CMD_BDI /* bdinfo */
|
2918 |
|
|
+#undef CONFIG_CMD_BOOTD /* bootd */
|
2919 |
|
|
+// #undef CONFIG_CMD_CONSOLE /* coninfo */
|
2920 |
|
|
+#undef CONFIG_CMD_ECHO /* echo arguments */
|
2921 |
|
|
+#undef CONFIG_CMD_SAVEENV /* saveenv */
|
2922 |
|
|
+#undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
|
2923 |
|
|
+#undef CONFIG_CMD_FPGA /* FPGA configuration Support */
|
2924 |
|
|
+#undef CONFIG_CMD_IMI /* iminfo */
|
2925 |
|
|
+#undef CONFIG_CMD_IMLS /* List all found images */
|
2926 |
|
|
+#undef CONFIG_CMD_ITEST /* Integer (and string) test */
|
2927 |
|
|
+#undef CONFIG_CMD_LOADB /* loadb */
|
2928 |
|
|
+#undef CONFIG_CMD_LOADS /* loads */
|
2929 |
|
|
+// #undef CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop mtest */
|
2930 |
|
|
+#undef CONFIG_CMD_MISC /* Misc functions like sleep etc*/
|
2931 |
|
|
+#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
|
2932 |
|
|
+#undef CONFIG_CMD_NFS /* NFS support */
|
2933 |
|
|
+#undef CONFIG_CMD_RUN /* run command in env variable */
|
2934 |
|
|
+#undef CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
|
2935 |
|
|
+#undef CONFIG_CMD_XIMG /* Load part of Multi Image */
|
2936 |
|
|
+
|
2937 |
|
|
+
|
2938 |
|
|
+/*-----------------------------------------------------------------------
|
2939 |
|
|
+ * environment data configuration.
|
2940 |
|
|
+ */
|
2941 |
|
|
+
|
2942 |
|
|
+#define CONFIG_ENV_IS_NOWHERE
|
2943 |
|
|
+#define CONFIG_ENV_SIZE 1024
|
2944 |
|
|
+#define CONFIG_SYS_MAX_FLASH_SECT 1
|
2945 |
|
|
+#define CONFIG_SYS_NO_FLASH
|
2946 |
|
|
+
|
2947 |
|
|
+
|
2948 |
|
|
+/*-----------------------------------------------------------------------
|
2949 |
|
|
+ * boot configuration.
|
2950 |
|
|
+ */
|
2951 |
|
|
+#undef CONFIG_BOOTARGS
|
2952 |
|
|
+
|
2953 |
|
|
+#define CONFIG_BOOTDELAY 10 /* autoboot after 10 seconds */
|
2954 |
|
|
+#define CONFIG_TIMESTAMP /* Print image info with timestamp */
|
2955 |
|
|
+#define CONFIG_SYS_LOAD_ADDR 0x81000000
|
2956 |
|
|
+
|
2957 |
|
|
+
|
2958 |
|
|
+/*-----------------------------------------------------------------------
|
2959 |
|
|
+ * Console configuration.
|
2960 |
|
|
+ */
|
2961 |
|
|
+#define CONFIG_SYS_PROMPT "de1_or1k # " /* Monitor Command Prompt */
|
2962 |
|
|
+
|
2963 |
|
|
+#define CONFIG_AUTO_COMPLETE
|
2964 |
|
|
+#define CONFIG_CMDLINE_EDITING
|
2965 |
|
|
+
|
2966 |
|
|
+#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
|
2967 |
|
|
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
|
2968 |
|
|
+#define CONFIG_SYS_MAXARGS 16
|
2969 |
|
|
+
|
2970 |
|
|
+
|
2971 |
|
|
+/*-----------------------------------------------------------------------
|
2972 |
|
|
+ * Start addresses for the final memory configuration
|
2973 |
|
|
+ * (Set up by the startup code)
|
2974 |
|
|
+ * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
|
2975 |
|
|
+ */
|
2976 |
|
|
+#define CONFIG_SYS_SDRAM_BASE 0x30000000
|
2977 |
|
|
+#define CONFIG_SYS_SDRAM_SIZE 0x00020000
|
2978 |
|
|
+#define CONFIG_SYS_FLASH_BASE 0x20000000
|
2979 |
|
|
+#define CONFIG_SYS_FLASH_SIZE 0x00400000
|
2980 |
|
|
+
|
2981 |
|
|
+#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
|
2982 |
|
|
+#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE)
|
2983 |
|
|
+
|
2984 |
|
|
+#define CONFIG_SYS_MALLOC_BASE 0x30010000
|
2985 |
|
|
+#define CONFIG_SYS_MALLOC_LEN 32*1024
|
2986 |
|
|
+
|
2987 |
|
|
+
|
2988 |
|
|
+/*-----------------------------------------------------------------------
|
2989 |
|
|
+ * Definitions for initial stack pointer and data area
|
2990 |
|
|
+ */
|
2991 |
|
|
+
|
2992 |
|
|
+#define CONFIG_SYS_INIT_RAM_ADDR 0x30000000 /* inside of SDRAM */
|
2993 |
|
|
+#define CONFIG_SYS_INIT_RAM_END (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_SDRAM_SIZE) /* End of used area in RAM */
|
2994 |
|
|
+#define CONFIG_SYS_INIT_DATA_SIZE 128 /* size in bytes reserved for initial data */
|
2995 |
|
|
+#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_INIT_DATA_SIZE)
|
2996 |
|
|
+#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
|
2997 |
|
|
+
|
2998 |
|
|
+
|
2999 |
|
|
+/*-----------------------------------------------------------------------
|
3000 |
|
|
+ * serial port configuration.
|
3001 |
|
|
+ */
|
3002 |
|
|
+
|
3003 |
|
|
+#define CONFIG_BAUDRATE 57600
|
3004 |
|
|
+#define CONFIG_SYS_BAUDRATE_TABLE { 9600 , 19200 , 38400 , 57600, 115200 }
|
3005 |
|
|
+
|
3006 |
|
|
+#define CONFIG_CONS_INDEX 1
|
3007 |
|
|
+#define CONFIG_SYS_NS16550_SERIAL
|
3008 |
|
|
+#define CONFIG_SYS_NS16550
|
3009 |
|
|
+#define CONFIG_SYS_NS16550_REG_SIZE 1
|
3010 |
|
|
+#define CONFIG_SYS_NS16550_COM1 (0x50000000)
|
3011 |
|
|
+#define CONFIG_SYS_NS16550_CLK CONFIG_HZ
|
3012 |
|
|
+
|
3013 |
|
|
+
|
3014 |
|
|
+/*-----------------------------------------------------------------------
|
3015 |
|
|
+ * qaz debug
|
3016 |
|
|
+ */
|
3017 |
|
|
+
|
3018 |
|
|
+
|
3019 |
|
|
+
|
3020 |
|
|
+#endif /* __CONFIG_H */
|
3021 |
|
|
+
|
3022 |
|
|
+
|
3023 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/include/image.h u-boot-2009.03/include/image.h
|
3024 |
|
|
--- u-boot-2009.03_orig/include/image.h 2009-03-21 14:04:41.000000000 -0700
|
3025 |
|
|
+++ u-boot-2009.03/include/image.h 2009-03-25 16:04:34.525496200 -0700
|
3026 |
|
|
@@ -478,6 +478,8 @@
|
3027 |
|
|
if (!image_check_arch (hdr, IH_ARCH_SH))
|
3028 |
|
|
#elif defined(__sparc__)
|
3029 |
|
|
if (!image_check_arch (hdr, IH_ARCH_SPARC))
|
3030 |
|
|
+#elif defined(__or1200__)
|
3031 |
|
|
+ if (!image_check_arch (hdr, IH_ARCH_INVALID))
|
3032 |
|
|
#else
|
3033 |
|
|
# error Unknown CPU type
|
3034 |
|
|
#endif
|
3035 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/lib_or1200/Makefile u-boot-2009.03/lib_or1200/Makefile
|
3036 |
|
|
--- u-boot-2009.03_orig/lib_or1200/Makefile 1969-12-31 16:00:00.000000000 -0800
|
3037 |
|
|
+++ u-boot-2009.03/lib_or1200/Makefile 2009-03-24 13:36:12.366942000 -0700
|
3038 |
|
|
@@ -0,0 +1,45 @@
|
3039 |
18 |
qaztronic |
+#
|
3040 |
|
|
+# (C) Copyright 2003-2006
|
3041 |
|
|
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
3042 |
|
|
+#
|
3043 |
|
|
+# See file CREDITS for list of people who contributed to this
|
3044 |
|
|
+# project.
|
3045 |
|
|
+#
|
3046 |
|
|
+# This program is free software; you can redistribute it and/or
|
3047 |
|
|
+# modify it under the terms of the GNU General Public License as
|
3048 |
|
|
+# published by the Free Software Foundation; either version 2 of
|
3049 |
|
|
+# the License, or (at your option) any later version.
|
3050 |
|
|
+#
|
3051 |
|
|
+# This program is distributed in the hope that it will be useful,
|
3052 |
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
3053 |
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
3054 |
|
|
+# GNU General Public License for more details.
|
3055 |
|
|
+#
|
3056 |
|
|
+# You should have received a copy of the GNU General Public License
|
3057 |
|
|
+# along with this program; if not, write to the Free Software
|
3058 |
|
|
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
3059 |
|
|
+# MA 02111-1307 USA
|
3060 |
|
|
+#
|
3061 |
|
|
+
|
3062 |
|
|
+include $(TOPDIR)/config.mk
|
3063 |
|
|
+
|
3064 |
|
|
+LIB = $(obj)lib$(ARCH).a
|
3065 |
|
|
+
|
3066 |
|
|
+SOBJS =
|
3067 |
|
|
+
|
3068 |
|
|
+COBJS = board.o bootm.o cache.o
|
3069 |
|
|
+
|
3070 |
|
|
+SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
3071 |
|
|
+OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
|
3072 |
|
|
+
|
3073 |
|
|
+$(LIB): $(obj).depend $(OBJS)
|
3074 |
|
|
+ $(AR) $(ARFLAGS) $@ $(OBJS)
|
3075 |
|
|
+
|
3076 |
|
|
+#########################################################################
|
3077 |
|
|
+
|
3078 |
|
|
+# defines $(obj).depend target
|
3079 |
|
|
+include $(SRCTREE)/rules.mk
|
3080 |
|
|
+
|
3081 |
|
|
+sinclude $(obj).depend
|
3082 |
|
|
+
|
3083 |
|
|
+#########################################################################
|
3084 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/lib_or1200/board.c u-boot-2009.03/lib_or1200/board.c
|
3085 |
|
|
--- u-boot-2009.03_orig/lib_or1200/board.c 1969-12-31 16:00:00.000000000 -0800
|
3086 |
|
|
+++ u-boot-2009.03/lib_or1200/board.c 2009-03-25 17:41:25.221131200 -0700
|
3087 |
|
|
@@ -0,0 +1,172 @@
|
3088 |
18 |
qaztronic |
+/*
|
3089 |
22 |
qaztronic |
+ * (C) Copyright 2007 Michal Simek
|
3090 |
|
|
+ * (C) Copyright 2004 Atmark Techno, Inc.
|
3091 |
|
|
+ *
|
3092 |
|
|
+ * Michal SIMEK
|
3093 |
|
|
+ * Yasushi SHOJI
|
3094 |
|
|
+ *
|
3095 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
3096 |
|
|
+ * project.
|
3097 |
|
|
+ *
|
3098 |
|
|
+ * This program is free software; you can redistribute it and/or
|
3099 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
3100 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
3101 |
|
|
+ * the License, or (at your option) any later version.
|
3102 |
|
|
+ *
|
3103 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
3104 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
3105 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
3106 |
|
|
+ * GNU General Public License for more details.
|
3107 |
|
|
+ *
|
3108 |
|
|
+ * You should have received a copy of the GNU General Public License
|
3109 |
|
|
+ * along with this program; if not, write to the Free Software
|
3110 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
3111 |
|
|
+ * MA 02111-1307 USA
|
3112 |
|
|
+ */
|
3113 |
|
|
+
|
3114 |
|
|
+#include
|
3115 |
|
|
+#include
|
3116 |
|
|
+#include
|
3117 |
|
|
+#include
|
3118 |
|
|
+#include
|
3119 |
|
|
+
|
3120 |
|
|
+DECLARE_GLOBAL_DATA_PTR;
|
3121 |
|
|
+
|
3122 |
|
|
+const char version_string[] = U_BOOT_VERSION " (" __DATE__ " - " __TIME__ ")";
|
3123 |
|
|
+
|
3124 |
|
|
+
|
3125 |
|
|
+int board_early_init_f (void);
|
3126 |
|
|
+void set_de1_post( unsigned int post_code );
|
3127 |
|
|
+void init_de1_post( void );
|
3128 |
|
|
+int de1_post_incr( void );
|
3129 |
|
|
+
|
3130 |
|
|
+
|
3131 |
|
|
+/*
|
3132 |
|
|
+ * Begin and End of memory area for malloc(), and current "brk"
|
3133 |
|
|
+ */
|
3134 |
|
|
+static ulong mem_malloc_start;
|
3135 |
|
|
+static ulong mem_malloc_end;
|
3136 |
|
|
+static ulong mem_malloc_brk;
|
3137 |
|
|
+
|
3138 |
|
|
+/*
|
3139 |
|
|
+ * The Malloc area is immediately below the monitor copy in DRAM
|
3140 |
|
|
+ * aka CONFIG_SYS_MONITOR_BASE - Note there is no need for reloc_off
|
3141 |
|
|
+ * as our monitory code is run from SDRAM
|
3142 |
|
|
+ */
|
3143 |
|
|
+static void mem_malloc_init (void)
|
3144 |
|
|
+{
|
3145 |
|
|
+ mem_malloc_end = (CONFIG_SYS_MALLOC_BASE + CONFIG_SYS_MALLOC_LEN);
|
3146 |
|
|
+ mem_malloc_start = CONFIG_SYS_MALLOC_BASE;
|
3147 |
|
|
+ mem_malloc_brk = mem_malloc_start;
|
3148 |
|
|
+
|
3149 |
|
|
+// memset ((void *)mem_malloc_start, 0, mem_malloc_end - mem_malloc_start);
|
3150 |
|
|
+ memset ((void *)mem_malloc_start, 0, 4 );
|
3151 |
|
|
+}
|
3152 |
|
|
+
|
3153 |
|
|
+void *sbrk (ptrdiff_t increment)
|
3154 |
|
|
+{
|
3155 |
|
|
+ ulong old = mem_malloc_brk;
|
3156 |
|
|
+ ulong new = old + increment;
|
3157 |
|
|
+
|
3158 |
|
|
+ if ((new < mem_malloc_start) || (new > mem_malloc_end)) {
|
3159 |
|
|
+ return (NULL);
|
3160 |
|
|
+ }
|
3161 |
|
|
+ mem_malloc_brk = new;
|
3162 |
|
|
+ return ((void *)old);
|
3163 |
|
|
+}
|
3164 |
|
|
+
|
3165 |
|
|
+
|
3166 |
|
|
+/*
|
3167 |
|
|
+ * All attempts to come up with a "common" initialization sequence
|
3168 |
|
|
+ * that works for all boards and architectures failed: some of the
|
3169 |
|
|
+ * requirements are just _too_ different. To get rid of the resulting
|
3170 |
|
|
+ * mess of board dependend #ifdef'ed code we now make the whole
|
3171 |
|
|
+ * initialization sequence configurable to the user.
|
3172 |
|
|
+ *
|
3173 |
|
|
+ * The requirements for any new initalization function is simple: it
|
3174 |
|
|
+ * receives a pointer to the "global data" structure as it's only
|
3175 |
|
|
+ * argument, and returns an integer return code, where 0 means
|
3176 |
|
|
+ * "continue" and != 0 means "fatal error, hang the system".
|
3177 |
|
|
+ */
|
3178 |
|
|
+typedef int (init_fnc_t) (void);
|
3179 |
|
|
+
|
3180 |
|
|
+init_fnc_t *init_sequence[] = {
|
3181 |
|
|
+ env_init,
|
3182 |
|
|
+ de1_post_incr,
|
3183 |
|
|
+ serial_init,
|
3184 |
|
|
+ de1_post_incr,
|
3185 |
|
|
+ NULL,
|
3186 |
|
|
+};
|
3187 |
|
|
+
|
3188 |
|
|
+void board_init (void)
|
3189 |
|
|
+{
|
3190 |
|
|
+ bd_t *bd;
|
3191 |
|
|
+ init_fnc_t **init_fnc_ptr;
|
3192 |
|
|
+ gd = (gd_t *) (CONFIG_SYS_GBL_DATA_OFFSET);
|
3193 |
|
|
+
|
3194 |
|
|
+// #if defined(CONFIG_CMD_FLASH)
|
3195 |
|
|
+// ulong flash_size = 0;
|
3196 |
|
|
+// #endif
|
3197 |
|
|
+
|
3198 |
|
|
+ memset ((void *)gd, 0, CONFIG_SYS_INIT_DATA_SIZE);
|
3199 |
|
|
+ gd->bd = (bd_t *) (gd + 1); /* At end of global data */
|
3200 |
|
|
+ gd->baudrate = CONFIG_BAUDRATE;
|
3201 |
|
|
+ bd = gd->bd;
|
3202 |
|
|
+ bd->bi_baudrate = CONFIG_BAUDRATE;
|
3203 |
|
|
+ bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
|
3204 |
|
|
+ bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
|
3205 |
|
|
+
|
3206 |
|
|
+ init_de1_post();
|
3207 |
|
|
+
|
3208 |
|
|
+ /* Initialise malloc() area */
|
3209 |
|
|
+ mem_malloc_init ();
|
3210 |
|
|
+
|
3211 |
|
|
+ set_de1_post(0x00000100);
|
3212 |
|
|
+
|
3213 |
|
|
+ board_early_init_f();
|
3214 |
|
|
+
|
3215 |
|
|
+ set_de1_post(0x00000200);
|
3216 |
|
|
+
|
3217 |
|
|
+ for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
|
3218 |
|
|
+
|
3219 |
|
|
+ de1_post_incr();
|
3220 |
|
|
+ WATCHDOG_RESET ();
|
3221 |
|
|
+ de1_post_incr();
|
3222 |
|
|
+
|
3223 |
|
|
+ if ((*init_fnc_ptr) () != 0) {
|
3224 |
|
|
+ hang ();
|
3225 |
|
|
+ }
|
3226 |
|
|
+ }
|
3227 |
|
|
+
|
3228 |
|
|
+ set_de1_post(0x00000300);
|
3229 |
|
|
+
|
3230 |
|
|
+// #if defined(CONFIG_CMD_FLASH)
|
3231 |
|
|
+// bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
|
3232 |
|
|
+// if (0 < (flash_size = flash_init ())) {
|
3233 |
|
|
+// bd->bi_flashsize = flash_size;
|
3234 |
|
|
+// bd->bi_flashoffset = CONFIG_SYS_FLASH_BASE + flash_size;
|
3235 |
|
|
+// } else {
|
3236 |
|
|
+// puts ("Flash init FAILED");
|
3237 |
|
|
+// bd->bi_flashstart = 0;
|
3238 |
|
|
+// bd->bi_flashsize = 0;
|
3239 |
|
|
+// bd->bi_flashoffset = 0;
|
3240 |
|
|
+// }
|
3241 |
|
|
+// #endif
|
3242 |
|
|
+
|
3243 |
|
|
+ /* relocate environment function pointers etc. */
|
3244 |
|
|
+ env_relocate ();
|
3245 |
|
|
+
|
3246 |
|
|
+ set_de1_post(0x00000400);
|
3247 |
|
|
+
|
3248 |
|
|
+ /* main_loop */
|
3249 |
|
|
+ for (;;) {
|
3250 |
|
|
+ WATCHDOG_RESET ();
|
3251 |
|
|
+ main_loop ();
|
3252 |
|
|
+ }
|
3253 |
|
|
+}
|
3254 |
|
|
+
|
3255 |
|
|
+void hang (void)
|
3256 |
|
|
+{
|
3257 |
|
|
+ puts ("### ERROR ### Please RESET the board ###\n");
|
3258 |
|
|
+ for (;;) ;
|
3259 |
|
|
+}
|
3260 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/lib_or1200/bootm.c u-boot-2009.03/lib_or1200/bootm.c
|
3261 |
|
|
--- u-boot-2009.03_orig/lib_or1200/bootm.c 1969-12-31 16:00:00.000000000 -0800
|
3262 |
|
|
+++ u-boot-2009.03/lib_or1200/bootm.c 2009-03-24 13:36:12.351353000 -0700
|
3263 |
|
|
@@ -0,0 +1,34 @@
|
3264 |
|
|
+/*
|
3265 |
18 |
qaztronic |
+ * (C) Copyright 2003, Psyent Corporation
|
3266 |
|
|
+ * Scott McNutt
|
3267 |
|
|
+ *
|
3268 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
3269 |
|
|
+ * project.
|
3270 |
|
|
+ *
|
3271 |
|
|
+ * This program is free software; you can redistribute it and/or
|
3272 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
3273 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
3274 |
|
|
+ * the License, or (at your option) any later version.
|
3275 |
|
|
+ *
|
3276 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
3277 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
3278 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
3279 |
|
|
+ * GNU General Public License for more details.
|
3280 |
|
|
+ *
|
3281 |
|
|
+ * You should have received a copy of the GNU General Public License
|
3282 |
|
|
+ * along with this program; if not, write to the Free Software
|
3283 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
3284 |
|
|
+ * MA 02111-1307 USA
|
3285 |
|
|
+ */
|
3286 |
|
|
+
|
3287 |
|
|
+#include
|
3288 |
|
|
+#include
|
3289 |
|
|
+
|
3290 |
|
|
+/* FIXME: Once we find a stable version of uC-linux for nios
|
3291 |
|
|
+ * we can get this working. ;-)
|
3292 |
|
|
+ *
|
3293 |
|
|
+ */
|
3294 |
|
|
+void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
|
3295 |
|
|
+ bootm_headers_t *images)
|
3296 |
|
|
+{
|
3297 |
|
|
+}
|
3298 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/lib_or1200/cache.c u-boot-2009.03/lib_or1200/cache.c
|
3299 |
|
|
--- u-boot-2009.03_orig/lib_or1200/cache.c 1969-12-31 16:00:00.000000000 -0800
|
3300 |
|
|
+++ u-boot-2009.03/lib_or1200/cache.c 2009-03-24 13:36:12.351353000 -0700
|
3301 |
|
|
@@ -0,0 +1,32 @@
|
3302 |
18 |
qaztronic |
+/*
|
3303 |
|
|
+ * (C) Copyright 2003, Psyent Corporation
|
3304 |
|
|
+ * Scott McNutt
|
3305 |
|
|
+ *
|
3306 |
|
|
+ * See file CREDITS for list of people who contributed to this
|
3307 |
|
|
+ * project.
|
3308 |
|
|
+ *
|
3309 |
|
|
+ * This program is free software; you can redistribute it and/or
|
3310 |
|
|
+ * modify it under the terms of the GNU General Public License as
|
3311 |
|
|
+ * published by the Free Software Foundation; either version 2 of
|
3312 |
|
|
+ * the License, or (at your option) any later version.
|
3313 |
|
|
+ *
|
3314 |
|
|
+ * This program is distributed in the hope that it will be useful,
|
3315 |
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
3316 |
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
3317 |
|
|
+ * GNU General Public License for more details.
|
3318 |
|
|
+ *
|
3319 |
|
|
+ * You should have received a copy of the GNU General Public License
|
3320 |
|
|
+ * along with this program; if not, write to the Free Software
|
3321 |
|
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
3322 |
|
|
+ * MA 02111-1307 USA
|
3323 |
|
|
+ */
|
3324 |
|
|
+
|
3325 |
|
|
+#include
|
3326 |
|
|
+
|
3327 |
|
|
+
|
3328 |
|
|
+void flush_cache (ulong addr, ulong size)
|
3329 |
|
|
+{
|
3330 |
|
|
+ /* Nios cache is write-thru -- nothing to do here.
|
3331 |
|
|
+ */
|
3332 |
|
|
+ return;
|
3333 |
|
|
+}
|
3334 |
22 |
qaztronic |
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/or1200_config.mk u-boot-2009.03/or1200_config.mk
|
3335 |
|
|
--- u-boot-2009.03_orig/or1200_config.mk 1969-12-31 16:00:00.000000000 -0800
|
3336 |
|
|
+++ u-boot-2009.03/or1200_config.mk 2008-09-18 09:46:16.250000000 -0700
|
3337 |
|
|
@@ -0,0 +1,28 @@
|
3338 |
|
|
+#
|
3339 |
|
|
+# (C) Copyright 2004 Atmark Techno, Inc.
|
3340 |
|
|
+#
|
3341 |
|
|
+# Yasushi SHOJI
|
3342 |
|
|
+#
|
3343 |
|
|
+# See file CREDITS for list of people who contributed to this
|
3344 |
|
|
+# project.
|
3345 |
|
|
+#
|
3346 |
|
|
+# This program is free software; you can redistribute it and/or
|
3347 |
|
|
+# modify it under the terms of the GNU General Public License as
|
3348 |
|
|
+# published by the Free Software Foundation; either version 2 of
|
3349 |
|
|
+# the License, or (at your option) any later version.
|
3350 |
|
|
+#
|
3351 |
|
|
+# This program is distributed in the hope that it will be useful,
|
3352 |
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
3353 |
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
3354 |
|
|
+# GNU General Public License for more details.
|
3355 |
|
|
+#
|
3356 |
|
|
+# You should have received a copy of the GNU General Public License
|
3357 |
|
|
+# along with this program; if not, write to the Free Software
|
3358 |
|
|
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
3359 |
|
|
+# MA 02111-1307 USA
|
3360 |
|
|
+#
|
3361 |
|
|
+
|
3362 |
|
|
+PLATFORM_CPPFLAGS += -D__or1200__
|
3363 |
|
|
+
|
3364 |
|
|
+SYM_PREFIX = _
|
3365 |
|
|
+
|
3366 |
|
|
diff -NaurbBw --exclude-from=diff_exclude.txt u-boot-2009.03_orig/tools/Makefile u-boot-2009.03/tools/Makefile
|
3367 |
|
|
--- u-boot-2009.03_orig/tools/Makefile 2009-03-21 14:04:41.000000000 -0700
|
3368 |
|
|
+++ u-boot-2009.03/tools/Makefile 2009-03-25 15:49:57.874856800 -0700
|
3369 |
|
|
@@ -21,7 +21,8 @@
|
3370 |
|
|
# MA 02111-1307 USA
|
3371 |
|
|
#
|
3372 |
|
|
|
3373 |
|
|
-BIN_FILES = img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) ubsha1$(SFX) gen_eth_addr$(SFX) bmp_logo$(SFX)
|
3374 |
|
|
+# BIN_FILES = img2srec$(SFX) mkimage$(SFX) envcrc$(SFX) ubsha1$(SFX) gen_eth_addr$(SFX) bmp_logo$(SFX)
|
3375 |
|
|
+BIN_FILES = img2srec$(SFX) envcrc$(SFX) ubsha1$(SFX) gen_eth_addr$(SFX) bmp_logo$(SFX)
|
3376 |
|
|
|
3377 |
|
|
OBJ_LINKS = env_embedded.o crc32.o md5.o sha1.o image.o
|
3378 |
|
|
OBJ_FILES = img2srec.o mkimage.o envcrc.o ubsha1.o gen_eth_addr.o bmp_logo.o
|