[U-Boot] [PATCH] TI DaVinci DM646x: Adding initial support for DM6467 EVM

Tom Tom.Rix at windriver.com
Fri Oct 2 14:16:33 CEST 2009


s-paulraj at ti.com wrote:
> From: Sandeep Paulraj <s-paulraj at ti.com>
> 
> This patch adds the initial support for DM6467 EVM.
> Other features like NET and NAND support will be added as follow up patches.
> 
> Signed-off-by: Sandeep Paulraj <s-paulraj at ti.com>
> ---
> There are multiple flavours of the DM646x. The newest DM646x SOC can operate
> at 1 GHz. The DM6467 EVM from Spectrum Digital can be used for both speed
> grades of the DM646x SOC . The only change on the EVM being an oscilator that
> operated at a higher frequency. The same board file will be used to support
> both SOC's. Support for this feature will be added as follow up patches.
> 
> Patches will also be sent to enable EMAC, NAND and other features.
>  Makefile                            |    3 +

Needs an addition to MAKEALL and optionally Maintainers

>  board/davinci/dm6467evm/Makefile    |   52 ++++++++++++++
>  board/davinci/dm6467evm/config.mk   |    2 +
>  board/davinci/dm6467evm/dm6467evm.c |   31 ++++++++
>  include/configs/davinci_dm6467evm.h |  131 +++++++++++++++++++++++++++++++++++
>  5 files changed, 219 insertions(+), 0 deletions(-)
>  create mode 100644 board/davinci/dm6467evm/Makefile
>  create mode 100644 board/davinci/dm6467evm/config.mk
>  create mode 100644 board/davinci/dm6467evm/dm6467evm.c
>  create mode 100644 include/configs/davinci_dm6467evm.h
> 
> diff --git a/Makefile b/Makefile
> index 0b61d05..dc797b0 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2962,6 +2962,9 @@ davinci_dm355evm_config :	unconfig
>  davinci_dm365evm_config :	unconfig
>  	@$(MKCONFIG) $(@:_config=) arm arm926ejs dm365evm davinci davinci
>  
> +davinci_dm6467evm_config :	unconfig
> +	@$(MKCONFIG) $(@:_config=) arm arm926ejs dm6467evm davinci davinci
> +
>  imx27lite_config:	unconfig
>  	@$(MKCONFIG) $(@:_config=) arm arm926ejs imx27lite logicpd mx27
>  
> diff --git a/board/davinci/dm6467evm/Makefile b/board/davinci/dm6467evm/Makefile
> new file mode 100644
> index 0000000..26b0705
> --- /dev/null
> +++ b/board/davinci/dm6467evm/Makefile
> @@ -0,0 +1,52 @@
> +#
> +# (C) Copyright 2000, 2001, 2002
> +# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
> +#
> +# Copyright (C) 2007 Sergey Kubushyn <ksi at koi8.net>
> +#
> +# 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
> +SOBJS	:=
> +
> +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 $(obj).depend
> +
> +#########################################################################
> +# This is for $(obj).depend target
> +include $(SRCTREE)/rules.mk
> +
> +sinclude $(obj).depend
> +
> +#########################################################################
> diff --git a/board/davinci/dm6467evm/config.mk b/board/davinci/dm6467evm/config.mk
> new file mode 100644
> index 0000000..ca801c2
> --- /dev/null
> +++ b/board/davinci/dm6467evm/config.mk
> @@ -0,0 +1,2 @@
> +#Provide at least 16MB spacing between us and the Linux Kernel image
> +TEXT_BASE = 0x81080000
> diff --git a/board/davinci/dm6467evm/dm6467evm.c b/board/davinci/dm6467evm/dm6467evm.c
> new file mode 100644
> index 0000000..9605818
> --- /dev/null
> +++ b/board/davinci/dm6467evm/dm6467evm.c
> @@ -0,0 +1,31 @@
> +/*
> + * Copyright (C) 2009 Texas Instruments Incorporated
> + *
> + * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
> + */
> +
> +#include <common.h>
> +#include <asm/io.h>
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +int board_init(void)
> +{
> +	gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_DM6467_EVM;
> +	gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
> +
> +	return 0;
> +}
> +
> diff --git a/include/configs/davinci_dm6467evm.h b/include/configs/davinci_dm6467evm.h
> new file mode 100644
> index 0000000..c23d533
> --- /dev/null
> +++ b/include/configs/davinci_dm6467evm.h
> @@ -0,0 +1,131 @@
> +/*
> + * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/

Above copyright did not have the http.
You should be consistent.
Add or remove, your choice.

> + *
> + * 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 __CONFIG_H
> +#define __CONFIG_H
> +
> +/* Spectrum Digital TMS320DM6467 EVM board */
> +#define DAVINCI_DM6467EVM
> +
> +#define CONFIG_SKIP_LOWLEVEL_INIT
> +#define CONFIG_SKIP_RELOCATE_UBOOT
> +
> +/* SoC Configuration */
> +#define CONFIG_ARM926EJS				/* arm926ejs CPU */
> +#define CONFIG_SYS_TIMERBASE		0x01c21400	/* use timer 0 */

Is there a logical register #define you could use instead of the magic 
number?

> +#define CONFIG_SYS_HZ_CLOCK		27000000
> +#define CONFIG_SYS_HZ			1000
> +#define CONFIG_SOC_DM646X
> +
> +/* EEPROM definitions for EEPROM */
> +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN		2
> +#define CONFIG_SYS_I2C_EEPROM_ADDR		0x50
> +#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	6
> +#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	20
> +
> +/* Memory Info */
> +#define CONFIG_SYS_MALLOC_LEN		(1 << 20)	/* 1 MiB */
> +#define CONFIG_SYS_GBL_DATA_SIZE	128		/* initial data */
> +#define CONFIG_SYS_MEMTEST_START	0x80000000
> +#define CONFIG_SYS_MEMTEST_END		0x81000000	/* 16MB RAM test */
> +#define CONFIG_NR_DRAM_BANKS		1
> +#define CONFIG_STACKSIZE		(256 << 10)	/* 256 KiB */
> +#define PHYS_SDRAM_1			0x80000000	/* DDR Start */
> +#define PHYS_SDRAM_1_SIZE		(256 << 20)	/* DDR size 256MB */
> +
> +/* Linux interfacing */
> +#define CONFIG_CMDLINE_TAG
> +#define CONFIG_SETUP_MEMORY_TAGS
> +#define CONFIG_SYS_BARGSIZE		1024		/* Bootarg Size */
> +#define CONFIG_SYS_LOAD_ADDR		0x80700000	/* kernel address */
> +
> +/* Serial Driver info */
> +#define CONFIG_SYS_NS16550
> +#define CONFIG_SYS_NS16550_SERIAL
> +#define CONFIG_SYS_NS16550_REG_SIZE	4
> +#define CONFIG_SYS_NS16550_COM1		0x01c20000
> +#define CONFIG_SYS_NS16550_CLK		24000000
> +#define CONFIG_CONS_INDEX		1
> +#define CONFIG_BAUDRATE			115200
> +#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
> +
> +/* I2C Configuration */
> +#define CONFIG_HARD_I2C
> +#define CONFIG_DRIVER_DAVINCI_I2C
> +#define CONFIG_SYS_I2C_SPEED		80000

This speed is unusual.
davinci_sonata.h has a comment that it had a silicon bug with 100k
Could the same comment be applied here ?

> +#define CONFIG_SYS_I2C_SLAVE		10
> +
> +/* Flash & Environment */
> +#define CONFIG_SYS_NO_FLASH
> +#ifdef CONFIG_SYS_USE_NAND
> +#define CONFIG_NAND_DAVINCI
> +#undef CONFIG_ENV_IS_IN_FLASH
> +#define CONFIG_ENV_IS_IN_NAND
> +#define CONFIG_ENV_SIZE			(16 << 10)	/* 16 KiB */
> +#define CONFIG_SYS_NAND_BASE_LIST	{0x42000000, }
> +#define CONFIG_SYS_NAND_HW_ECC
> +#define CONFIG_SYS_MAX_NAND_DEVICE	1
> +#define CONFIG_ENV_OFFSET		0
> +#else
> +#define CONFIG_ENV_IS_NOWHERE
> +#define CONFIG_ENV_SIZE			(4 << 10)	/* 4 KiB */
> +#endif
> +
> +/* U-Boot general configuration */
> +#undef	CONFIG_USE_IRQ				/* No IRQ/FIQ in U-Boot */

There is a TAB between #undef and CONFIG_USB_IRQ.
Other undef's here use a space.


> +#define CONFIG_BOOTDELAY	3
> +#define CONFIG_BOOTFILE		"uImage"	/* Boot file name */
> +#define CONFIG_SYS_PROMPT	"DM6467 EVM > "	/* Monitor Command Prompt */
> +#define CONFIG_SYS_CBSIZE	1024		/* Console I/O Buffer Size  */
> +#define CONFIG_SYS_PBSIZE		\
> +		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
> +#define CONFIG_SYS_MAXARGS		16
> +#define CONFIG_VERSION_VARIABLE
> +#define CONFIG_AUTO_COMPLETE
> +#define CONFIG_SYS_HUSH_PARSER
> +#define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
> +#define CONFIG_CMDLINE_EDITING
> +#define CONFIG_SYS_LONGHELP
> +#define CONFIG_CRC32_VERIFY
> +#define CONFIG_MX_CYCLIC
> +#define CONFIG_BOOTCOMMAND   		"source 0x82080000; dhcp; bootm"

3 spaces at the end of CONFIG_BOOTCOMMAND can be removed.

> +#define CONFIG_BOOTARGS		\
> +		"mem=120M console=ttyS0,115200n8 " \
> +		"root=/dev/hda1 rw noinitrd ip=dhcp"
> +
> +/* U-Boot commands */
> +#include <config_cmd_default.h>
> +#define CONFIG_CMD_ASKENV
> +#define CONFIG_CMD_DIAG
> +#define CONFIG_CMD_I2C
> +#define CONFIG_CMD_MII
> +#define CONFIG_CMD_SAVES
> +#define CONFIG_CMD_EEPROM
> +#undef CONFIG_CMD_NET
> +#undef CONFIG_CMD_BDI
> +#undef CONFIG_CMD_FPGA
> +#undef CONFIG_CMD_SETGETDCR
> +#ifdef CONFIG_SYS_USE_NAND
> +#undef CONFIG_CMD_FLASH
> +#undef CONFIG_CMD_IMLS
> +#define CONFIG_CMD_NAND
> +#endif
> +
> +#endif /* __CONFIG_H */
> +

Tom


More information about the U-Boot mailing list