All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rabin Vincent <rabin.vincent@stericsson.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv2 13/13] mop500: add board-specific files
Date: Thu, 8 Apr 2010 19:13:20 +0530	[thread overview]
Message-ID: <1270734200-17762-14-git-send-email-rabin.vincent@stericsson.com> (raw)
In-Reply-To: <1270734200-17762-13-git-send-email-rabin.vincent@stericsson.com>

Add base board code for the MOP500 board, which uses the U8500 SoC.

Acked-by: Michael Brandt <michael.brandt@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
---
 MAINTAINERS                       |    4 ++
 MAKEALL                           |    9 +++
 Makefile                          |    9 +++-
 board/stericsson/mop500/Makefile  |   54 ++++++++++++++++++
 board/stericsson/mop500/config.mk |   23 ++++++++
 board/stericsson/mop500/mop500.c  |   72 ++++++++++++++++++++++++
 include/configs/mop500.h          |  108 +++++++++++++++++++++++++++++++++++++
 7 files changed, 278 insertions(+), 1 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 0658bc3..2e556fe 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -769,6 +769,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 a88c31e..d8585de 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -642,6 +642,14 @@ LIST_ARM_CORTEX_A8="		\
 "
 
 #########################################################################
+## ARM Cortex-A9 Systems
+#########################################################################
+
+LIST_ARM_CORTEX_A9="		\
+	mop500			\
+"
+
+#########################################################################
 ## AT91 Systems
 #########################################################################
 
@@ -719,6 +727,7 @@ LIST_arm="			\
 	${LIST_ARM10}		\
 	${LIST_ARM11}		\
 	${LIST_ARM_CORTEX_A8}	\
+	${LIST_ARM_CORTEX_A9}	\
 	${LIST_at91}		\
 	${LIST_pxa}		\
 	${LIST_ixp}		\
diff --git a/Makefile b/Makefile
index 4532550..141a9f6 100644
--- a/Makefile
+++ b/Makefile
@@ -3141,7 +3141,7 @@ SMN42_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm720t SMN42 siemens lpc2292
 
 #########################################################################
-## ARM CORTEX Systems
+## ARM CORTEX-A8 Systems
 #########################################################################
 
 devkit8000_config :	unconfig
@@ -3172,6 +3172,13 @@ smdkc100_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 smdkc100 samsung s5pc1xx
 
 #########################################################################
+## ARM CORTEX-A9 Systems
+#########################################################################
+
+mop500_config:		unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm_cortexa9 mop500 stericsson ux500
+
+#########################################################################
 ## XScale Systems
 #########################################################################
 
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..1b03f65
--- /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.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);
+}
+
+static void clock_init(void)
+{
+	struct prcmu *prcmu = (struct prcmu *) U8500_PRCMU_BASE;
+
+	/* Enable timers */
+	writel(PRCM_TCR_DOZE_MODE, &prcmu->tcr);
+
+	u8500_prcmu_enable(&prcmu->per3clk_mgt);
+	u8500_prcmu_enable(&prcmu->per7clk_mgt);
+	u8500_prcmu_enable(&prcmu->uartclk_mgt);
+
+	u8500_clock_enable(U8500_CLK_MTU0);
+	u8500_clock_enable(U8500_CLK_UART2);
+}
+
+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..71a003f
--- /dev/null
+++ b/include/configs/mop500.h
@@ -0,0 +1,108 @@
+/*
+ * (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
+#define CONFIG_NOMADIK_GPIO_NUM_BANKS	9
+
+/* 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 */
-- 
1.7.0

  reply	other threads:[~2010-04-08 13:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 13:43 [U-Boot] [PATCHv2 00/13] ST-Ericsson Ux500 support Rabin Vincent
2010-04-08 13:43 ` [U-Boot] [PATCHv2 01/13] Nomadik: move nomadik.h to asm/arch/nhk8815.h Rabin Vincent
2010-04-08 13:43   ` [U-Boot] [PATCHv2 02/13] Nomadik: timer: push down single-use macros Rabin Vincent
2010-04-08 13:43     ` [U-Boot] [PATCHv2 03/13] Nomadik: timer: remove header and use C structs Rabin Vincent
2010-04-08 13:43       ` [U-Boot] [PATCHv2 04/13] Nomadik: move timer code to drivers/misc Rabin Vincent
2010-04-08 13:43         ` [U-Boot] [PATCHv2 05/13] Nomadik: move gpio driver to drivers/gpio Rabin Vincent
2010-04-08 13:43           ` [U-Boot] [PATCHv2 06/13] nomadik-gpio: check for invalid gpio numbers Rabin Vincent
2010-04-08 13:43             ` [U-Boot] [PATCHv2 07/13] nomadik-gpio: get base address from platform code Rabin Vincent
2010-04-08 13:43               ` [U-Boot] [PATCHv2 08/13] nomadik-mtu: support configurable clock rates Rabin Vincent
2010-04-08 13:43                 ` [U-Boot] [PATCHv2 09/13] arm: add Cortex A9 support Rabin Vincent
2010-04-08 13:43                   ` [U-Boot] [PATCHv2 10/13] ARM Cortex A9: ifdef code calling lowlevel init Rabin Vincent
2010-04-08 13:43                     ` [U-Boot] [PATCHv2 11/13] ux500: add SoC-specific code Rabin Vincent
2010-04-08 13:43                       ` [U-Boot] [PATCHv2 12/13] pl01x: add support for Ux500 variant of pl011 Rabin Vincent
2010-04-08 13:43                         ` Rabin Vincent [this message]
2010-04-09 23:04                         ` Wolfgang Denk
2010-04-09 11:29                   ` [U-Boot] [PATCHv2 09/13] arm: add Cortex A9 support Nishanth Menon
2010-04-09 13:27                     ` Vaibhav Bedia
2010-04-09 23:06                       ` Wolfgang Denk
2010-04-10  0:22                         ` Nishanth Menon
2010-04-10 16:54                       ` Rabin Vincent
2010-04-11 20:45                         ` Tom
2010-04-20 12:16                           ` Rabin VINCENT

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=1270734200-17762-14-git-send-email-rabin.vincent@stericsson.com \
    --to=rabin.vincent@stericsson.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.