[U-Boot-Users] [PATCH 02/08]: mpc7448hpc2 platform support

Zang Roy-r61911 tie-fei.zang at freescale.com
Fri Jul 28 11:52:40 CEST 2006


mpc7448hpc2 platform support.

Signed-off-by: Alexandre Bounine <alexandreb at tundra.com>
Signed-off-by: Roy Zang	<tie-fei.zang at freescale.com>

---
 board/mpc7448hpc2/Makefile      |   49 ++++
 board/mpc7448hpc2/config.mk     |   28 ++
 board/mpc7448hpc2/mpc7448hpc2.c |  468
+++++++++++++++++++++++++++++++++++++++
 board/mpc7448hpc2/u-boot.lds    |  134 +++++++++++
 include/configs/mpc7448hpc2.h   |  433
++++++++++++++++++++++++++++++++++++
 5 files changed, 1112 insertions(+), 0 deletions(-)

diff --git a/board/mpc7448hpc2/Makefile b/board/mpc7448hpc2/Makefile
new file mode 100644
index 0000000..23d0adc
--- /dev/null
+++ b/board/mpc7448hpc2/Makefile
@@ -0,0 +1,49 @@
+#
+# (C) Copyright 2000
+# Wolfgang Denk, DENX Software Engineering, wd at 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 pci.o serial.o ns16550.o tsi108_init.o tsi108_i2c.o
\
+          tsi108_eth.o cfi_flash.o
+
+SOBJS	= asm_init.o
+
+$(LIB):	.depend $(OBJS) $(SOBJS)
+	$(AR) crv $@  $(OBJS) $(SOBJS)
+
+clean:
+	rm -f $(SOBJS) $(OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak .depend
+
+#######################################################################
##
+
+.depend:	Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
+		$(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
+
+sinclude .depend
+
+#######################################################################
##
diff --git a/board/mpc7448hpc2/config.mk b/board/mpc7448hpc2/config.mk
new file mode 100644
index 0000000..9147a5c
--- /dev/null
+++ b/board/mpc7448hpc2/config.mk
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2005 Freescale Semiconductor, Inc.
+#
+# 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
+#
+
+# Flash address
+TEXT_BASE = 0xFFF00000
+# RAM address
+#TEXT_BASE = 0x00400000
+
+PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -maltivec -mabi=altivec
-msoft-float
diff --git a/board/mpc7448hpc2/mpc7448hpc2.c
b/board/mpc7448hpc2/mpc7448hpc2.c
new file mode 100644
index 0000000..d147fe6
--- /dev/null
+++ b/board/mpc7448hpc2/mpc7448hpc2.c
@@ -0,0 +1,468 @@
+/*
+ * (C) Copyright 2005 Freescale Semiconductor, Inc.
+ *
+ * Roy Zang <tie-fei.zang at 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
+ *
+ * modifications for the Tsi108 Emul Board by avb at Tundra
+ */
+
+/*
+ * board support/init functions for the 
+ * Freescale MPC7448 HPC2 (High-Performance Computing 2 Platform).
+ */
+
+#include <common.h>
+#include <74xx_7xx.h>
+
+#undef	DEBUG
+
+extern void flush_data_cache(void);
+extern void invalidate_l1_instruction_cache(void);
+extern void tsi108_init_f(void);
+
+int display_mem_map(void);
+
+void after_reloc(ulong dest_addr)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+
+	/*
+	 * Jump to the main U-Boot board init code
+	 */
+	board_init_r((gd_t *) gd, dest_addr);
+	/* NOTREACHED */
+}
+
+/*
+ * Check Board Identity:
+ *
+ * report board type
+ */
+
+int checkboard(void)
+{
+	int l_type = 0;
+
+	printf("BOARD: %s\n", CFG_BOARD_NAME);
+	return (l_type);
+}
+
+/*
+ * Read Processor ID:
+ *
+ * report calling processor number
+ */
+
+int read_pid(void)
+{
+	return 0;		/* we are on single CPU platform for a
while */
+}
+
+long int dram_size(int board_type)
+{
+	return 0x20000000;	/* 256M bytes */
+}
+
+long int initdram(int board_type)
+{
+	return dram_size(board_type);
+}
+
+/* DRAM check routines copied from gw8260 */
+
+#if defined (CFG_DRAM_TEST)
+
+/*********************************************************************/
+/* NAME:  move64() -  moves a double word (64-bit)		     */
+/*								     */
+/* DESCRIPTION:
*/
+/*   this function performs a double word move from the data at
*/
+/*   the source pointer to the location at the destination pointer.  */
+/*								     */
+/* INPUTS:							     */
+/*   unsigned long long *src  - pointer to data to move
*/
+/*								     */
+/* OUTPUTS:							     */
+/*   unsigned long long *dest - pointer to locate to move data	     */
+/*								     */
+/* RETURNS:							     */
+/*   None							     */
+/*								     */
+/* RESTRICTIONS/LIMITATIONS:					     */
+/*   May cloober fr0.						     */
+/*								     */
+/*********************************************************************/
+static void move64(unsigned long long *src, unsigned long long *dest)
+{
+	asm("lfd  0, 0(3)\n\t"	/* fpr0   =  *scr       */
+	    "stfd 0, 0(4)"	/* *dest  =  fpr0       */
+      : : :"fr0");		/* Clobbers fr0         */
+	return;
+}
+
+#if defined (CFG_DRAM_TEST_DATA)
+
+unsigned long long pattern[] = {
+	0xaaaaaaaaaaaaaaaaULL,
+	0xccccccccccccccccULL,
+	0xf0f0f0f0f0f0f0f0ULL,
+	0xff00ff00ff00ff00ULL,
+	0xffff0000ffff0000ULL,
+	0xffffffff00000000ULL,
+	0x00000000ffffffffULL,
+	0x0000ffff0000ffffULL,
+	0x00ff00ff00ff00ffULL,
+	0x0f0f0f0f0f0f0f0fULL,
+	0x3333333333333333ULL,
+	0x5555555555555555ULL
+};
+
+/*********************************************************************/
+/* NAME:  mem_test_data() -  test data lines for shorts and opens    */
+/*								     */
+/* DESCRIPTION:
*/
+/*   Tests data lines for shorts and opens by forcing adjacent data  */
+/*   to opposite states. Because the data lines could be routed in   */
+/*   an arbitrary manner the must ensure test patterns ensure that   */
+/*   every case is tested. By using the following series of binary   */
+/*   patterns every combination of adjacent bits is test regardless  */
+/*   of routing.						     */
+/*								     */
+/*     ...101010101010101010101010				     */
+/*     ...110011001100110011001100				     */
+/*     ...111100001111000011110000				     */
+/*     ...111111110000000011111111				     */
+/*								     */
+/*   Carrying this out, gives us six hex patterns as follows:	     */
+/*								     */
+/*     0xaaaaaaaaaaaaaaaa					     */
+/*     0xcccccccccccccccc					     */
+/*     0xf0f0f0f0f0f0f0f0					     */
+/*     0xff00ff00ff00ff00					     */
+/*     0xffff0000ffff0000					     */
+/*     0xffffffff00000000					     */
+/*								     */
+/*   The number test patterns will always be given by:		     */
+/*								     */
+/*   log(base 2)(number data bits) = log2 (64) = 6		     */
+/*								     */
+/*   To test for short and opens to other signals on our boards. we  */
+/*   simply							     */
+/*   test with the 1's complemnt of the paterns as well.	     */
+/*								     */
+/* OUTPUTS:							     */
+/*   Displays failing test pattern				     */
+/*								     */
+/* RETURNS:							     */
+/*   0 -  Passed test						     */
+/*   1 -  Failed test						     */
+/*								     */
+/* RESTRICTIONS/LIMITATIONS:					     */
+/*  Assumes only one one SDRAM bank				     */
+/*								     */
+/*********************************************************************/
+int mem_test_data(void)
+{
+	unsigned long long *pmem = (unsigned long long
*)CFG_MEMTEST_START;
+	unsigned long long temp64;
+	int num_patterns = sizeof(pattern) / sizeof(pattern[0]);
+	int i;
+	unsigned int hi, lo;
+
+	for (i = 0; i < num_patterns; i++) {
+		move64(&(pattern[i]), pmem);
+		move64(pmem, &temp64);
+
+		/* hi = (temp64>>32) & 0xffffffff;          */
+		/* lo = temp64 & 0xffffffff;                */
+		/* printf("\ntemp64 = 0x%08x%08x", hi, lo); */
+
+		hi = (pattern[i] >> 32) & 0xffffffff;
+		lo = pattern[i] & 0xffffffff;
+		/* printf("\npattern[%d] = 0x%08x%08x", i, hi, lo);  */
+
+		if (temp64 != pattern[i]) {
+			printf("\n   Data Test Failed, pattern
0x%08x%08x",
+			       hi, lo);
+			return 1;
+		}
+	}
+
+	return 0;
+}
+#endif	/* CFG_DRAM_TEST_DATA */
+
+#if defined (CFG_DRAM_TEST_ADDRESS)
+/*********************************************************************/
+/* NAME:  mem_test_address() -	test address lines		     */
+/*								     */
+/* DESCRIPTION:
*/
+/*   This function performs a test to verify that each word im	     */
+/*   memory is uniquly addressable. The test sequence is as follows: */
+/*								     */
+/*   1) write the address of each word to each word.		     */
+/*   2) verify that each location equals its address		     */
+/*								     */
+/* OUTPUTS:							     */
+/*   Displays failing test pattern and address			     */
+/*								     */
+/* RETURNS:							     */
+/*   0 -  Passed test						     */
+/*   1 -  Failed test						     */
+/*								     */
+/* RESTRICTIONS/LIMITATIONS:					     */
+/*								     */
+/*								     */
+/*********************************************************************/
+int mem_test_address(void)
+{
+	volatile unsigned int *pmem =
+	    (volatile unsigned int *)CFG_MEMTEST_START;
+	const unsigned int size = (CFG_MEMTEST_END - CFG_MEMTEST_START)
/ 4;
+	unsigned int i;
+
+	/* write address to each location */
+	for (i = 0; i < size; i++) {
+		pmem[i] = i;
+	}
+
+	/* verify each loaction */
+	for (i = 0; i < size; i++) {
+		if (pmem[i] != i) {
+			printf("\n   Address Test Failed at 0x%x", i);
+			return 1;
+		}
+	}
+	return 0;
+}
+#endif				/* CFG_DRAM_TEST_ADDRESS */
+
+#if defined (CFG_DRAM_TEST_WALK)
+/*********************************************************************/
+/* NAME:   mem_march() -  memory march				     */
+/*								     */
+/* DESCRIPTION:
*/
+/*   Marches up through memory. At each location verifies rmask if   */
+/*   read = 1. At each location write wmask if	write = 1. Displays  */
+/*   failing address and pattern.				     */
+/*								     */
+/* INPUTS:							     */
+/*   volatile unsigned long long * base - start address of test
*/
+/*   unsigned int size - number of dwords(64-bit) to test	     */
+/*   unsigned long long rmask - read verify mask		     */
+/*   unsigned long long wmask - wrtie verify mask		     */
+/*   short read - verifies rmask if read = 1			     */
+/*   short write  - writes wmask if write = 1			     */
+/*								     */
+/* OUTPUTS:							     */
+/*   Displays failing test pattern and address			     */
+/*								     */
+/* RETURNS:							     */
+/*   0 -  Passed test						     */
+/*   1 -  Failed test						     */
+/*								     */
+/* RESTRICTIONS/LIMITATIONS:					     */
+/*								     */
+/*								     */
+/*********************************************************************/
+int mem_march(volatile unsigned long long *base,
+	      unsigned int size,
+	      unsigned long long rmask,
+	      unsigned long long wmask, short read, short write)
+{
+	unsigned int i;
+	unsigned long long temp;
+	unsigned int hitemp, lotemp, himask, lomask;
+
+	for (i = 0; i < size; i++) {
+		if (read != 0) {
+			/* temp = base[i]; */
+			move64((unsigned long long *)&(base[i]), &temp);
+			if (rmask != temp) {
+				hitemp = (temp >> 32) & 0xffffffff;
+				lotemp = temp & 0xffffffff;
+				himask = (rmask >> 32) & 0xffffffff;
+				lomask = rmask & 0xffffffff;
+
+				printf("\n Walking one's test failed:
\ 
+					address = 0x%08x," "\n\texpected
\
+					0x%08x%08x, found 0x%08x%08x", i
<< 3,\
+					himask, lomask, hitemp, lotemp);
+				return 1;
+			}
+		}
+		if (write != 0) {
+			/*  base[i] = wmask; */
+			move64(&wmask, (unsigned long long
*)&(base[i]));
+		}
+	}
+	return 0;
+}
+#endif				/* CFG_DRAM_TEST_WALK */
+
+/*********************************************************************/
+/* NAME:   mem_test_walk() -  a simple walking ones test	     */
+/*								     */
+/* DESCRIPTION:
*/
+/*   Performs a walking ones through entire physical memory. The     */
+/*   test uses as series of memory marches, mem_march(), to verify   */
+/*   and write the test patterns to memory. The test sequence is as  */
+/*   follows:							     */
+/*     1) march writing 0000...0001				     */
+/*     2) march verifying 0000...0001  , writing  0000...0010	     */
+/*     3) repeat step 2 shifting masks left 1 bit each time unitl    */
+/*	   the write mask equals 1000...0000			     */
+/*     4) march verifying 1000...0000				     */
+/*   The test fails if any of the memory marches return a failure.   */
+/*								     */
+/* OUTPUTS:							     */
+/*   Displays which pass on the memory test is executing	     */
+/*								     */
+/* RETURNS:							     */
+/*   0 -  Passed test						     */
+/*   1 -  Failed test						     */
+/*								     */
+/* RESTRICTIONS/LIMITATIONS:					     */
+/*								     */
+/*								     */
+/*********************************************************************/
+int mem_test_walk(void)
+{
+	unsigned long long mask;
+	volatile unsigned long long *pmem =
+	    (volatile unsigned long long *)CFG_MEMTEST_START;
+	const unsigned long size = (CFG_MEMTEST_END - CFG_MEMTEST_START)
/ 8;
+
+	unsigned int i;
+
+	mask = 0x01;
+
+	printf("Initial Pass");
+	mem_march(pmem, size, 0x0, 0x1, 0, 1);
+
+	printf("\b\b\b\b\b\b\b\b\b\b\b\b");
+	printf("		");
+	printf("         ");
+	printf("\b\b\b\b\b\b\b\b\b\b\b\b");
+
+	for (i = 0; i < 63; i++) {
+		printf("Pass %2d", i + 2);
+		if (mem_march(pmem, size, mask, mask << 1, 1, 1) != 0) {
+			/*printf("mask: 0x%x, pass: %d, ", mask, i); */
+			return 1;
+		}
+		mask = mask << 1;
+		printf("\b\b\b\b\b\b\b");
+	}
+
+	printf("Last Pass");
+	if (mem_march(pmem, size, 0, mask, 0, 1) != 0) {
+		/* printf("mask: 0x%x", mask); */
+		return 1;
+	}
+	printf("\b\b\b\b\b\b\b\b\b");
+	printf("	     ");
+	printf("\b\b\b\b\b\b\b\b\b");
+
+	return 0;
+}
+
+/*********************************************************************/
+/* NAME:    testdram() -  calls any enabled memory tests	     */
+/*								     */
+/* DESCRIPTION:
*/
+/*   Runs memory tests if the environment test variables are set to  */
+/*   'y'.							     */
+/*								     */
+/* INPUTS:							     */
+/*   testdramdata    - If set to 'y', data test is run.
*/
+/*   testdramaddress - If set to 'y', address test is run.	     */
+/*   testdramwalk    - If set to 'y', walking ones test is run	     */
+/*								     */
+/* OUTPUTS:							     */
+/*   None							     */
+/*								     */
+/* RETURNS:							     */
+/*   0 -  Passed test						     */
+/*   1 -  Failed test						     */
+/*								     */
+/* RESTRICTIONS/LIMITATIONS:					     */
+/*								     */
+/*								     */
+/*********************************************************************/
+int testdram(void)
+{
+	char *s;
+	int rundata, runaddress, runwalk;
+
+	s = getenv("testdramdata");
+	rundata = (s && (*s == 'y')) ? 1 : 0;
+	s = getenv("testdramaddress");
+	runaddress = (s && (*s == 'y')) ? 1 : 0;
+	s = getenv("testdramwalk");
+	runwalk = (s && (*s == 'y')) ? 1 : 0;
+
+/*    rundata = 1; */
+/*    runaddress = 0; */
+/*    runwalk = 0; */
+
+	if ((rundata == 1) || (runaddress == 1) || (runwalk == 1)) {
+		printf("Testing RAM from 0x%08x to 0x%08x ...  \
+			(don't panic... that will take a moment
!!!!)\n", \
+			CFG_MEMTEST_START, CFG_MEMTEST_END);
+	}
+#ifdef CFG_DRAM_TEST_DATA
+	if (rundata == 1) {
+		printf("Test DATA ...  ");
+		if (mem_test_data () == 1) {
+			printf("failed \n");
+			return 1;
+		} else
+			printf("ok \n");
+	}
+#endif
+#ifdef CFG_DRAM_TEST_ADDRESS
+	if (runaddress == 1) {
+		printf("Test ADDRESS ...  ");
+		if (mem_test_address () == 1) {
+			printf("failed \n");
+			return 1;
+		} else
+			printf("ok \n");
+	}
+#endif
+#ifdef CFG_DRAM_TEST_WALK
+	if (runwalk == 1) {
+		printf("Test WALKING ONEs ...  ");
+		if (mem_test_walk() == 1) {
+			printf("failed \n");
+			return 1;
+		} else
+			printf("ok \n");
+	}
+#endif
+	if ((rundata == 1) || (runaddress == 1) || (runwalk == 1)) {
+		printf("passed\n");
+	}
+	return 0;
+
+}
+#endif /* CFG_DRAM_TEST */
diff --git a/board/mpc7448hpc2/u-boot.lds b/board/mpc7448hpc2/u-boot.lds
new file mode 100644
index 0000000..feadc1b
--- /dev/null
+++ b/board/mpc7448hpc2/u-boot.lds
@@ -0,0 +1,134 @@
+/*
+ * (C) Copyright 2001
+ * Josh Huber <huber at mclx.com>, Mission Critical Linux, Inc.
+ *
+ * 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
+ */
+
+/*
+ * u-boot.lds - linker script for U-Boot on the Galileo Eval Board.
+ */
+
+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/74xx_7xx/start.o	(.text)
+
+/* store the environment in a seperate sector in the boot flash */
+/*    . = env_offset; */
+/*    common/environment.o(.text) */
+
+    *(.text)
+    *(.fixup)
+    *(.got1)
+  }
+  _etext = .;
+  PROVIDE (etext = .);
+  .rodata    :
+  {
+    *(.rodata)
+    *(.rodata1)
+    *(.rodata.str1.4)
+  }
+  .fini      : { *(.fini)    } =0
+  .ctors     : { *(.ctors)   }
+  .dtors     : { *(.dtors)   }
+
+  /* Read-write section, merged into data segment: */
+  . = (. + 0x00FF) & 0xFFFFFF00;
+  _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(256);
+  __init_begin = .;
+  .text.init : { *(.text.init) }
+  .data.init : { *(.data.init) }
+  . = ALIGN(256);
+  __init_end = .;
+
+  __bss_start = .;
+  .bss       :
+  {
+   *(.sbss) *(.scommon)
+   *(.dynbss)
+   *(.bss)
+   *(COMMON)
+  }
+  _end = . ;
+  PROVIDE (end = .);
+}
diff --git a/include/configs/mpc7448hpc2.h
b/include/configs/mpc7448hpc2.h
new file mode 100644
index 0000000..f47f85c
--- /dev/null
+++ b/include/configs/mpc7448hpc2.h
@@ -0,0 +1,433 @@
+/*
+ * Copyright (c) 2005 Freescale Semiconductor, Inc.
+ *
+ * (C) Copyright 2005
+ * Alex Bounine , Tundra Semiconductor Corp.
+ *
+ * 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
+ */
+
+/****************************************************************
+ *
+ * board specific configuration options for Freescale
+ * MPC7448HPC2 (High-Performance Computing II) (Taiga) board
+ *
+ ****************************************************************/
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#undef DEBUG
+
+/* Board Configuration Definitions */
+/* MPC7448HPC2 (High-Performance Computing II) (Taiga) board */
+
+#define CONFIG_MPC7448HPC2
+
+#define CONFIG_74xx
+#define CONFIG_750FX		/* this option to enable init of
extended BATs */
+#define CONFIG_ALTIVEC		/* undef to disable */
+
+#define CFG_BOARD_NAME       "MPC7448 HPC II"
+#define CONFIG_IDENT_STRING  " Freescale MPC7448 HPC II"
+
+#define CFG_OCN_CLK         133000000	/* 133 MHz */
+
+#define CFG_CLK_SPREAD		/* Enable Spread-Spectrum Clock
generation */
+
+#undef  CONFIG_ECC		/* disable ECC support */
+
+/* Board-specific Initialization Functions to be called */
+#define CFG_BOARD_ASM_INIT
+#define CONFIG_BOARD_EARLY_INIT_F
+#define CONFIG_BOARD_EARLY_INIT_R
+#define CONFIG_MISC_INIT_R
+
+/* Default MAC Addresses for on-chip GIGE Controller */
+
+#define CONFIG_ETHADDR      00:06:D2:00:00:01
+
+#define CONFIG_HAS_ETH1
+#define CONFIG_ETH1ADDR     00:06:D2:00:00:02
+
+#define CONFIG_ENV_OVERWRITE
+
+/*
+ * High Level Configuration Options
+ * (easy to change)
+ */
+
+#define CONFIG_BAUDRATE    115200	/* console baudrate = 115000 */
+
+/*#define CFG_HUSH_PARSER */
+#undef CFG_HUSH_PARSER
+
+#define CFG_PROMPT_HUSH_PS2  "> "
+
+/*
+ * The following defines let you select what serial you want to use
+ * for your console driver.
+ *
+ * what to do:
+ * If you have hacked a serial cable onto the second DUART channel,
change the CFG_DUART port from 1
+ * to 0 below.
+ *
+ */
+
+#define CFG_NS16550_REG_SIZE    1
+
+#define CONFIG_BOOTDELAY     3	/* autoboot after 3 seconds */
+#define CONFIG_ZERO_BOOTDELAY_CHECK
+
+#undef CONFIG_BOOTARGS
+/*#define CONFIG_PREBOOT  "echo;echo Type \"run flash_nfs\" to mount
root filesystem over NFS;echo" */
+
+#if (CONFIG_BOOTDELAY >= 0)
+#define CONFIG_BOOTCOMMAND      "tftpboot 0x400000 zImage.initrd.elf;\
+ setenv bootargs $(bootargs) $(bootargs_root)
nfsroot=$(serverip):$(rootpath) \
+ ip=$(ipaddr):$(serverip)$(bootargs_end);  bootm 0x400000; "
+
+#define CONFIG_BOOTARGS "console=ttyS0,115200"
+#endif
+
+#undef CONFIG_EXTRA_ENV_SETTINGS
+
+#define CONFIG_SERIAL    "No. 1"
+
+/* Networking Configuration */
+
+#define KSEG1ADDR(a)   (a)	/* Needed by the rtl8139 driver */
+
+#define CONFIG_TSI108_ETH
+#define CONFIG_TSI108_ETH_NUM_PORTS 2
+
+#define CONFIG_NET_MULTI
+
+#define CONFIG_IPADDR       172.27.234.48
+#define CONFIG_SERVERIP     172.27.234.10
+#define CONFIG_NETMASK      255.255.0.0
+#define CONFIG_GATEWAYIP    172.27.255.254
+
+#define CONFIG_BOOTFILE     zImage.initrd.elf
+#define CONFIG_LOADADDR     0x400000
+
+#define CONFIG_TESTDRAMDATA     y
+#define CONFIG_TESTDRAMADDRESS  n
+#define CONFIG_TESETDRAMWALK    n
+
+/*---------------------------------------------------------------------
----- */
+
+#define CONFIG_LOADS_ECHO   0	/* echo off for serial download */
+#define CFG_LOADS_BAUD_CHANGE	/* allow baudrate changes */
+
+#undef CONFIG_WATCHDOG		/* watchdog disabled */
+
+#define CONFIG_BOOTP_MASK  (CONFIG_BOOTP_DEFAULT | \
+                            CONFIG_BOOTP_BOOTFILESIZE)
+
+/* Flash banks JFFS2 should use */
+#define CFG_JFFS2_FIRST_BANK   1
+#define CFG_JFFS2_NUM_BANKS    1
+
+#define CONFIG_COMMANDS (CONFIG_CMD_DFL \
+		| CFG_CMD_ASKENV \
+		| CFG_CMD_CACHE \
+		| CFG_CMD_PCI \
+		| CFG_CMD_I2C \
+		| CFG_CMD_SDRAM \
+		| CFG_CMD_EEPROM \
+		| CFG_CMD_NET \
+		| CFG_CMD_FLASH \
+		| CFG_CMD_ENV \
+		| CFG_CMD_BSP \
+		| CFG_CMD_DHCP \
+		| CFG_CMD_PING \
+		| CFG_CMD_DATE)
+
+/* this must be included AFTER the definition of CONFIG_COMMANDS (if
any) */
+#include <cmd_confdefs.h>
+
+/*set date in u-boot*/
+#define CONFIG_RTC_M48T35A
+#define CFG_NVRAM_BASE_ADDR 0xfc000000
+#define CFG_NVRAM_SIZE 0x8000
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_VERSION_VARIABLE 1
+
+#define CFG_I2C_EEPROM_ADDR      0x50	/* I2C EEPROM page 1 */
+#define CFG_I2C_EEPROM_ADDR_LEN     1	/* Bytes of address */
+
+#define CFG_LONGHELP		/* undef to save memory */
+#define CFG_PROMPT	"=> "	/* Monitor Command Prompt */
+
+#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#define CFG_CBSIZE               1024	/* Console I/O Buffer Size */
+#define CONFIG_KGDB_BAUDRATE   115200	/* speed to run kgdb serial port
at */
+#else
+#define CFG_CBSIZE               256	/* Console I/O Buffer Size */
+#endif
+
+#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16)	/* Print Buffer
Size */
+#define CFG_MAXARGS     16	/* max number of command args */
+#define CFG_BARGSIZE    CFG_CBSIZE	/* Boot Argument Buffer Size */
+
+/*
+#define CFG_DRAM_TEST
+ * DRAM tests
+ *   CFG_DRAM_TEST - enables the following tests.
+ *
+ *   CFG_DRAM_TEST_DATA - Enables test for shorted or open data lines
+ *			  Environment variable 'test_dram_data' must be
+ *			  set to 'y'.
+ *   CFG_DRAM_TEST_DATA - Enables test to verify that each word is
uniquely
+ *			  addressable. Environment variable
+ *			  'test_dram_address' must be set to 'y'.
+ *   CFG_DRAM_TEST_WALK - Enables test a 64-bit walking ones pattern
test.
+ *			  This test takes about 6 minutes to test 64 MB.
+ *			  Environment variable 'test_dram_walk' must be
+ *			  set to 'y'.
+ */
+#define CFG_DRAM_TEST
+#if defined(CFG_DRAM_TEST)
+#define CFG_MEMTEST_START       0x00400000	/* memtest works on */
+#define CFG_MEMTEST_END         0x07c00000	/* 4 ... 124 MB in DRAM
*/
+#define CFG_DRAM_TEST_DATA
+#define CFG_DRAM_TEST_ADDRESS
+#define CFG_DRAM_TEST_WALK
+#endif				/* CFG_DRAM_TEST */
+
+#define CFG_LOAD_ADDR           0x00400000	/* default load address
*/
+
+#define CFG_HZ                  1000	/* decr freq: 1ms ticks */
+
+/*
+ * Low Level Configuration Settings
+ * (address mappings, register initial values, etc.)
+ * You should know what you are doing if you make changes here.
+ */
+
+/*---------------------------------------------------------------------
--
+ * Definitions for initial stack pointer and data area
+ */
+
+/*
+ * When locking data in cache you should point the CFG_INIT_RAM_ADDRESS
+ * To an unused memory region. The stack will remain in cache until RAM
+ * is initialized
+*/
+#undef  CFG_INIT_RAM_LOCK
+#define CFG_INIT_RAM_ADDR   0x07d00000	/* unused memory region */
+#define CFG_INIT_RAM_END 0x4000	/* larger space - we have SDRAM
initialized */
+
+#define CFG_GBL_DATA_SIZE   128	/* size in bytes reserved for
init data */
+#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
+
+/*---------------------------------------------------------------------
--
+ * Start addresses for the final memory configuration
+ * (Set up by the startup code)
+ * Please note that CFG_SDRAM_BASE _must_ start at 0
+ */
+
+#define CFG_SDRAM_BASE       0x00000000	/* first 256 MB of SDRAM
*/
+#define CFG_SDRAM1_BASE      0x10000000	/* next 256MB of SDRAM
*/
+
+#define CFG_SDRAM2_BASE      0x40000000	/* beginning of
non-cacheable alias for SDRAM - first 256MB */
+#define CFG_SDRAM3_BASE      0x50000000	/* next Non-Cacheable
256MB of SDRAM */
+
+#define CFG_PCI_PFM_BASE     0x80000000	/* Prefetchable
(cacheable) PCI/X PFM and SDRAM OCN (128MB+128MB) */
+
+#define CFG_PCI_MEM32_BASE   0xE0000000	/* Non-Cacheable PCI/X
MEM and SDRAM OCN (128MB+128MB) */
+
+#define CFG_MISC_REGION_BASE 0xf0000000	/* Base Address for
(PCI/X + Flash) region */
+
+#define CFG_FLASH_BASE       0xff000000	/* Base Address of Flash
device */
+#define CFG_FLASH_BASE2      0xfe000000	/* Alternate Flash Base
Address */
+
+#define CONFIG_VERY_BIG_RAM	/* we will use up to 256M memory for
cause we are short of BATS */
+
+#define PCI0_IO_BASE_BOOTM   0xfd000000
+
+#define CFG_RESET_ADDRESS  0x3fffff00
+#define CFG_MONITOR_LEN    (256 << 10)	/* Reserve 256 kB for Monitor */
+#define CFG_MONITOR_BASE   TEXT_BASE	/* u-boot code base */
+#define CFG_MALLOC_LEN     (256 << 10)	/* Reserve 256 kB for malloc */
+
+/* Peripheral Device section */
+
+/*******************************************************
+ * Resources on the Tsi108
+ *******************************************************/
+
+#define CFG_TSI108_CSR_RST_BASE 0xC0000000	/* Tsi108 CSR base after
reset */
+#define CFG_TSI108_CSR_BASE     CFG_TSI108_CSR_RST_BASE	/*
Runtime Tsi108 CSR base */
+
+#define ENABLE_PCI_CSR_BAR	/* enables access to Tsi108 CSRs from
the PCI/X bus */
+
+#undef  DISABLE_PBM
+
+#define CFG_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
+
+#define CFG_DUART_IO       (CFG_TSI108_CSR_BASE + 0x7808)
+#define CFG_DUART_CHAN      0	/* channel to use for console */
+#define CFG_INIT_CHAN1
+#define CFG_INIT_CHAN2
+
+/*---------------------------------------------------------------------
--
+ * PCI stuff
+
*-----------------------------------------------------------------------
+ */
+
+#define CONFIG_PCI		/* include pci support */
+
+#define PCI_HOST_ADAPTER  0	/* configure as pci adapter */
+#define PCI_HOST_FORCE    1	/* configure as pci host */
+#define PCI_HOST_AUTO     2	/* detected via arbiter enable */
+
+#define CONFIG_PCI_HOST PCI_HOST_FORCE	/* select pci host function */
+#define CONFIG_PCI_PNP		/* do pci plug-and-play */
+
+/* PCI MEMORY MAP section */
+
+/* PCI view of System Memory */
+#define CFG_PCI_MEMORY_BUS      0x00000000
+#define CFG_PCI_MEMORY_PHYS     0x00000000
+#define CFG_PCI_MEMORY_SIZE     0x80000000	
+
+/* PCI Memory Space */
+#define CFG_PCI_MEM_BUS         (CFG_PCI_MEM_PHYS)
+#define CFG_PCI_MEM_PHYS        (CFG_PCI_MEM32_BASE)
//CFG_PCI_MEM32_BASE = 0xE0000000
+#define CFG_PCI_MEM_SIZE        0x10000000	/* 256 MB space for
PCI/X Mem + SDRAM OCN */
+
+/* PCI I/O Space */
+#define CFG_PCI_IO_BUS          0x00000000
+#define CFG_PCI_IO_PHYS         0xfa000000	/* Changed from fd000000
*/
+
+#define CFG_PCI_IO_SIZE         0x01000000	/* 16MB */
+
+#define _IO_BASE		0x00000000	/* points to PCI I/O
space      */
+
+/* PCI Config Space mapping */
+#define CFG_PCI_CFG_BASE	0xfb000000	/* Changed from FE000000
*/
+#define CFG_PCI_CFG_SIZE	0x01000000	/* 16MB */
+
+#define CFG_IBAT0U  0xFE0003FF
+#define CFG_IBAT0L  0xFE000002
+
+#define CFG_IBAT1U  0x00007FFF
+#define CFG_IBAT1L  0x00000012
+
+#define CFG_IBAT2U  0x80007FFF
+#define CFG_IBAT2L  0x80000022
+
+#define CFG_IBAT3U  0x00000000
+#define CFG_IBAT3L  0x00000000
+
+#define CFG_IBAT4U  0x00000000
+#define CFG_IBAT4L  0x00000000
+
+#define CFG_IBAT5U  0x00000000
+#define CFG_IBAT5L  0x00000000
+
+#define CFG_IBAT6U  0x00000000
+#define CFG_IBAT6L  0x00000000
+
+#define CFG_IBAT7U  0x00000000
+#define CFG_IBAT7L  0x00000000
+
+#define CFG_DBAT0U  0xE0003FFF
+#define CFG_DBAT0L  0xE000002A
+
+#define CFG_DBAT1U  0x00007FFF
+#define CFG_DBAT1L  0x00000012
+
+#define CFG_DBAT2U  0x00000000
+#define CFG_DBAT2L  0x00000000
+
+#define CFG_DBAT3U  0xC0000003
+#define CFG_DBAT3L  0xC000002A
+
+#define CFG_DBAT4U  0x00000000
+#define CFG_DBAT4L  0x00000000
+
+#define CFG_DBAT5U  0x00000000
+#define CFG_DBAT5L  0x00000000
+
+#define CFG_DBAT6U  0x00000000
+#define CFG_DBAT6L  0x00000000
+
+#define CFG_DBAT7U  0x00000000
+#define CFG_DBAT7L  0x00000000
+
+/* I2C addresses for the two DIMM SPD chips */
+#define DIMM0_I2C_ADDR    0x51
+#define DIMM1_I2C_ADDR    0x52
+
+/*
+ * For booting Linux, the board info and command line data
+ * have to be in the first 8 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CFG_BOOTMAPSZ    (8<<20)	/* Initial Memory map for Linux
*/
+
+/*---------------------------------------------------------------------
--
+ * FLASH organization
+ */
+#define CFG_MAX_FLASH_BANKS  2	/* Flash can be at one of two addresses
*/
+#define FLASH_BANK_SIZE      0x01000000	/* 16 MB Total */
+#define CFG_FLASH_BANKS_LIST {CFG_FLASH_BASE, CFG_FLASH_BASE2}
+
+#define CFG_HPC2_FLASH_CFI_DRIVER
+#define CFG_FLASH_CFI
+
+#define PHYS_FLASH_SIZE     0x01000000
+#define CFG_MAX_FLASH_SECT  (128)
+
+#define CFG_ENV_IS_IN_NVRAM
+#define CFG_ENV_ADDR         0xFC000000
+
+#define CFG_ENV_OFFSET      0x00000000	/* Offset of Environment Sector
*/
+#define CFG_ENV_SIZE        0x00000400	/* Total Size of Environment
Space */
+
+/*---------------------------------------------------------------------
--
+ * Cache Configuration
+ */
+#define CFG_CACHELINE_SIZE   32	/* For all MPC74xx CPUs */
+#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#define CFG_CACHELINE_SHIFT   5	/* log base 2 of the above value
*/
+#endif
+
+/*---------------------------------------------------------------------
--
+ * L2CR setup -- make sure this is right for your board!
+ * look in include/mpc74xx.h for the defines used here
+ */
+#undef CFG_L2
+
+#define L2_INIT  0
+#define L2_ENABLE  (L2_INIT | L2CR_L2E)
+
+/*
+ * Internal Definitions
+ *
+ * Boot Flags
+ */
+#define BOOTFLAG_COLD    0x01	/* Normal Power-On: Boot from FLASH */
+#define BOOTFLAG_WARM    0x02	/* Software reboot */
+#endif				/* __CONFIG_H */
-- 
1.4.0




More information about the U-Boot mailing list