mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Franck JULLIEN <franck.jullien@gmail.com>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/4] Add MIPS arch support to barebox
Date: Thu, 30 Jun 2011 09:12:16 +0200	[thread overview]
Message-ID: <BANLkTi=tJbuM6UOyni2VPoHzzqqcKnD0Yg@mail.gmail.com> (raw)
In-Reply-To: <20110630025251.GJ17355@game.jcrosoft.org>


[-- Attachment #1.1: Type: text/plain, Size: 4771 bytes --]

2011/6/30 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

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

...and nios2 :)


>
> Best Regards,
> J.
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>

[-- Attachment #1.2: Type: text/html, Size: 6371 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-06-30  7:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29  3:24 Antony Pavlov
2011-06-29  3:24 ` [PATCH 2/4] MIPS: add Malta machine " Antony Pavlov
2011-06-30  3:02   ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-02 14:41   ` Shinya Kuribayashi
2011-07-02 16:45     ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-03 20:44       ` Antony Pavlov
2011-07-04  5:11         ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-04  8:54       ` Antony Pavlov
2011-07-04  8:52         ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-03 20:50     ` Antony Pavlov
2011-06-29  3:24 ` [PATCH 3/4] MIPS: add qemu malta board " Antony Pavlov
2011-06-30  2:58   ` Jean-Christophe PLAGNIOL-VILLARD
2011-06-30  9:12     ` Antony Pavlov
2011-06-30  9:38   ` Jean-Christophe PLAGNIOL-VILLARD
2011-06-30 10:34     ` Antony Pavlov
2011-06-29  3:24 ` [PATCH 4/4] MISP: add documentation template Antony Pavlov
2011-06-29  5:40 ` [PATCH 1/4] Add MIPS arch support to barebox Jean-Christophe PLAGNIOL-VILLARD
2011-06-29  7:53   ` Antony Pavlov
2011-06-30  2:52 ` Jean-Christophe PLAGNIOL-VILLARD
2011-06-30  7:12   ` Franck JULLIEN [this message]
2011-06-30  9:18     ` Jean-Christophe PLAGNIOL-VILLARD
2011-06-30  9:13   ` Antony Pavlov
2011-07-02 13:47 ` Shinya Kuribayashi
2011-07-02 16:46   ` Jean-Christophe PLAGNIOL-VILLARD
2011-07-03 20:40   ` Antony Pavlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=tJbuM6UOyni2VPoHzzqqcKnD0Yg@mail.gmail.com' \
    --to=franck.jullien@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox