From patchwork Sat Jan 29 01:00:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Spang X-Patchwork-Id: 80917 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 698D1B7110 for ; Sat, 29 Jan 2011 12:12:06 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8C7B6280C9; Sat, 29 Jan 2011 02:11:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 LCUSyiorU1Ql; Sat, 29 Jan 2011 02:11:12 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 622EF280CB; Sat, 29 Jan 2011 02:10:38 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0D20528086 for ; Sat, 29 Jan 2011 02:10:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 81RENcT48Ck0 for ; Sat, 29 Jan 2011 02:10:21 +0100 (CET) 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 caffeine.csclub.uwaterloo.ca (caffeine.csclub.uwaterloo.ca [129.97.134.17]) by theia.denx.de (Postfix) with ESMTP id 23B3F28084 for ; Sat, 29 Jan 2011 02:10:16 +0100 (CET) Received: from caffeine.csclub.uwaterloo.ca (localhost [127.0.0.1]) by caffeine.csclub.uwaterloo.ca (Postfix) with ESMTP id 469AA816DE; Fri, 28 Jan 2011 20:01:06 -0500 (EST) Received: from corn-syrup (corn-syrup.csclub.uwaterloo.ca [129.97.134.72]) by caffeine.csclub.uwaterloo.ca (Postfix) with SMTP id 2E291816D9; Fri, 28 Jan 2011 20:01:05 -0500 (EST) Received: by corn-syrup (sSMTP sendmail emulation); Fri, 28 Jan 2011 20:01:05 -0500 From: Michael Spang To: u-boot@lists.denx.de Date: Fri, 28 Jan 2011 20:00:39 -0500 Message-Id: <1296262841-8819-6-git-send-email-mspang@csclub.uwaterloo.ca> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1296262841-8819-1-git-send-email-mspang@csclub.uwaterloo.ca> References: <1296262841-8819-1-git-send-email-mspang@csclub.uwaterloo.ca> X-Virus-Scanned: ClamAV using ClamSMTP Cc: Michael Spang , Alexander Clouter Subject: [U-Boot] [PATCH 6/8] Add board support for TS-7800 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The TS-7800 is an Orion5x implementation by Technologic Systems. Signed-off-by: Michael Spang --- MAKEALL | 1 + board/technologic/ts7800/Makefile | 46 +++++++++++ board/technologic/ts7800/ts7800.c | 36 +++++++++ boards.cfg | 1 + include/configs/ts7800.h | 149 +++++++++++++++++++++++++++++++++++++ 5 files changed, 233 insertions(+), 0 deletions(-) create mode 100644 board/technologic/ts7800/Makefile create mode 100644 board/technologic/ts7800/ts7800.c create mode 100644 include/configs/ts7800.h diff --git a/MAKEALL b/MAKEALL index a732e6a..5cd4155 100755 --- a/MAKEALL +++ b/MAKEALL @@ -344,6 +344,7 @@ LIST_ARM9=" \ edb9315 \ edb9315a \ edminiv2 \ + ts7800 \ guruplug \ imx27lite \ jadecpu \ diff --git a/board/technologic/ts7800/Makefile b/board/technologic/ts7800/Makefile new file mode 100644 index 0000000..d62d0f2 --- /dev/null +++ b/board/technologic/ts7800/Makefile @@ -0,0 +1,46 @@ +# +# Copyright (C) 2010 Michael Spang +# +# 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 +# + +LIB = $(obj)lib$(BOARD).o + +COBJS := ts7800.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +######################################################################### diff --git a/board/technologic/ts7800/ts7800.c b/board/technologic/ts7800/ts7800.c new file mode 100644 index 0000000..8d4ba73 --- /dev/null +++ b/board/technologic/ts7800/ts7800.c @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2010 Michael Spang + * + * 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 + +DECLARE_GLOBAL_DATA_PTR; + +int board_init(void) +{ + // Technologic's MBR uses machine type 526, however the mainline + // machine type is 1652. Technologic's kernel sources will need + // patching to boot from U-Boot. + gd->bd->bi_arch_number = MACH_TYPE_TS78XX; + gd->bd->bi_boot_params = 0x100; + + return 0; +} diff --git a/boards.cfg b/boards.cfg index 4cca934..22d8eeb 100644 --- a/boards.cfg +++ b/boards.cfg @@ -104,6 +104,7 @@ imx27lite arm arm926ejs imx27lite logicpd magnesium arm arm926ejs imx27lite logicpd mx27 omap5912osk arm arm926ejs - ti omap edminiv2 arm arm926ejs - LaCie orion5x +ts7800 arm arm926ejs - technologic orion5x ca9x4_ct_vxp arm armv7 vexpress armltd mx51evk arm armv7 mx51evk freescale mx5 mx53evk arm armv7 mx53evk freescale mx5 diff --git a/include/configs/ts7800.h b/include/configs/ts7800.h new file mode 100644 index 0000000..dc7e3e2 --- /dev/null +++ b/include/configs/ts7800.h @@ -0,0 +1,149 @@ +/* + * Copyright (C) 2010 Michael Spang + * + * 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 + */ + +#ifndef _CONFIG_TS7800_H +#define _CONFIG_TS7800_H + +/* + * User Interface Configuration + */ + +#define CONFIG_IDENT_STRING " TS-7800" +#define CONFIG_SYS_PROMPT "TS-7800> " +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_BOOTDELAY 3 + +/* + * Flash Driver + */ + +#define CONFIG_SYS_NO_FLASH + +/* + * Commands Configuration + */ + +#include +#define CONFIG_CMD_PING +#define CONFIG_CMD_MII + +/* + * Serial Port Configuration + */ + +#define CONFIG_CONS_INDEX 1 +#define CONFIG_BAUDRATE 115200 + +/* + * Environment Configuration + */ + +#define CONFIG_ENV_IS_NOWHERE 1 +#define CONFIG_ENV_SIZE 0x2000 + +/* + * Limits + */ + +#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buff Size */ +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) /* Print Buffer Size */ +#define CONFIG_SYS_MAXARGS 16 /* Maximum arguments to U-Boot commands */ + +/* + * System Components + */ + +#define CONFIG_MARVELL 1 +#define CONFIG_ARM926EJS 1 /* Basic Architecture */ +#define CONFIG_FEROCEON 1 /* CPU Core subversion */ +#define CONFIG_ORION5X 1 /* SOC Family Name */ +#define CONFIG_88F5182 1 /* SOC Name */ +#define CONFIG_MACH_TS78XX 1 /* Machine type */ +#define CONFIG_SYS_HZ 1000 + +/* + * Board Initialization + */ + +#define CONFIG_ARCH_MISC_INIT /* call arch_misc_init() */ +#define CONFIG_ARCH_CPU_INIT /* call arch_cpu_init() */ +#define CONFIG_SKIP_SDRAM_INIT /* U-Boot starts in RAM so do not initialize RAM */ + +/* MPP configuration need not be changed from power-on */ +#define ORION5X_MPP0_7 0x00000000 +#define ORION5X_MPP8_15 0x00000000 +#define ORION5X_MPP16_23 0x00000000 +#define ORION5X_GPIO_OUT_ENABLE 0xffffffff + +/* + * Memory Layout + */ + +#define CONFIG_SYS_TEXT_BASE 0x00008000 /* Boards loads U-Boot at 32 kB */ +#define CONFIG_SYS_INIT_SP_ADDR 0x00100000 /* Initial stack at 1 MB */ +#define CONFIG_SYS_MALLOC_LEN 0x00020000 /* Reserve 128 kB for malloc() */ + +#define CONFIG_SYS_SDRAM_BASE 0x00000000 /* RAM starts at address 0 */ +#define CONFIG_NR_DRAM_BANKS 1 /* Board has one 128 MB RAM bank */ + +#define CONFIG_SYS_LOAD_ADDR 0x00800000 /* Executables load by default at 8 MB */ +#define CONFIG_SYS_MEMTEST_START 0x00001000 /* Memtest starts after vectors */ +#define CONFIG_SYS_MEMTEST_END 0x07e00000 /* Memtest ends before U-Boot */ + +/* + * UART Driver + */ + +#define CONFIG_SYS_NS16550 +#define CONFIG_SYS_NS16550_SERIAL +#define CONFIG_SYS_NS16550_REG_SIZE (-4) +#define CONFIG_SYS_NS16550_CLK CONFIG_SYS_TCLK +#define CONFIG_SYS_NS16550_COM1 ORION5X_UART0_BASE +#define CONFIG_SYS_NS16550_COM2 ORION5X_UART1_BASE +#define CONFIG_SYS_BAUDRATE_TABLE \ + { 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600 } + +/* + * Network Driver + */ + +#ifdef CONFIG_CMD_NET +#define CONFIG_MVGBE +#define CONFIG_MVGBE_PORTS {1} +#define CONFIG_PRESERVE_LOCAL_MAC +#define CONFIG_PHY_BASE_ADR 0 +#define CONFIG_NETCONSOLE +#define CONFIG_NET_MULTI +#define CONFIG_MII +#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN +#define CONFIG_ENV_OVERWRITE +#endif + +/* + * Linux + */ + +#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ +#define CONFIG_INITRD_TAG 1 /* enable INITRD tag */ +#define CONFIG_SETUP_MEMORY_TAGS 1 /* enable memory tag */ + +#endif /* _CONFIG_TS7800_H */