From: Tom <Tom.Rix@windriver.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 8/8] mop500: add board-specific files
Date: Sun, 28 Mar 2010 12:49:15 -0500 [thread overview]
Message-ID: <4BAF969B.1030608@windriver.com> (raw)
In-Reply-To: <1268890402-31618-1-git-send-email-rabin.vincent@stericsson.com>
Rabin Vincent wrote:
> Add base board code for the MOP500 board, which uses the U8500 SoC.
>
> Acked-by: Michael Brandt <michael.brandt@stericsson.com>
> Tested-by: Michael Brandt <michael.brandt@stericsson.com>
> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
> ---
> MAINTAINERS | 4 ++
> MAKEALL | 1 +
MAINTAINERS and MAKEALL will need to be changed for change to arm_cortexa9
> Makefile | 3 +
> board/stericsson/mop500/Makefile | 54 +++++++++++++++++++
> board/stericsson/mop500/config.mk | 23 ++++++++
> board/stericsson/mop500/mop500.c | 72 +++++++++++++++++++++++++
> include/configs/mop500.h | 107 +++++++++++++++++++++++++++++++++++++
> 7 files changed, 264 insertions(+), 0 deletions(-)
> create mode 100644 board/stericsson/mop500/Makefile
> create mode 100644 board/stericsson/mop500/config.mk
> create mode 100644 board/stericsson/mop500/mop500.c
> create mode 100644 include/configs/mop500.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 80057ce..4a9a371 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -759,6 +759,10 @@ Hugo Villeneuve <hugo.villeneuve@lyrtech.com>
>
> SFFSDR ARM926EJS
>
> +Rabin Vincent <rabin.vincent@stericsson.com>
> +
> + mop500 ARM CORTEX-A9 (U8500 SoC)
> +
> Prafulla Wadaskar <prafulla@marvell.com>
>
> mv88f6281gtw_ge ARM926EJS (Kirkwood SoC)
> diff --git a/MAKEALL b/MAKEALL
> index beacb5f..dd50cc4 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -633,6 +633,7 @@ LIST_ARM11=" \
> #########################################################################
> LIST_ARM_CORTEX_A8=" \
> devkit8000 \
> + mop500 \
> mx51evk \
> omap3_beagle \
> omap3_overo \
> diff --git a/Makefile b/Makefile
> index d801e25..9e07de6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -3163,6 +3163,9 @@ SMN42_config : unconfig
> devkit8000_config : unconfig
> @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 timll omap3
>
> +mop500_config: unconfig
> + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 mop500 stericsson ux500
> +
> omap3_beagle_config : unconfig
> @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 beagle ti omap3
>
> diff --git a/board/stericsson/mop500/Makefile b/board/stericsson/mop500/Makefile
> new file mode 100644
> index 0000000..218d572
> --- /dev/null
> +++ b/board/stericsson/mop500/Makefile
> @@ -0,0 +1,54 @@
> +#
> +# (C) Copyright 2000-2004
> +# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
> +#
> +# (C) Copyright 2004
> +# ARM Ltd.
> +# Philippe Robin, <philippe.robin@arm.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
> +#
> +
> +include $(TOPDIR)/config.mk
> +
> +LIB = $(obj)lib$(BOARD).a
> +
> +COBJS := mop500.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 $(obj).depend
> +
> +#########################################################################
> +
> +# defines $(obj).depend target
> +include $(SRCTREE)/rules.mk
> +
> +sinclude $(obj).depend
> +
> +#########################################################################
> diff --git a/board/stericsson/mop500/config.mk b/board/stericsson/mop500/config.mk
> new file mode 100644
> index 0000000..af246bd
> --- /dev/null
> +++ b/board/stericsson/mop500/config.mk
> @@ -0,0 +1,23 @@
> +#
> +# (C) Copyright 2010 ST-Ericsson SA
> +#
> +# 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
> +#
> +
> +TEXT_BASE = 0x05600000
> diff --git a/board/stericsson/mop500/mop500.c b/board/stericsson/mop500/mop500.c
> new file mode 100644
> index 0000000..d45477f
> --- /dev/null
> +++ b/board/stericsson/mop500/mop500.c
> @@ -0,0 +1,72 @@
> +/*
> + * (C) Copyright 2010 ST-Ericsson SA
> + * Author: Rabin Vincent <rabin.vincent@stericsson.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
> + */
> +
> +#include <common.h>
> +#include <asm/io.h>
> +#include <asm/arch/clock.h>
> +#include <nomadik_gpio.h>
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +static void gpio_init(void)
> +{
> + /* UART2 */
> + nmk_gpio_af(29, GPIO_ALT_C);
> + nmk_gpio_af(30, GPIO_ALT_C);
Change these to immediates to logical #define's
> +}
> +
> +static void clock_init(void)
> +{
> + struct prcmu *prcmu = (struct prcmu *) U8500_PRCMU_BASE;
> +
> + /* Enable timers */
> + writel(1 << 17, &prcmu->tcr);
Change this immediate to a logical #define
> +
> + u8500_prcmu_enable(&prcmu->per3clk_mgt);
> + u8500_prcmu_enable(&prcmu->per7clk_mgt);
> + u8500_prcmu_enable(&prcmu->uartclk_mgt);
> +
> + u8500_clock_enable(7, 2, -1); /* MTU0 */
> + u8500_clock_enable(3, 6, 6); /* UART2 */
Change these to immediates to logical #define's
> +}
> +
> +int board_init(void)
> +{
> + gd->bd->bi_arch_number = MACH_TYPE_U8500;
> + gd->bd->bi_boot_params = 0x00000100;
> +
> + gpio_init();
> + clock_init();
> +
> + icache_enable();
> +
> + return 0;
> +}
> +
> +int dram_init(void)
> +{
> + gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
> + gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
> +
> + return 0;
> +}
> diff --git a/include/configs/mop500.h b/include/configs/mop500.h
> new file mode 100644
> index 0000000..f94bda0
> --- /dev/null
> +++ b/include/configs/mop500.h
> @@ -0,0 +1,107 @@
> +/*
> + * (C) Copyright 2010 ST-Ericsson SA
> + *
> + * 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
> + */
> +
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +#include <asm/arch/hardware.h>
> +
> +#define CONFIG_ARMCORTEXA9
> +#define CONFIG_UX500
> +#define CONFIG_UX500_U8500 /* cpu variant */
> +#define CONFIG_UX500_MOP500 /* board variant */
> +
> +#define CONFIG_L2_OFF
> +#define CONFIG_SKIP_LOWLEVEL_INIT
> +
> +/* commands */
> +#include <config_cmd_default.h>
> +
> +#undef CONFIG_CMD_NET
> +#undef CONFIG_CMD_NFS
> +#undef CONFIG_CMD_FLASH
> +#undef CONFIG_CMD_IMLS
> +#define CONFIG_SYS_NO_FLASH
> +
> +/* user interface */
> +#define CONFIG_SYS_LONGHELP
> +#define CONFIG_SYS_HUSH_PARSER
> +#define CONFIG_SYS_PROMPT "U8500> "
> +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
> +#define CONFIG_CMDLINE_EDITING
> +#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
> +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \
> + + sizeof(CONFIG_SYS_PROMPT) + 16)
> +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Arg Buffer Size */
> +#define CONFIG_SYS_MAXARGS 16
> +#define CONFIG_SYS_LOAD_ADDR 0x800000 /* default load address */
> +#define CONFIG_SYS_LOADS_BAUD_CHANGE
> +
> +/* boot config */
> +#define CONFIG_SETUP_MEMORY_TAGS
> +#define CONFIG_INITRD_TAG
> +#define CONFIG_CMDLINE_TAG
> +#define CONFIG_BOOTDELAY 1
> +#define CONFIG_BOOTARGS "root=/dev/ram0 console=ttyAMA2,115200n8 init=linuxrc"
> +
> +/* memory-related information */
> +#define CONFIG_NR_DRAM_BANKS 1
> +#define PHYS_SDRAM_1 0x00000000 /* DDR-SDRAM Bank #1 */
> +#define PHYS_SDRAM_1_SIZE 0x10000000 /* 256 MB */
> +
> +#define CONFIG_STACKSIZE (128 * 1024) /* regular stack */
> +#ifdef CONFIG_USE_IRQ
> +# define CONFIG_STACKSIZE_IRQ (4 * 1024) /* IRQ stack */
> +# define CONFIG_STACKSIZE_FIQ (4 * 1024) /* FIQ stack */
> +#endif
> +
> +#define CONFIG_ENV_IS_NOWHERE
> +
> +#define CONFIG_ENV_SIZE 0x20000 /* 128 Kb */
> +
> +#define CONFIG_SYS_MEMTEST_START 0x00000000
> +#define CONFIG_SYS_MEMTEST_END 0x0FFFFFFF
> +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 256 * 1024)
> +#define CONFIG_SYS_GBL_DATA_SIZE 128 /* for initial data */
> +
> +/* timing informazion */
> +#define CONFIG_SYS_HZ 1000 /* Mandatory... */
> +#define CONFIG_SYS_TIMERBASE U8500_MTU0_BASE
> +#define CONFIG_NOMADIK_MTU
> +#define CONFIG_NOMADIK_MTU_CLOCK 6250000
> +#define CONFIG_NOMADIK_MTU_PRESCALE MTU_CRn_PRESCALE_16
> +
> +/* GPIO */
> +#define CONFIG_NOMADIK_GPIO
> +
> +/* serial port (PL011) configuration */
> +#define CONFIG_PL011_SERIAL
> +#define CONFIG_CONS_INDEX 2
> +#define CONFIG_BAUDRATE 115200
> +#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
> +
> +#define CONFIG_PL01x_PORTS { (void *)U8500_UART0_BASE, \
> + (void *)U8500_UART1_BASE, \
> + (void *)U8500_UART2_BASE }
> +#define CONFIG_PL011_CLOCK 38400000
> +
> +#endif /* __CONFIG_H */
Tom
next prev parent reply other threads:[~2010-03-28 17:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 4:20 [U-Boot] [PATCH 0/8] ST-Ericsson Ux500 support Rabin Vincent
2010-03-18 4:20 ` [U-Boot] [PATCH 1/8] Nomadik: move timer code to drivers/misc Rabin Vincent
2010-03-28 17:30 ` Tom
2010-04-06 11:16 ` Rabin VINCENT
2010-04-06 11:30 ` Alessandro Rubini
2010-03-18 4:28 ` [U-Boot] [PATCH 2/8] Nomadik: move gpio driver to drivers/gpio Rabin Vincent
2010-03-28 17:32 ` Tom
2010-04-06 11:25 ` Rabin VINCENT
2010-03-18 5:02 ` [U-Boot] [PATCH 3/8] nomadik_gpio: get base address from platform code Rabin Vincent
2010-03-28 17:35 ` Tom
2010-03-18 5:08 ` [U-Boot] [PATCH 4/8] nomadik_mtu: support configurable clock rates Rabin Vincent
2010-03-28 17:36 ` Tom
2010-03-18 5:10 ` [U-Boot] [PATCH 5/8] ARM Cortex A8: ifdef code calling lowlevel init Rabin Vincent
2010-03-28 17:38 ` Tom
2010-03-18 5:10 ` [U-Boot] [PATCH 6/8] ux500: add SoC-specific code Rabin Vincent
2010-03-28 17:42 ` Tom
2010-04-07 6:15 ` Rabin VINCENT
2010-03-18 5:10 ` [U-Boot] [PATCH 7/8] pl01x: add support for Ux500 variant of pl011 Rabin Vincent
2010-03-28 17:45 ` Tom
2010-03-18 5:33 ` [U-Boot] [PATCH 8/8] mop500: add board-specific files Rabin Vincent
2010-03-28 17:49 ` Tom [this message]
2010-04-08 13:41 ` Rabin VINCENT
2010-04-09 22:28 ` Wolfgang Denk
2010-04-17 21:46 ` Tom Rix
2010-03-21 19:42 ` [U-Boot] [PATCH 0/8] ST-Ericsson Ux500 support Wolfgang Denk
2010-03-28 17:27 ` Tom
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=4BAF969B.1030608@windriver.com \
--to=tom.rix@windriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox