[PATCH 2/2] Initial bsp for Tiny6410
Peng Fan
van.freenix at gmail.com
Fri Apr 19 09:04:20 UTC 2013
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.
Regards,
Peng.
2013/4/19 Sebastian Huber <sebastian.huber at embedded-brains.de>
> On 04/18/2013 06:50 PM, Gedare Bloom wrote:
>
>> The previous version indicated you copied code from other parts of
>> RTEMS. If you retained the copied code, you should also retain the
>> code's copyright notice and add your own copyright if you made
>> changes.
>>
>
> The best way would be to not copy code at all and use a common file. We
> have for example this:
>
> --- ../../arm/smdk2410/startup/**bspreset.c 2012-07-17
> 15:01:17.784193073 +0200
> +++ ../../arm/tiny6410/startup/**bspreset.c 2013-04-17
> 16:39:27.860189978 +0200
> @@ -1,5 +1,7 @@
> /*
> - * Copyright (c) 2002 by Jay Monkman <jtm at smoothsmoothie.com>
>
> + * Bsp Reset
> + *
> + * Copyright (c) 2013 by PengFan <van.freenix at gmail.com>
> *
>
> * The license and distribution terms for this file may be
> * found in the file LICENSE in this distribution or at
> @@ -10,15 +12,10 @@
>
> void bsp_reset(void)
> {
> -#if ON_SKYEYE == 1
> - #define SKYEYE_MAGIC_ADDRESS (*(volatile unsigned int *)(0xb0000000))
> -
> - SKYEYE_MAGIC_ADDRESS = 0xff;
> -#else
> - /* XXX TODO this code is copied from gp32.. move it to a shared place */
> rtems_interrupt_level level;
> rtems_interrupt_disable(level)**;
> - /* disable mmu, invalide i-cache and call swi #4 */
>
> + /* disable mmu, invalide i-cache, clean and invalidate d-cache
> + * and mov pc to 0 */
> __asm__ volatile(""
> "mrc p15,0,r0,c1,c0,0 \n"
> "bic r0,r0,#1 \n"
> @@ -35,11 +32,17 @@
> "nop \n"
> "nop \n"
> "nop \n"
> - "swi #4 "
>
> + "mov r0,#0 \n"
> + "MCR p15,0,r0,c7,c14,0 \n"
> + "nop \n"
> + "nop \n"
> + "nop \n"
> + "nop \n"
> + "nop \n"
> + "ldr pc, =0x0"
> :
> :
> : "r0"
> );
>
> /* we should be back in bios now */
> -#endif
> }
>
> Why do we need two different files if we only use the CP15 and no chip
> specific features like a watchdog module?
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail : sebastian.huber at embedded-**brains.de<sebastian.huber at embedded-brains.de>
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
> ______________________________**_________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/**listinfo/rtems-devel<http://www.rtems.org/mailman/listinfo/rtems-devel>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20130419/41caa56b/attachment-0001.html>
More information about the devel
mailing list