Add support for the digsy MTC board.
Subsystems (2)
PATCH v3 1/1 Add support for the digsy MTC board.
This is the InterControl custom device based on the MPC5200B chip.
---
Version 3:
- updated (c)
Version 2:
- use I/O accessor functions instead of volatile pointer
- set ethernet address only if not set in environment
- add some comments and some style cleanup
MAKEALL | 1 + Makefile | 16 ++ board/digsy_mtc/Makefile | 32 ++++ board/digsy_mtc/config.mk | 24 +++ board/digsy_mtc/digsy_mtc.c | 333 ++++++++++++++++++++++++++++++++++++ board/digsy_mtc/eeprom.h | 32 ++++ board/digsy_mtc/is42s16800a-7t.h | 28 +++ cpu/mpc5xxx/ide.c | 2 +- drivers/net/mpc5xxx_fec.c | 1 + include/configs/digsy_mtc.h | 345 ++++++++++++++++++++++++++++++++++++++ 10 files changed, 813 insertions(+), 1 deletions(-) create mode 100644 board/digsy_mtc/Makefile create mode 100644 board/digsy_mtc/config.mk create mode 100644 board/digsy_mtc/digsy_mtc.c create mode 100644 board/digsy_mtc/eeprom.h create mode 100644 board/digsy_mtc/is42s16800a-7t.h create mode 100644 include/configs/digsy_mtc.h
MAKEALL +1 -0
@@ -47,6 +47,7 @@ LIST_5xxx=" \ BC3450 \ cm5200 \ cpci5200 \ + digsy_mtc \ EVAL5200 \ fo300 \ icecube_5100 \
Makefile +16 -0
@@ -527,6 +527,22 @@ cm5200_config: unconfig cpci5200_config: unconfig @$(MKCONFIG) -a cpci5200 ppc mpc5xxx cpci5200 esd +digsy_mtc_config \ +digsy_mtc_LOWBOOT_config \ +digsy_mtc_RAMBOOT_config: unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/digsy_mtc + @ >$(obj)include/config.h + @[ -z "$(findstring LOWBOOT_,$@)" ] || \ + { echo "TEXT_BASE = 0xFF000000" >$(obj)board/digsy_mtc/config.tmp ; \ + echo "... with LOWBOOT configuration" ; \ + } + @[ -z "$(findstring RAMBOOT_,$@)" ] || \ + { echo "TEXT_BASE = 0x00100000" >$(obj)board/digsy_mtc/config.tmp ; \ + echo "... with RAMBOOT configuration" ; \ + } + @$(MKCONFIG) -a digsy_mtc ppc mpc5xxx digsy_mtc + hmi1001_config: unconfig @$(MKCONFIG) hmi1001 ppc mpc5xxx hmi1001
board/digsy_mtc/Makefile new file +31 -0
@@ -0,0 +1,31 @@ +# +# Author: Grzegorz Bernacki, Semihalf, gjb at semihalf.com +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).a + +COBJS := $(BOARD).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/digsy_mtc/config.mk new file +24 -0
@@ -0,0 +1,24 @@ +# +# Author: Grzegorz Bernacki, Semihalf, gjb at semihalf.com +# + +# +# digsyMTC board: +# +# Valid values for TEXT_BASE are: +# +# 0xFFF00000 boot high (standard configuration) +# 0xFE000000 boot low +# 0x00100000 boot from RAM (for testing only) +# + +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + +ifndef TEXT_BASE +## Standard: boot high +TEXT_BASE = 0xFFF00000 +## For testing: boot from RAM +# TEXT_BASE = 0x00100000 +endif + +PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -I$(TOPDIR)/board
board/digsy_mtc/digsy_mtc.c new file +333 -0
333 lines not on this page · raw message
board/digsy_mtc/eeprom.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* (C) Copyright 2009 Semihalf, Grzegorz Bernacki <[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 anty 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 CMD_EEPROM_H +#define CMD_EEPROM_H + +#define EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR +#define EEPROM_LEN 1024/* eeprom length */ +#define EEPROM_IDENT 2408/* identification word */ +#define EEPROM_ADDR_IDENT 0/* identification word offset */ +#define EEPROM_ADDR_LEN_SYS 2/* system area lenght offset */ +#define EEPROM_ADDR_LEN_SYSCFG 4/* system config area length offset */ +#define EEPROM_ADDR_ETHADDR 23/* ethernet addres offset */ + +#endif
board/digsy_mtc/is42s16800a-7t.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* (C) Copyright 2004-2009 +* Mark Jonas, Freescale Semiconductor, mark.jonas at motorola.com. +* +* 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 +*/ + +#define SDRAM_MODE 0x00CD0000 +#define SDRAM_CONTROL 0x505F0000 +#define SDRAM_CONFIG1 0xD2322900 +#define SDRAM_CONFIG2 0x8AD70000 +
cpu/mpc5xxx/ide.c +1 -1
@@ -42,7 +42,7 @@ int ide_preinit (void)struct mpc5xxx_sdma *psdma = (struct mpc5xxx_sdma *)MPC5XXX_SDMA ; reg = *(vu_long *)MPC5XXX_GPS_PORT_CONFIG ; -#if defined(CONFIG_TOTAL5200 ) +#if defined(CONFIG_TOTAL5200 ) || defined(CONFIG_DIGSY_MTC )/* ATA cs0/1 on i2c2 clk/io */ reg = (reg & ~0x03000000ul ) |0x02000000ul ;#else
drivers/net/mpc5xxx_fec.c +1 -0
@@ -893,6 +893,7 @@ int mpc5xxx_fec_initialize(bd_t * bis) fec->rbdBase = (FEC_RBD *)(FEC_BD_BASE +FEC_TBD_NUM *sizeof (FEC_TBD )); #if defined(CONFIG_CANMB) || \ defined(CONFIG_CM5200) || \ + defined(CONFIG_DIGSY_MTC) || \ defined(CONFIG_HMI1001) || \ defined(CONFIG_ICECUBE) || \ defined(CONFIG_INKA4X0) || \
include/configs/digsy_mtc.h new file +345 -0
345 lines not on this page · raw message
Signature · 1 line
1.6.0.6
PATCH v3 1/1 Add support for the digsy MTC board.
Hi Grzegorz,
Quoted 12 lines · Grzegorz Bernacki
This is the InterControl custom device based on the MPC5200B chip.
Signed-off-by Grzegorz Bernacki <[email protected]>---
Version 3:
- updated (c)
Version 2:
- use I/O accessor functions instead of volatile pointer
- set ethernet address only if not set in environment
- add some comments and some style cleanup
<snip>
drivers/net/mpc5xxx_fec.c int mpc5xxx_fec_initialize(bd_t * bis) · line 899
Quoted 13 lines
drivers/net/mpc5xxx_fec.c +1
-0@@ -893,6 +893,7 @@ int mpc5xxx_fec_initialize(bd_t * bis) fec->rbdBase = (FEC_RBD *)(FEC_BD_BASE +FEC_TBD_NUM *sizeof (FEC_TBD )); #if defined(CONFIG_CANMB) || \ defined(CONFIG_CM5200) || \ + defined(CONFIG_DIGSY_MTC) || \ defined(CONFIG_HMI1001) || \ defined(CONFIG_ICECUBE) || \ defined(CONFIG_INKA4X0) || \
No more adding to this mess, please. This absolutely belongs in board code. I know you're not responsible for it, so if you don't have time to clean it up I can do so and supply an untested patch.
<snip>
regards,
Ben
PATCH v3 1/1 Add support for the digsy MTC board.
Hi Ben,
Quoted 4 lines
No more adding to this mess, please. This absolutely belongs in board code. I know you're not responsible for it, so if you don't have time to clean it up I can do so and supply an untested patch.
Yes, you are right, but I would like to merge this patch into main repository and then clean it up for all the boards. If you have a preliminary patch to fix it I can help you with testing on digsy_mtc.
regards,
Grzesiek
PATCH v3 1/1 Add support for the digsy MTC board.
Hi Grzesiek,
Quoted 9 lines · Grzegorz Bernacki
Hi Ben,
Quoted 5 lines
No more adding to this mess, please. This absolutely belongs in board code. I know you're not responsible for it, so if you don't have time to clean it up I can do so and supply an untested patch.
Quoted 7 lines
Yes, you are right, but I would like to merge this patch into main repository and then clean it up for all the boards. If you have a preliminary patch to fix it I can help you with testing on
digsy_mtc.regards,
Grzesiek
I just posted a patch. Please let me know what you think.
regards,
Ben
PATCH v3 1/1 Add support for the digsy MTC board.
Quoted 3 lines · Ben Warren
Quoted 1 line
I just posted a patch. Please let me know what you think.
Patch looks good. I tested it on motionpro, tqm5200 and digsy_mtc and it works fine.
Wolfgang,
Since my patch with digsy_mtc support and Ben's patch touch the same file, I think that maybe the best solution it to apply Ben's patch first and then I will send rebased version of my patch.
regards,
Grzesiek
PATCH v3 1/1 Add support for the digsy MTC board.
Quoted 4 lines · Grzegorz Bernacki
Quoted 2 lines · Ben Warren
Quoted 2 lines
Quoted 8 lines
Quoted 3 lines
I just posted a patch. Please let me know what you think.
Patch looks good. I tested it on motionpro, tqm5200 and
digsy_mtcand it works fine.
Excellent! Thanks.
Quoted 8 lines
Wolfgang,
Since my patch withdigsy_mtcsupport and Ben's patch touch the same file, I think that maybe the best solution it to apply Ben's patch first and then I will send rebased version of my patch.regards,
Grzesiek
I'll put it in the net repo and send a pull request tonight. (there are a few other patches that need to be pulled too).
regards,
Ben