All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3 v5] devkit3250: add Timll DevKit3250 board initial support
Date: Fri, 13 Jan 2012 13:46:20 +0100	[thread overview]
Message-ID: <201201131346.20201.marek.vasut@gmail.com> (raw)
In-Reply-To: <1326415341-7351-4-git-send-email-vz@mleia.com>

> This change adds a basic support for Embest/Timll DevKit3250 board,
> NOR and UART are the only supported peripherals for a moment. The board
> doesn't require low-level init, because the initial SDRAM and GPIO
> configuration is performed during kickstart bootloader execution.
> 
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> Cc: Wolfgang Denk <wd@denx.de>
> ---

Acked-by: Marek Vasut <marek.vasut@gmail.com>

> Changes from v4 to v5:
> * fixed bi_boot_params initialization
> * cosmetic changes in board configuration
> 
> Changes from v3 to v4:
> * removed dcache flushing from board_init()
> * tabs instead of spaces in board config file
> 
> Changes from v2 to v3:
> * updated a relocation address
> * combined a record in maintainers file into the patch
> * use high speed UART2 by default
> 
> Changes from v1 to v2:
> * corrected address in GPLv2+ licence header in files
> * removed clean and distclean targets from board makefile
> * do not set machine id explicitly, if CONFIG_MACH_TYPE is defined
> * minor indentation cleanups
> 
>  MAINTAINERS                         |    4 +
>  board/timll/devkit3250/Makefile     |   44 +++++++++++++
>  board/timll/devkit3250/devkit3250.c |   65 +++++++++++++++++++
>  boards.cfg                          |    1 +
>  include/configs/devkit3250.h        |  117
> +++++++++++++++++++++++++++++++++++ 5 files changed, 231 insertions(+), 0
> deletions(-)
>  create mode 100644 board/timll/devkit3250/Makefile
>  create mode 100644 board/timll/devkit3250/devkit3250.c
>  create mode 100644 include/configs/devkit3250.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 4bf12b5..68dedae 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -914,6 +914,10 @@ Sughosh Ganu <urwithsughosh@gmail.com>
> 
>  	hawkboard	ARM926EJS (OMAP-L138)
> 
> +Vladimir Zapolskiy <vz@mleia.com>
> +
> +	devkit3250	lpc32xx
> +
>  -------------------------------------------------------------------------
> 
>  Unknown / orphaned boards:
> diff --git a/board/timll/devkit3250/Makefile
> b/board/timll/devkit3250/Makefile new file mode 100644
> index 0000000..ea7827c
> --- /dev/null
> +++ b/board/timll/devkit3250/Makefile
> @@ -0,0 +1,44 @@
> +#
> +# Copyright (C) 2011 by Vladimir Zapolskiy <vz@mleia.com>
> +# Copyright (C) 2008, Guennadi Liakhovetski <lg@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 $(TOPDIR)/config.mk
> +
> +LIB	= $(obj)lib$(BOARD).o
> +
> +COBJS	:= devkit3250.o
> +
> +SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
> +OBJS	:= $(addprefix $(obj),$(COBJS))
> +SOBJS	:= $(addprefix $(obj),$(SOBJS))
> +
> +$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
> +	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
> +
> +#########################################################################
> +
> +# defines $(obj).depend target
> +include $(SRCTREE)/rules.mk
> +
> +sinclude $(obj).depend
> +
> +#########################################################################
> diff --git a/board/timll/devkit3250/devkit3250.c
> b/board/timll/devkit3250/devkit3250.c new file mode 100644
> index 0000000..6b0ec80
> --- /dev/null
> +++ b/board/timll/devkit3250/devkit3250.c
> @@ -0,0 +1,65 @@
> +/*
> + * Embest/Timll DevKit3250 board support
> + *
> + * Copyright (C) 2011 Vladimir Zapolskiy <vz@mleia.com>
> + *
> + * 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 <asm/arch/sys_proto.h>
> +#include <asm/arch/cpu.h>
> +#include <asm/arch/emc.h>
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +static struct emc_regs *emc = (struct emc_regs *)EMC_BASE;
> +
> +int board_early_init_f(void)
> +{
> +	lpc32xx_uart_init(CONFIG_SYS_LPC32XX_UART);
> +
> +	return 0;
> +}
> +
> +int board_init(void)
> +{
> +	/* adress of boot parameters */
> +	gd->bd->bi_boot_params  = CONFIG_SYS_SDRAM_BASE + 0x100;
> +
> +#ifdef CONFIG_SYS_FLASH_CFI
> +	/* Use 16-bit memory interface for NOR Flash */
> +	emc->stat[0].config	= EMC_STAT_CONFIG_PB | EMC_STAT_CONFIG_16BIT;
> +
> +	/* Change the NOR timings to optimum value to get maximum bandwidth */
> +	emc->stat[0].waitwen	= EMC_STAT_WAITWEN(1);
> +	emc->stat[0].waitoen	= EMC_STAT_WAITOEN(1);
> +	emc->stat[0].waitrd	= EMC_STAT_WAITRD(12);
> +	emc->stat[0].waitpage	= EMC_STAT_WAITPAGE(12);
> +	emc->stat[0].waitwr	= EMC_STAT_WAITWR(5);
> +	emc->stat[0].waitturn	= EMC_STAT_WAITTURN(2);
> +#endif
> +
> +	return 0;
> +}
> +
> +int dram_init(void)
> +{
> +	gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
> +				    CONFIG_SYS_SDRAM_SIZE);
> +
> +	return 0;
> +}
> diff --git a/boards.cfg b/boards.cfg
> index 0b32532..24a98fe 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -176,6 +176,7 @@ omap730p2_cs0boot	     arm         arm926ejs  
> omap730p2		 ti             omap omap730p2_cs3boot	     arm        
> arm926ejs   omap730p2		 ti             omap        omap730p2:CS3_BOOT
> edminiv2                     arm         arm926ejs   -                  
> LaCie          orion5x dkb			     arm         arm926ejs   -               
>    Marvell        pantheon +devkit3250                   arm        
> arm926ejs   devkit3250          timll          lpc32xx versatileab        
>          arm         arm926ejs   versatile           armltd        
> versatile   versatile:ARCH_VERSATILE_AB versatilepb                  arm  
>       arm926ejs   versatile           armltd         versatile  
> versatile:ARCH_VERSATILE_PB versatileqemu                arm        
> arm926ejs   versatile           armltd         versatile  
> versatile:ARCH_VERSATILE_QEMU,ARCH_VERSATILE_PB diff --git
> a/include/configs/devkit3250.h b/include/configs/devkit3250.h new file
> mode 100644
> index 0000000..9f15ffb
> --- /dev/null
> +++ b/include/configs/devkit3250.h
> @@ -0,0 +1,117 @@
> +/*
> + * Embest/Timll DevKit3250 board configuration file
> + *
> + * Copyright (C) 2011 Vladimir Zapolskiy <vz@mleia.com>
> + *
> + * 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.
> + */
> +
> +#ifndef __CONFIG_DEVKIT3250_H__
> +#define __CONFIG_DEVKIT3250_H__
> +
> +/* SoC and board defines */
> +#include <asm/sizes.h>
> +#include <asm/arch/cpu.h>
> +
> +/*
> + * Define DevKit3250 machine type by hand until it lands in mach-types
> + */
> +#define MACH_TYPE_DEVKIT3250		3697
> +#define CONFIG_MACH_TYPE		MACH_TYPE_DEVKIT3250
> +
> +#define CONFIG_SYS_ICACHE_OFF
> +#define CONFIG_SYS_DCACHE_OFF
> +#define CONFIG_SKIP_LOWLEVEL_INIT
> +#define CONFIG_BOARD_EARLY_INIT_F
> +
> +/*
> + * Memory configurations
> + */
> +#define CONFIG_NR_DRAM_BANKS		1
> +#define CONFIG_STACKSIZE		SZ_32K
> +#define CONFIG_SYS_MALLOC_LEN		SZ_1M
> +#define CONFIG_SYS_GBL_DATA_SIZE	128
> +#define CONFIG_SYS_SDRAM_BASE		EMC_DYCS0_BASE
> +#define CONFIG_SYS_SDRAM_SIZE		SZ_64M
> +#define CONFIG_SYS_TEXT_BASE		0x83FA0000
> +#define CONFIG_SYS_MEMTEST_START	(CONFIG_SYS_SDRAM_BASE + SZ_32K)
> +#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_TEXT_BASE - SZ_1M)
> +
> +#define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + SZ_32K)
> +
> +#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + SZ_4K \
> +					 - GENERATED_GBL_DATA_SIZE)
> +
> +/*
> + * Serial Driver
> + */
> +#define CONFIG_SYS_LPC32XX_UART		2   /* UART2 */
> +#define CONFIG_BAUDRATE			115200
> +
> +/*
> + * NOR Flash
> + */
> +#define CONFIG_CMD_FLASH
> +#define CONFIG_SYS_MAX_FLASH_BANKS	1
> +#define CONFIG_SYS_MAX_FLASH_SECT	71
> +#define CONFIG_SYS_FLASH_BASE		EMC_CS0_BASE
> +#define CONFIG_SYS_FLASH_SIZE		SZ_4M
> +#define CONFIG_SYS_FLASH_CFI
> +
> +/*
> + * U-Boot General Configurations
> + */
> +#define CONFIG_SYS_LONGHELP
> +#define CONFIG_SYS_PROMPT		"=> "
> +#define CONFIG_SYS_CBSIZE		1024
> +#define CONFIG_SYS_PBSIZE		\
> +	(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
> +#define CONFIG_SYS_MAXARGS		16
> +#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
> +
> +#define CONFIG_AUTO_COMPLETE
> +#define CONFIG_CMDLINE_EDITING
> +#define CONFIG_VERSION_VARIABLE
> +#define CONFIG_DISPLAY_CPUINFO
> +#define CONFIG_DOS_PARTITION
> +
> +#define CONFIG_ENV_IS_NOWHERE
> +#define CONFIG_ENV_SIZE			SZ_128K
> +
> +/*
> + * U-Boot Commands
> + */
> +#include <config_cmd_default.h>
> +#define CONFIG_CMD_CACHE
> +
> +/*
> + * Boot Linux
> + */
> +#define CONFIG_CMDLINE_TAG
> +#define CONFIG_SETUP_MEMORY_TAGS
> +#define CONFIG_ZERO_BOOTDELAY_CHECK
> +#define CONFIG_BOOTDELAY		3
> +
> +#define CONFIG_BOOTFILE			"uImage"
> +#define CONFIG_BOOTARGS			"console=ttyS2,115200n8"
> +#define CONFIG_LOADADDR			0x80008000
> +
> +/*
> + * Include SoC specific configuration
> + */
> +#include <asm/arch/config.h>
> +
> +#endif  /* __CONFIG_DEVKIT3250_H__*/

      reply	other threads:[~2012-01-13 12:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13  0:42 [U-Boot] [PATCH 0/3 v3] devkit3250: add Timll DevKit3250 board initial support Vladimir Zapolskiy
2012-01-13  0:42 ` [U-Boot] [PATCH 1/3 v8] arm926ejs: add NXP LPC32x0 cpu series support Vladimir Zapolskiy
2012-01-13 12:45   ` Marek Vasut
2012-02-10 18:00   ` Albert ARIBAUD
2012-02-10 20:14     ` Vladimir Zapolskiy
2012-02-10 20:19       ` Albert ARIBAUD
2012-01-13  0:42 ` [U-Boot] [PATCH 2/3 v3] serial: add LPC32X0 high-speed UART devices support Vladimir Zapolskiy
2012-01-13 12:46   ` Marek Vasut
2012-01-13  0:42 ` [U-Boot] [PATCH 3/3 v5] devkit3250: add Timll DevKit3250 board initial support Vladimir Zapolskiy
2012-01-13 12:46   ` Marek Vasut [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201201131346.20201.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.