[U-Boot] [PATCH 4/4] arm/kirkwood: Add Keymile SUEN3 support

Dieter Kiermaier dk-arm-linux at gmx.de
Thu Jul 9 09:21:33 CEST 2009


Hi Stefan, hi Prafulla,

> Hi Prafulla,
> 
> On Wednesday 08 July 2009 19:48:19 Prafulla Wadaskar wrote:
> > >  MAINTAINERS                       |    1 +
> > >  MAKEALL                           |    1 +
> > >  Makefile                          |    3 +
> > >  board/keymile/suen3/Makefile      |   51 +++++++++
> > >  board/keymile/suen3/config.mk     |   25 ++++
> > >  board/keymile/suen3/sdramregs.txt |   28 +++++
> >
> > This file will be of no use until we have proposed bin_dep.sh and doimage
> > utility in place.
> 
> Even without doimage and/or bin_dep.sh in place, I think it makes perfect 
> sense to include this SDRAM init file in the board directory. Mainly because 
> of two reasons:
> 
> a) Keep bootloader related files in one place (SDRAM init is crucial for
>    correct operation)
> 
> b) Keep those files under revision control
> 
> And I don't think that anything really speaks against having this file in this 
> place for now.
> 
> But anyway, we should try to get at least your bin_dep.sh infrastructure 
> accepter. Or at least restart the discussion about it (and probably about 
> doimage as well).

I would prefer this, too. If I'm allowed to vote for this :)

Dieter

> 
> > >  board/keymile/suen3/suen3.c       |  127 +++++++++++++++++++++
> > >  include/configs/suen3.h           |  221
> > > +++++++++++++++++++++++++++++++++++++
> > >  8 files changed, 457 insertions(+), 0 deletions(-)  create mode
> > > 100644 board/keymile/suen3/Makefile  create mode 100644
> > > board/keymile/suen3/config.mk  create mode 100644
> > > board/keymile/suen3/sdramregs.txt  create mode 100644
> > > board/keymile/suen3/suen3.c  create mode 100644
> > > include/configs/suen3.h
> > >
> > > diff --git a/MAINTAINERS b/MAINTAINERS index 705bac5..ce117e1 100644
> > > --- a/MAINTAINERS
> > > +++ b/MAINTAINERS
> > > @@ -637,6 +637,7 @@ Stefan Roese <sr at denx.de>
> > >  	ixdpg425	xscale
> > >  	pdnb3		xscale
> > >  	scpu		xscale
> > > +	suen3		ARM926EJS (Kirkwood SoC)
> > >
> > >  Alessandro Rubini <rubini at unipv.it>
> > >  Nomadik Linux Team <STN_WMM_nomadik_linux at list.st.com>
> > > diff --git a/MAKEALL b/MAKEALL
> > > index 41f1445..6c80694 100755
> > > --- a/MAKEALL
> > > +++ b/MAKEALL
> > > @@ -524,6 +524,7 @@ LIST_ARM9="			\
> > >  	scb9328			\
> > >  	smdk2400		\
> > >  	smdk2410		\
> > > +	suen3			\
> > >  	trab			\
> > >  	VCMA9			\
> > >  	versatile		\
> > > diff --git a/Makefile b/Makefile
> > > index 2a06440..3afc4ba 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -2925,6 +2925,9 @@ smdk2400_config	:	unconfig
> > >  smdk2410_config	:	unconfig
> > >  	@$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 samsung s3c24x0
> > >
> > > +suen3_config: unconfig
> > > +	@$(MKCONFIG) $(@:_config=) arm arm926ejs $(@:_config=) keymile
> > > +kirkwood
> > > +
> > >  SX1_stdout_serial_config \
> > >  SX1_config:		unconfig
> > >  	@mkdir -p $(obj)include
> > > diff --git a/board/keymile/suen3/Makefile
> > > b/board/keymile/suen3/Makefile new file mode 100644 index
> > > 0000000..de05cc8
> > > --- /dev/null
> > > +++ b/board/keymile/suen3/Makefile
> > > @@ -0,0 +1,51 @@
> > > +#
> > > +# (C) Copyright 2009
> > > +# Marvell Semiconductor <www.marvell.com> # Prafulla Wadaskar
> > > +<prafulla at marvell.com> # # See file CREDITS for list of people who
> > > +contributed to this # project.
> >
> > I think you forgot to change these lines :-)
> 
> I didn't change much in this file, so I didn't change the copyright header.
> 
> > > +#
> > > +# 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., 51 Franklin Street, Fifth Floor, Boston, # MA
> > > +02110-1301 USA #
> > > +
> > > +include $(TOPDIR)/config.mk
> > > +
> > > +LIB	= $(obj)lib$(BOARD).a
> > > +
> > > +COBJS	:= suen3.o
> > > +
> > > +SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
> > > +OBJS	:= $(addprefix $(obj),$(COBJS))
> > > +SOBJS	:= $(addprefix $(obj),$(SOBJS))
> > > +
> > > +$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
> > > +	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
> > > +
> > > +clean:
> > > +	rm -f $(SOBJS) $(OBJS)
> > > +
> > > +distclean:	clean
> > > +	rm -f $(LIB) core *.bak .depend
> > > +
> > > +#############################################################
> > > ##########
> > > +##
> > > +
> > > +# defines $(obj).depend target
> > > +include $(SRCTREE)/rules.mk
> > > +
> > > +sinclude $(obj).depend
> > > +
> > > +#############################################################
> > > ##########
> > > +##
> > > diff --git a/board/keymile/suen3/config.mk
> > > b/board/keymile/suen3/config.mk new file mode 100644 index
> > > 0000000..fb29a1b
> > > --- /dev/null
> > > +++ b/board/keymile/suen3/config.mk
> > > @@ -0,0 +1,25 @@
> > > +#
> > > +# (C) Copyright 2009
> > > +# Marvell Semiconductor <www.marvell.com> # Prafulla Wadaskar
> > > +<prafulla at marvell.com> # # See file CREDITS for list of people who
> > > +contributed to this # project.
> >
> > Here too
> 
> Again, nothing changed.
> 
> > > +#
> > > +# 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., 51 Franklin Street, Fifth Floor, Boston, # MA
> > > +02110-1301 USA #
> > > +
> > > +TEXT_BASE = 0x00600000
> > > diff --git a/board/keymile/suen3/sdramregs.txt
> > > b/board/keymile/suen3/sdramregs.txt
> > > new file mode 100644
> > > index 0000000..74abb20
> > > --- /dev/null
> > > +++ b/board/keymile/suen3/sdramregs.txt
> >
> > Under which license?
> 
> GPL of course. ;)
> 
> And one question about this: Does "doimage" allow comments? And if yes, what's 
> the comment control character? Is C-style supported ("/*")?
> 
> > > @@ -0,0 +1,28 @@
> > > +0xFFD10000 0x01111111
> > > +0xFFD10008 0x00001100
> > > +0xFFD100E0 0x1B1B1B1B
> > > +0xFFD20134 0xBBBBBBBB
> > > +0xFFD20138 0x00BBBBBB
> > > +0xFFD20154 0x00000200
> > > +0xFFD2014C 0x00001C00
> > > +0xFFD20148 0x00000001
> > > +0xFFD01400 0x43000400
> > > +0xFFD01404 0x36343000
> > > +0xFFD01408 0x2302544B
> > > +0xFFD0140C 0x00000032
> > > +0xFFD01410 0x0000000D
> > > +0xFFD01414 0x00000000
> > > +0xFFD01418 0x00000000
> > > +0xFFD0141C 0x00000642
> > > +0xFFD01420 0x00000040
> > > +0xFFD01424 0x0000F07F
> > > +0xFFD01504 0x07FFFFF1
> > > +0xFFD01508 0x00000000
> > > +0xFFD0150C 0x00000000
> > > +0xFFD01514 0x00000000
> > > +0xFFD0151C 0x00000000
> > > +0xFFD01494 0x00000000
> > > +0xFFD01498 0x00000000
> > > +0xFFD0149C 0x0000E90F
> > > +0xFFD01480 0x00000001
> > > +0x0 0x0
> > > diff --git a/board/keymile/suen3/suen3.c b/board/keymile/suen3/suen3.c
> > > new file mode 100644 index 0000000..231745f
> > > --- /dev/null
> > > +++ b/board/keymile/suen3/suen3.c
> > > @@ -0,0 +1,127 @@
> > > +/*
> > > + * (C) Copyright 2009
> > > + * Marvell Semiconductor <www.marvell.com>
> > > + * Prafulla Wadaskar <prafulla at marvell.com>
> >
> > Here too
> 
> The basic part if from you. So I left your copyright in it.
> 
> > > + *
> > > + * (C) Copyright 2009
> > > + * Stefan Roese, DENX Software Engineering, sr 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., 51 Franklin Street, Fifth Floor, Boston,
> > > + * MA 02110-1301 USA
> > > + */
> > > +
> > > +#include <common.h>
> > > +#include <netdev.h>
> > > +#include <miiphy.h>
> > > +#include <asm/arch/kirkwood.h>
> > > +#include <asm/arch/mpp.h>
> > > +
> > > +DECLARE_GLOBAL_DATA_PTR;
> > > +
> > > +int board_init(void)
> > > +{
> > > +	/* Multi-Purpose Pins Functionality configuration */
> > > +	u32 kwmpp_config[] = {
> > > +		MPP0_NF_IO2,
> > > +		MPP1_NF_IO3,
> > > +		MPP2_NF_IO4,
> > > +		MPP3_NF_IO5,
> > > +		MPP4_NF_IO6,
> > > +		MPP5_NF_IO7,
> > > +		MPP6_SYSRST_OUTn,
> > > +		MPP7_PEX_RST_OUTn,
> > > +		MPP8_TW_SDA,
> > > +		MPP9_TW_SCK,
> > > +		MPP10_UART0_TXD,
> > > +		MPP11_UART0_RXD,
> > > +		MPP12_GPO,		/* Reserved */
> > > +		MPP13_UART1_TXD,
> > > +		MPP14_UART1_RXD,
> > > +		MPP15_GPIO,		/* Not used */
> > > +		MPP16_GPIO,		/* Not used */
> > > +		MPP17_GPIO,		/* Reserved */
> > > +		MPP18_NF_IO0,
> > > +		MPP19_NF_IO1,
> > > +		MPP20_GPIO,
> > > +		MPP21_GPIO,
> > > +		MPP22_GPIO,
> > > +		MPP23_GPIO,
> > > +		MPP24_GPIO,
> > > +		MPP25_GPIO,
> > > +		MPP26_GPIO,
> > > +		MPP27_GPIO,
> > > +		MPP28_GPIO,
> > > +		MPP29_GPIO,
> > > +		MPP30_GPIO,
> > > +		MPP31_GPIO,
> > > +		MPP32_GPIO,
> > > +		MPP33_GPIO,
> > > +		MPP34_GPIO,		/* CDL1 (input) */
> > > +		MPP35_GPIO,		/* CDL2 (input) */
> > > +		MPP36_GPIO,		/* MAIN_IRQ (input) */
> > > +		MPP37_GPIO,		/* BOARD_LED */
> > > +		MPP38_GPIO,		/* Piggy3 LED[1] */
> > > +		MPP39_GPIO,		/* Piggy3 LED[2] */
> > > +		MPP40_GPIO,		/* Piggy3 LED[3] */
> > > +		MPP41_GPIO,		/* Piggy3 LED[4] */
> > > +		MPP42_GPIO,		/* Piggy3 LED[5] */
> > > +		MPP43_GPIO,		/* Piggy3 LED[6] */
> > > +		MPP44_GPIO,		/* Piggy3 LED[7] */
> > > +		MPP45_GPIO,		/* Piggy3 LED[8] */
> > > +		MPP46_GPIO,		/* Reserved */
> > > +		MPP47_GPIO,		/* Reserved */
> > > +		MPP48_GPIO,		/* Reserved */
> > > +		MPP49_GPIO,		/* SW_INTOUTn */
> > > +		0
> > > +	};
> > > +
> > > +	kirkwood_mpp_conf(kwmpp_config);
> > > +
> > > +	/*
> > > +	 * arch number of board
> > > +	 */
> > > +	gd->bd->bi_arch_number = MACH_TYPE_SUEN3;
> > > +
> > > +	/* address of boot parameters */
> > > +	gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
> > > +
> > > +	return 0;
> > > +}
> > > +
> > > +int dram_init(void)
> > > +{
> > > +	int i;
> > > +
> > > +	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
> > > +		gd->bd->bi_dram[i].start = kw_sdram_bar(i);
> > > +		gd->bd->bi_dram[i].size = kw_sdram_bs(i);
> > > +	}
> > > +	return 0;
> > > +}
> > > +
> > > +/* Configure and enable MV88E1118 PHY */ void reset_phy(void) {
> >
> > If this PHY connected using RGMII then pls check you done need RGMII Tx/Rx
> > delays
> 
> Ethernet works without any further changes on this board (tested with 
> 100MBit). How should this RGMII Tx/Rx delay problem show? Instable traffic? Or 
> what would be not working?
> 
> Thanks.
> 
> Best regards,
> Stefan
> 
> =====================================================================
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
> =====================================================================
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 




More information about the U-Boot mailing list