summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorwdenk <wdenk>2005-04-05 21:57:18 +0000
committerwdenk <wdenk>2005-04-05 21:57:18 +0000
commit12b43d515c62682fcf7b578f31920a2be49142fe (patch)
tree1bfefb96f221647486f80b4fc91b3a7e3660beca /board
parentf5c5ef4a1fa7dcf90fd74f795a131d07377406ab (diff)
downloadu-boot-imx-12b43d515c62682fcf7b578f31920a2be49142fe.zip
u-boot-imx-12b43d515c62682fcf7b578f31920a2be49142fe.tar.gz
u-boot-imx-12b43d515c62682fcf7b578f31920a2be49142fe.tar.bz2
Add support for MPC8220 based "sorcery" board.
Diffstat (limited to 'board')
-rw-r--r--board/alaska/Makefile4
-rw-r--r--board/alaska/serial.c131
-rw-r--r--board/sorcery/Makefile45
-rw-r--r--board/sorcery/config.mk29
-rw-r--r--board/sorcery/sorcery.c43
-rw-r--r--board/sorcery/u-boot.lds122
6 files changed, 241 insertions, 133 deletions
diff --git a/board/alaska/Makefile b/board/alaska/Makefile
index d2b5bb7..e4fe110 100644
--- a/board/alaska/Makefile
+++ b/board/alaska/Makefile
@@ -1,4 +1,4 @@
-# (C) Copyright 2003-2004
+# (C) Copyright 2003-2005
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
@@ -24,7 +24,7 @@ include $(TOPDIR)/config.mk
LIB = lib$(BOARD).a
-OBJS := $(BOARD).o flash.o extserial.o serial.o
+OBJS := $(BOARD).o flash.o extserial.o
$(LIB): $(OBJS) $(SOBJS)
$(AR) crv $@ $(OBJS)
diff --git a/board/alaska/serial.c b/board/alaska/serial.c
deleted file mode 100644
index 08285b8..0000000
--- a/board/alaska/serial.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * (C) Copyright 2004, Freescale, Inc
- * TsiChung Liew, Tsi-Chung.Liew@freescale.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
- *
- */
-
-/*
- * Minimal serial functions needed to use one of the PSC ports
- * as serial console interface.
- */
-
-#include <common.h>
-#include <mpc8220.h>
-
-int serial_init (void)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
-#if defined (CONFIG_EXTUART_CONSOLE)
- volatile uchar *cpld = (volatile uchar *) CFG_CPLD_BASE;
-#endif
-
- /* Check CPLD Switch 2 whether is external or internal */
-#if defined (CONFIG_EXTUART_CONSOLE)
- if ((*cpld & 0x02) == 0x02) {
- gd->bExtUart = 1;
- return ext_serial_init ();
- } else
-#endif
- {
-#if defined(CONFIG_PSC_CONSOLE)
- gd->bExtUart = 0;
- return psc_serial_init ();
-#endif
- }
-
- return (0);
-}
-
-void serial_putc (const char c)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- if (gd->bExtUart) {
-#if defined (CONFIG_EXTUART_CONSOLE)
- ext_serial_putc (c);
-#endif
- } else {
-#if defined(CONFIG_PSC_CONSOLE)
- psc_serial_putc (c);
-#endif
- }
-}
-
-void serial_puts (const char *s)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- if (gd->bExtUart) {
-#if defined (CONFIG_EXTUART_CONSOLE)
- ext_serial_puts (s);
-#endif
- } else {
-#if defined(CONFIG_PSC_CONSOLE)
- psc_serial_puts (s);
-#endif
- }
-}
-
-int serial_getc (void)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- if (gd->bExtUart) {
-#if defined (CONFIG_EXTUART_CONSOLE)
- return ext_serial_getc ();
-#endif
- } else {
-#if defined(CONFIG_PSC_CONSOLE)
- return psc_serial_getc ();
-#endif
- }
-}
-
-int serial_tstc (void)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- if (gd->bExtUart) {
-#if defined (CONFIG_EXTUART_CONSOLE)
- return ext_serial_tstc ();
-#endif
- } else {
-#if defined(CONFIG_PSC_CONSOLE)
- return psc_serial_tstc ();
-#endif
- }
-}
-
-void serial_setbrg (void)
-{
- DECLARE_GLOBAL_DATA_PTR;
-
- if (gd->bExtUart) {
-#if defined (CONFIG_EXTUART_CONSOLE)
- ext_serial_setbrg ();
-#endif
- } else {
-#if defined(CONFIG_PSC_CONSOLE)
- psc_serial_setbrg ();
-#endif
- }
-}
diff --git a/board/sorcery/Makefile b/board/sorcery/Makefile
new file mode 100644
index 0000000..3d6d673
--- /dev/null
+++ b/board/sorcery/Makefile
@@ -0,0 +1,45 @@
+# (C) Copyright 2005
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# 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 = lib$(BOARD).a
+
+OBJS := $(BOARD).o
+
+$(LIB): $(OBJS) $(SOBJS)
+ $(AR) crv $@ $(OBJS)
+
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
+ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+
+-include .depend
+
+#########################################################################
diff --git a/board/sorcery/config.mk b/board/sorcery/config.mk
new file mode 100644
index 0000000..25de0b5
--- /dev/null
+++ b/board/sorcery/config.mk
@@ -0,0 +1,29 @@
+#
+# (C) Copyright 2003-2004
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# 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
+#
+
+#
+# sorcery board
+#
+
+TEXT_BASE = 0xfff00000
+PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -I$(TOPDIR)/board
diff --git a/board/sorcery/sorcery.c b/board/sorcery/sorcery.c
new file mode 100644
index 0000000..2f53fac
--- /dev/null
+++ b/board/sorcery/sorcery.c
@@ -0,0 +1,43 @@
+/*
+ * (C) Copyright 2004, Freescale Inc.
+ * TsiChung Liew, Tsi-Chung.Liew@freescale.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 <mpc8220.h>
+#include <asm/processor.h>
+#include <asm/mmu.h>
+
+long int initdram (int board_type)
+{
+ ulong size;
+
+ size = dramSetup ();
+
+ return get_ram_size((ulong *)CFG_SDRAM_BASE, size);
+}
+
+int checkboard (void)
+{
+ puts ("Board: Sorcery-C MPC8220\n");
+
+ return 0;
+}
diff --git a/board/sorcery/u-boot.lds b/board/sorcery/u-boot.lds
new file mode 100644
index 0000000..6e4a060
--- /dev/null
+++ b/board/sorcery/u-boot.lds
@@ -0,0 +1,122 @@
+/*
+ * (C) Copyright 2003-2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * 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
+ */
+
+OUTPUT_ARCH(powerpc)
+SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
+/* Do we need any of these for elf?
+ __DYNAMIC = 0; */
+SECTIONS
+{
+ /* Read-only sections, merged into text segment: */
+ . = + SIZEOF_HEADERS;
+ .interp : { *(.interp) }
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+ .rel.text : { *(.rel.text) }
+ .rela.text : { *(.rela.text) }
+ .rel.data : { *(.rel.data) }
+ .rela.data : { *(.rela.data) }
+ .rel.rodata : { *(.rel.rodata) }
+ .rela.rodata : { *(.rela.rodata) }
+ .rel.got : { *(.rel.got) }
+ .rela.got : { *(.rela.got) }
+ .rel.ctors : { *(.rel.ctors) }
+ .rela.ctors : { *(.rela.ctors) }
+ .rel.dtors : { *(.rel.dtors) }
+ .rela.dtors : { *(.rela.dtors) }
+ .rel.bss : { *(.rel.bss) }
+ .rela.bss : { *(.rela.bss) }
+ .rel.plt : { *(.rel.plt) }
+ .rela.plt : { *(.rela.plt) }
+ .init : { *(.init) }
+ .plt : { *(.plt) }
+ .text :
+ {
+ cpu/mpc8220/start.o (.text)
+ *(.text)
+ *(.fixup)
+ *(.got1)
+ . = ALIGN(16);
+ *(.rodata)
+ *(.rodata1)
+ *(.rodata.str1.4)
+ }
+ .fini : { *(.fini) } =0
+ .ctors : { *(.ctors) }
+ .dtors : { *(.dtors) }
+
+ /* Read-write section, merged into data segment: */
+ . = (. + 0x0FFF) & 0xFFFFF000;
+ _erotext = .;
+ PROVIDE (erotext = .);
+ .reloc :
+ {
+ *(.got)
+ _GOT2_TABLE_ = .;
+ *(.got2)
+ _FIXUP_TABLE_ = .;
+ *(.fixup)
+ }
+ __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
+ __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
+
+ .data :
+ {
+ *(.data)
+ *(.data1)
+ *(.sdata)
+ *(.sdata2)
+ *(.dynamic)
+ CONSTRUCTORS
+ }
+ _edata = .;
+ PROVIDE (edata = .);
+
+ __u_boot_cmd_start = .;
+ .u_boot_cmd : { *(.u_boot_cmd) }
+ __u_boot_cmd_end = .;
+
+
+ __start___ex_table = .;
+ __ex_table : { *(__ex_table) }
+ __stop___ex_table = .;
+
+ . = ALIGN(4096);
+ __init_begin = .;
+ .text.init : { *(.text.init) }
+ .data.init : { *(.data.init) }
+ . = ALIGN(4096);
+ __init_end = .;
+
+ __bss_start = .;
+ .bss :
+ {
+ *(.sbss) *(.scommon)
+ *(.dynbss)
+ *(.bss)
+ *(COMMON)
+ }
+ _end = . ;
+ PROVIDE (end = .);
+}