Add support for mpc8313 based BUBBATWO
PATCH 1/2 Add support for mpc8313 based BUBBATWO
These patches add support for the mpc8313 based BUBBATWO board.
--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + include/configs/BUBBATWO.h | 516 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 524 insertions(+), 0 deletions(-) create mode 100644 include/configs/BUBBATWO.h
MAINTAINERS +4 -0
@@ -224,6 +224,10 @@ Sangmoon Kim <[email protected]> debris MPC8245 KVME080 MPC8245 +Tor Krill <[email protected]> + + BUBBATWO MPC8313 + Thomas Lange <[email protected]> GTH MPC860
MAKEALL +1 -0
@@ -332,6 +332,7 @@ LIST_83xx=" \ MPC837XERDB \ sbc8349 \ TQM834x \ + BUBBATWO \ "
Makefile +3 -0
@@ -1993,6 +1993,9 @@ MPC8313ERDB_66_config: unconfig fi ; @$(MKCONFIG) -a MPC8313ERDB ppc mpc83xx mpc8313erdb freescale +BUBBATWO_config: unconfig + @$(MKCONFIG) BUBBATWO ppc mpc83xx bubbatwo excito + MPC8315ERDB_config: unconfig @$(MKCONFIG) -a MPC8315ERDB ppc mpc83xx mpc8315erdb freescale
include/configs/BUBBATWO.h new file +516 -0
516 lines not on this page · raw message
Signature · 1 line
1.5.5.3
PATCH 2/2 Add board specific files for BUBBATWO
--- board/excito/bubbatwo/Makefile | 50 +++++++++ board/excito/bubbatwo/bubba_commands.c | 93 +++++++++++++++++ board/excito/bubbatwo/bubbatwo.c | 175 ++++++++++++++++++++++++++++++++ board/excito/bubbatwo/bubbatwo.h | 30 ++++++ board/excito/bubbatwo/config.mk | 1 + board/excito/bubbatwo/sdram.c | 167 ++++++++++++++++++++++++++++++ 6 files changed, 516 insertions(+), 0 deletions(-) create mode 100644 board/excito/bubbatwo/Makefile create mode 100644 board/excito/bubbatwo/bubba_commands.c create mode 100644 board/excito/bubbatwo/bubbatwo.c create mode 100644 board/excito/bubbatwo/bubbatwo.h create mode 100644 board/excito/bubbatwo/config.mk create mode 100644 board/excito/bubbatwo/sdram.c
board/excito/bubbatwo/Makefile new file +50 -0
@@ -0,0 +1,50 @@ +# +# (C) Copyright 2006 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# 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 $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).a + +COBJS := $(BOARD).o sdram.o bubba_commands.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/excito/bubbatwo/bubba_commands.c new file +93 -0
93 lines not on this page · raw message
board/excito/bubbatwo/bubbatwo.c new file +175 -0
175 lines not on this page · raw message
board/excito/bubbatwo/bubbatwo.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* Copyright (C) Excito Elektronik i Sk?ne AB, All rights reserved. +* Author: Tor Krill <[email protected]> +* +* 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 +*/ + +/* GPIO definitions */ +#define HW_IDMASK 0x07 +#define HW_ID0 (1<<3) +#define HW_ID1 (1<<2) +#define HW_ID2 (1<<0) + +#define BUTTON (1<<1) + +int getboardversion (void ); +
board/excito/bubbatwo/config.mk new file +1 -0
@@ -0,0 +1 @@ +TEXT_BASE = 0xFE000000
board/excito/bubbatwo/sdram.c new file +167 -0
167 lines not on this page · raw message
Signature · 1 line
1.5.5.3
PATCH 2/2 Add board specific files for BUBBATWO
board/excito/bubbatwo/bubba_commands.c line 93
Quoted 6 lines · On Mon, 2 Jun 2008 15:16:02 +0200 Tor Krill <[email protected]> wrote:
board/excito/bubbatwo/bubba_commands.c new file +6
-0+U_BOOT_CMD (bubbacmd,3 ,1 , do_bubbacmd, +"bubbacmd- Board specific commands for Bubba TWO\n" , +"spindown [dev] - spin down disk dev\n" +"bubbacmd spinup [dev] - spin up disk dev\n" +"bubbacmd button - read button status\n" ); +#endif
I the spinup/spindown commands should be part of cmd_ide, no? Or rather, should they be eliminated in favour of "Das U-Boot way" of only powering up devices when accesses are requested? i.e, power up on a disk read command and power down after it's done?
btw, this also prevents me from applying this board support patch because of the sata_sil3114 driver dependency here.
board/excito/bubbatwo/bubbatwo.c line 86
Quoted 4 lines
board/excito/bubbatwo/bubbatwo.c new file +4
-0+int getboardversion (void ) +{ +volatile immap_t *im = (immap_t *)CFG_IMMR ; +int rev = im->gpio[0 ].dat & (HW_ID0 |HW_ID1 |HW_ID2 );
looks like the and op is unnecessary here..plus we're not doing volatile i/o accesses any more - use {in,out}_be32(), {set,clr}bits32() etc., this occurs many other places in this patch..
board/excito/bubbatwo/bubbatwo.c line 93
Quoted 7 lines
board/excito/bubbatwo/bubbatwo.c new file +7
-0+ + rev = + ((rev &HW_ID0 ) >>3 ) | ((rev &HW_ID1 ) >>2 ) | ((rev &HW_ID2 ) << +1 ); + +return rev; +}
return ((rev & HW_ID0) >> 3) | ((rev & HW_ID1) >> 2) |
((rev & HW_ID2) << 1);
board/excito/bubbatwo/bubbatwo.c line 162
Quoted 10 lines
board/excito/bubbatwo/bubbatwo.c new file +10
-0+ulong board_flash_get_legacy (ulong base,int banknum,flash_info_t * info) +{ +if (banknum ==0 ) {/* non-CFI boot flash */ + info->portwidth =FLASH_CFI_16BIT ; + info->chipwidth =FLASH_CFI_BY16 ; + info->interface =FLASH_CFI_X16 ; +return 1 ; + }else { +return 0 ; + }
else is superfluous
Quoted 20 lines
board/excito/bubbatwo/sdram.c new file +20
-0+/* Lookup table for the different boardversions */ +static struct { +u32 memsize; +u32 config; +} meminfo[] = { +/* 0 - revA prototypes */ + { + memsize:128 , config:CFG_DDR_CONFIG_128 }, +/* 1 - revB */ + { + memsize:256 , config:CFG_DDR_CONFIG_256 }, +/* 2 - empty */ + { + memsize:128 , config:CFG_DDR_CONFIG_128 }, +/* 3 - empty */ + { + memsize:128 , config:CFG_DDR_CONFIG_128 }, +/* 4 - empty */ + { + memsize:128 , config:CFG_DDR_CONFIG_128 },
board/excito/bubbatwo/sdram.c line 87
Quoted 10 lines
board/excito/bubbatwo/sdram.c new file +10
-0+/* 5 - empty */ + { + memsize: 128, config:CFG_DDR_CONFIG_128}, +/* 6 - empty */ + { + memsize: 128, config:CFG_DDR_CONFIG_128}, +/* 7 - empty */ + { + memsize: 128, config:CFG_DDR_CONFIG_128} +};
would something like this be neater:
{ 128, CFG_DDR_CONFIG_128 }, /* 7 - empty */?
Kim
PATCH 1/2 Add support for mpc8313 based BUBBATWO
In reply to Tor KrillHi Tor,
Quoted 31 lines
These patches add support for the mpc8313 based BUBBATWO board.
Signed-off-by Tor Krill <[email protected]>--- MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 3 + include/configs/BUBBATWO.h | 516 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 524 insertions(+), 0 deletions(-) create mode 100644 include/configs/BUBBATWO.hMAINTAINERS +4
-0@@ -224,6 +224,10 @@ Sangmoon Kim <[email protected]> debris MPC8245 KVME080 MPC8245 +Tor Krill <[email protected]> + + BUBBATWO MPC8313 + Thomas Lange <[email protected]> GTH MPC860MAKEALL +0
-0
MAKEALL LIST_83xx=" \ · line 336
Quoted 5 lines
MAKEALL +1
-0@@ -332,6 +332,7 @@ LIST_83xx=" \ MPC837XERDB \ sbc8349 \ TQM834x \ + BUBBATWO \ "
Did you notice any unsorted list in MAKEALL? See?
Makefile MPC8313ERDB_66_config: unconfig · line 2000
Quoted 13 lines
Makefile +3
-0@@ -1993,6 +1993,9 @@ MPC8313ERDB_66_config: unconfig fi ; @$(MKCONFIG) -a MPC8313ERDB ppc mpc83xx mpc8313erdb freescale +BUBBATWO_config: unconfig + @$(MKCONFIG) BUBBATWO ppc mpc83xx bubbatwo excito + MPC8315ERDB_config: unconfig @$(MKCONFIG) -a MPC8315ERDB ppc mpc83xx mpc8315erdb freescale
Although not every section is sorted, I'd vote also to use sorting here, simply to make such a large file more transparent.
Quoted 10 lines
include/configs/BUBBATWO.h new file +4
-0@@ -0,0 +1,516 @@ +/* +* Copyright (C) Freescale Semiconductor, Inc. 2006. +* Copyright (C) Excito Elektronik i Sk?ne, 2008. +*
[...]
include/configs/BUBBATWO.h line 465
Quoted 5 lines
include/configs/BUBBATWO.h new file +5
-0+ +#define CONFIG_ETHADDR 00:22:02:00:95:01 +#define CONFIG_HAS_ETH1 +#define CONFIG_HAS_ETH0 +#define CONFIG_ETH1ADDR 00:22:02:00:95:02
Having MAC-Addresses in U-Boot proper is considered to be a bug. See the long list of mails on this topic...
Cheers
Detlev
Signature · 7 lines
Referee's report: This paper contains much that is new and much that is true. Unfortunately, that which is true is not new and that which is new is not true. -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de