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