<br><br><div class="gmail_quote">2011/6/30 Jean-Christophe PLAGNIOL-VILLARD <span dir="ltr"><<a href="mailto:plagnioj@jcrosoft.com">plagnioj@jcrosoft.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> @@ -0,0 +1,32 @@<br>
> +/*<br>
> + * Copyright (C) 2011 Antony Pavlov <<a href="mailto:antonynpavlov@gmail.com">antonynpavlov@gmail.com</a>><br>
> + *<br>
> + * This program is free software; you can redistribute it and/or<br>
> + * modify it under the terms of the GNU General Public License as<br>
> + * published by the Free Software Foundation; either version 2 of<br>
> + * the License, or (at your option) any later version.<br>
> + *<br>
> + * This program is distributed in the hope that it will be useful,<br>
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
> + * GNU General Public License for more details.<br>
> + *<br>
> + * You should have received a copy of the GNU General Public License<br>
> + * along with this program; if not, write to the Free Software<br>
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,<br>
> + * MA 02111-1307 USA<br>
> + *<br>
> + */<br>
> +<br>
> +/**<br>
> + * @file<br>
> + * @brief Resetting an CPU<br>
> + */<br>
> +<br>
> +#include <common.h><br>
> +<br>
> +void __noreturn reset_cpu(ulong addr)<br>
> +{<br>
> + mips_machine_restart();<br>
> +}<br>
> +EXPORT_SYMBOL(reset_cpu);<br>
</div>no need of this manage it at machine level<br>
<div><div></div><div class="h5">> diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h<br>
> new file mode 100644<br>
> index 0000000..5c1e2de<br>
> --- /dev/null<br>
> +++ b/arch/mips/include/asm/types.h<br>
> @@ -0,0 +1,44 @@<br>
> +/*<br>
> + * This program is free software; you can redistribute it and/or<br>
> + * modify it under the terms of the GNU General Public License as<br>
> + * published by the Free Software Foundation; either version 2 of<br>
> + * the License, or (at your option) any later version.<br>
> + *<br>
> + * This program is distributed in the hope that it will be useful,<br>
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
> + * GNU General Public License for more details.<br>
> + *<br>
> + * You should have received a copy of the GNU General Public License<br>
> + * along with this program; if not, write to the Free Software<br>
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,<br>
> + * MA 02111-1307 USA<br>
> + *<br>
> + */<br>
> +<br>
> +#ifndef __ASM_MIPS_TYPES_H<br>
> +#define __ASM_MIPS_TYPES_H<br>
> +<br>
> +#ifndef __ASSEMBLY__<br>
> +<br>
> +typedef __signed__ char __s8;<br>
> +typedef unsigned char __u8;<br>
> +<br>
> +typedef __signed__ short __s16;<br>
> +typedef unsigned short __u16;<br>
> +<br>
> +typedef __signed__ int __s32;<br>
> +typedef unsigned int __u32;<br>
> +<br>
> +typedef __signed__ long long __s64;<br>
> +typedef unsigned long long __u64;<br>
> +<br>
> +typedef unsigned char u8;<br>
> +<br>
</div></div>can we factorize<br>
it's copy across arch<br>
<div class="im">> +typedef unsigned short u16;<br>
> +<br>
> +typedef unsigned int u32;<br>
> +<br>
> +#endif /* __ASSEMBLY__ */<br>
> +<br>
> +#endif /* __ASM_MIPS_TYPES_H */<br>
> diff --git a/arch/mips/include/mach/debug_ll.h b/arch/mips/include/mach/debug_ll.h<br>
> new file mode 100644<br>
> index 0000000..9fff7be<br>
> --- /dev/null<br>
</div><div><div></div><div class="h5">> +++ b/arch/mips/lib/memory.c<br>
> @@ -0,0 +1,34 @@<br>
> +/*<br>
> + * Copyright (c) 2011 Antony Pavlov <<a href="mailto:antonynpavlov@gmail.com">antonynpavlov@gmail.com</a>><br>
> + * See file CREDITS for list of people who contributed to this project.<br>
> + *<br>
> + * This file is part of barebox.<br>
> + *<br>
> + * This program is free software; you can redistribute it and/or<br>
> + * modify it under the terms of the GNU General Public License as<br>
> + * published by the Free Software Foundation; either version 2 of<br>
> + * the License, or (at your option) any later version.<br>
> + *<br>
> + * This program is distributed in the hope that it will be useful,<br>
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
> + * GNU General Public License for more details.<br>
> + *<br>
> + * You should have received a copy of the GNU General Public License<br>
> + * along with this program; if not, write to the Free Software<br>
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,<br>
> + * MA 02111-1307 USA<br>
> + */<br>
> +<br>
> +#include <common.h><br>
> +#include <init.h><br>
> +#include <mem_malloc.h><br>
> +#include <asm-generic/memory_layout.h><br>
> +<br>
> +static int mips_mem_malloc_init(void)<br>
> +{<br>
> + mem_malloc_init((void *)MALLOC_BASE,<br>
> + (void *)(MALLOC_BASE + MALLOC_SIZE));<br>
> + return 0;<br>
> +}<br>
> +core_initcall(mips_mem_malloc_init);<br>
</div></div>can we factorise this code this is the same on arm, m68k, blackfin too<br></blockquote><div><br></div><div>...and nios2 :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Best Regards,<br>
J.<br>
<br>
_______________________________________________<br>
<div><div></div><div class="h5">barebox mailing list<br>
<a href="mailto:barebox@lists.infradead.org">barebox@lists.infradead.org</a><br>
<a href="http://lists.infradead.org/mailman/listinfo/barebox" target="_blank">http://lists.infradead.org/mailman/listinfo/barebox</a><br>
</div></div></blockquote></div><br>