]> git.sur5r.net Git - u-boot/commitdiff
Merge with /home/wd/git/u-boot/custodian/u-boot-mpc85xx
authorWolfgang Denk <wd@denx.de>
Sat, 5 May 2007 15:33:22 +0000 (17:33 +0200)
committerWolfgang Denk <wd@denx.de>
Sat, 5 May 2007 15:33:22 +0000 (17:33 +0200)
22 files changed:
CHANGELOG
MAINTAINERS
Makefile
board/ixdp425/config.mk
board/mpc8641hpcn/init.S
board/prodrive/pdnb3/config.mk
board/stxssa/Makefile [new file with mode: 0644]
board/stxssa/config.mk [new file with mode: 0644]
board/stxssa/init.S [new file with mode: 0644]
board/stxssa/stxssa.c [new file with mode: 0644]
board/stxssa/u-boot.lds [new file with mode: 0644]
common/cmd_bootm.c
cpu/ixp/npe/Makefile
cpu/mpc86xx/cpu.c
cpu/mpc86xx/spd_sdram.c
cpu/mpc86xx/start.S
doc/README.nand
drivers/nand/nand_base.c
include/configs/delta.h
include/configs/stxssa.h [new file with mode: 0644]
include/configs/zylonite.h
include/mpc86xx.h

index a18bb06511db907a079e4da4c4f41c07b7d5c420..66e03e864cbb2c63167714f8cf0b6aa44e2a906e 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,134 @@
+commit a79886590593ba1d667c840caa4940c61639f18f
+Author: Thomas Knobloch <knobloch@siemens.com>
+Date:  Sat May 5 07:04:42 2007 +0200
+
+    NAND: Wrong calculation of page number in nand_block_bad()
+
+    In case that there is no memory based bad block table available the
+    function nand_block_checkbad() in drivers/mtd/nand/nand_base.c will call
+    nand_block_bad() directly. When parameter 'getchip' is set to zero,
+    nand_block_bad() will not right shift the offset to calculate the
+    correct page number.
+
+    Signed-off-by: Thomas Knobloch <knobloch@siemens.com>
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 9877d7dcd1eebe61aa5d8b8ffe9c048ea426e6f6
+Author: Wolfgang Denk <wd@denx.de>
+Date:  Fri May 4 10:02:33 2007 +0200
+
+    Fix initrd length corruption in bootm command.
+
+    When using FDT Images, the length of an inital ramdisk was
+    overwritten (bug introduced by commit 87a449c8, 22 Aug 2006).
+
+    Patches by Timur Tabi & Johns Daniel.
+
+    Signed-off-by: Wolfgang Denk <wd@denx.de>
+
+commit c64a89d6ce8584b9fc64f4e85da9ecac3cfc2c2a
+Author: Wolfgang Denk <wd@denx.de>
+Date:  Thu May 3 16:34:41 2007 +0200
+
+    Update board configuration for STX GP3SSA board:
+
+    Enable hush shell, environment in flash rather in EEPROM,
+    more user-friendly default environment, etc.
+    The simple EEPROM environment can be selected easily in the board
+    config file.
+
+    Signed-off-by: Wolfgang Denk <wd@denx.de>
+
+commit 2c6fb199dc5756fc72f49d1f4de105e089049d65
+Author: Wolfgang Denk <wd@denx.de>
+Date:  Tue Apr 24 14:37:49 2007 +0200
+
+    Cleanup STX GP3SSA code; fix build and compile problems.
+
+commit 35171dc04e028ecacc23ad916a66295472555dbf
+Author: Dan Malek <dan@embeddedalley.com>
+Date:  Fri Jan 5 09:15:34 2007 +0100
+
+    Add support for STX GP3SSA (stxssa) Board
+
+    Signed-off-by Dan Malek, <dan@embeddedalley.com>
+
+commit a75af9bfd8fff0499efdbb90601cec5a2afef117
+Author: James Yang <James.Yang@freescale.com>
+Date:  Wed Feb 7 15:28:04 2007 -0600
+
+    Conditionalize 8641 Rev1.0 MCM workarounds
+
+    Signed-off-by: James Yang <James.Yang@freescale.com>
+    Signed-off-by: Jon Loeliger <jdl@freescale.com>
+
+commit c1ab82669d9525998c34e802a12cad662723f22a
+Author: James Yang <James.Yang@freescale.com>
+Date:  Fri Mar 16 13:02:53 2007 -0500
+
+    Rewrote picos_to_clk() to avoid rounding errors.
+    Clarified that conversion is to DRAM clocks rather than platform clocks.
+    Made function static to spd_sdram.c.
+
+    Signed-off-by: James Yang <James.Yang@freescale.com>
+    Signed-off-by: Jon Loeliger <jdl@freescale.com>
+
+commit 323bfa8f436dc3bc57187c9b1488bc3146ff1522
+Author: Stefan Roese <sr@denx.de>
+Date:  Mon Apr 23 12:00:22 2007 +0200
+
+    Remove BOARDLIBS usage completely
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 2e343b9a57f32e1bd08c35c9976910333fb4e13d
+Author: Ed Swarthout <Ed.Swarthout@freescale.com>
+Date:  Wed Feb 28 05:37:29 2007 -0600
+
+    mpc8641hpcn: Fix LAW and TLB setup to use the IO_PHYS #defines.
+
+    Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
+
+commit 79cb47391eebef85acadb3f6961ef6c55cace6ac
+Author: Zhang Wei <wei.zhang@freescale.com>
+Date:  Fri Jan 19 10:42:37 2007 +0800
+
+    Enable LAWs for MPC8641 PCI-Ex2.
+
+    Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
+    Signed-off-by: Jon Loeliger <jdl@freescale.com>
+
+commit bd7851ce1e1f140665b520026abf1042968b1102
+Author: Jon Loeliger <jdl@freescale.com>
+Date:  Fri Apr 20 14:12:26 2007 -0500
+
+    mpc86xx; Write MAC address to mac-address and local-mac-address
+
+    Some device trees have a mac-address property, some have local-mac-address,
+    and some have both.  To support all of these device trees, ftp_cpu_setup()
+    should write the MAC address to mac-address and local-mac-address, if they
+    exist.
+
+    Signed-off-by: Timur Tabi <timur@freescale.com>
+    Signed-off-by: Jon Loeliger <jdl@freescale.com>
+
+commit 7dbdf28b8bd855a8530dc3292e4982575a197060
+Author: Jon Loeliger <jdl@freescale.com>
+Date:  Fri Apr 20 14:11:38 2007 -0500
+
+    mpc86xx: protect memcpy to bad address if a mac-address is missing from dt
+
+    Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
+    Signed-off-by: Jon Loeliger <jdl@freescale.com>
+
+commit 14da5f7675bbb427c469e3f45006e027b6e21db9
+Author: Wolfgang Denk <wd@denx.de>
+Date:  Fri Apr 20 17:43:28 2007 +0200
+
+    Cleanup compiler warnings, update CHANGELOG
+
+    Signed-off-by: Wolfgang Denk <wd@denx.de>
+
 commit 6923565db12af34fd5e02d354ee65a8c78ac460f
 Author: Detlev Zundel <dzu@denx.de>
 Date:  Fri Apr 20 12:01:47 2007 +0200
index c3c73da4f77bb96df63d2cea5d2645b5f42e8838..2eaef1784eaccbf31f6870135a6d1399ebb6d977 100644 (file)
@@ -221,10 +221,11 @@ Jon Loeliger <jdl@freescale.com>
 
        MPC8641HPCN             MPC8641D
 
-Dan Malek <dan@embeddededge.com>
+Dan Malek <dan@embeddedalley.com>
 
-       STxGP3                  MPC85xx
-       STxXTc                  MPC8xx
+       stxgp3                  MPC85xx
+       stxssa                  MPC85xx
+       stxxtc                  MPC8xx
 
 Eran Man <eran@nbase.co.il>
 
index a9d56ecb20e3535c58caf37e35fb83cd701dd9e3..ceee2c7bed3ad5ee4f7a33e23dd51a164a5e0d22 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -197,6 +197,9 @@ LIBS += cpu/$(CPU)/lib$(CPU).a
 ifdef SOC
 LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
 endif
+ifeq ($(CPU),ixp)
+LIBS += cpu/ixp/npe/libnpe.a
+endif
 LIBS += lib_$(ARCH)/lib$(ARCH).a
 LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
        fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a
@@ -220,7 +223,6 @@ LIBS += $(shell if [ -d post/board/$(BOARDDIR) ]; then echo \
        "post/board/$(BOARDDIR)/libpost$(BOARD).a"; fi)
 LIBS += common/libcommon.a
 LIBS += libfdt/libfdt.a
-LIBS += $(BOARDLIBS)
 
 LIBS := $(addprefix $(obj),$(LIBS))
 .PHONY : $(LIBS)
@@ -1777,6 +1779,9 @@ sbc8560_66_config:      unconfig
 stxgp3_config:         unconfig
        @$(MKCONFIG) $(@:_config=) ppc mpc85xx stxgp3
 
+stxssa_config:         unconfig
+       @$(MKCONFIG) $(@:_config=) ppc mpc85xx stxssa
+
 TQM8540_config         \
 TQM8541_config         \
 TQM8555_config         \
index d49c0e7e6d58837ddfc75b5939d57ecceadf2db5..ecff8d741566235a78bab67ed6fdc8a920c60e1a 100644 (file)
@@ -1,4 +1,2 @@
+#
 TEXT_BASE = 0x00f80000
-
-# include NPE ethernet driver
-BOARDLIBS = $(obj)cpu/ixp/npe/libnpe.a
index 6b3e2d275de1dfde76fea7ff44c3f51b1c3d996a..cb21ba6a75ba0192e050b00239ca9c4c5c5659af 100644 (file)
@@ -59,7 +59,7 @@
 #define LAWAR2 (LAWAR_EN | LAWAR_TRGT_IF_PCI1 | (LAWAR_SIZE & LAWAR_SIZE_512M))
 
 #define LAWBAR3 ((CFG_PCI2_MEM_BASE>>12) & 0xffffff)
-#define LAWAR3 (~LAWAR_EN & (LAWAR_TRGT_IF_PCI2 | (LAWAR_SIZE & LAWAR_SIZE_512M)))
+#define LAWAR3 (LAWAR_EN | LAWAR_TRGT_IF_PCI2 | (LAWAR_SIZE & LAWAR_SIZE_512M))
 
 /*
  * This is not so much the SDRAM map as it is the whole localbus map.
 #define LAWBAR4 ((0xf8100000>>12) & 0xffffff)
 #define LAWAR4 (LAWAR_EN | LAWAR_TRGT_IF_LBC | (LAWAR_SIZE & LAWAR_SIZE_2M))
 
-#define LAWBAR5 ((CFG_PCI1_IO_BASE>>12) & 0xffffff)
+#define LAWBAR5 ((CFG_PCI1_IO_PHYS>>12) & 0xffffff)
 #define LAWAR5 (LAWAR_EN | LAWAR_TRGT_IF_PCI1 | (LAWAR_SIZE & LAWAR_SIZE_16M))
 
-#define LAWBAR6 ((CFG_PCI2_IO_BASE>>12) & 0xffffff)
-#define LAWAR6 (~LAWAR_EN &( LAWAR_TRGT_IF_PCI2 | (LAWAR_SIZE & LAWAR_SIZE_16M)))
+#define LAWBAR6 ((CFG_PCI2_IO_PHYS>>12) & 0xffffff)
+#define LAWAR6 (LAWAR_EN | LAWAR_TRGT_IF_PCI2 | (LAWAR_SIZE & LAWAR_SIZE_16M))
 
 #define LAWBAR7 ((0xfe000000 >>12) & 0xffffff)
 #define LAWAR7 (LAWAR_EN | LAWAR_TRGT_IF_LBC | (LAWAR_SIZE & LAWAR_SIZE_32M))
@@ -84,7 +84,7 @@
 #define LAWAR8  ((LAWAR_TRGT_IF_DDR2 | (LAWAR_SIZE & LAWAR_SIZE_512M)) & ~LAWAR_EN)
 #endif
 
-#define LAWBAR9 ((CFG_RIO_MEM_BASE>>12) & 0xfffff)
+#define LAWBAR9 ((CFG_RIO_MEM_PHYS>>12) & 0xfffff)
 #define LAWAR9  (LAWAR_EN | LAWAR_TRGT_IF_RIO | (LAWAR_SIZE & LAWAR_SIZE_512M))
 
        .section .bootpg, "ax"
index 767075884a0fe1054b4de93561e87d7d7a54c853..51dee86ae5611a540db0d9d8f96074e03a8d9204 100644 (file)
@@ -1,4 +1,2 @@
+#
 TEXT_BASE = 0x01f00000
-
-# include NPE ethernet driver
-BOARDLIBS = $(obj)cpu/ixp/npe/libnpe.a
diff --git a/board/stxssa/Makefile b/board/stxssa/Makefile
new file mode 100644 (file)
index 0000000..344ecdf
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2001
+# 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    = $(obj)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+SOBJS  := init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+       rm -f $(OBJS) $(SOBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/stxssa/config.mk b/board/stxssa/config.mk
new file mode 100644 (file)
index 0000000..30f42c5
--- /dev/null
@@ -0,0 +1,34 @@
+# Modified by Xianghua Xiao, X.Xiao@motorola.com
+# (C) Copyright 2002,2003 Motorola Inc.
+#
+# Copied from ADS85xx for STx GP3 - Dan Malek
+#
+# 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
+#
+
+#
+# default CCARBAR is at 0xff700000
+# assume U-Boot is less than 0.5MB
+# U-Boot is less than 256K, so push
+# it further up into the flash
+#
+TEXT_BASE = 0xfffC0000
+
+PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
+PLATFORM_CPPFLAGS += -DCONFIG_E500=1
diff --git a/board/stxssa/init.S b/board/stxssa/init.S
new file mode 100644 (file)
index 0000000..a1a8d9e
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * Copyright (C) 2005 Embedded Alley Solutions, Inc.
+ * Dan Malek <dan@embeddedalley.com>
+ * Copied from STx GP3.
+ * Updates for Silicon Tx GP3 SSA.  We only support 32-bit flash
+ * and DDR with SPD EEPROM configuration.
+ *
+ * Copyright 2004 Freescale Semiconductor.
+ * Copyright (C) 2002,2003, Motorola Inc.
+ * Xianghua Xiao <X.Xiao@motorola.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 <ppc_asm.tmpl>
+#include <ppc_defs.h>
+#include <asm/cache.h>
+#include <asm/mmu.h>
+#include <config.h>
+#include <mpc85xx.h>
+
+
+/*
+ * TLB0 and TLB1 Entries
+ *
+ * Out of reset, TLB1's Entry 0 maps the highest 4K for CCSRBAR.
+ * However, CCSRBAR is then relocated to CFG_CCSRBAR right after
+ * these TLB entries are established.
+ *
+ * The TLB entries for DDR are dynamically setup in spd_sdram()
+ * and use TLB1 Entries 8 through 15 as needed according to the
+ * size of DDR memory.
+ *
+ * MAS0: tlbsel, esel, nv
+ * MAS1: valid, iprot, tid, ts, tsize
+ * MAS2: epn, sharen, x0, x1, w, i, m, g, e
+ * MAS3: rpn, u0-u3, ux, sx, uw, sw, ur, sr
+ */
+
+#define        entry_start \
+       mflr    r1      ;       \
+       bl      0f      ;
+
+#define        entry_end \
+0:     mflr    r0      ;       \
+       mtlr    r1      ;       \
+       blr             ;
+
+
+       .section        .bootpg, "ax"
+       .globl  tlb1_entry
+tlb1_entry:
+       entry_start
+
+       /*
+        * Number of TLB0 and TLB1 entries in the following table
+        */
+       .long 12
+
+#if (CFG_CCSRBAR_DEFAULT != CFG_CCSRBAR)
+       /*
+        * TLB0         4K      Non-cacheable, guarded
+        * 0xff700000   4K      Initial CCSRBAR mapping
+        *
+        * This ends up at a TLB0 Index==0 entry, and must not collide
+        * with other TLB0 Entries.
+        */
+       .long TLB1_MAS0(0, 0, 0)
+       .long TLB1_MAS1(1, 0, 0, 0, 0)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_CCSRBAR_DEFAULT), 0,0,0,0,1,0,1,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_CCSRBAR_DEFAULT), 0,0,0,0,0,1,0,1,0,1)
+#else
+#error("Update the number of table entries in tlb1_entry")
+#endif
+
+       /*
+        * TLB0         16K     Cacheable, non-guarded
+        * 0xd001_0000  16K     Temporary Global data for initialization
+        *
+        * Use four 4K TLB0 entries.  These entries must be cacheable
+        * as they provide the bootstrap memory before the memory
+        * controler and real memory have been configured.
+        *
+        * These entries end up at TLB0 Indicies 0x10, 0x14, 0x18 and 0x1c,
+        * and must not collide with other TLB0 entries.
+        */
+       .long TLB1_MAS0(0, 0, 0)
+       .long TLB1_MAS1(1, 0, 0, 0, 0)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_INIT_RAM_ADDR), \
+                       0,0,0,0,0,0,0,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_INIT_RAM_ADDR), \
+                       0,0,0,0,0,1,0,1,0,1)
+
+       .long TLB1_MAS0(0, 0, 0)
+       .long TLB1_MAS1(1, 0, 0, 0, 0)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_INIT_RAM_ADDR + 4 * 1024), \
+                       0,0,0,0,0,0,0,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_INIT_RAM_ADDR + 4 * 1024), \
+                       0,0,0,0,0,1,0,1,0,1)
+
+       .long TLB1_MAS0(0, 0, 0)
+       .long TLB1_MAS1(1, 0, 0, 0, 0)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_INIT_RAM_ADDR + 8 * 1024), \
+                       0,0,0,0,0,0,0,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_INIT_RAM_ADDR + 8 * 1024), \
+                       0,0,0,0,0,1,0,1,0,1)
+
+       .long TLB1_MAS0(0, 0, 0)
+       .long TLB1_MAS1(1, 0, 0, 0, 0)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_INIT_RAM_ADDR + 12 * 1024), \
+                       0,0,0,0,0,0,0,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_INIT_RAM_ADDR + 12 * 1024), \
+                       0,0,0,0,0,1,0,1,0,1)
+
+
+       /*
+        * TLB 0:       64M     Non-cacheable, guarded
+        * 0xfc000000   6M4     FLASH
+        * Out of reset this entry is only 4K.
+        */
+       .long TLB1_MAS0(1, 0, 0)
+       .long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_64M)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_FLASH_BASE), 0,0,0,0,1,0,1,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_FLASH_BASE), 0,0,0,0,0,1,0,1,0,1)
+
+       /*
+        * TLB 1:       256M    Non-cacheable, guarded
+        * 0x80000000   256M    PCI1 MEM First half
+        */
+       .long TLB1_MAS0(1, 1, 0)
+       .long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_256M)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_PCI1_MEM_BASE), 0,0,0,0,1,0,1,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_PCI1_MEM_BASE), 0,0,0,0,0,1,0,1,0,1)
+
+       /*
+        * TLB 2:       256M    Non-cacheable, guarded
+        * 0x90000000   256M    PCI1 MEM Second half
+        */
+       .long TLB1_MAS0(1, 2, 0)
+       .long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_256M)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_PCI1_MEM_BASE + 0x10000000), \
+                       0,0,0,0,1,0,1,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_PCI1_MEM_BASE + 0x10000000), \
+                       0,0,0,0,0,1,0,1,0,1)
+
+       /*
+        * TLB 3:       256M    Non-cacheable, guarded
+        * 0xa0000000   256M    PCI2 MEM First half
+        */
+       .long TLB1_MAS0(1, 3, 0)
+       .long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_256M)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_PCI2_MEM_BASE), 0,0,0,0,1,0,1,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_PCI2_MEM_BASE), 0,0,0,0,0,1,0,1,0,1)
+
+       /*
+        * TLB 4:       256M    Non-cacheable, guarded
+        * 0xb0000000   256M    PCI2 MEM Second half
+        */
+       .long TLB1_MAS0(1, 4, 0)
+       .long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_256M)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_PCI2_MEM_BASE + 0x10000000), \
+                       0,0,0,0,1,0,1,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_PCI2_MEM_BASE + 0x10000000), \
+                       0,0,0,0,0,1,0,1,0,1)
+
+       /*
+        * TLB 5:       64M     Non-cacheable, guarded
+        * 0xe000_0000  1M      CCSRBAR
+        * 0xe200_0000  16M     PCI1 IO
+        * 0xe300_0000  16M     PCI2 IO
+        */
+       .long TLB1_MAS0(1, 5, 0)
+       .long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_64M)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_CCSRBAR), 0,0,0,0,1,0,1,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_CCSRBAR), 0,0,0,0,0,1,0,1,0,1)
+
+       /*
+        * TLB 6:       256M    Non-cacheable, guarded
+        * 0xf0000000           Local bus expansion option.
+        * 0xfb000000           Configuration Latch register (one word)
+        * 0xfc000000           Up to 64M flash
+        */
+       .long TLB1_MAS0(1, 7, 0)
+       .long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_256M)
+       .long TLB1_MAS2(E500_TLB_EPN(CFG_LBC_OPTION_BASE), 0,0,0,0,1,0,1,0)
+       .long TLB1_MAS3(E500_TLB_RPN(CFG_LBC_OPTION_BASE), 0,0,0,0,0,1,0,1,0,1)
+       entry_end
+
+/*
+ * LAW(Local Access Window) configuration:
+ *
+ * 0x0000_0000     0x7fff_ffff     DDR                     2G
+ * 0x8000_0000     0x9fff_ffff     PCI1 MEM                512M
+ * 0xa000_0000     0xbfff_ffff     PCI2 MEM                512M
+ * 0xe000_0000     0xe000_ffff     CCSR                    1M
+ * 0xe200_0000     0xe2ff_ffff     PCI1 IO                 16M
+ * 0xe300_0000     0xe3ff_ffff     PCI2 IO                 16M
+ * 0xf000_0000     0xfaff_ffff     Local bus               128M
+ * 0xfb00_0000     0xfb00_ffff     Config Latch            64K
+ * 0xfc00_0000     0xffff_ffff     FLASH (boot bank)       64M
+ *
+ * Notes:
+ *    CCSRBAR and L2-as-SRAM don't need a configured Local Access Window.
+ *    If flash is 8M at default position (last 8M), no LAW needed.
+ */
+
+#if !defined(CONFIG_SPD_EEPROM)
+#define LAWBAR0 ((CFG_DDR_SDRAM_BASE>>12) & 0xfffff)
+#define LAWAR0 (LAWAR_EN | LAWAR_TRGT_IF_DDR | (LAWAR_SIZE & LAWAR_SIZE_128M))
+#else
+#define LAWBAR0 0
+#define LAWAR0  ((LAWAR_TRGT_IF_DDR | (LAWAR_SIZE & LAWAR_SIZE_128M)) & ~LAWAR_EN)
+#endif
+
+#define LAWBAR1 ((CFG_PCI1_MEM_BASE>>12) & 0xfffff)
+#define LAWAR1         (LAWAR_EN | LAWAR_TRGT_IF_PCI1 | (LAWAR_SIZE & LAWAR_SIZE_512M))
+
+#define LAWBAR2 ((CFG_PCI2_MEM_BASE>>12) & 0xfffff)
+#define LAWAR2         (LAWAR_EN | LAWAR_TRGT_IF_PCI2 | (LAWAR_SIZE & LAWAR_SIZE_512M))
+
+#define LAWBAR3 ((CFG_PCI1_IO_PHYS>>12) & 0xfffff)
+#define LAWAR3         (LAWAR_EN | LAWAR_TRGT_IF_PCI1 | (LAWAR_SIZE & LAWAR_SIZE_16M))
+
+#define LAWBAR4 ((CFG_PCI2_IO_PHYS>>12) & 0xfffff)
+#define LAWAR4         (LAWAR_EN | LAWAR_TRGT_IF_PCI2 | (LAWAR_SIZE & LAWAR_SIZE_16M))
+
+/* Map the whole localbus, including flash and reset latch.
+*/
+#define LAWBAR5 ((CFG_LBC_OPTION_BASE>>12) & 0xfffff)
+#define LAWAR5 (LAWAR_EN | LAWAR_TRGT_IF_LBC | (LAWAR_SIZE & LAWAR_SIZE_256M))
+
+
+       .section .bootpg, "ax"
+       .globl  law_entry
+law_entry:
+       entry_start
+       .long 6
+       .long LAWBAR0,LAWAR0,LAWBAR1,LAWAR1,LAWBAR2,LAWAR2,LAWBAR3,LAWAR3
+       .long LAWBAR4,LAWAR4,LAWBAR5,LAWAR5
+       entry_end
diff --git a/board/stxssa/stxssa.c b/board/stxssa/stxssa.c
new file mode 100644 (file)
index 0000000..0fb233d
--- /dev/null
@@ -0,0 +1,398 @@
+/*
+ * (C) Copyright 2005, Embedded Alley Solutions, Inc.
+ * Dan Malek, <dan@embeddedalley.com>
+ * Copied from STx GP3.
+ * Updates for Silicon Tx GP3 SSA
+ *
+ * (C) Copyright 2003,Motorola Inc.
+ * Xianghua Xiao, (X.Xiao@motorola.com)
+ *
+ * (C) Copyright 2002 Scott McNutt <smcnutt@artesyncp.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
+ */
+
+
+extern long int spd_sdram (void);
+
+#include <common.h>
+#include <pci.h>
+#include <asm/processor.h>
+#include <asm/immap_85xx.h>
+#include <ioports.h>
+#include <asm/io.h>
+#include <spd.h>
+#include <miiphy.h>
+
+long int fixed_sdram (void);
+
+/*
+ * I/O Port configuration table
+ *
+ * if conf is 1, then that port pin will be configured at boot time
+ * according to the five values podr/pdir/ppar/psor/pdat for that entry
+ */
+
+const iop_conf_t iop_conf_tab[4][32] = {
+
+    /* Port A configuration */
+    {   /*            conf ppar psor pdir podr pdat */
+       /* PA31 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 TxENB */
+       /* PA30 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 TxClav   */
+       /* PA29 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 TxSOC  */
+       /* PA28 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 RxENB */
+       /* PA27 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 RxSOC */
+       /* PA26 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 RxClav */
+       /* PA25 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 ATMTXD[0] */
+       /* PA24 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 ATMTXD[1] */
+       /* PA23 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 ATMTXD[2] */
+       /* PA22 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 ATMTXD[3] */
+       /* PA21 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 ATMTXD[4] */
+       /* PA20 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 ATMTXD[5] */
+       /* PA19 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 ATMTXD[6] */
+       /* PA18 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 ATMTXD[7] */
+       /* PA17 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 ATMRXD[7] */
+       /* PA16 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 ATMRXD[6] */
+       /* PA15 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 ATMRXD[5] */
+       /* PA14 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 ATMRXD[4] */
+       /* PA13 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 ATMRXD[3] */
+       /* PA12 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 ATMRXD[2] */
+       /* PA11 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 ATMRXD[1] */
+       /* PA10 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 ATMRXD[0] */
+       /* PA9  */ {   0,   1,   1,   1,   0,   0   }, /* FCC1 L1TXD */
+       /* PA8  */ {   0,   1,   1,   0,   0,   0   }, /* FCC1 L1RXD */
+       /* PA7  */ {   0,   0,   0,   1,   0,   0   }, /* PA7 */
+       /* PA6  */ {   0,   1,   1,   1,   0,   0   }, /* TDM A1 L1RSYNC */
+       /* PA5  */ {   0,   0,   0,   1,   0,   0   }, /* PA5 */
+       /* PA4  */ {   0,   0,   0,   1,   0,   0   }, /* PA4 */
+       /* PA3  */ {   0,   0,   0,   1,   0,   0   }, /* PA3 */
+       /* PA2  */ {   0,   0,   0,   1,   0,   0   }, /* PA2 */
+       /* PA1  */ {   1,   0,   0,   0,   0,   0   }, /* FREERUN */
+       /* PA0  */ {   0,   0,   0,   1,   0,   0   }  /* PA0 */
+    },
+
+    /* Port B configuration */
+    {   /*            conf ppar psor pdir podr pdat */
+       /* PB31 */ {   1,   1,   0,   1,   0,   0   }, /* FCC2 MII TX_ER */
+       /* PB30 */ {   1,   1,   0,   0,   0,   0   }, /* FCC2 MII RX_DV */
+       /* PB29 */ {   1,   1,   1,   1,   0,   0   }, /* FCC2 MII TX_EN */
+       /* PB28 */ {   1,   1,   0,   0,   0,   0   }, /* FCC2 MII RX_ER */
+       /* PB27 */ {   1,   1,   0,   0,   0,   0   }, /* FCC2 MII COL */
+       /* PB26 */ {   1,   1,   0,   0,   0,   0   }, /* FCC2 MII CRS */
+       /* PB25 */ {   1,   1,   0,   1,   0,   0   }, /* FCC2 MII TxD[3] */
+       /* PB24 */ {   1,   1,   0,   1,   0,   0   }, /* FCC2 MII TxD[2] */
+       /* PB23 */ {   1,   1,   0,   1,   0,   0   }, /* FCC2 MII TxD[1] */
+       /* PB22 */ {   1,   1,   0,   1,   0,   0   }, /* FCC2 MII TxD[0] */
+       /* PB21 */ {   1,   1,   0,   0,   0,   0   }, /* FCC2 MII RxD[0] */
+       /* PB20 */ {   1,   1,   0,   0,   0,   0   }, /* FCC2 MII RxD[1] */
+       /* PB19 */ {   1,   1,   0,   0,   0,   0   }, /* FCC2 MII RxD[2] */
+       /* PB18 */ {   1,   1,   0,   0,   0,   0   }, /* FCC2 MII RxD[3] */
+       /* PB17 */ {   0,   1,   0,   0,   0,   0   }, /* FCC3:RX_DIV */
+       /* PB16 */ {   0,   1,   0,   0,   0,   0   }, /* FCC3:RX_ERR */
+       /* PB15 */ {   0,   1,   0,   1,   0,   0   }, /* FCC3:TX_ERR */
+       /* PB14 */ {   0,   1,   0,   1,   0,   0   }, /* FCC3:TX_EN */
+       /* PB13 */ {   0,   1,   0,   0,   0,   0   }, /* FCC3:COL */
+       /* PB12 */ {   0,   1,   0,   0,   0,   0   }, /* FCC3:CRS */
+       /* PB11 */ {   0,   1,   0,   0,   0,   0   }, /* FCC3:RXD */
+       /* PB10 */ {   0,   1,   0,   0,   0,   0   }, /* FCC3:RXD */
+       /* PB9  */ {   0,   1,   0,   0,   0,   0   }, /* FCC3:RXD */
+       /* PB8  */ {   0,   1,   0,   0,   0,   0   }, /* FCC3:RXD */
+       /* PB7  */ {   0,   1,   0,   1,   0,   0   }, /* FCC3:TXD */
+       /* PB6  */ {   0,   1,   0,   1,   0,   0   }, /* FCC3:TXD */
+       /* PB5  */ {   0,   1,   0,   1,   0,   0   }, /* FCC3:TXD */
+       /* PB4  */ {   0,   1,   0,   1,   0,   0   }, /* FCC3:TXD */
+       /* PB3  */ {   0,   0,   0,   0,   0,   0   }, /* pin doesn't exist */
+       /* PB2  */ {   0,   0,   0,   0,   0,   0   }, /* pin doesn't exist */
+       /* PB1  */ {   0,   0,   0,   0,   0,   0   }, /* pin doesn't exist */
+       /* PB0  */ {   0,   0,   0,   0,   0,   0   }  /* pin doesn't exist */
+    },
+
+    /* Port C */
+    {   /*            conf ppar psor pdir podr pdat */
+       /* PC31 */ {   0,   0,   0,   1,   0,   0   }, /* PC31 */
+       /* PC30 */ {   0,   0,   0,   1,   0,   0   }, /* PC30 */
+       /* PC29 */ {   0,   1,   1,   0,   0,   0   }, /* SCC1 EN *CLSN */
+       /* PC28 */ {   0,   0,   0,   1,   0,   0   }, /* PC28 */
+       /* PC27 */ {   0,   0,   0,   1,   0,   0   }, /* UART Clock in */
+       /* PC26 */ {   0,   0,   0,   1,   0,   0   }, /* PC26 */
+       /* PC25 */ {   0,   0,   0,   1,   0,   0   }, /* PC25 */
+       /* PC24 */ {   0,   0,   0,   1,   0,   0   }, /* PC24 */
+       /* PC23 */ {   0,   1,   0,   1,   0,   0   }, /* ATMTFCLK */
+       /* PC22 */ {   0,   1,   0,   0,   0,   0   }, /* ATMRFCLK */
+       /* PC21 */ {   0,   1,   0,   0,   0,   0   }, /* SCC1 EN RXCLK */
+       /* PC20 */ {   0,   1,   0,   0,   0,   0   }, /* SCC1 EN TXCLK */
+       /* PC19 */ {   1,   1,   0,   0,   0,   0   }, /* FCC2 MII RX_CLK CLK13 */
+       /* PC18 */ {   1,   1,   0,   0,   0,   0   }, /* FCC Tx Clock (CLK14) */
+       /* PC17 */ {   0,   0,   0,   1,   0,   0   }, /* PC17 */
+       /* PC16 */ {   0,   1,   0,   0,   0,   0   }, /* FCC Tx Clock (CLK16) */
+       /* PC15 */ {   0,   1,   0,   0,   0,   0   }, /* PC15 */
+       /* PC14 */ {   0,   1,   0,   0,   0,   0   }, /* SCC1 EN *CD */
+       /* PC13 */ {   0,   0,   0,   1,   0,   0   }, /* PC13 */
+       /* PC12 */ {   0,   1,   0,   1,   0,   0   }, /* PC12 */
+       /* PC11 */ {   0,   0,   0,   1,   0,   0   }, /* LXT971 transmit control */
+       /* PC10 */ {   0,   0,   0,   1,   0,   0   }, /* FETHMDC */
+       /* PC9  */ {   0,   0,   0,   0,   0,   0   }, /* FETHMDIO */
+       /* PC8  */ {   0,   0,   0,   1,   0,   0   }, /* PC8 */
+       /* PC7  */ {   0,   0,   0,   1,   0,   0   }, /* PC7 */
+       /* PC6  */ {   0,   0,   0,   1,   0,   0   }, /* PC6 */
+       /* PC5  */ {   0,   0,   0,   1,   0,   0   }, /* PC5 */
+       /* PC4  */ {   0,   0,   0,   1,   0,   0   }, /* PC4 */
+       /* PC3  */ {   0,   0,   0,   1,   0,   0   }, /* PC3 */
+       /* PC2  */ {   0,   0,   0,   1,   0,   1   }, /* ENET FDE */
+       /* PC1  */ {   0,   0,   0,   1,   0,   0   }, /* ENET DSQE */
+       /* PC0  */ {   0,   0,   0,   1,   0,   0   }, /* ENET LBK */
+    },
+
+    /* Port D */
+    {   /*            conf ppar psor pdir podr pdat */
+       /* PD31 */ {   0,   1,   0,   0,   0,   0   }, /* SCC1 EN RxD */
+       /* PD30 */ {   0,   1,   1,   1,   0,   0   }, /* SCC1 EN TxD */
+       /* PD29 */ {   0,   1,   0,   1,   0,   0   }, /* SCC1 EN TENA */
+       /* PD28 */ {   1,   1,   0,   0,   0,   0   }, /* SCC2 RxD */
+       /* PD27 */ {   1,   1,   0,   1,   0,   0   }, /* SCC2 TxD */
+       /* PD26 */ {   0,   0,   0,   1,   0,   0   }, /* PD26 */
+       /* PD25 */ {   0,   0,   0,   1,   0,   0   }, /* PD25 */
+       /* PD24 */ {   0,   0,   0,   1,   0,   0   }, /* PD24 */
+       /* PD23 */ {   0,   0,   0,   1,   0,   0   }, /* PD23 */
+       /* PD22 */ {   0,   0,   0,   1,   0,   0   }, /* PD22 */
+       /* PD21 */ {   0,   0,   0,   1,   0,   0   }, /* PD21 */
+       /* PD20 */ {   0,   0,   0,   1,   0,   0   }, /* PD20 */
+       /* PD19 */ {   0,   0,   0,   1,   0,   0   }, /* PD19 */
+       /* PD18 */ {   0,   0,   0,   1,   0,   0   }, /* PD18 */
+       /* PD17 */ {   0,   1,   0,   0,   0,   0   }, /* FCC1 ATMRXPRTY */
+       /* PD16 */ {   0,   1,   0,   1,   0,   0   }, /* FCC1 ATMTXPRTY */
+       /* PD15 */ {   1,   1,   1,   0,   1,   0   }, /* I2C SDA */
+       /* PD14 */ {   1,   1,   1,   0,   0,   0   }, /* I2C CLK */
+       /* PD13 */ {   0,   0,   0,   0,   0,   0   }, /* PD13 */
+       /* PD12 */ {   0,   0,   0,   0,   0,   0   }, /* PD12 */
+       /* PD11 */ {   0,   0,   0,   0,   0,   0   }, /* PD11 */
+       /* PD10 */ {   0,   0,   0,   0,   0,   0   }, /* PD10 */
+       /* PD9  */ {   0,   1,   0,   1,   0,   0   }, /* SMC1 TXD */
+       /* PD8  */ {   0,   1,   0,   0,   0,   0   }, /* SMC1 RXD */
+       /* PD7  */ {   0,   0,   0,   1,   0,   1   }, /* PD7 */
+       /* PD6  */ {   0,   0,   0,   1,   0,   1   }, /* PD6 */
+       /* PD5  */ {   0,   0,   0,   1,   0,   1   }, /* PD5 */
+       /* PD4  */ {   0,   0,   0,   1,   0,   1   }, /* PD4 */
+       /* PD3  */ {   0,   0,   0,   0,   0,   0   }, /* pin doesn't exist */
+       /* PD2  */ {   0,   0,   0,   0,   0,   0   }, /* pin doesn't exist */
+       /* PD1  */ {   0,   0,   0,   0,   0,   0   }, /* pin doesn't exist */
+       /* PD0  */ {   0,   0,   0,   0,   0,   0   }  /* pin doesn't exist */
+    }
+};
+
+static uint64_t        next_led_update;
+static uint            led_bit;
+
+void
+reset_phy(void)
+{
+       volatile uint *blatch;
+#if 0
+       int     i;
+#endif
+       blatch = (volatile uint *)CFG_LBC_CFGLATCH_BASE;
+
+       /* reset Giga bit Ethernet port if needed here */
+
+#if 1
+       *blatch &= ~0x000000c0;
+       udelay(100);
+#else
+       *blatch = 0;
+       asm("eieio");
+       for (i=0; i<1000; i++)
+               udelay(1000);
+#endif
+       *blatch = 0x000000c1;   /* Light one led, too */
+       udelay(1000);
+
+#if 0  /* This is the port we really want to use for debugging. */
+       /* reset the CPM FEC port */
+#if (CONFIG_ETHER_INDEX == 2)
+       bcsr->bcsr2 &= ~FETH2_RST;
+       udelay(2);
+       bcsr->bcsr2 |=  FETH2_RST;
+       udelay(1000);
+#elif (CONFIG_ETHER_INDEX == 3)
+       bcsr->bcsr3 &= ~FETH3_RST;
+       udelay(2);
+       bcsr->bcsr3 |=  FETH3_RST;
+       udelay(1000);
+#endif
+#if defined(CONFIG_MII) && defined(CONFIG_ETHER_ON_FCC)
+       /* reset PHY */
+       miiphy_reset("FCC1 ETHERNET", 0x0);
+
+       /* change PHY address to 0x02 */
+       bb_miiphy_write(NULL, 0, PHY_MIPSCR, 0xf028);
+
+       bb_miiphy_write(NULL, 0x02, PHY_BMCR,
+                       PHY_BMCR_AUTON | PHY_BMCR_RST_NEG);
+#endif /* CONFIG_MII */
+#endif
+}
+
+int
+board_early_init_f(void)
+{
+#if defined(CONFIG_PCI)
+    volatile immap_t *immr = (immap_t *)CFG_IMMR;
+    volatile ccsr_pcix_t *pci = &immr->im_pcix;
+
+    pci->peer &= 0xfffffffdf; /* disable master abort */
+#endif
+
+       /* Why is the phy reset done _after_ the ethernet
+        * initialization in lib_ppc/board.c?
+        * Do it here so it's done before the TSECs are used.
+        */
+       reset_phy();
+
+       return 0;
+}
+
+int
+checkboard(void)
+{
+       printf ("Board: Silicon Tx GPPP SSA Board\n");
+       return (0);
+}
+
+/* Blinkin' LEDS for Robert.
+*/
+void
+show_activity(int flag)
+{
+       volatile uint *blatch;
+
+       if (next_led_update > get_ticks())
+               return;
+
+       blatch = (volatile uint *)CFG_LBC_CFGLATCH_BASE;
+
+       led_bit >>= 1;
+       if (led_bit == 0)
+               led_bit = 0x08;
+       *blatch = (0xc0 | led_bit);
+       eieio();
+       next_led_update += (get_tbclk() / 4);
+}
+
+long int
+initdram (int board_type)
+{
+       long dram_size = 0;
+       extern long spd_sdram (void);
+
+#if defined(CONFIG_DDR_DLL)
+       {
+               volatile immap_t *immap = (immap_t *)CFG_IMMR;
+               volatile ccsr_gur_t *gur= &immap->im_gur;
+               uint temp_ddrdll = 0;
+
+               /* Work around to stabilize DDR DLL */
+               temp_ddrdll = gur->ddrdllcr;
+               gur->ddrdllcr = ((temp_ddrdll & 0xff) << 16) | 0x80000000;
+               asm("sync;isync;msync");
+       }
+#endif
+
+       dram_size = spd_sdram ();
+
+#if defined(CONFIG_DDR_ECC)
+       /* Initialize and enable DDR ECC.
+       */
+       ddr_enable_ecc(dram_size);
+#endif
+
+       return dram_size;
+}
+
+
+#if defined(CFG_DRAM_TEST)
+int testdram (void)
+{
+       uint *pstart = (uint *) CFG_MEMTEST_START;
+       uint *pend = (uint *) CFG_MEMTEST_END;
+       uint *p;
+
+       printf("SDRAM test phase 1:\n");
+       for (p = pstart; p < pend; p++)
+               *p = 0xaaaaaaaa;
+
+       for (p = pstart; p < pend; p++) {
+               if (*p != 0xaaaaaaaa) {
+                       printf ("SDRAM test fails at: %08x\n", (uint) p);
+                       return 1;
+               }
+       }
+
+       printf("SDRAM test phase 2:\n");
+       for (p = pstart; p < pend; p++)
+               *p = 0x55555555;
+
+       for (p = pstart; p < pend; p++) {
+               if (*p != 0x55555555) {
+                       printf ("SDRAM test fails at: %08x\n", (uint) p);
+                       return 1;
+               }
+       }
+
+       printf("SDRAM test passed.\n");
+       return 0;
+}
+#endif
+
+#if defined(CONFIG_PCI)
+
+/*
+ * Initialize PCI Devices, report devices found.
+ */
+
+#ifndef CONFIG_PCI_PNP
+static struct pci_config_table pci_stxgp3_config_table[] = {
+    { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+      PCI_IDSEL_NUMBER, PCI_ANY_ID,
+      pci_cfgfunc_config_device, { PCI_ENET0_IOADDR,
+                                  PCI_ENET0_MEMADDR,
+                                  PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER
+      } },
+    { }
+};
+#endif
+
+
+static struct pci_controller hose = {
+#ifndef CONFIG_PCI_PNP
+       config_table: pci_stxgp3_config_table,
+#endif
+};
+
+#endif /* CONFIG_PCI */
+
+
+void
+pci_init_board(void)
+{
+#ifdef CONFIG_PCI
+       extern void pci_mpc85xx_init(struct pci_controller *hose);
+
+       pci_mpc85xx_init(&hose);
+#endif /* CONFIG_PCI */
+}
diff --git a/board/stxssa/u-boot.lds b/board/stxssa/u-boot.lds
new file mode 100644 (file)
index 0000000..95ecf66
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+ * (C) Copyright 2005 Embedded Alley Solutions, Inc.
+ * Dan Malek, <dan@embeddedalley.com>
+ * Copied from STx GP3.
+ * Updates for Silicon Tx GP3 SSA.
+ *
+ * (C) Copyright 2002,2003,Motorola,Inc.
+ * Xianghua Xiao, X.Xiao@motorola.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
+ */
+
+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
+{
+  .resetvec 0xFFFFFFFC :
+  {
+    *(.resetvec)
+  } = 0xffff
+
+  .bootpg 0xFFFFF000 :
+  {
+    cpu/mpc85xx/start.o        (.bootpg)
+    board/stxssa/init.o (.bootpg)
+  } = 0xffff
+
+  /* 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/mpc85xx/start.o        (.text)
+    board/stxssa/init.o (.text)
+    cpu/mpc85xx/commproc.o (.text)
+    cpu/mpc85xx/traps.o (.text)
+    cpu/mpc85xx/interrupts.o (.text)
+    cpu/mpc85xx/serial_scc.o (.text)
+    cpu/mpc85xx/ether_fcc.o (.text)
+    cpu/mpc85xx/cpu_init.o (.text)
+    cpu/mpc85xx/cpu.o (.text)
+    cpu/mpc85xx/speed.o (.text)
+    cpu/mpc85xx/spd_sdram.o (.text)
+    common/dlmalloc.o (.text)
+    lib_generic/crc32.o (.text)
+    lib_ppc/extable.o (.text)
+    lib_generic/zlib.o (.text)
+    *(.text)
+    *(.fixup)
+    *(.got1)
+   }
+    _etext = .;
+    PROVIDE (etext = .);
+    .rodata    :
+   {
+    *(.rodata)
+    *(.rodata1)
+    *(.rodata.str1.4)
+    *(.eh_frame)
+  }
+  .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 = .);
+}
index 32c29e55a37bc829d16226590d94f63adc934ef0..a6499e8dd9bc3fc853606567c847d0a064f02e55 100644 (file)
@@ -779,9 +779,8 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
 
                        checksum = ntohl(hdr->ih_dcrc);
                        addr = (ulong)((uchar *)(hdr) + sizeof(image_header_t));
-                       len = ntohl(hdr->ih_size);
 
-                       if(checksum != crc32(0, (uchar *)addr, len)) {
+                       if(checksum != crc32(0, (uchar *)addr, ntohl(hdr->ih_size))) {
                                printf("ERROR: Flat Device Tree checksum is invalid\n");
                                return;
                        }
index 4de34fd5b9e395d87c5120ffd9bbaece005c8043..7f020b5d576d42c504af9782c3fa75c7d9621d29 100644 (file)
@@ -87,7 +87,7 @@ START := $(addprefix $(obj),$(START))
 
 all:   $(LIB)
 
-$(LIB):        $(obj).depend $(OBJS)
+$(LIB):        $(OBJS)
        $(AR) $(ARFLAGS) $@ $(OBJS)
 
 #########################################################################
index 84f5bef50878bd3924ac14f9a0a73f8aec1d17c6..a33acfec4d3072ce8c240800a07a37fcd2a11090 100644 (file)
@@ -280,22 +280,38 @@ ft_cpu_setup(void *blob, bd_t *bd)
 
 #if defined(CONFIG_MPC86XX_TSEC1)
        p = ft_get_prop(blob, "/" OF_SOC "/ethernet@24000/mac-address", &len);
-       memcpy(p, bd->bi_enetaddr, 6);
+       if (p != NULL)
+               memcpy(p, bd->bi_enetaddr, 6);
+       p = ft_get_prop(blob, "/" OF_SOC "/ethernet@24000/local-mac-address", &len);
+       if (p)
+               memcpy(p, bd->bi_enetaddr, 6);
 #endif
 
 #if defined(CONFIG_MPC86XX_TSEC2)
        p = ft_get_prop(blob, "/" OF_SOC "/ethernet@25000/mac-address", &len);
-       memcpy(p, bd->bi_enet1addr, 6);
+       if (p != NULL)
+               memcpy(p, bd->bi_enet1addr, 6);
+       p = ft_get_prop(blob, "/" OF_SOC "/ethernet@25000/local-mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enet1addr, 6);
 #endif
 
 #if defined(CONFIG_MPC86XX_TSEC3)
        p = ft_get_prop(blob, "/" OF_SOC "/ethernet@26000/mac-address", &len);
-       memcpy(p, bd->bi_enet2addr, 6);
+       if (p != NULL)
+               memcpy(p, bd->bi_enet2addr, 6);
+       p = ft_get_prop(blob, "/" OF_SOC "/ethernet@26000/local-mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enet2addr, 6);
 #endif
 
 #if defined(CONFIG_MPC86XX_TSEC4)
        p = ft_get_prop(blob, "/" OF_SOC "/ethernet@27000/mac-address", &len);
-       memcpy(p, bd->bi_enet3addr, 6);
+       if (p != NULL)
+               memcpy(p, bd->bi_enet3addr, 6);
+       p = ft_get_prop(blob, "/" OF_SOC "/ethernet@27000/local-mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enet3addr, 6);
 #endif
 
 }
index ac9ff81ce602e1f9573254cfbcf5e26ef7ec3367..f37ab430b325bc2a2fc2c7df2a6859d36964baaf 100644 (file)
@@ -51,20 +51,32 @@ extern int dma_xfer(void *dest, uint count, void *src);
 #define CFG_SUPER_BANK_INTERLEAVING    0
 
 /*
- * Convert picoseconds into clock cycles (rounding up if needed).
+ * Convert picoseconds into DRAM clock cycles (rounding up if needed).
  */
 
-int
-picos_to_clk(int picos)
+static unsigned int
+picos_to_clk(unsigned int picos)
 {
-       int clks;
-
-       clks = picos / (2000000000 / (get_bus_freq(0) / 1000));
-       if (picos % (2000000000 / (get_bus_freq(0) / 1000)) != 0) {
+       /* use unsigned long long to avoid rounding errors */
+       const unsigned long long ULL_2e12 = 2000000000000ULL;
+       unsigned long long clks;
+       unsigned long long clks_temp;
+
+       if (! picos)
+           return 0;
+
+       clks = get_bus_freq(0) * (unsigned long long) picos;
+       clks_temp = clks;
+       clks = clks / ULL_2e12;
+       if (clks_temp % ULL_2e12) {
                clks++;
        }
 
-       return clks;
+       if (clks > 0xFFFFFFFFULL) {
+               clks = 0xFFFFFFFFULL;
+       }
+
+       return (unsigned int) clks;
 }
 
 
index 7406fe2248b407fe26d7c5df6963154c26c6fe2b..67c56db1a37499d572c5190ea82fbbeffe9b60d2 100644 (file)
@@ -241,26 +241,40 @@ in_flash:
        bl      setup_ccsrbar
 #endif
 
-       /* Fix for SMP linux - Changing arbitration to round-robin */
-       lis     r3, CFG_CCSRBAR@h
-       ori     r3, r3, 0x1000
-       xor     r4, r4, r4
-       li      r4, 0x1000
-       stw     r4, 0(r3)
 
-       /* setup the law entries */
-       bl      law_entry
+       /* -- MPC8641 Rev 1.0 MCM Errata fixups -- */
+
+       /* skip fixups if not Rev 1.0 */
+       mfspr   r4, SVR
+       rlwinm  r4,r4,0,24,31
+       cmpwi   r4,0x10
+       bne     1f
+
+       lis     r3,MCM_ABCR@ha
+       lwz     r4,MCM_ABCR@l(r3)       /* ABCR -> r4 */
+
+       /* set ABCR[A_STRM_CNT] = 0 */
+       rlwinm  r4,r4,0,0,29
+
+       /* set ABCR[ARB_POLICY] to 0x1 (round-robin) */
+       addi    r0,r0,1
+       rlwimi  r4,r0,12,18,19
+
+       stw     r4,MCM_ABCR@l(r3)       /* r4 -> ABCR */
        sync
 
-       /* Don't use this feature due to bug in 8641D PD4 */
-       /* Disable ERD_DIS */
-       lis     r3, CFG_CCSRBAR@h
-       ori     r3, r3, 0x1008
-       lwz     r4, 0(r3)
+       /* Set DBCR[ERD_DIS] */
+       lis     r3,MCM_DBCR@ha
+       lwz     r4,MCM_DBCR@l(r3)
        oris    r4, r4, 0x4000
-       stw     r4, 0(r3)
+       stw     r4,MCM_DBCR@l(r3)
+       sync
+1:
+       /* setup the law entries */
+       bl      law_entry
        sync
 
+
 #if (EMULATOR_RUN == 1)
        /* On the emulator we want to adjust these ASAP */
        /* otherwise things are sloooow */
index b5171f4d407c6d602100bb9b15993754d6d0c921..5c31845a94c0a016f6c8a8021fea8a0639497650 100644 (file)
@@ -192,12 +192,7 @@ The old NAND handling code has been re-factored and is now confined
 to only board-specific files and - unfortunately - to the DoC code
 (see below). A new configuration variable has been introduced:
 CFG_NAND_LEGACY, which has to be defined in the board config file if
-that board uses legacy code. If CFG_NAND_LEGACY is defined, the board
-specific config.mk file should also have "BOARDLIBS =
-drivers/nand_legacy/libnand_legacy.a". For boards using the new NAND
-approach (PPChameleon and netstar at the moment) no variable is
-necessary, but the config.mk should have "BOARDLIBS =
-drivers/nand/libnand.a".
+that board uses legacy code.
 
 The necessary changes have been made to all affected boards, and no
 build breakage has been introduced, except for NETTA and NETTA_ISDN
index 8495829900c4a179642d80ddadbbe04ad748fad7..c6fee18222b494297066c89ae1db1e2f330c93f1 100644 (file)
@@ -427,8 +427,9 @@ static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
        struct nand_chip *this = mtd->priv;
        u16 bad;
 
+       page = (int)(ofs >> this->page_shift) & this->pagemask;
+
        if (getchip) {
-               page = (int)(ofs >> this->page_shift);
                chipnr = (int)(ofs >> this->chip_shift);
 
                /* Grab the lock and see if the device is available */
@@ -436,18 +437,17 @@ static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
 
                /* Select the NAND device */
                this->select_chip(mtd, chipnr);
-       } else
-               page = (int) ofs;
+       }
 
        if (this->options & NAND_BUSWIDTH_16) {
-               this->cmdfunc (mtd, NAND_CMD_READOOB, this->badblockpos & 0xFE, page & this->pagemask);
+               this->cmdfunc (mtd, NAND_CMD_READOOB, this->badblockpos & 0xFE, page);
                bad = cpu_to_le16(this->read_word(mtd));
                if (this->badblockpos & 0x1)
                        bad >>= 1;
                if ((bad & 0xFF) != 0xff)
                        res = 1;
        } else {
-               this->cmdfunc (mtd, NAND_CMD_READOOB, this->badblockpos, page & this->pagemask);
+               this->cmdfunc (mtd, NAND_CMD_READOOB, this->badblockpos, page);
                if (this->read_byte(mtd) != 0xff)
                        res = 1;
        }
index 91284fdace858fe5e3052e0de788267a49d3001e..15681208b62355232030a7f39c160d9165500e8c 100644 (file)
 /*
  * NAND Flash
  */
-/* Use the new NAND code. (BOARDLIBS = drivers/nand/libnand.a required) */
 #undef CFG_NAND_LEGACY
 
 #define CFG_NAND0_BASE         0x0 /* 0x43100040 */ /* 0x10000000 */
diff --git a/include/configs/stxssa.h b/include/configs/stxssa.h
new file mode 100644 (file)
index 0000000..8624f4b
--- /dev/null
@@ -0,0 +1,465 @@
+/*
+ * (C) Copyright 2005 Embedded Alley Solutions, Inc.
+ * Dan Malek <dan@embeddedalley.com>
+ * Copied from STx GP3.
+ * Updates for Silicon Tx GP3 SSA board.
+ *
+ * (C) Copyright 2002,2003 Motorola,Inc.
+ * Xianghua Xiao <X.Xiao@motorola.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
+ */
+
+/* mpc8560ads board configuration file */
+/* please refer to doc/README.mpc85xx for more info */
+/* make sure you change the MAC address and other network params first,
+ * search for CONFIG_ETHADDR,CONFIG_SERVERIP,etc in this file
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/* High Level Configuration Options */
+#define CONFIG_BOOKE           1       /* BOOKE                */
+#define CONFIG_E500            1       /* BOOKE e500 family    */
+#define CONFIG_MPC85xx         1       /* MPC8540/MPC8560      */
+#define CONFIG_CPM2            1       /* has CPM2 */
+#define CONFIG_STXSSA          1       /* Silicon Tx GPPP SSA board specific*/
+
+#undef  CONFIG_PCI                     /* pci ethernet support */
+#define CONFIG_TSEC_ENET               /* tsec ethernet support*/
+#undef CONFIG_ETHER_ON_FCC             /* cpm FCC ethernet support */
+#define CONFIG_ENV_OVERWRITE
+#define CONFIG_SPD_EEPROM               /* Use SPD EEPROM for DDR setup */
+#undef  CONFIG_DDR_ECC                 /* only for ECC DDR module */
+#undef CONFIG_DDR_DLL                  /* possible DLL fix needed */
+#define CONFIG_DDR_2T_TIMING           /* Sets the 2T timing bit */
+
+
+/* sysclk for MPC85xx
+ */
+
+#define CONFIG_SYS_CLK_FREQ     33000000 /* most pci cards are 33Mhz */
+
+/* Blinkin' LEDs for Robert :-)
+*/
+#define CONFIG_SHOW_ACTIVITY 1
+
+/*
+ * These can be toggled for performance analysis, otherwise use default.
+ */
+#define CONFIG_L2_CACHE                     /* toggle L2 cache         */
+#define  CONFIG_BTB                          /* toggle branch predition */
+#define  CONFIG_ADDR_STREAMING               /* toggle addr streaming   */
+
+#define CONFIG_BOARD_EARLY_INIT_F   1        /* Call board_pre_init      */
+
+#undef  CFG_DRAM_TEST                       /* memory test, takes time  */
+#define CFG_MEMTEST_START       0x00200000  /* memtest region */
+#define CFG_MEMTEST_END         0x00400000
+
+
+/* Localbus connector.  There are many options that can be
+ * connected here, including sdram or lots of flash.
+ * This address, however, is used to configure a 256M local bus
+ * window that includes the Config latch below.
+ */
+#define CFG_LBC_OPTION_BASE    0xf0000000      /* Localbus Extension */
+#define CFG_LBC_OPTION_SIZE    256             /* 256MB */
+
+/* There are various flash options used, we configure for the largest,
+ * which is 64Mbytes.  The CFI works fine and will discover the proper
+ * sizes.
+ */
+#define CFG_FLASH_BASE         0xFC000000      /* start of FLASH 64M    */
+#define CFG_BR0_PRELIM         0xFC001801      /* port size 32bit      */
+#define CFG_OR0_PRELIM         0xFC000FF7      /* 64 MB Flash           */
+
+#define CFG_FLASH_CFI          1
+#define CFG_FLASH_CFI_DRIVER   1
+#undef CFG_FLASH_USE_BUFFER_WRITE      /* use buffered writes (20x faster) */
+#define CFG_MAX_FLASH_SECT     256     /* max number of sectors on one chip */
+#define CFG_MAX_FLASH_BANKS    1       /* max number of memory banks   */
+
+#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE }
+
+#define CFG_FLASH_PROTECTION
+
+/* The configuration latch is Chip Select 1.
+ * It's an 8-bit latch in the lower 8 bits of the word.
+ */
+#define CFG_LBC_CFGLATCH_BASE  0xfb000000      /* Base of config latch */
+#define CFG_BR1_PRELIM         0xfb001801      /* 32-bit port */
+#define CFG_OR1_PRELIM         0xffff0ff7      /* 64K is enough */
+
+#define CFG_MONITOR_BASE       TEXT_BASE       /* start of monitor     */
+
+#if (CFG_MONITOR_BASE < CFG_FLASH_BASE)
+#define CFG_RAMBOOT
+#else
+#undef  CFG_RAMBOOT
+#endif
+
+#ifdef CFG_RAMBOOT
+#define CFG_CCSRBAR_DEFAULT    0x40000000      /* CCSRBAR by BDI cfg   */
+#else
+#define CFG_CCSRBAR_DEFAULT    0xff700000      /* CCSRBAR Default      */
+#endif
+#define CFG_CCSRBAR             0xe0000000      /* relocated CCSRBAR    */
+#define CFG_IMMR               CFG_CCSRBAR     /* PQII uses CFG_IMMR   */
+
+
+/*
+ * DDR Setup
+ */
+
+/*
+ * Base addresses -- Note these are effective addresses where the
+ * actual resources get mapped (not physical addresses)
+ */
+#define CFG_DDR_SDRAM_BASE     0x00000000      /* DDR is system memory  */
+#define CFG_SDRAM_BASE         CFG_DDR_SDRAM_BASE
+
+#define SPD_EEPROM_ADDRESS     0x54            /*  DDR DIMM */
+
+#undef CONFIG_CLOCKS_IN_MHZ
+
+/* local bus definitions */
+#define CFG_BR2_PRELIM         0xf8001861      /* 64MB localbus SDRAM  */
+#define CFG_OR2_PRELIM         0xfc006901
+#define CFG_LBC_LCRR           0x00030004      /* local bus freq       */
+#define CFG_LBC_LBCR           0x00000000
+#define CFG_LBC_LSRT           0x20000000
+#define CFG_LBC_MRTPR          0x20000000
+#define CFG_LBC_LSDMR_1                0x2861b723
+#define CFG_LBC_LSDMR_2                0x0861b723
+#define CFG_LBC_LSDMR_3                0x0861b723
+#define CFG_LBC_LSDMR_4                0x1861b723
+#define CFG_LBC_LSDMR_5                0x4061b723
+
+#define CONFIG_L1_INIT_RAM
+#define CFG_INIT_RAM_LOCK      1
+#define CFG_INIT_RAM_ADDR       0x60000000      /* Initial RAM address  */
+#define CFG_INIT_RAM_END       0x4000          /* End of used area in RAM */
+
+#define CFG_GBL_DATA_SIZE      128             /* num bytes initial data */
+#define CFG_GBL_DATA_OFFSET    (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
+#define CFG_INIT_SP_OFFSET     CFG_GBL_DATA_OFFSET
+
+#define CFG_MONITOR_LEN                (256 * 1024)    /* Reserve 256 kB for Mon */
+#define CFG_MALLOC_LEN         (512 * 1024)    /* Reserved for malloc */
+
+/* Serial Port */
+#define CONFIG_CONS_INDEX     2
+#undef CONFIG_SERIAL_SOFTWARE_FIFO
+#define CFG_NS16550
+#define CFG_NS16550_SERIAL
+#define CFG_NS16550_REG_SIZE    1
+#define CFG_NS16550_CLK                get_bus_freq(0)
+
+#define CFG_BAUDRATE_TABLE  \
+       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 115200}
+
+#define CFG_NS16550_COM1        (CFG_CCSRBAR+0x4500)
+#define CFG_NS16550_COM2        (CFG_CCSRBAR+0x4600)
+
+#define CONFIG_CMDLINE_EDITING 1       /* add command line history     */
+#define CFG_HUSH_PARSER                1       /* Use the HUSH parser          */
+#ifdef  CFG_HUSH_PARSER
+#define CFG_PROMPT_HUSH_PS2 "> "
+#endif
+
+/* I2C */
+#define CONFIG_FSL_I2C                 /* Use FSL common I2C driver */
+#define  CONFIG_HARD_I2C               /* I2C with hardware support*/
+#undef CONFIG_SOFT_I2C                 /* I2C bit-banged */
+#define CFG_I2C_SPEED          400000  /* I2C speed and slave address  */
+#define CFG_I2C_SLAVE          0x7F
+#if 0
+#define CFG_I2C_NOPROBES        {0x00}  /* Don't probe these addrs */
+#else
+/* I did the 'if 0' so we could keep the syntax above if ever needed. */
+#undef CFG_I2C_NOPROBES
+#endif
+#define CFG_I2C_OFFSET         0x3000
+
+/* I2C EEPROM.  AT24C32, we keep our environment in here.
+*/
+#define CFG_I2C_EEPROM_ADDR            0x51    /* 1010001x             */
+#define CFG_I2C_EEPROM_ADDR_LEN                2
+#define CFG_EEPROM_PAGE_WRITE_BITS     5       /* =32 Bytes per write  */
+#define CFG_EEPROM_PAGE_WRITE_ENABLE
+#define CFG_EEPROM_PAGE_WRITE_DELAY_MS 20
+
+/*
+ * Standard 8555 PCI mapping.
+ * Addresses are mapped 1-1.
+ */
+#define CFG_PCI1_MEM_BASE      0x80000000
+#define CFG_PCI1_MEM_PHYS      CFG_PCI1_MEM_BASE
+#define CFG_PCI1_MEM_SIZE      0x20000000      /* 512M */
+#define CFG_PCI1_IO_BASE       0x00000000
+#define CFG_PCI1_IO_PHYS       0xe2000000
+#define CFG_PCI1_IO_SIZE       0x01000000      /* 16M */
+
+#define CFG_PCI2_MEM_BASE      0xa0000000
+#define CFG_PCI2_MEM_PHYS      CFG_PCI2_MEM_BASE
+#define CFG_PCI2_MEM_SIZE      0x20000000      /* 512M */
+#define CFG_PCI2_IO_BASE       0x00000000
+#define CFG_PCI2_IO_PHYS       0xe3000000
+#define CFG_PCI2_IO_SIZE       0x01000000      /* 16M */
+
+#if defined(CONFIG_PCI)                /* PCI Ethernet card */
+
+#define CONFIG_NET_MULTI
+#define CONFIG_PCI_PNP                 /* do pci plug-and-play */
+
+#undef CONFIG_EEPRO100
+#undef CONFIG_TULIP
+
+#if !defined(CONFIG_PCI_PNP)
+  #define PCI_ENET0_IOADDR     0xe0000000
+  #define PCI_ENET0_MEMADDR     0xe0000000
+  #define PCI_IDSEL_NUMBER      0x0c   /* slot0->3(IDSEL)=12->15 */
+#endif
+
+#undef CONFIG_PCI_SCAN_SHOW
+#define CFG_PCI_SUBSYS_VENDORID 0x1057  /* Motorola */
+
+#endif /* CONFIG_PCI */
+
+#if defined(CONFIG_TSEC_ENET)
+
+#ifndef CONFIG_NET_MULTI
+#define CONFIG_NET_MULTI       1
+#endif
+
+#define CONFIG_MII             1       /* MII PHY management           */
+
+#define CONFIG_MPC85XX_TSEC1   1
+#define CONFIG_MPC85XX_TSEC1_NAME      "TSEC0"
+#define CONFIG_MPC85XX_TSEC2   1
+#define CONFIG_MPC85XX_TSEC2_NAME      "TSEC1"
+#undef CONFIG_MPS85XX_FEC
+
+#define TSEC1_PHY_ADDR         2
+#define TSEC2_PHY_ADDR         4
+#define TSEC1_PHYIDX           0
+#define TSEC2_PHYIDX           0
+#define CONFIG_ETHPRIME                "TSEC0"
+
+#elif defined(CONFIG_ETHER_ON_FCC)     /* CPM FCC Ethernet */
+
+#define CONFIG_ETHER_ON_FCC2             /* define if ether on FCC   */
+#undef  CONFIG_ETHER_NONE               /* define if ether on something else */
+#define CONFIG_ETHER_INDEX      2       /* which channel for ether  */
+
+#if (CONFIG_ETHER_INDEX == 2)
+  /*
+   * - Rx-CLK is CLK13
+   * - Tx-CLK is CLK14
+   * - Select bus for bd/buffers
+   * - Full duplex
+   */
+  #define CFG_CMXFCR_MASK       (CMXFCR_FC2 | CMXFCR_RF2CS_MSK | CMXFCR_TF2CS_MSK)
+  #define CFG_CMXFCR_VALUE      (CMXFCR_RF2CS_CLK13 | CMXFCR_TF2CS_CLK14)
+  #define CFG_CPMFCR_RAMTYPE    0
+#if 0
+  #define CFG_FCC_PSMR          (FCC_PSMR_FDE)
+#else
+  #define CFG_FCC_PSMR          0
+#endif
+  #define FETH2_RST            0x01
+#elif (CONFIG_ETHER_INDEX == 3)
+  /* need more definitions here for FE3 */
+  #define FETH3_RST            0x80
+#endif                                 /* CONFIG_ETHER_INDEX */
+
+/* MDIO is done through the TSEC0 control.
+*/
+#define CONFIG_MII                     /* MII PHY management */
+#undef CONFIG_BITBANGMII               /* bit-bang MII PHY management  */
+
+#endif
+
+/* Environment - default config is in flash, see below */
+#if 0  /* in EEPROM */
+#define CFG_ENV_IS_IN_EEPROM   1
+#define CFG_ENV_OFFSET         0
+#define CFG_ENV_SIZE           2048
+#else  /* in flash */
+#define        CFG_ENV_IS_IN_FLASH     1
+#define CFG_ENV_SECT_SIZE      0x40000
+
+#define        CFG_ENV_ADDR            (CFG_MONITOR_BASE - CFG_ENV_SECT_SIZE)
+#define        CFG_ENV_SIZE            0x4000
+#define CFG_ENV_ADDR_REDUND    (CFG_ENV_ADDR - CFG_ENV_SECT_SIZE)
+#define CFG_ENV_SIZE_REDUND    (CFG_ENV_SIZE)
+#endif
+
+#define CONFIG_LOADS_ECHO      1       /* echo on for serial download  */
+#define CFG_LOADS_BAUD_CHANGE  1       /* allow baudrate change        */
+
+#define        CONFIG_TIMESTAMP                /* Print image info with ts     */
+
+#if defined(CFG_RAMBOOT)
+  #if defined(CONFIG_PCI)
+  #define  CONFIG_COMMANDS     ((CONFIG_CMD_DFL | CFG_CMD_PCI | \
+                               CFG_CMD_PING | CFG_CMD_I2C) & \
+                                ~(CFG_CMD_ENV | \
+                                 CFG_CMD_LOADS ))
+  #elif defined(CONFIG_TSEC_ENET)
+  #define  CONFIG_COMMANDS     ((CONFIG_CMD_DFL | CFG_CMD_PING | \
+                               CFG_CMD_MII | CFG_CMD_I2C ) & \
+                               ~(CFG_CMD_ENV))
+  #elif defined(CONFIG_ETHER_ON_FCC)
+  #define  CONFIG_COMMANDS     ((CONFIG_CMD_DFL | CFG_CMD_MII | \
+                               CFG_CMD_PING | CFG_CMD_I2C) & \
+                               ~(CFG_CMD_ENV))
+  #endif
+#else
+  #if defined(CONFIG_PCI)
+  #define  CONFIG_COMMANDS     (CONFIG_CMD_DFL | CFG_CMD_PCI | \
+                               CFG_CMD_ELF | CFG_CMD_PING | CFG_CMD_I2C)
+  #elif defined(CONFIG_TSEC_ENET)
+  #define  CONFIG_COMMANDS     (CONFIG_CMD_DFL | CFG_CMD_PING | \
+                               CFG_CMD_ELF | CFG_CMD_MII | CFG_CMD_I2C)
+  #elif defined(CONFIG_ETHER_ON_FCC)
+  #define  CONFIG_COMMANDS     (CONFIG_CMD_DFL | CFG_CMD_MII | \
+                               CFG_CMD_ELF | CFG_CMD_PING | CFG_CMD_I2C)
+  #endif
+#endif
+#include <cmd_confdefs.h>
+
+#undef CONFIG_WATCHDOG                 /* watchdog disabled            */
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CFG_LONGHELP                   /* undef to save memory         */
+#define CFG_PROMPT     "SSA=> "        /* Monitor Command Prompt       */
+#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#define CFG_CBSIZE     1024            /* Console I/O Buffer Size      */
+#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_LOAD_ADDR  0x1000000       /* default load address */
+#define CFG_HZ         1000            /* decrementer freq: 1 ms ticks */
+
+/*
+ * 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 */
+
+/* Cache Configuration */
+#define CFG_DCACHE_SIZE                32768
+#define CFG_CACHELINE_SIZE     32
+#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#define CFG_CACHELINE_SHIFT    5       /* log base 2 of the above value */
+#endif
+
+/*
+ * Internal Definitions
+ *
+ * Boot Flags
+ */
+#define BOOTFLAG_COLD  0x01            /* Normal Power-On: Boot from FLASH */
+#define BOOTFLAG_WARM  0x02            /* Software reboot              */
+
+#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#define CONFIG_KGDB_BAUDRATE   230400  /* speed to run kgdb serial port */
+#define CONFIG_KGDB_SER_INDEX  2       /* which serial port to use */
+#endif
+
+/*Note: change below for your network setting!!! */
+#if defined(CONFIG_TSEC_ENET) || defined(CONFIG_ETHER_ON_FCC)
+#define CONFIG_ETHADDR  00:e0:0c:07:9b:8a
+#define CONFIG_HAS_ETH1
+#define CONFIG_ETH1ADDR  00:e0:0c:07:9b:8b
+#define CONFIG_HAS_ETH2
+#define CONFIG_ETH2ADDR  00:e0:0c:07:9b:8c
+#endif
+
+/*
+ * Environment in EEPROM is compatible with different flash sector sizes,
+ * but only little space is available, so we use a very simple setup.
+ * With environment in flash, we use a more powerful default configuration.
+ */
+#ifdef CFG_ENV_IS_IN_EEPROM            /* use restricted "standard" environment */
+
+#define CONFIG_BAUDRATE                38400
+
+#define CONFIG_BOOTDELAY       3       /* -1 disable autoboot */
+#define CONFIG_BOOTCOMMAND     "bootm 0xffc00000 0xffd00000"
+#define CONFIG_BOOTARGS                "root=/dev/nfs rw ip=any console=ttyS1,$baudrate"
+#define CONFIG_SERVERIP        192.168.85.1
+#define CONFIG_IPADDR                  192.168.85.60
+#define CONFIG_GATEWAYIP       192.168.85.1
+#define CONFIG_NETMASK         255.255.255.0
+#define CONFIG_HOSTNAME        STX_SSA
+#define CONFIG_ROOTPATH        /gppproot
+#define CONFIG_BOOTFILE        uImage
+#define CONFIG_LOADADDR                0x1000000
+
+#else /* ENV IS IN FLASH               -- use a full-blown envionment */
+
+#define CONFIG_BAUDRATE                115200
+
+#define CONFIG_BOOTDELAY       5       /* -1 disable autoboot */
+
+#define CONFIG_PREBOOT "echo;" \
+       "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \
+       "echo"
+
+#undef CONFIG_BOOTARGS         /* the boot command will set bootargs   */
+
+#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
+       "hostname=gp3ssa\0"                                             \
+       "bootfile=/tftpboot/gp3ssa/uImage\0"                            \
+       "loadaddr=400000\0"                                             \
+       "netdev=eth0\0"                                                 \
+       "consdev=ttyS1\0"                                               \
+       "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
+               "nfsroot=$serverip:$rootpath\0"                         \
+       "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
+       "addip=setenv bootargs $bootargs "                              \
+               "ip=$ipaddr:$serverip:$gatewayip:$netmask"              \
+               ":$hostname:$netdev:off panic=1\0"                      \
+       "addcons=setenv bootargs $bootargs "                            \
+               "console=$consdev,$baudrate\0"                          \
+       "flash_nfs=run nfsargs addip addcons;"                          \
+               "bootm $kernel_addr\0"                                  \
+       "flash_self=run ramargs addip addcons;"                         \
+               "bootm $kernel_addr $ramdisk_addr\0"                    \
+       "net_nfs=tftp $loadaddr $bootfile;"                             \
+               "run nfsargs addip addcons;bootm\0"                     \
+       "rootpath=/opt/eldk/ppc_85xx\0"                                 \
+       "kernel_addr=FC000000\0"                                        \
+       "ramdisk_addr=FC200000\0"                                       \
+       ""
+#define CONFIG_BOOTCOMMAND     "run flash_self"
+
+#endif /* CFG_ENV_IS_IN_EEPROM */
+
+#endif /* __CONFIG_H */
index c6aa8ece5b010886e7d2d235b22efed8bd0e458b..1e8ed7abdfcaf65a746fd3d96260783176dd7e61 100644 (file)
 /*
  * NAND Flash
  */
-/* Use the new NAND code. (BOARDLIBS = drivers/nand/libnand.a required) */
 #define CONFIG_NEW_NAND_CODE
 #define CFG_NAND0_BASE         0x0
 #undef CFG_NAND1_BASE
index bc8ba3f2da2872ae9debdc9c2c9306e7b5678586..673bfed16e9832054835420e7e7d3ff4f5f3be53 100644 (file)
@@ -9,6 +9,15 @@
 
 #define EXC_OFF_SYS_RESET      0x0100  /* System reset offset */
 
+
+/*
+ * platform register addresses
+ */
+
+#define GUTS_SVR       (CFG_CCSRBAR + 0xE00A4)
+#define MCM_ABCR       (CFG_CCSRBAR + 0x01000)
+#define MCM_DBCR       (CFG_CCSRBAR + 0x01008)
+
 /*
  * l2cr values.  Look in config_<BOARD>.h for the actual setup
  */