From patchwork Thu Apr 8 13:43:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rabin Vincent X-Patchwork-Id: 71749 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id DBB051051E73 for ; Thu, 8 Apr 2010 15:49:21 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id 14962C913116 for ; Thu, 8 Apr 2010 15:49:21 +0200 (CEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.9) for (single-drop); Thu, 08 Apr 2010 15:49:21 +0200 (CEST) Received: from murder (svr19.m-online.net [192.168.3.147]) by backend2 (Cyrus v2.2.12) with LMTPA; Thu, 08 Apr 2010 15:47:40 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend3.pop.m-online.net (Cyrus v2.2.13) with LMTPA; Thu, 08 Apr 2010 15:47:40 +0200 Received: from scanner-2.m-online.net (unknown [192.168.8.166]) by mail.m-online.net (Postfix) with ESMTP id 68643200122; Thu, 8 Apr 2010 15:47:40 +0200 (CEST) Received: from mxin-3.m-online.net ([192.168.6.165]) by scanner-2.m-online.net (scanner-2.m-online.net [192.168.8.166]) (amavisd-new, port 10026) with ESMTP id 32705-02-3; Thu, 8 Apr 2010 15:47:38 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-3.m-online.net (Postfix) with ESMTP id 758DA47A4F9; Thu, 8 Apr 2010 15:47:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5C21228248; Thu, 8 Apr 2010 15:45:33 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5HjtwXiExdFJ; Thu, 8 Apr 2010 15:45:33 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8338A281F2; Thu, 8 Apr 2010 15:44:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0CBE028133 for ; Thu, 8 Apr 2010 15:44:55 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v37dUBNZFnRL for ; Thu, 8 Apr 2010 15:44:54 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from eu1sys200aog104.obsmtp.com (eu1sys200aog104.obsmtp.com [207.126.144.117]) by theia.denx.de (Postfix) with ESMTPS id 2C6BC28184 for ; Thu, 8 Apr 2010 15:44:17 +0200 (CEST) Received: from source ([138.198.100.35]) (using TLSv1) by eu1sys200aob104.postini.com ([207.126.147.11]) with SMTP ID DSNKS73dsBk0yOxDv31o2Gl4pmn4HwDMAJlL@postini.com; Thu, 08 Apr 2010 13:44:18 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id C47F1127 for ; Thu, 8 Apr 2010 13:44:12 +0000 (GMT) Received: from relay1.stm.gmessaging.net (exdcvyvsstm006.eq1stm.local [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 615CC229 for ; Thu, 8 Apr 2010 13:44:00 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 1AA7A24C2F4 for ; Thu, 8 Apr 2010 15:44:04 +0200 (CEST) Received: from localhost (10.201.54.39) by exdcvycastm022.EQ1STM.local (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.1.393.1; Thu, 8 Apr 2010 15:44:10 +0200 From: Rabin Vincent To: Date: Thu, 8 Apr 2010 19:13:20 +0530 Message-ID: <1270734200-17762-14-git-send-email-rabin.vincent@stericsson.com> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1270734200-17762-13-git-send-email-rabin.vincent@stericsson.com> References: <1270734200-17762-1-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-2-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-3-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-4-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-5-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-6-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-7-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-8-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-9-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-10-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-11-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-12-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-13-git-send-email-rabin.vincent@stericsson.com> MIME-Version: 1.0 Cc: STEricsson_nomadik_linux@list.st.com, Michael Brandt Subject: [U-Boot] [PATCHv2 13/13] mop500: add board-specific files X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net Add base board code for the MOP500 board, which uses the U8500 SoC. Acked-by: Michael Brandt Signed-off-by: Rabin Vincent --- 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 SFFSDR ARM926EJS +Rabin Vincent + + mop500 ARM CORTEX-A9 (U8500 SoC) + Prafulla Wadaskar 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@denx.de. +# +# (C) Copyright 2004 +# ARM Ltd. +# Philippe Robin, +# +# 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 + * + * 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 +#include +#include +#include + +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 + +#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 + +#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 */