diff mbox

[U-Boot,7/9] Add board support for TS-7800

Message ID 1300391223-11879-8-git-send-email-mspang@csclub.uwaterloo.ca
State Changes Requested
Headers show

Commit Message

Michael Spang March 17, 2011, 7:47 p.m. UTC
The TS-7800 is an Orion5x implementation by Technologic Systems.

Signed-off-by: Michael Spang <mspang@csclub.uwaterloo.ca>
---
 MAKEALL                           |    1 +
 board/technologic/ts7800/Makefile |   46 +++++++++++
 board/technologic/ts7800/ts7800.c |   36 +++++++++
 boards.cfg                        |    1 +
 include/configs/ts7800.h          |  152 +++++++++++++++++++++++++++++++++++++
 5 files changed, 236 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

Comments

Wolfgang Denk April 24, 2011, 11:57 p.m. UTC | #1
Dear Michael Spang,

In message <1300391223-11879-8-git-send-email-mspang@csclub.uwaterloo.ca> you wrote:
> The TS-7800 is an Orion5x implementation by Technologic Systems.
> 
> Signed-off-by: Michael Spang <mspang@csclub.uwaterloo.ca>
> ---
>  MAKEALL                           |    1 +
>  board/technologic/ts7800/Makefile |   46 +++++++++++
>  board/technologic/ts7800/ts7800.c |   36 +++++++++
>  boards.cfg                        |    1 +
>  include/configs/ts7800.h          |  152 +++++++++++++++++++++++++++++++++++++
>  5 files changed, 236 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			\

Boards don;t get added to MAKEALL any more; they will get picked
automatically from boards.cfg.

...
> +#define CONFIG_ENV_IS_NOWHERE	1

Please remove the '1' from all defines that select a feature only, i.
e. that don;t actually care abut a specific numeric value.



Best regards,

Wolfgang Denk
Michael Spang April 26, 2011, 3:38 a.m. UTC | #2
On Sun, Apr 24, 2011 at 7:57 PM, Wolfgang Denk <wd@denx.de> wrote:
> Dear Michael Spang,
>
> In message <1300391223-11879-8-git-send-email-mspang@csclub.uwaterloo.ca> you wrote:
>> The TS-7800 is an Orion5x implementation by Technologic Systems.
>>
>> Signed-off-by: Michael Spang <mspang@csclub.uwaterloo.ca>
>> ---
>>  MAKEALL                           |    1 +
>>  board/technologic/ts7800/Makefile |   46 +++++++++++
>>  board/technologic/ts7800/ts7800.c |   36 +++++++++
>>  boards.cfg                        |    1 +
>>  include/configs/ts7800.h          |  152 +++++++++++++++++++++++++++++++++++++
>>  5 files changed, 236 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                 \
>
> Boards don;t get added to MAKEALL any more; they will get picked
> automatically from boards.cfg.
>
> ...
>> +#define CONFIG_ENV_IS_NOWHERE        1
>
> Please remove the '1' from all defines that select a feature only, i.
> e. that don;t actually care abut a specific numeric value.

Ok I'll drop the change to MAKEALL and update the #defines.

Michael
diff mbox

Patch

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..3a02b04
--- /dev/null
+++ b/board/technologic/ts7800/Makefile
@@ -0,0 +1,46 @@ 
+#
+# Copyright (C) 2010-2011 Michael Spang <mspang@csclub.uwaterloo.ca>
+#
+# 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..4937436
--- /dev/null
+++ b/board/technologic/ts7800/ts7800.c
@@ -0,0 +1,36 @@ 
+/*
+ * Copyright (C) 2010-2011 Michael Spang <mspang@csclub.uwaterloo.ca>
+ *
+ * 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 <common.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+	/* Technologic's MBR uses machine type 526, however the mainline
+	   machine type is 1652. Set the machtype environment variable
+	   to 526 to boot Technologic kernels. */
+	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 45c3102..b9d7939 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -106,6 +106,7 @@  magnesium                    arm         arm926ejs   imx27lite           logicpd
 omap5912osk                  arm         arm926ejs   -                   ti             omap
 edminiv2                     arm         arm926ejs   -                   LaCie          orion5x
 dkb			     arm         arm926ejs   -                   Marvell        pantheon
+ts7800                       arm         arm926ejs   -                   technologic    orion5x
 ca9x4_ct_vxp                 arm         armv7       vexpress            armltd
 efikamx                      arm         armv7       efikamx             -              mx5
 mx51evk                      arm         armv7       mx51evk             freescale      mx5
diff --git a/include/configs/ts7800.h b/include/configs/ts7800.h
new file mode 100644
index 0000000..c07d132
--- /dev/null
+++ b/include/configs/ts7800.h
@@ -0,0 +1,152 @@ 
+/*
+ * Copyright (C) 2010-2011 Michael Spang <mspang@csclub.uwaterloo.ca>
+ *
+ * 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 <config_cmd_default.h>
+#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		/* Print Buffer Size */ \
+	(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS	16	/* Max args 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_LOWLEVEL_INIT /* U-Boot starts with RAM initialized */
+
+/* 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 /* Load kernels at 8 MB */
+
+/* Memtest skips the first 4k (vectors) and the last 2MB (U-Boot) */
+#define CONFIG_SYS_MEMTEST_START	0x00001000
+#define CONFIG_SYS_MEMTEST_END		0x07e00000
+
+/*
+ * 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 */