[U-Boot] [PATCH 5/5] MIPS: Malta: convert to generic board

Paul Burton paul.burton at imgtec.com
Mon Apr 7 11:00:44 CEST 2014


On Sun, Apr 06, 2014 at 08:58:16PM +0200, Daniel Schwierzeck wrote:
> 2014-04-04 13:20 GMT+02:00 Paul Burton <paul.burton at imgtec.com>:
> > This patch converts the MIPS Malta development board to make use of the
> > generic board code now that it is supported on MIPS.
> >
> > Signed-off-by: Paul Burton <paul.burton at imgtec.com>
> > ---
> >  board/imgtec/malta/malta.c | 9 ++++-----
> >  include/configs/malta.h    | 3 +++
> >  2 files changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c
> > index d363e49..0f16b74 100644
> > --- a/board/imgtec/malta/malta.c
> > +++ b/board/imgtec/malta/malta.c
> > @@ -19,6 +19,8 @@
> >
> >  #include "superio.h"
> >
> > +DECLARE_GLOBAL_DATA_PTR;
> > +
> >  enum core_card {
> >         CORE_UNKNOWN,
> >         CORE_LV,
> > @@ -82,11 +84,6 @@ static enum sys_con malta_sys_con(void)
> >         }
> >  }
> >
> > -phys_size_t initdram(int board_type)
> > -{
> > -       return CONFIG_SYS_MEM_SIZE;
> > -}
> > -
> >  int checkboard(void)
> >  {
> >         enum core_card core;
> > @@ -129,6 +126,8 @@ int board_early_init_f(void)
> >  {
> >         void *io_base;
> >
> > +       gd->ram_size = CONFIG_SYS_MEM_SIZE;
> > +
> >         /* choose correct PCI I/O base */
> >         switch (malta_sys_con()) {
> >         case SYSCON_GT64120:
> 
> I would prefer to enable the according init funtions in board_f,c for
> MIPS, so that all MIPS boards can be converted without changing such
> code.

Sure, v2 coming shortly.

> 
> --- a/common/board_f.c
> +++ b/common/board_f.c
> @@ -173,7 +173,7 @@ static int announce_dram_init(void)
>         return 0;
>  }
> 
> -#ifdef CONFIG_PPC
> +#if defined(CONFIG_PPC) || defined(CONFIG_MIPS)
>  static int init_func_ram(void)
>  {
>  #ifdef CONFIG_BOARD_TYPES
> @@ -889,7 +889,7 @@ static init_fnc_t init_sequence_f[] = {
>  #ifdef CONFIG_ARM
>         dram_init,              /* configure available RAM banks */
>  #endif
> -#ifdef CONFIG_PPC
> +#if defined(CONFIG_PPC) || defined(CONFIG_MIPS)
>         init_func_ram,
>  #endif
>  #ifdef CONFIG_POST
> 
> BTW: there are other canditates too, which are implemented in the same
> way as PowerPC or ARM and which should be also enabled for MIPS, e.g.
> init_timer
> 
> -- 
> - Daniel

Thanks for pointing that out! I can't spot anything besides init_timer,
except for the board-specific incapi_set_cpuclk call which I guess will
probably just need to be added to common/board_f.c if & when that board
is converted.

Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140407/9afb8dbb/attachment.pgp>


More information about the U-Boot mailing list