<div dir="ltr">Thanks for all your comments and advice. I'll try to use the common files in the bsp, and add related copyright if modified from other bsps.<div><br><div style>Regards,</div><div style>Peng. </div></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/19 Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 04/18/2013 06:50 PM, Gedare Bloom wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The previous version indicated you copied code from other parts of<br>
RTEMS. If you retained the copied code, you should also retain the<br>
code's copyright notice and add your own copyright if you made<br>
changes.<br>
</blockquote>
<br></div>
The best way would be to not copy code at all and use a common file.  We have for example this:<br>
<br>
--- ../../arm/smdk2410/startup/<u></u>bspreset.c       2012-07-17 15:01:17.784193073 +0200<br>
+++ ../../arm/tiny6410/startup/<u></u>bspreset.c       2013-04-17 16:39:27.860189978 +0200<br>
@@ -1,5 +1,7 @@<br>
 /*<br>
- *  Copyright (c) 2002 by Jay Monkman <<a href="mailto:jtm@smoothsmoothie.com" target="_blank">jtm@smoothsmoothie.com</a>><div class="im"><br>
+ *  Bsp Reset<br>
+ *<br>
+ *  Copyright (c) 2013 by PengFan <<a href="mailto:van.freenix@gmail.com" target="_blank">van.freenix@gmail.com</a>><br></div>
  *<div class="im"><br>
  *  The license and distribution terms for this file may be<br></div><div class="im">
  *  found in the file LICENSE in this distribution or at<br></div>
@@ -10,15 +12,10 @@<br>
<br>
 void bsp_reset(void)<br>
 {<br>
-#if ON_SKYEYE == 1<br>
-  #define SKYEYE_MAGIC_ADDRESS (*(volatile unsigned int *)(0xb0000000))<br>
-<br>
-  SKYEYE_MAGIC_ADDRESS = 0xff;<br>
-#else<br>
-  /* XXX TODO this code is copied from gp32.. move it to a shared place */<br>
   rtems_interrupt_level level;<br>
   rtems_interrupt_disable(level)<u></u>;<br>
-  /* disable mmu, invalide i-cache and call swi #4 */<div class="im"><br>
+  /* disable mmu, invalide i-cache, clean and invalidate d-cache<br>
+        * and mov pc to 0 */<br></div>
   __asm__ volatile(""<br>
     "mrc    p15,0,r0,c1,c0,0  \n"<br>
     "bic    r0,r0,#1          \n"<br>
@@ -35,11 +32,17 @@<br>
     "nop                      \n"<br>
     "nop                      \n"<br>
     "nop                      \n"<br>
-    "swi    #4                "<div class="im"><br>
+    "mov    r0,#0             \n"<br>
+    "MCR    p15,0,r0,c7,c14,0 \n"<br>
+    "nop                      \n"<br>
+    "nop                      \n"<br>
+    "nop                      \n"<br>
+    "nop                      \n"<br>
+    "nop                      \n"<br>
+    "ldr       pc,                                     =0x0"<br></div>
     :<br>
     :<br>
     : "r0"<br>
   );<div class="im"><br>
   /* we should be back in bios now */<br></div>
-#endif<br>
 }<br>
<br>
Why do we need two different files if we only use the CP15 and no chip specific features like a watchdog module?<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone   : +49 89 189 47 41-16<br>
Fax     : +49 89 189 47 41-09<br>
E-Mail  : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-<u></u>brains.de</a><br>
PGP     : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
rtems-devel mailing list<br>
<a href="mailto:rtems-devel@rtems.org" target="_blank">rtems-devel@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/<u></u>listinfo/rtems-devel</a><br>
</div></div></blockquote></div><br></div>