]> rtime.felk.cvut.cz Git - rtems-devel.git/blob - rtems-patches/current/rtems-update-mrm332-to-mo376.patch
Update of the build and patches to rtems-4.7.1
[rtems-devel.git] / rtems-patches / current / rtems-update-mrm332-to-mo376.patch
1 ---
2  c/src/lib/libbsp/m68k/mo376/ChangeLog         |    5 +
3  c/src/lib/libbsp/m68k/mo376/Makefile.am       |    2 
4  c/src/lib/libbsp/m68k/mo376/README            |   25 ++++-----
5  c/src/lib/libbsp/m68k/mo376/clock/ckinit.c    |    2 
6  c/src/lib/libbsp/m68k/mo376/configure.ac      |    2 
7  c/src/lib/libbsp/m68k/mo376/console/sci.c     |    4 -
8  c/src/lib/libbsp/m68k/mo376/include/bsp.h     |    2 
9  c/src/lib/libbsp/m68k/mo376/include/mo376.h   |   70 ++++++++++++++++++++++++++
10  c/src/lib/libbsp/m68k/mo376/include/mrm332.h  |   70 --------------------------
11  c/src/lib/libbsp/m68k/mo376/preinstall.am     |    6 +-
12  c/src/lib/libbsp/m68k/mo376/start/start.S     |    2 
13  c/src/lib/libbsp/m68k/mo376/startup/start_c.c |    2 
14  c/src/lib/libbsp/m68k/mo376/times             |    6 +-
15  make/custom/mo376.cfg                         |    4 -
16  14 files changed, 104 insertions(+), 98 deletions(-)
17
18 Index: rtems/c/src/lib/libbsp/m68k/mo376/start/start.S
19 ===================================================================
20 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/start/start.S        2007-08-14 17:20:30.000000000 +0200
21 +++ rtems/c/src/lib/libbsp/m68k/mo376/start/start.S     2007-08-14 17:24:09.000000000 +0200
22 @@ -2,7 +2,7 @@
23   *  $Id
24   */
25  
26 -#include "mrm332.h"
27 +#include "mo376.h"
28  #include <rtems/asm.h>
29  #include <rtems/m68k/sim.h>
30  
31 Index: rtems/c/src/lib/libbsp/m68k/mo376/include/bsp.h
32 ===================================================================
33 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/include/bsp.h        2007-08-14 17:20:30.000000000 +0200
34 +++ rtems/c/src/lib/libbsp/m68k/mo376/include/bsp.h     2007-08-14 17:24:09.000000000 +0200
35 @@ -26,7 +26,7 @@
36  #include <rtems/clockdrv.h>
37  #include <rtems/console.h>
38  #include <rtems/iosupp.h>
39 -#include <mrm332.h>
40 +#include <mo376.h>
41  #include <rtems/m68k/sim.h>
42  #include <rtems/m68k/qsm.h>
43  
44 Index: rtems/c/src/lib/libbsp/m68k/mo376/ChangeLog
45 ===================================================================
46 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/ChangeLog    2007-08-14 17:20:30.000000000 +0200
47 +++ rtems/c/src/lib/libbsp/m68k/mo376/ChangeLog 2007-08-14 17:24:09.000000000 +0200
48 @@ -29,6 +29,11 @@
49  
50         * include/bsp.h: New header guard.
51  
52 +2005-04-08     Pavel Pisa <pisa@cmp.felk.cvut.cz>
53 +
54 +       * MO376 BSP for PiKRON's MO_CPU1/MO_CPU2 board started
55 +       as clone of MRM332 BSP.
56 +
57  2005-01-07     Ralf Corsepius <ralf.corsepius@rtems.org>
58  
59         * Makefile.am: Eliminate CFLAGS_OPTIMIZE_V.
60 Index: rtems/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c
61 ===================================================================
62 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c       2007-08-14 17:20:30.000000000 +0200
63 +++ rtems/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c    2007-08-14 17:24:09.000000000 +0200
64 @@ -20,7 +20,7 @@
65  #include <stdlib.h>
66  #include <bsp.h>
67  #include <rtems/libio.h>
68 -#include <mrm332.h>
69 +#include <mo376.h>
70  
71  #define CLOCK_VECTOR   MRM_PIV
72  
73 Index: rtems/c/src/lib/libbsp/m68k/mo376/configure.ac
74 ===================================================================
75 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/configure.ac 2007-08-14 17:20:30.000000000 +0200
76 +++ rtems/c/src/lib/libbsp/m68k/mo376/configure.ac      2007-08-14 17:26:26.000000000 +0200
77 @@ -3,7 +3,7 @@
78  ## $Id: configure.ac,v 1.14.2.2 2006/12/02 06:04:46 ralf Exp $
79  
80  AC_PREREQ(2.60)
81 -AC_INIT([rtems-c-src-lib-libbsp-m68k-mrm332],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
82 +AC_INIT([rtems-c-src-lib-libbsp-m68k-mo376],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
83  AC_CONFIG_SRCDIR([bsp_specs])
84  RTEMS_TOP(../../../../../..)
85  
86 Index: rtems/c/src/lib/libbsp/m68k/mo376/README
87 ===================================================================
88 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/README       2007-08-14 17:20:30.000000000 +0200
89 +++ rtems/c/src/lib/libbsp/m68k/mo376/README    2007-08-14 17:24:09.000000000 +0200
90 @@ -2,23 +2,24 @@
91  #  $Id: README,v 1.1 2001/05/25 16:28:46 joel Exp $
92  #
93  
94 -Description: mrm332
95 +Description: mo376
96  ============
97 -CPU: MC68332 @16 or 25MHz
98 -RAM: 32k or 512k
99 -ROM: 512k flash
100 +CPU: MC68376 @21MHz
101 +RAM: 1MiB or 2MiB
102 +ROM: 1MiB or 2MiB flash
103  
104 -   The Mini RoboMind is a small board based on the 68332 microcontroller
105 -designed and build by Mark Castelluccio.  For details, see:
106 +   The mo376 BSP supports MO_CPU1/MO_CPU2 boards developed by PiKRON company.
107 +The design documentation conforms open-source mind of board authors
108 +and can be found on the company pages
109  
110 -        http://www.robominds.com
111 +        http://www.pikron.com/en/main_frame_mo_cpu1.html
112  
113 -   This BSP was ported from the efi332 BSP by Matt Cross (profesor@gweep.net),
114 -the efi332 BSP was written by John S Gwynne.
115 +  This BSP has been cloned from Mini RoboMind BSP written for small board based
116 +on the 68332 microcontroller designed and build by Mark Castelluccio
117 +
118 +   The mrm332 BSP was ported from the efi332 BSP by Matt Cross (profesor@gweep.net),
119 +the efi332 was written by John S Gwynne.
120  
121  TODO:
122  =====
123 -- integrate the interrupt driven stdin/stdout into RTEMS to (a) reduce
124 -  the interrupt priority and (2) to prevent it from blocking.
125 -- add a timer driver for the tmtest set.
126  
127 Index: rtems/c/src/lib/libbsp/m68k/mo376/Makefile.am
128 ===================================================================
129 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/Makefile.am  2007-08-14 17:20:30.000000000 +0200
130 +++ rtems/c/src/lib/libbsp/m68k/mo376/Makefile.am       2007-08-14 17:24:09.000000000 +0200
131 @@ -16,7 +16,7 @@
132  DISTCLEANFILES = include/bspopts.h
133  noinst_PROGRAMS =
134  
135 -include_HEADERS += include/mrm332.h
136 +include_HEADERS += include/mo376.h
137  nodist_include_HEADERS += ../../shared/include/coverhd.h
138  
139  EXTRA_DIST = times
140 Index: rtems/c/src/lib/libbsp/m68k/mo376/console/sci.c
141 ===================================================================
142 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/console/sci.c        2007-08-14 17:20:30.000000000 +0200
143 +++ rtems/c/src/lib/libbsp/m68k/mo376/console/sci.c     2007-08-14 17:31:42.000000000 +0200
144 @@ -105,7 +105,7 @@
145  
146  /* system clock definitions, i dont have documentation on this... */
147  
148 -#if 0 /* Not needed, this is provided in mrm332.h */
149 +#if 0 /* Not needed, this is provided in mo376.h */
150  #define XTAL            32768.0    /* crystal frequency in Hz */
151  #define NUMB_W          0          /* system clock parameters */
152  #define NUMB_X          1
153 @@ -1215,7 +1215,7 @@
154  
155      /* calculate the register value as a float and convert to an int */
156      /* set baud rate - you must define the system clock constant */
157 -    /* see mrm332.h for an example */
158 +    /* see mo376.h for an example */
159  
160      value = ( (uint16_t) ( SYS_CLOCK / rate / 32.0 + 0.5 ) & 0x1fff );
161  
162 Index: rtems/c/src/lib/libbsp/m68k/mo376/startup/start_c.c
163 ===================================================================
164 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/startup/start_c.c    2007-08-14 17:20:30.000000000 +0200
165 +++ rtems/c/src/lib/libbsp/m68k/mo376/startup/start_c.c 2007-08-14 17:24:09.000000000 +0200
166 @@ -2,7 +2,7 @@
167   *  $Id
168   */
169  
170 -#include <mrm332.h>
171 +#include <mo376.h>
172  #include <rtems/m68k/sim.h>
173  #define __START_C__
174  #include "bsp.h"
175 Index: rtems/c/src/lib/libbsp/m68k/mo376/times
176 ===================================================================
177 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/times        2007-08-14 17:20:30.000000000 +0200
178 +++ rtems/c/src/lib/libbsp/m68k/mo376/times     2007-08-14 17:24:09.000000000 +0200
179 @@ -1,5 +1,5 @@
180  #
181 -#  Timing Test Suite Results for the MRM332 BSP
182 +#  Timing Test Suite Results for the MO376 BSP
183  #
184  #  $Id: times,v 1.2 2004/01/07 21:13:50 joel Exp $
185  #
186 @@ -8,9 +8,9 @@
187  
188  TBD: MATT - update this with real times!
189  
190 -Board:                MRM332 
191 +Board:                MO376 
192  CPU:                  68332
193 -Clock Speed:          20 Mhz
194 +Clock Speed:          21 Mhz
195  Memory Configuration: SRAM, DRAM, cache, etc
196  Wait States:          
197  
198 Index: rtems/c/src/lib/libbsp/m68k/mo376/include/mo376.h
199 ===================================================================
200 --- /dev/null   1970-01-01 00:00:00.000000000 +0000
201 +++ rtems/c/src/lib/libbsp/m68k/mo376/include/mo376.h   2007-08-14 17:24:09.000000000 +0200
202 @@ -0,0 +1,70 @@
203 +/*  mo376.h
204 + *
205 + *  $Id: mo376.h,v 1.5 2004/04/21 16:01:35 ralf Exp $
206 + */
207 +
208 +#ifndef _MO376_H_
209 +#define _MO376_H_
210 +
211 +/* SIM_MM (SIM Module Mapping) determines the location of the control
212 +   register block. When MM=0, register addresses range fom 0x7ff000 to
213 +   0x7FFFFF. When MM=1, register addresses range from 0xfff000 to
214 +   0xffffff. */
215 +#define SIM_MM 1
216 +
217 +/* Interrupt related definitions */
218 +#define SIM_IARB 15
219 +#define QSM_IARB 10
220 +
221 +#define MRM_PIV 64
222 +#define ISRL_PIT 4             /* zero disables PIT */
223 +
224 +#define EFI_QIVR 66            /* 66=>SCI and 67=>QSPI interrupt */
225 +#define ISRL_QSPI 0
226 +
227 +#define EFI_SPINT 24           /* spurious interrupt */
228 +#define EFI_INT1 25            /* CTS interrupt */
229 +#define ISRL_SCI 6
230 +
231 +/* System Clock definitions */
232 +#define XTAL 32768.0           /* crystal frequency in Hz */
233 +
234 +#if 0
235 +/* Default MRM clock rate (8.388688 MHz) set by CPU32: */
236 +#define MRM_W 0                        /* system clock parameters */
237 +#define MRM_X 0
238 +#define MRM_Y 0x3f
239 +#endif
240 +
241 +#if 1
242 +/* 16.77722 MHz: */
243 +#define MRM_W 1                        /* system clock parameters */
244 +#define MRM_X 1
245 +#define MRM_Y 0x0f
246 +#endif
247 +
248 +#if 0
249 +/* 25.16582 MHz: */
250 +#define MRM_W 1                        /* system clock parameters */
251 +#define MRM_X 1
252 +#define MRM_Y 0x17
253 +#endif
254 +
255 +#define SYS_CLOCK (XTAL*4.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X)))
256 +#define SCI_BAUD 19200         /* RS232 Baud Rate */
257 +
258 +/* macros/functions */
259 +
260 +#ifndef ASM
261 +
262 +/*
263 + *  This prototype really should have the noreturn attribute but
264 + *  that causes a warning. Not sure how to fix that.
265 + */
266 +/*   static void reboot(void) __attribute__ ((noreturn)); */
267 +static void reboot(void);
268 +__inline__ static void reboot() {asm("trap #15; .word 0x0063");}
269 +
270 +#endif /* ASM */
271 +
272 +#endif /* _MRM_H_ */
273 Index: rtems/c/src/lib/libbsp/m68k/mo376/include/mrm332.h
274 ===================================================================
275 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/include/mrm332.h     2007-08-14 17:20:30.000000000 +0200
276 +++ /dev/null   1970-01-01 00:00:00.000000000 +0000
277 @@ -1,70 +0,0 @@
278 -/*  mrm332.h
279 - *
280 - *  $Id: mrm332.h,v 1.5 2004/04/21 16:01:35 ralf Exp $
281 - */
282 -
283 -#ifndef _MRM332_H_
284 -#define _MRM332_H_
285 -
286 -/* SIM_MM (SIM Module Mapping) determines the location of the control
287 -   register block. When MM=0, register addresses range fom 0x7ff000 to
288 -   0x7FFFFF. When MM=1, register addresses range from 0xfff000 to
289 -   0xffffff. */
290 -#define SIM_MM 1
291 -
292 -/* Interrupt related definitions */
293 -#define SIM_IARB 15
294 -#define QSM_IARB 10
295 -
296 -#define MRM_PIV 64
297 -#define ISRL_PIT 4             /* zero disables PIT */
298 -
299 -#define EFI_QIVR 66            /* 66=>SCI and 67=>QSPI interrupt */
300 -#define ISRL_QSPI 0
301 -
302 -#define EFI_SPINT 24           /* spurious interrupt */
303 -#define EFI_INT1 25            /* CTS interrupt */
304 -#define ISRL_SCI 6
305 -
306 -/* System Clock definitions */
307 -#define XTAL 32768.0           /* crystal frequency in Hz */
308 -
309 -#if 0
310 -/* Default MRM clock rate (8.388688 MHz) set by CPU32: */
311 -#define MRM_W 0                        /* system clock parameters */
312 -#define MRM_X 0
313 -#define MRM_Y 0x3f
314 -#endif
315 -
316 -#if 1
317 -/* 16.77722 MHz: */
318 -#define MRM_W 1                        /* system clock parameters */
319 -#define MRM_X 1
320 -#define MRM_Y 0x0f
321 -#endif
322 -
323 -#if 0
324 -/* 25.16582 MHz: */
325 -#define MRM_W 1                        /* system clock parameters */
326 -#define MRM_X 1
327 -#define MRM_Y 0x17
328 -#endif
329 -
330 -#define SYS_CLOCK (XTAL*4.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X)))
331 -#define SCI_BAUD 19200         /* RS232 Baud Rate */
332 -
333 -/* macros/functions */
334 -
335 -#ifndef ASM
336 -
337 -/*
338 - *  This prototype really should have the noreturn attribute but
339 - *  that causes a warning. Not sure how to fix that.
340 - */
341 -/*   static void reboot(void) __attribute__ ((noreturn)); */
342 -static void reboot(void);
343 -__inline__ static void reboot() {asm("trap #15; .word 0x0063");}
344 -
345 -#endif /* ASM */
346 -
347 -#endif /* _MRM_H_ */
348 Index: rtems/make/custom/mo376.cfg
349 ===================================================================
350 --- rtems.orig/make/custom/mo376.cfg    2007-08-14 17:20:30.000000000 +0200
351 +++ rtems/make/custom/mo376.cfg 2007-08-14 17:24:09.000000000 +0200
352 @@ -10,7 +10,7 @@
353  RTEMS_CPU_MODEL=m68332
354  
355  # This is the actual bsp directory used during the build process.
356 -RTEMS_BSP_FAMILY=mrm332
357 +RTEMS_BSP_FAMILY=mo376
358  
359  #  This contains the compiler options necessary to select the CPU model
360  #  and (hopefully) optimize for it. 
361 @@ -25,7 +25,7 @@
362  ifeq ($(MRM_IN_ROM),yes)
363  # Build a rommable image - move the .data section after the .text section
364  # in the image.
365 -CPU_CFLAGS += -qnolinkcmds -T $(exec_prefix)/mrm332/lib/linkcmds_ROM
366 +CPU_CFLAGS += -qnolinkcmds -T $(exec_prefix)/mo376/lib/linkcmds_ROM
367  
368  #  This is a good way to get debug information.  The output file is large
369  #  though and greatly slows the build process so only do this if needed.
370 Index: rtems/c/src/lib/libbsp/m68k/mo376/preinstall.am
371 ===================================================================
372 --- rtems.orig/c/src/lib/libbsp/m68k/mo376/preinstall.am        2007-08-14 17:20:30.000000000 +0200
373 +++ rtems/c/src/lib/libbsp/m68k/mo376/preinstall.am     2007-08-14 17:24:09.000000000 +0200
374 @@ -44,9 +44,9 @@
375         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
376  PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
377  
378 -$(PROJECT_INCLUDE)/mrm332.h: include/mrm332.h $(PROJECT_INCLUDE)/$(dirstamp)
379 -       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mrm332.h
380 -PREINSTALL_FILES += $(PROJECT_INCLUDE)/mrm332.h
381 +$(PROJECT_INCLUDE)/mo376.h: include/mo376.h $(PROJECT_INCLUDE)/$(dirstamp)
382 +       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mo376.h
383 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/mo376.h
384  
385  $(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
386         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h