Merge branch 'denx-coldfire' into coldfire-aug2007
authorJohn Rigby <jrigby@freescale.com>
Thu, 16 Aug 2007 23:40:03 +0000 (17:40 -0600)
committerJohn Rigby <jrigby@freescale.com>
Thu, 16 Aug 2007 23:40:03 +0000 (17:40 -0600)
85 files changed:
CHANGELOG
MAINTAINERS
MAKEALL
Makefile
board/esd/ash405/Makefile
board/esd/ash405/ash405.c
board/esd/cms700/Makefile
board/esd/cms700/cms700.c
board/esd/common/auto_update.c
board/esd/common/esd405ep_nand.c [new file with mode: 0644]
board/esd/cpci750/cpci750.c
board/esd/cpci750/ide.c
board/esd/hh405/Makefile
board/esd/hh405/hh405.c
board/esd/hub405/Makefile
board/esd/hub405/hub405.c
board/esd/plu405/Makefile
board/esd/plu405/plu405.c
board/esd/voh405/Makefile
board/esd/voh405/voh405.c
board/esd/wuh405/Makefile
board/esd/wuh405/wuh405.c
board/fads/fads.h
board/freescale/common/sys_eeprom.c [new file with mode: 0644]
board/freescale/mpc8641hpcn/Makefile [new file with mode: 0644]
board/freescale/mpc8641hpcn/config.mk [new file with mode: 0644]
board/freescale/mpc8641hpcn/init.S [new file with mode: 0644]
board/freescale/mpc8641hpcn/mpc8641hpcn.c [new file with mode: 0644]
board/freescale/mpc8641hpcn/u-boot.lds [new file with mode: 0644]
board/mpc8641hpcn/Makefile [deleted file]
board/mpc8641hpcn/config.mk [deleted file]
board/mpc8641hpcn/init.S [deleted file]
board/mpc8641hpcn/mpc8641hpcn.c [deleted file]
board/mpc8641hpcn/sys_eeprom.c [deleted file]
board/mpc8641hpcn/u-boot.lds [deleted file]
common/cmd_bootm.c
common/cmd_nand.c
common/fdt_support.c
drivers/bios_emulator/besys.c
drivers/bios_emulator/bios.c
drivers/bios_emulator/biosemu.c
drivers/bios_emulator/x86emu/debug.c
drivers/bios_emulator/x86emu/decode.c
drivers/bios_emulator/x86emu/ops.c
drivers/bios_emulator/x86emu/ops2.c
drivers/bios_emulator/x86emu/prim_ops.c
drivers/bios_emulator/x86emu/sys.c
drivers/nand/nand_ids.c
drivers/qe/uec.c
drivers/tsec.c
include/asm-ppc/immap_85xx.h
include/configs/ASH405.h
include/configs/CMS700.h
include/configs/CPCI405.h
include/configs/CPCI4052.h
include/configs/CPCI405AB.h
include/configs/CPCI405DT.h
include/configs/HH405.h
include/configs/HUB405.h
include/configs/MPC8313ERDB.h
include/configs/MPC8349EMDS.h
include/configs/MPC8349ITX.h
include/configs/MPC8540ADS.h
include/configs/MPC8540EVAL.h
include/configs/MPC8541CDS.h
include/configs/MPC8544DS.h
include/configs/MPC8548CDS.h
include/configs/MPC8555CDS.h
include/configs/MPC8560ADS.h
include/configs/MPC8568MDS.h
include/configs/MPC8641HPCN.h
include/configs/PLU405.h
include/configs/PM854.h
include/configs/PM856.h
include/configs/TQM834x.h
include/configs/TQM85xx.h
include/configs/VOH405.h
include/configs/WUH405.h
include/configs/sbc8349.h
include/configs/sbc8641d.h
include/configs/stxgp3.h
include/configs/stxssa.h
include/linux/mtd/nand.h
include/nand.h
net/tftp.c

index a83456814979b4541c63aca3fadb74ed65b0b0a4..da67d366c977c0c37b2b4ae2690660051b1d9b96 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,91 @@
+commit 2d78074d2e806edc380c1464eb9e5df335ece65e
+Author: Stefan Roese <sr@denx.de>
+Date:  Fri Jun 22 17:32:28 2007 +0200
+
+    ppc7xx: Update CPCI750 board
+
+    This small CPCI750 update extends the board specific command
+    "show_config" to display the Marvell strapping registers and
+    extends the PCI IDE controller.
+
+    Signed-off-by: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 30b52df9e906bf0e465916c2c6bb5192b438e0b8
+Author: Jon Loeliger <jdl@freescale.com>
+Date:  Wed Aug 15 11:55:35 2007 -0500
+
+    86xx: Fix lingering CFG_CMD_* references in sbc8641d.h
+
+    Remove a leftover in net/tftp.c while we're at it.
+
+    Signed-off-by: Jon Loeliger <jdl@freescale.com>
+
+commit 4ce917742b1e48faa9bf9a9757545e56fb4cfe44
+Author: Jon Loeliger <jdl@freescale.com>
+Date:  Wed Aug 15 12:20:40 2007 -0500
+
+    Move the MPC8641HPCN board under board/freescale.
+
+    Minor path corrections needed to ensure buildability.
+
+    Signed-off-by: Jon Loeliger <jdl@freescale.com>
+
+commit 8662577fe36fdb6a44b55b998d9daac6392a736a
+Author: Jon Loeliger <jdl@freescale.com>
+Date:  Wed Aug 15 11:46:22 2007 -0500
+
+    86xx: Fix lingering CFG_CMD_* references in sbc8641d.h
+
+    Remove a leftover in net/tftp.c while we're at it.
+
+    Signed-off-by: Jon Loeliger <jdl@freescale.com>
+
+commit 210f463c71917b7a4495c2103c228b9c179ae64d
+Author: Jerry Van Baren <gvb.uboot@gmail.com>
+Date:  Wed Aug 15 11:13:15 2007 -0400
+
+    Fix where the #ifdef CFG_BOOTMAPSZ is placed.
+
+    Commit 073e1b509980cefe6f53c2d7fbbcd135df1e3924 "Fix initrd/dtb
+    interaction" put the new code outside of the #if defined(CONFIG_OF_LIBFDT)
+    when it should have gone inside of the conditional.  As a result, it
+    broke non-LIBFDT board builds.
+
+    Also added a missing "not." to the comment.
+
+    Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
+
+commit 594e79838ce5078a90d0c27abb2b2d61d5f8e8a7
+Author: Ed Swarthout <Ed.Swarthout@freescale.com>
+Date:  Tue Aug 14 14:06:45 2007 -0500
+
+    Fix malloc size error in ahci_init_one.
+
+    Typically this causes scsi init to corrupt the
+    devlist and break the coninfo command.
+    Fix a compiler size warning.
+
+    Signed-off-by: Jason Jin <jason.jin@freescale.com>
+    Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
+    Acked-by: Andy Fleming <afleming@freescale.com>
+
+commit b361acd64fd2525c081b9b288b0804efe209c0e9
+Author: ksi@koi8.net <ksi@koi8.net>
+Date:  Tue Aug 14 10:02:16 2007 -0700
+
+    TI DaVinci - fix unsupported %hhx format
+
+    Signed-off-by: Sergey Kubushyn <ksi@koi8.net>
+
+commit f01dbb5424a81453c81190dd30e945891466f621
+Author: Wolfgang Denk <wd@denx.de>
+Date:  Tue Aug 14 18:42:36 2007 +0200
+
+    Coding style cleanup. Update CHANGELOG.
+
+    Signed-off-by: Wolfgang Denk <wd@denx.de>
+
 commit 073e1b509980cefe6f53c2d7fbbcd135df1e3924
 Author: Andy Fleming <afleming@freescale.com>
 Date:  Tue Aug 14 10:32:59 2007 -0500
@@ -20,6 +108,50 @@ Date:       Tue Aug 14 15:40:00 2007 +0100
 
     Supply spi interface in at45.c
 
+commit 4ce846ec59f36b85d6644a769690ad3feb667575
+Author: Stefan Roese <sr@denx.de>
+Date:  Tue Aug 14 15:12:01 2007 +0200
+
+    POST: Fix merge problem
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 429d9571f60631ae8a2fe12b11be4c75b0c2b37c
+Author: Stefan Roese <sr@denx.de>
+Date:  Tue Aug 14 15:03:17 2007 +0200
+
+    Coding style cleanup
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 779e975117a75e91fcebe226a63104dbfb924ab1
+Author: Stefan Roese <sr@denx.de>
+Date:  Tue Aug 14 14:44:41 2007 +0200
+
+    ppc4xx: Add initial Zeus (PPC405EP) board support
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit c5a172a5fd636c12467429e3f7910e53773979c6
+Author: Stefan Roese <sr@denx.de>
+Date:  Tue Aug 14 14:41:55 2007 +0200
+
+    POST: Add option for external ethernet loopback test
+
+    When CFG_POST_ETHER_EXT_LOOPBACK is defined, the ethernet POST
+    is not done using an internal loopback connection, but by assuming
+    that an external loopback connector is plugged into the board.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit eb2b4010ae426245172988804ee8d9193fb41038
+Author: Stefan Roese <sr@denx.de>
+Date:  Tue Aug 14 14:39:44 2007 +0200
+
+    POST: Add ppc405 support to cache and UART POST
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
 commit 0c42f36f15074bd9808a7dbd7ef611fad9bf537c
 Author: Peter Pearse <peter.pearse@arm.com>
 Date:  Tue Aug 14 10:46:32 2007 +0100
@@ -391,6 +523,17 @@ Date:      Wed Jun 27 13:34:26 2007 +0200
     Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
     Acked-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
 
+commit 273db7e1bdd1937e32f1d4507321bb721ebd3118
+Author: Stefan Roese <sr@denx.de>
+Date:  Mon Aug 13 09:05:33 2007 +0200
+
+    ppc4xx: Fix problem in PLL clock calculation
+
+    This patch was originall provided by David Mitchell <dmitchell@amcc.com>
+    and fixes a bug in the PLL clock calculation.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
 commit 9986bc3e40e899bea372a99a2bca4071bdf2e24b
 Author: Wolfgang Denk <wd@denx.de>
 Date:  Sun Aug 12 21:34:50 2007 +0200
@@ -849,6 +992,14 @@ Date:      Thu Aug 2 14:42:20 2007 -0500
     Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
+commit 35d22f957a85a22bb3cd1ad084fa5404620d1c42
+Author: Stefan Roese <sr@denx.de>
+Date:  Fri Aug 10 10:42:25 2007 +0200
+
+    Coding style cleanup
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
 commit 3a6d56c20989fe27360afe743bd2a7ad4d76e48f
 Author: Dirk Behme <dirk.behme@googlemail.com>
 Date:  Thu Aug 2 17:42:08 2007 +0200
@@ -873,6 +1024,105 @@ Date:    Thu Aug 2 17:41:14 2007 +0200
 
     Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
 
+commit 157cda4d0c3d592ccbb19bbfc07d9251894f0894
+Author: Niklaus Giger <niklausgiger@gmx.ch>
+Date:  Fri Jul 27 11:31:22 2007 +0200
+
+    Add PPC4xx-HCU4 and HCU5 boards: HCU5 files
+
+    Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
+
+commit 6e5de26c6e7580faf16e87745cd488b92b492d0c
+Author: Niklaus Giger <niklausgiger@gmx.ch>
+Date:  Fri Jul 27 11:30:33 2007 +0200
+
+    Add PPC4xx-HCU4 and HCU5 boards: HCU4 files
+
+    Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
+
+commit e8397fc78c9394d71de233a4d810fbc9047e4c76
+Author: Niklaus Giger <niklausgiger@gmx.ch>
+Date:  Fri Jul 27 11:38:26 2007 +0200
+
+    Add PPC4xx-HCU4 and HCU5 boards: common files
+
+    Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
+
+commit ac982ea5a4f2f993efcf52dca122f5a59df047d8
+Author: Niklaus Giger <niklausgiger@gmx.ch>
+Date:  Fri Jul 27 11:28:44 2007 +0200
+
+    Add PPC4xx-HCU4 and HCU5 boards: make related
+
+    Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
+
+commit 137fdd9f474ecb853efdace5200576308c67f18d
+Author: Niklaus Giger <niklausgiger@gmx.ch>
+Date:  Fri Jul 27 11:28:03 2007 +0200
+
+    Add PPC4xx-HCU4 and HCU5 boards: HCU5 config
+
+    Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
+
+commit 714bc55b35b6f6a65cc8740a3842a543e88cdef2
+Author: Niklaus Giger <niklausgiger@gmx.ch>
+Date:  Fri Jul 27 11:27:15 2007 +0200
+
+    Add PPC4xx-HCU4 and HCU5 boards: HCU4 config
+
+    Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
+
+commit 1894dd381124bdbfbdae7cf3a6ca52a8eb1f4421
+Author: Niklaus Giger <niklausgiger@gmx.ch>
+Date:  Fri Jul 27 11:25:31 2007 +0200
+
+    Add PPC4xx-HCU4 and HCU5 boards: READMEs
+
+    Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
+
+commit 641cca9569ce351ddb287fd3343d8b1dcb591db4
+Author: Niklaus Giger <niklausgiger@gmx.ch>
+Date:  Fri Jul 27 11:37:40 2007 +0200
+
+    Add PPC4xx-HCU4 and HCU5 boards: Infrastructure
+
+    This series of patches adds support for 2 boards from Netstal Maschinen.
+
+    The HCU4 has a PPC405Gpr and
+    the HCU5 has a PPC440EPX.
+
+    The HCU4 has a somehow complicated flash setup, as the booteprom is
+    only 8 bits and the CFI 16 bits wide, which makes it impossible to use a more
+    elegant solution.
+
+    The HCU5 has only a booteprom as the whole code will be downloaded from a
+    different board which has HD, CD-ROM, etc and where all code is stored.
+
+    This is my third try. I incorporated all suggestions made by Wolfgang and Stefan.
+    Thanks them a lot.
+
+    Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
+
+commit 3e4c90c6233618fc1806e63fde68df5f3d6a0171
+Author: Stefan Roese <sr@denx.de>
+Date:  Fri Aug 10 08:42:55 2007 +0200
+
+    ppc4xx: Update lwmon5 POST configuration
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 29cb25da56afe18cf5e7072a92a9d98ea8af1fd4
+Author: Yuri Tikhonov <yur@emcraft.com>
+Date:  Fri Aug 10 08:25:22 2007 +0200
+
+    POST: Add ppc4xx UART POST support without external uart clock (lwmon5)
+
+    The patch adds support for UART POST on ppc44x-based boards with no
+    external serial clocks installed.
+
+    Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
+    Acked-by: Stefan Roese <sr@denx.de>
+
 commit 99c2fdab91bc633e46fb41dbaa629f87ccf6e00f
 Author: Kim Phillips <kim.phillips@freescale.com>
 Date:  Mon Aug 6 18:18:34 2007 -0500
@@ -1169,6 +1419,17 @@ Date:    Mon Aug 6 23:21:05 2007 +0200
 
     Signed-off-by: Wolfgang Denk <wd@denx.de>
 
+commit 537223afa61f64480df31ce440a9cb386df4a814
+Author: Stefan Roese <sr@denx.de>
+Date:  Mon Aug 6 21:10:17 2007 +0200
+
+    ppc4xx: Update AMCC Bamboo README doc/README.bamboo
+
+    As suggested by Eugene O'Brien <Eugene.O'Brien@advantechamt.com>,
+    here an updated Bamboo README.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
 commit 9c7e4b06214db61bb21f1bcbe57c97519669baae
 Author: Wolfgang Denk <wd@denx.de>
 Date:  Mon Aug 6 02:17:36 2007 +0200
@@ -1316,6 +1577,42 @@ Date:    Thu Aug 2 10:11:18 2007 +0200
 
     Minor cleanup of <board>_nand build rules.
 
+commit 9ca8d79de096c65b9b9c867259b3ff4685f775ef
+Author: Stefan Roese <sr@denx.de>
+Date:  Thu Aug 2 08:33:56 2007 +0200
+
+    ppc4xx: Code cleanup
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit c92409812206ac67a7fa7aae298539a9c3804a46
+Author: Grzegorz Bernacki <gjb@semihalf.com>
+Date:  Tue Jul 31 18:51:48 2007 +0200
+
+    [ppc440SPe] Graceful recovery from machine check during PCIe configuration
+
+    During config transactions on the PCIe bus an attempt to scan for a
+    non-existent device can lead to a machine check exception with certain
+    peripheral devices. In order to avoid crashing in such scenarios the
+    instrumented versions of the config cycle read routines are introduced, so
+    the exceptions fixups framework can gracefully recover.
+
+    Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
+    Acked-by: Rafal Jaworowski <raj@semihalf.com>
+
+commit dec99558b9ea75a37940d07f41a3565a50b54ad1
+Author: Rafal Jaworowski <raj@semihalf.com>
+Date:  Tue Jul 31 18:19:54 2007 +0200
+
+    [ppc4xx] Separate settings for PCIe bus numbering on 440SPe rev.A
+
+    This brings back separate settings for PCIe bus numbers depending on chip
+    revision, which got eliminated in 2b393b0f0af8402ef43b25c1968bfd29714ddffa
+    commit. 440SPe rev. A does NOT work properly with the same settings as for
+    the rev. B (no devices are seen on the bus during enumeration).
+
+    Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
+
 commit cdd917a43da6fa7fc8f54a3cc9f420ce5ecf3197
 Author: Wolfgang Denk <wd@denx.de>
 Date:  Thu Aug 2 00:48:45 2007 +0200
@@ -1324,6 +1621,55 @@ Date:    Thu Aug 2 00:48:45 2007 +0200
 
     Signed-off-by: Wolfgang Denk <wd@denx.de>
 
+commit d2f68006627eda6cb6c7f364bddf621dbfd2fc68
+Author: Eugene OBrien <eugene.obrien@advantechamt.com>
+Date:  Tue Jul 31 10:24:56 2007 +0200
+
+    ppc4xx: Update AMCC Bamboo 440EP support
+
+    Changed storage type of cfg_simulate_spd_eeprom to const
+    Changed storage type of gpio_tab to stack storage
+    (Cannot access global data declarations in .bss until afer code relocation)
+
+    Improved SDRAM tests to catch problems where data is not uniquely addressable
+    (e.g. incorrectly programmed SDRAM row or columns)
+
+    Added CONFIG_PROG_SDRAM_TLB to support Bamboo SIMM/DIMM modules
+    Fixed AM29LV320DT (OpCode Flash) sector map
+
+    Signed-off-by: Eugene OBrien <eugene.obrien@advantechamt.com>
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit ea9f6bce383cc9fbcdee28b5836109b1a6dba574
+Author: Stefan Roese <sr@denx.de>
+Date:  Tue Jul 31 08:37:01 2007 +0200
+
+    ppc4xx: Update 440EPx lwmon5 board support
+
+    - Clear ECC status regs after ECC POST test
+    - Set dcbz for ECC generation with caches enabled as default
+    - Code cleanup
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 27a528fb41433c4c1e2b5d6bd3fd8d78606fc724
+Author: Stefan Roese <sr@denx.de>
+Date:  Mon Jul 30 11:04:57 2007 +0200
+
+    ppc4xx: Only print ECC related info when the error bis are set
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit e36220a4baf1f188ba60f17e9d0f043069b1362a
+Author: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
+Date:  Fri Jul 27 16:44:31 2007 +0200
+
+    new FPGA image for PLU405 board
+
+    new FPGA image for PLU405 board with improved CompactFlash timing
+
+    Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
+
 commit 8993e54b6f397973794f3d6f47d3b3c0c98dd4f6
 Author: Rafal Jaworowski <raj@semihalf.com>
 Date:  Fri Jul 27 14:43:59 2007 +0200
@@ -1351,6 +1697,73 @@ Date:    Fri Jul 27 14:22:04 2007 +0200
 
     Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
 
+commit d4024bb72dd81695ec099b2199eda0d27c623e62
+Author: John Otken <john@softadvances.com>
+Date:  Thu Jul 26 17:49:11 2007 +0200
+
+    ppc4xx: Add support for AMCC 405EP Taihu board
+
+    Signed-off-by: John Otken <john@softadvances.com>
+
+commit b66091de6c7390620312c2501db23d8391e7cabb
+Author: Anatolij Gustschin <agust@denx.de>
+Date:  Thu Jul 26 15:08:01 2007 +0200
+
+    ppc4xx: lwmon5: Update Lime initialization
+
+    Change Lime SDRAM initialization to now support 100MHz and
+    133MHz (if enabled). Also the framebuffer is initialized to
+    display a blue rectangle with a white border.
+
+    Signed-off-by: Anatolij Gustschin <agust@denx.de>
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 9f24a808f17fc0f37b7fb4805f734741335caecc
+Author: Stefan Roese <sr@denx.de>
+Date:  Tue Jul 24 09:52:52 2007 +0200
+
+    ppc4xx: lwmon5: Support for 128 MByte NOR FLASH added
+
+    The used Intel NOR FLASH chips have internally two dies, and are now
+    treated as two seperate chips.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit aedf5bde179ecfbd0a96130d18996a96518b785f
+Author: Stefan Roese <sr@denx.de>
+Date:  Tue Jul 24 07:20:09 2007 +0200
+
+    ppc4xx: Fix lwmon5 interrupt controller setup (polarity, trigger...)
+
+    As suggested by Hakan Eryigit, here an updated setup for the lwmon5
+    interrupt controller.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit a71d96eac8130b53a91f93cd10c70fca0db18d52
+Author: Stefan Roese <sr@denx.de>
+Date:  Fri Jul 20 15:03:44 2007 +0200
+
+    ppc4xx: Fix bug with default GPIO output value
+
+    As spotted by Matthias Fuchs, the default output values for all GPIO1
+    outputs were not setup correctly. This patch fixes this issue.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 531e3e8b831f357056448fa573137d5fb37000fd
+Author: Pavel Kolesnikov <concord@emcraft.com>
+Date:  Fri Jul 20 15:03:03 2007 +0200
+
+    POST: Add ECC POST for the lwmon5 board
+
+    This patch adds ECC Post test for the Lwmon5 board based
+    on PPC440EPx to U-Boot.
+
+    Signed-off-by: Pavel Kolesnikov <concord@emcraft.com>
+    Acked-by: Yuri Tikhonov <yur@emcraft.com>
+    Acked-by: Stefan Roese <sr@denx.de>
+
 commit cc3023b9f95d7ac959a764471a65001062aecf41
 Author: Rafal Jaworowski <raj@semihalf.com>
 Date:  Thu Jul 19 17:12:28 2007 +0200
@@ -1362,6 +1775,58 @@ Date:    Thu Jul 19 17:12:28 2007 +0200
 
     Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
 
+commit 8848ec858f74ed6dab06fb6d5ddc933e0a1328bf
+Author: Stefan Roese <sr@denx.de>
+Date:  Mon Jul 16 10:02:12 2007 +0200
+
+    ppc4xx: Code cleanup
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 2a49fc17d09020e7ebd9536694d99d20e419fcb8
+Author: Stefan Roese <sr@denx.de>
+Date:  Mon Jul 16 10:01:38 2007 +0200
+
+    ppc4xx: AMCC Luan uses the new boardspecific DDR2 controller setup
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit df3f17422aeb03fb81a7ac8c78d2b05d05aa4cf9
+Author: Stefan Roese <sr@denx.de>
+Date:  Mon Jul 16 10:00:43 2007 +0200
+
+    ppc4xx: Support for Yucca board with 440SPe Rev A added to 44x_spd_ddr2.c
+
+    The new boardspecific DDR2 controller configuration is used for the Yucca
+    board. Now the Yucca board with 440SPe Rev. A chips is also supported.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 6ed14addf97c8cd8f531e9ae7b2d3e222fffd53e
+Author: Stefan Roese <sr@denx.de>
+Date:  Mon Jul 16 09:57:00 2007 +0200
+
+    ppc4xx: Add new weak functions to support boardspecific DDR2 configuration
+
+    The new "weak" functions ddr_wrdtr() and ddr_clktr() are added to better
+    support non default, boardspecific DDR(2) controller configuration.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 5743a9207a370b90f09b20ebd61167c806b937f3
+Author: Stefan Roese <sr@denx.de>
+Date:  Mon Jul 16 08:53:51 2007 +0200
+
+    ppc4xx: Add remove_tlb() function to remove a mem area from TLB setup
+
+    The new function remove_tlb() can be used to remove the TLB's used to
+    map a specific memory region. This is especially useful for the DDR(2)
+    setup routines which configure the SDRAM area temporarily as a cached
+    area (for speedup on auto-calibration and ECC generation) and later
+    need this area uncached for normal usage.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
 commit 3a6cab844cf74f76639d795e0be8717e02c86af7
 Author: Wolfgang Denk <wd@denx.de>
 Date:  Sat Jul 14 22:51:02 2007 +0200
@@ -1393,6 +1858,17 @@ Date:    Fri Jul 13 08:26:05 2007 +0200
 
     Signed-off-by: Heiko Schocher <hs@denx.de>
 
+commit a2e1c7098cf9574386b0c96841dfc8ea5cc93578
+Author: Stefan Roese <sr@denx.de>
+Date:  Thu Jul 12 16:32:08 2007 +0200
+
+    ppc4xx: Change receive buffer handling in the 4xx emac driver
+
+    This change fixes a bug in the receive buffer handling, that
+    could lead to problems upon high network traffic (broadcasts...).
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
 commit 239f05ee4dd4cfe0b50f251b533dcebe9e67c360
 Author: Wolfgang Denk <wd@denx.de>
 Date:  Thu Jul 12 01:45:34 2007 +0200
@@ -1975,6 +2451,50 @@ Date:    Tue Jul 10 00:01:28 2007 +0200
 
     Signed-off-by: Wolfgang Denk <wd@denx.de>
 
+commit c8603cfbd4573379a6076c9c208545ba2bbf019a
+Author: Stefan Roese <sr@denx.de>
+Date:  Mon Jul 9 11:00:24 2007 +0200
+
+    Small coding style cleanup
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 0f92c7e7c9a62755b1457d3c46f93c8c1f6c19fc
+Author: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
+Date:  Mon Jul 9 10:10:08 2007 +0200
+
+    Migrate esd 405EP boards to new NAND subsystem
+
+    Remove unused CFG_NAND_LEGACY define
+
+    These boards to not have NAND.
+
+    Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
+
+commit bd84ee4c2020c3a6861f4bb2e7ea0fb49f82e803
+Author: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
+Date:  Mon Jul 9 10:10:06 2007 +0200
+
+    Migrate esd 405EP boards to new NAND subsystem
+
+    Migrate esd 405EP boards to new NAND subsystem
+
+    -cleanup
+    -use correct io accessors (in/out_be32())
+
+    Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
+
+commit e09f7ab5749c345f924da272bea0521a73af5b11
+Author: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
+Date:  Mon Jul 9 10:10:04 2007 +0200
+
+    Migrate esd 405EP boards to new NAND subsystem
+
+    This patch prepares the migration from the legacy NAND driver
+    to U-Boot's new NAND subsystem for esd boards.
+
+    Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
+
 commit c3517f919d0f61650cf3027fd4faf0f631142f6c
 Author: Jon Loeliger <jdl@freescale.com>
 Date:  Sun Jul 8 18:10:08 2007 -0500
@@ -2162,6 +2682,41 @@ Date:    Thu Jul 5 19:13:52 2007 -0500
 
     Signed-off-by: Jon Loeliger <jdl@freescale.com>
 
+commit 10e038932f22ee80ebd53de312531e70e6590a2f
+Author: Thomas Knobloch <knobloch@siemens.com>
+Date:  Fri Jul 6 14:58:39 2007 +0200
+
+    [NAND] Bad block skipping for command nboot
+
+    The old implementation of command nboot does not support reading the image from
+    NAND flash with skipping of bad blocks. The patch implements a new version of
+    the nboot command: by calling nboot.jffs2 from the u-boot command line the
+    command will load the image from NAND flash with respect to bad blocks (by using
+    nand_read_opts()). This is similar to e.g. the NAND read command: "nand
+    read.jffs2 ...".
+
+    Signed-off-by: Thomas Knobloch <knobloch@siemens.com>
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 334043f601a90ac53e5ecc846fbb73a1ef38cb1f
+Author: Stefan Roese <sr@denx.de>
+Date:  Fri Jul 6 12:26:51 2007 +0200
+
+    ppc4xx: Update lwmon5 default environment
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
+commit 5d187430a055d62f17ca84d75e7245439d1f7e75
+Author: Stefan Roese <sr@denx.de>
+Date:  Fri Jul 6 11:48:24 2007 +0200
+
+    ppc4xx: Update lwmon5 board
+
+    Add unlock=yes environment variable to default variables to unlock
+    the CFI flash by default.
+
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
 commit 6b0a174a1e6f55e1f5a1fbb223cdad7645a4646e
 Author: Stefan Roese <sr@denx.de>
 Date:  Fri Jul 6 09:45:47 2007 +0200
@@ -3151,6 +3706,18 @@ Date:    Fri Jun 22 14:58:04 2007 +0200
     - adapt to the more generic EXCEPTION_PROLOG and CRIT_EXCEPTION macros
     - minor 4xx cleanup
 
+commit d677b32855f577ae2690dcd64a172cdd706e0ffc
+Author: Mike Frysinger <vapier@gentoo.org>
+Date:  Fri Jun 22 10:34:12 2007 +0200
+
+    [patch] add nand_init() prototype to nand.h
+
+    since nand_init() is expected to be called by other parts of u-boot, there
+    should be a prototype for it in nand.h
+
+    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
 commit 83b4cfa3d629dff0264366263c5e94d9a50ad80b
 Author: Wolfgang Denk <wd@denx.de>
 Date:  Wed Jun 20 18:14:24 2007 +0200
@@ -3767,6 +4334,16 @@ Date:    Sun May 27 16:51:48 2007 +0200
     Signed-off-by: Marian Balakowicz <m8@semihalf.com>
     Acked-by: Bartlomiej Sieka <tur@semihalf.com>
 
+commit 7ebb4479b07ff294eb4d76e420753a0349f7c93b
+Author: Ulf Samuelsson <ulf@atmel.com>
+Date:  Thu May 24 12:12:47 2007 +0200
+
+    [PATCH][NAND] Define the Vendor Id for Micron NAND Flash
+
+    Signed-off-by: Ulf Samuelsson <ulf@atmel.com>
+    Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
+    Signed-off-by: Stefan Roese <sr@denx.de>
+
 commit d756894722c888d09a9fa1df8323753772d3dcce
 Author: Stefan Roese <sr@denx.de>
 Date:  Thu May 24 09:49:00 2007 +0200
index f812431b8292f8143dd6be8daa1c75a5219ec7b5..d5249e51553dc3b0e94680e05473235ca3c8bc3a 100644 (file)
@@ -158,12 +158,12 @@ Matthias Fuchs <matthias.fuchs@esd-electronics.com>
        VOH405                  PPC405EP
        VOM405                  PPC405EP
        WUH405                  PPC405EP
-       CMS700                  PPC405EP
+       CMS700                  PPC405EP
 
 Niklaus Giger <niklaus.giger@netstal.com>
 
-        HCU4                    PPC405GPr
-        HCU5                    PPC440EPx
+       HCU4                    PPC405GPr
+       HCU5                    PPC440EPx
 
 Frank Gottschling <fgottschling@eltec.de>
 
diff --git a/MAKEALL b/MAKEALL
index 4775cfeee72f1b745f1408d7f5838bfea655f673..4467d7570b5d03f6dcfde76324d87c4041509bbb 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -358,6 +358,12 @@ LIST_74xx="                \
        ZUMA            \
 "
 
+LIST_TSEC="            \
+       ${LIST_85xx}    \
+       ${LIST_86xx}    \
+       ${LIST_83xx}    \
+"
+
 LIST_7xx="             \
        BAB7xx          \
        CPCI750         \
@@ -673,7 +679,7 @@ do
        mips|mips_el| \
        nios|nios2| \
        ppc|5xx|5xxx|512x|8xx|8220|824x|8260|83xx|85xx|86xx|4xx|7xx|74xx| \
-       x86|I486)
+       x86|I486|TSEC)
                        for target in `eval echo '$LIST_'${arg}`
                        do
                                build_target ${target}
index 92db8f494a2dc3dae5ac8fe531d168d86aeab8cc..2bb11b6f883957622d5a6ee031a9a84a9be1ab4a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1914,7 +1914,7 @@ TQM8560_config:           unconfig
 #########################################################################
 
 MPC8641HPCN_config:    unconfig
-       @$(MKCONFIG) $(@:_config=) ppc mpc86xx mpc8641hpcn
+       @$(MKCONFIG) $(@:_config=) ppc mpc86xx mpc8641hpcn freescale
 
 sbc8641d_config:       unconfig
        @./mkconfig $(@:_config=) ppc mpc86xx sbc8641d
index 4d75868ea84c86c2292e7311d25ebdd66318642d..308f752d095dc9b8c877dd4daefd592dc0177b52 100644 (file)
@@ -28,7 +28,9 @@ endif
 
 LIB    = $(obj)lib$(BOARD).a
 
-COBJS  = $(BOARD).o flash.o ../common/misc.o
+COBJS  = $(BOARD).o flash.o \
+       ../common/misc.o \
+       ../common/esd405ep_nand.o \
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
index f41eb7b22cfb0176a6317f4a08114cde555f0866..8a5b03bcedb3d35a8ac79e247028a2cb2f27dea8 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <asm/processor.h>
+#include <asm/io.h>
 #include <command.h>
 #include <malloc.h>
 
@@ -33,6 +34,7 @@
 #endif
 
 extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+extern void lxt971_no_sleep(void);
 
 /* fpga configuration data - gzip compressed and generated by bin2c */
 const unsigned char fpgadata[] =
@@ -164,17 +166,11 @@ int misc_init_r (void)
        /*
         * Reset external DUARTs
         */
-       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_DUART_RST); /* set reset to high */
+       out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_DUART_RST);
        udelay(10); /* wait 10us */
-       out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_DUART_RST); /* set reset to low */
+       out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~CFG_DUART_RST);
        udelay(1000); /* wait 1ms */
 
-       /*
-        * Set NAND-FLASH GPIO signals to default
-        */
-       out32(GPIO0_OR, in32(GPIO0_OR) & ~(CFG_NAND_CLE | CFG_NAND_ALE));
-       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);
-
        /*
         * Enable interrupts in exar duart mcr[3]
         */
@@ -218,35 +214,17 @@ long int initdram (int board_type)
        mtdcr(memcfga, mem_mb0cf);
        val = mfdcr(memcfgd);
 
-#if 0
-       printf("\nmb0cf=%x\n", val); /* test-only */
-       printf("strap=%x\n", mfdcr(strap)); /* test-only */
-#endif
-
        return (4*1024*1024 << ((val & 0x000e0000) >> 17));
 }
 
 /* ------------------------------------------------------------------------- */
 
-int testdram (void)
+void reset_phy(void)
 {
-       /* TODO: XXX XXX XXX */
-       printf ("test: 16 MB - ok\n");
-
-       return (0);
-}
-
-/* ------------------------------------------------------------------------- */
-
-#if defined(CONFIG_CMD_NAND)
-#include <linux/mtd/nand_legacy.h>
-extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
-
-void nand_init(void)
-{
-       nand_probe(CFG_NAND_BASE);
-       if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) {
-               print_size(nand_dev_desc[0].totlen, "\n");
-       }
-}
+#ifdef CONFIG_LXT971_NO_SLEEP
+       /*
+        * Disable sleep mode in LXT971
+        */
+       lxt971_no_sleep();
 #endif
+}
index df487662fd2853404c5dabebcf93802c92324818..0d4ab2d13a943da890511c0e18076da3e3a3b669 100644 (file)
@@ -33,7 +33,10 @@ CPLD    = ../common/xilinx_jtag/lenval.o \
          ../common/xilinx_jtag/micro.o \
          ../common/xilinx_jtag/ports.o
 
-COBJS  = $(BOARD).o flash.o ../common/misc.o $(CPLD)
+COBJS  = $(BOARD).o flash.o \
+       ../common/misc.o \
+       $(CPLD) \
+       ../common/esd405ep_nand.o \
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
index 635ba2fdb9c72b92dc35b30b659c9937c3bf94fd..2cdd7be360c824a9fc1fbc942077d238ea8f2ed5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2005
+ * (C) Copyright 2005-2007
  * Matthias Fuchs, esd gmbh germany, matthias.fuchs@esd-electronics.com
  *
  * See file CREDITS for list of people who contributed to this
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <asm/processor.h>
+#include <asm/io.h>
 #include <command.h>
 #include <malloc.h>
 
@@ -68,9 +69,9 @@ int board_early_init_f (void)
        /*
         * Reset CPLD via GPIO12 (CS3) pin
         */
-       out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_PLD_RESET);
+       out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~CFG_PLD_RESET);
        udelay(1000); /* wait 1ms */
-       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_PLD_RESET);
+       out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_PLD_RESET);
        udelay(1000); /* wait 1ms */
 
        return 0;
@@ -94,13 +95,7 @@ int misc_init_r (void)
        /*
         * Setup and enable EEPROM write protection
         */
-       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_EEPROM_WP);
-
-       /*
-        * Set NAND-FLASH GPIO signals to default
-        */
-       out32(GPIO0_OR, in32(GPIO0_OR) & ~(CFG_NAND_CLE | CFG_NAND_ALE));
-       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);
+       out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_EEPROM_WP);
 
        return (0);
 }
@@ -153,11 +148,6 @@ long int initdram (int board_type)
        mtdcr(memcfga, mem_mb0cf);
        val = mfdcr(memcfgd);
 
-#if 0
-       printf("\nmb0cf=%x\n", val); /* test-only */
-       printf("strap=%x\n", mfdcr(strap)); /* test-only */
-#endif
-
        return (4*1024*1024 << ((val & 0x000e0000) >> 17));
 }
 
@@ -180,17 +170,17 @@ int eeprom_write_enable (unsigned dev_addr, int state)
                switch (state) {
                case 1:
                        /* Enable write access, clear bit GPIO_SINT2. */
-                       out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_EEPROM_WP);
+                       out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~CFG_EEPROM_WP);
                        state = 0;
                        break;
                case 0:
                        /* Disable write access, set bit GPIO_SINT2. */
-                       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_EEPROM_WP);
+                       out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_EEPROM_WP);
                        state = 0;
                        break;
                default:
                        /* Read current status back. */
-                       state = (0 == (in32(GPIO0_OR) & CFG_EEPROM_WP));
+                       state = (0 == (in_be32((void *)GPIO0_OR) & CFG_EEPROM_WP));
                        break;
                }
        }
@@ -235,19 +225,6 @@ U_BOOT_CMD(eepwren,        2,      0,      do_eep_wren,
 
 /* ------------------------------------------------------------------------- */
 
-#if defined(CONFIG_CMD_NAND)
-#include <linux/mtd/nand_legacy.h>
-extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
-
-void nand_init(void)
-{
-       nand_probe(CFG_NAND_BASE);
-       if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) {
-               print_size(nand_dev_desc[0].totlen, "\n");
-       }
-}
-#endif
-
 void reset_phy(void)
 {
 #ifdef CONFIG_LXT971_NO_SLEEP
index 62f6c204340bc00c5ea2dd52ab1bfc437273561b..da147ee5508c047b930a10c9b3f1354f7479e0f0 100644 (file)
@@ -31,7 +31,9 @@
 #include <command.h>
 #include <image.h>
 #include <asm/byteorder.h>
+#if defined(CFG_NAND_LEGACY)
 #include <linux/mtd/nand_legacy.h>
+#endif
 #include <fat.h>
 #include <part.h>
 
@@ -294,6 +296,8 @@ int au_do_update(int i, long sz)
                        rc = nand_legacy_rw(nand_dev_desc, NANDRW_WRITE | NANDRW_JFFS2,
                                     start, nbytes, (size_t *)&total, (uchar *)addr);
                        debug ("nand_legacy_rw: ret=%x total=%d nbytes=%d\n", rc, total, nbytes);
+#else
+                       rc = -1;
 #endif
                }
                if (rc != 0) {
diff --git a/board/esd/common/esd405ep_nand.c b/board/esd/common/esd405ep_nand.c
new file mode 100644 (file)
index 0000000..7bf6847
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * (C) Copyright 2007
+ * Matthias Fuchs, esd gmbh germany, matthias.fuchs@esd-electronics.com
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+
+#if defined(CONFIG_CMD_NAND)
+#include <asm/io.h>
+#include <nand.h>
+
+/*
+ * hardware specific access to control-lines
+ */
+static void esd405ep_nand_hwcontrol(struct mtd_info *mtdinfo, int cmd)
+{
+       switch(cmd) {
+       case NAND_CTL_SETCLE:
+               out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_NAND_CLE);
+               break;
+       case NAND_CTL_CLRCLE:
+               out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~CFG_NAND_CLE);
+               break;
+       case NAND_CTL_SETALE:
+               out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_NAND_ALE);
+               break;
+       case NAND_CTL_CLRALE:
+               out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~CFG_NAND_ALE);
+               break;
+       case NAND_CTL_SETNCE:
+               out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~CFG_NAND_CE);
+               break;
+       case NAND_CTL_CLRNCE:
+               out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_NAND_CE);
+               break;
+       }
+}
+
+
+/*
+ * read device ready pin
+ */
+static int esd405ep_nand_device_ready(struct mtd_info *mtdinfo)
+{
+       if (in_be32((void *)GPIO0_IR) & CFG_NAND_RDY)
+               return 1;
+       return 0;
+}
+
+
+int board_nand_init(struct nand_chip *nand)
+{
+       /*
+        * Set NAND-FLASH GPIO signals to defaults
+        */
+       out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~(CFG_NAND_CLE | CFG_NAND_ALE));
+       out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_NAND_CE);
+
+       /*
+        * Initialize nand_chip structure
+        */
+       nand->hwcontrol = esd405ep_nand_hwcontrol;
+       nand->dev_ready = esd405ep_nand_device_ready;
+       nand->eccmode = NAND_ECC_SOFT;
+       nand->chip_delay = NAND_BIG_DELAY_US;
+       nand->options = NAND_SAMSUNG_LP_OPTIONS;
+       return 0;
+}
+#endif
index 17e3568941006dfa6b539e196477dee5ec0b569a..298aa6a195f6bca3fb6e216cb4296e1580354836 100644 (file)
 #define DP(x)
 #endif
 
+static char show_config_tab[][15] = {{"PCI0DLL_2     "},  /* 31 */
+                                    {"PCI0DLL_1     "},  /* 30 */
+                                    {"PCI0DLL_0     "},  /* 29 */
+                                    {"PCI1DLL_2     "},  /* 28 */
+                                    {"PCI1DLL_1     "},  /* 27 */
+                                    {"PCI1DLL_0     "},  /* 26 */
+                                    {"BbEP2En       "},  /* 25 */
+                                    {"SDRAMRdDataDel"},  /* 24 */
+                                    {"SDRAMRdDel    "},  /* 23 */
+                                    {"SDRAMSync     "},  /* 22 */
+                                    {"SDRAMPipeSel_1"},  /* 21 */
+                                    {"SDRAMPipeSel_0"},  /* 20 */
+                                    {"SDRAMAddDel   "},  /* 19 */
+                                    {"SDRAMClkSel   "},  /* 18 */
+                                    {"Reserved(1!)  "},  /* 17 */
+                                    {"PCIRty        "},  /* 16 */
+                                    {"BootCSWidth_1 "},  /* 15 */
+                                    {"BootCSWidth_0 "},  /* 14 */
+                                    {"PCI1PadsCal   "},  /* 13 */
+                                    {"PCI0PadsCal   "},  /* 12 */
+                                    {"MultiMVId_1   "},  /* 11 */
+                                    {"MultiMVId_0   "},  /* 10 */
+                                    {"MultiGTEn     "},  /* 09 */
+                                    {"Int60xArb     "},  /* 08 */
+                                    {"CPUBusConfig_1"},  /* 07 */
+                                    {"CPUBusConfig_0"},  /* 06 */
+                                    {"DefIntSpc     "},  /* 05 */
+                                    {0               },  /* 04 */
+                                    {"SROMAdd_1     "},  /* 03 */
+                                    {"SROMAdd_0     "},  /* 02 */
+                                    {"DRAMPadCal    "},  /* 01 */
+                                    {"SInitEn       "},  /* 00 */
+                                    {0               },  /* 31 */
+                                    {0               },  /* 30 */
+                                    {0               },  /* 29 */
+                                    {0               },  /* 28 */
+                                    {0               },  /* 27 */
+                                    {0               },  /* 26 */
+                                    {0               },  /* 25 */
+                                    {0               },  /* 24 */
+                                    {0               },  /* 23 */
+                                    {0               },  /* 22 */
+                                    {"JTAGCalBy     "},  /* 21 */
+                                    {"GB2Sel        "},  /* 20 */
+                                    {"GB1Sel        "},  /* 19 */
+                                    {"DRAMPLL_MDiv_5"},  /* 18 */
+                                    {"DRAMPLL_MDiv_4"},  /* 17 */
+                                    {"DRAMPLL_MDiv_3"},  /* 16 */
+                                    {"DRAMPLL_MDiv_2"},  /* 15 */
+                                    {"DRAMPLL_MDiv_1"},  /* 14 */
+                                    {"DRAMPLL_MDiv_0"},  /* 13 */
+                                    {"GB0Sel        "},  /* 12 */
+                                    {"DRAMPLLPU     "},  /* 11 */
+                                    {"DRAMPLL_HIKVCO"},  /* 10 */
+                                    {"DRAMPLLNP     "},  /* 09 */
+                                    {"DRAMPLL_NDiv_7"},  /* 08 */
+                                    {"DRAMPLL_NDiv_6"},  /* 07 */
+                                    {"CPUPadCal     "},  /* 06 */
+                                    {"DRAMPLL_NDiv_5"},  /* 05 */
+                                    {"DRAMPLL_NDiv_4"},  /* 04 */
+                                    {"DRAMPLL_NDiv_3"},  /* 03 */
+                                    {"DRAMPLL_NDiv_2"},  /* 02 */
+                                    {"DRAMPLL_NDiv_1"},  /* 01 */
+                                    {"DRAMPLL_NDiv_0"}}; /* 00 */
+
 extern void flush_data_cache (void);
 extern void invalidate_l1_instruction_cache (void);
 extern flash_info_t flash_info[];
@@ -901,21 +966,37 @@ void board_prebootm_init ()
        dcache_disable ();
 }
 
-
-int do_show_cfg(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_show_config(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 {
        unsigned int reset_sample_low;
        unsigned int reset_sample_high;
+       unsigned int l, l1, l2;
 
        GT_REG_READ(0x3c4, &reset_sample_low);
        GT_REG_READ(0x3d4, &reset_sample_high);
        printf("Reset configuration 0x%08x 0x%08x\n", reset_sample_low, reset_sample_high);
 
+       l2 = 0;
+       for (l=0; l<63; l++) {
+               if (show_config_tab[l][0] != 0) {
+                       printf("%14s:%1x ", show_config_tab[l],
+                              ((reset_sample_low >> (31 - (l & 0x1f)))) & 0x01);
+                       l2++;
+                       if ((l2 % 4) == 0)
+                               printf("\n");
+               } else {
+                       l1++;
+               }
+               if (l == 32)
+                       reset_sample_low = reset_sample_high;
+       }
+       printf("\n");
+
        return(0);
 }
 
 U_BOOT_CMD(
-       show_cfg,       1,      1,      do_show_cfg,
-       "show_cfg- Show Marvell strapping register\n",
+       show_config,    1,      1,      do_show_config,
+       "show_config - Show Marvell strapping register\n",
        "Show Marvell strapping register (ResetSampleLow ResetSampleHigh)\n"
        );
index 01b90c631dd3d51cbea969d7a017571bf0a21745..0adafe2d085ec5fb21eae76dcc784eef05bac04f 100644 (file)
@@ -43,6 +43,8 @@ int ide_preinit (void)
                ide_bus_offset[l] = -ATA_STATUS;
        }
        devbusfn = pci_find_device (0x1103, 0x0004, 0);
+       if (devbusfn == -1)
+               devbusfn = pci_find_device (0x1095, 0x3114, 0);
        if (devbusfn != -1) {
                status = 0;
 
index ce7876c414e2f38a096c8507774689f3559f3874..0e5e57a5adeecdd66a8dffd821702b97432134cf 100644 (file)
@@ -28,7 +28,10 @@ endif
 
 LIB    = $(obj)lib$(BOARD).a
 
-COBJS  = $(BOARD).o flash.o ../common/misc.o ../common/auto_update.o
+COBJS  = $(BOARD).o flash.o \
+       ../common/misc.o \
+       ../common/esd405ep_nand.o \
+       ../common/auto_update.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
index 9ef5907cdd43177d0871f41eed1059ed1ebb266e..67b5d5406dd84a0b047d1289b6fdb1141bc5ec72 100644 (file)
@@ -5,7 +5,7 @@
  * (C) Copyright 2005
  * Stefan Roese, DENX Software Engineering, sr@denx.de.
  *
- * (C) Copyright 2006
+ * (C) Copyright 2006-2007
  * Matthias Fuchs, esd GmbH, matthias.fuchs@esd-electronics.com
  *
  * See file CREDITS for list of people who contributed to this
@@ -476,12 +476,6 @@ int misc_init_r (void)
         */
        out32(GPIO0_OR, in32(GPIO0_OR) | CFG_EEPROM_WP);
 
-       /*
-        * Set NAND-FLASH GPIO signals to default
-        */
-       out32(GPIO0_OR, in32(GPIO0_OR) & ~(CFG_NAND_CLE | CFG_NAND_ALE));
-       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);
-
        /*
         * Reset touch-screen controller
         */
@@ -690,20 +684,6 @@ void ide_set_reset(int on)
 #endif /* CONFIG_IDE_RESET */
 
 
-#if defined(CONFIG_CMD_NAND)
-#include <linux/mtd/nand_legacy.h>
-extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
-
-void nand_init(void)
-{
-       nand_probe(CFG_NAND_BASE);
-       if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) {
-               print_size(nand_dev_desc[0].totlen, "\n");
-       }
-}
-#endif
-
-
 #if defined(CFG_EEPROM_WREN)
 /* Input: <dev_addr>  I2C address of EEPROM device to enable.
  *         <state>     -1: deliver current state
index 4d75868ea84c86c2292e7311d25ebdd66318642d..308f752d095dc9b8c877dd4daefd592dc0177b52 100644 (file)
@@ -28,7 +28,9 @@ endif
 
 LIB    = $(obj)lib$(BOARD).a
 
-COBJS  = $(BOARD).o flash.o ../common/misc.o
+COBJS  = $(BOARD).o flash.o \
+       ../common/misc.o \
+       ../common/esd405ep_nand.o \
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
index dd3706e1a86ed064413843b38630e8f1c37e6b78..25c8068fdecc8824b01ffd8f85ef3b5ef37fcbf6 100644 (file)
@@ -152,12 +152,6 @@ int misc_init_r (void)
 
        out32(GPIO0_OR, val);
 
-       /*
-        * Set NAND-FLASH GPIO signals to default
-        */
-       out32(GPIO0_OR, in32(GPIO0_OR) & ~(CFG_NAND_CLE | CFG_NAND_ALE));
-       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);
-
        /*
         * check board type and setup AP power
         */
@@ -242,33 +236,5 @@ long int initdram (int board_type)
        mtdcr(memcfga, mem_mb0cf);
        val = mfdcr(memcfgd);
 
-#if 0
-       printf("\nmb0cf=%x\n", val); /* test-only */
-       printf("strap=%x\n", mfdcr(strap)); /* test-only */
-#endif
-
        return (4*1024*1024 << ((val & 0x000e0000) >> 17));
 }
-
-
-int testdram (void)
-{
-       /* TODO: XXX XXX XXX */
-       printf ("test: 16 MB - ok\n");
-
-       return (0);
-}
-
-
-#if defined(CONFIG_CMD_NAND)
-#include <linux/mtd/nand_legacy.h>
-extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
-
-void nand_init(void)
-{
-       nand_probe(CFG_NAND_BASE);
-       if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) {
-               print_size(nand_dev_desc[0].totlen, "\n");
-       }
-}
-#endif
index ce7876c414e2f38a096c8507774689f3559f3874..0e5e57a5adeecdd66a8dffd821702b97432134cf 100644 (file)
@@ -28,7 +28,10 @@ endif
 
 LIB    = $(obj)lib$(BOARD).a
 
-COBJS  = $(BOARD).o flash.o ../common/misc.o ../common/auto_update.o
+COBJS  = $(BOARD).o flash.o \
+       ../common/misc.o \
+       ../common/esd405ep_nand.o \
+       ../common/auto_update.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
index 920f7178aec384dec0cf1821b82e5e24018ced5a..f026a7ac3b22d13b7664e901d9f9c753e42ea9a7 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <asm/processor.h>
+#include <asm/io.h>
 #include <command.h>
 #include <malloc.h>
 
@@ -31,6 +32,8 @@
 #define FPGA_DEBUG
 #endif
 
+DECLARE_GLOBAL_DATA_PTR;
+
 extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 extern void lxt971_no_sleep(void);
 
@@ -114,6 +117,10 @@ int misc_init_r (void)
        int index;
        int i;
 
+       /* adjust flash start and offset */
+       gd->bd->bi_flashstart = 0 - gd->bd->bi_flashsize;
+       gd->bd->bi_flashoffset = 0;
+
        dst = malloc(CFG_FPGA_MAX_SIZE);
        if (gunzip (dst, CFG_FPGA_MAX_SIZE, (uchar *)fpgadata, &len) != 0) {
                printf ("GUNZIP ERROR - must RESET board to recover\n");
@@ -177,17 +184,11 @@ int misc_init_r (void)
        /*
         * Reset external DUARTs
         */
-       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_DUART_RST); /* set reset to high */
+       out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_DUART_RST);
        udelay(10); /* wait 10us */
-       out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_DUART_RST); /* set reset to low */
+       out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) & ~CFG_DUART_RST);
        udelay(1000); /* wait 1ms */
 
-       /*
-        * Set NAND-FLASH GPIO signals to default
-        */
-       out32(GPIO0_OR, in32(GPIO0_OR) & ~(CFG_NAND_CLE | CFG_NAND_ALE));
-       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);
-
        /*
         * Enable interrupts in exar duart mcr[3]
         */
@@ -226,24 +227,10 @@ long int initdram (int board_type)
        mtdcr(memcfga, mem_mb0cf);
        val = mfdcr(memcfgd);
 
-#if 0
-       printf("\nmb0cf=%x\n", val); /* test-only */
-       printf("strap=%x\n", mfdcr(strap)); /* test-only */
-#endif
-
        return (4*1024*1024 << ((val & 0x000e0000) >> 17));
 }
 
 
-int testdram (void)
-{
-       /* TODO: XXX XXX XXX */
-       printf ("test: 16 MB - ok\n");
-
-       return (0);
-}
-
-
 #ifdef CONFIG_IDE_RESET
 void ide_set_reset(int on)
 {
@@ -262,31 +249,6 @@ void ide_set_reset(int on)
 #endif /* CONFIG_IDE_RESET */
 
 
-#if defined(CONFIG_CMD_NAND)
-#include <linux/mtd/nand_legacy.h>
-extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
-
-void nand_init(void)
-{
-       nand_probe(CFG_NAND_BASE);
-       if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) {
-               print_size(nand_dev_desc[0].totlen, "\n");
-       }
-}
-#endif
-
-
-#ifdef CONFIG_AUTO_UPDATE_SHOW
-void board_auto_update_show(int au_active)
-{
-       if (au_active) {
-               printf("\n Dies ist die board-funktion: Updating!!!\n");
-       } else {
-               printf("\n Dies ist die board-funktion: Updating done!!!\n");
-       }
-}
-#endif
-
 void reset_phy(void)
 {
 #ifdef CONFIG_LXT971_NO_SLEEP
index 4d75868ea84c86c2292e7311d25ebdd66318642d..308f752d095dc9b8c877dd4daefd592dc0177b52 100644 (file)
@@ -28,7 +28,9 @@ endif
 
 LIB    = $(obj)lib$(BOARD).a
 
-COBJS  = $(BOARD).o flash.o ../common/misc.o
+COBJS  = $(BOARD).o flash.o \
+       ../common/misc.o \
+       ../common/esd405ep_nand.o \
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
index 3e118e7655550f993f7bd8b5b85b66bb294696aa..2857a0bef5ede64a9050afae9d15ba8514161571 100644 (file)
@@ -194,12 +194,6 @@ int misc_init_r (void)
        out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_DUART_RST); /* set reset to low */
        udelay(1000); /* wait 1ms */
 
-       /*
-        * Set NAND-FLASH GPIO signals to default
-        */
-       out32(GPIO0_OR, in32(GPIO0_OR) & ~(CFG_NAND_CLE | CFG_NAND_ALE));
-       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);
-
        /*
         * Enable interrupts in exar duart mcr[3]
         */
@@ -340,17 +334,3 @@ void ide_set_reset(int on)
        }
 }
 #endif /* CONFIG_IDE_RESET */
-
-
-#if defined(CONFIG_CMD_NAND)
-#include <linux/mtd/nand_legacy.h>
-extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
-
-void nand_init(void)
-{
-       nand_probe(CFG_NAND_BASE);
-       if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) {
-               print_size(nand_dev_desc[0].totlen, "\n");
-       }
-}
-#endif
index 4d75868ea84c86c2292e7311d25ebdd66318642d..308f752d095dc9b8c877dd4daefd592dc0177b52 100644 (file)
@@ -28,7 +28,9 @@ endif
 
 LIB    = $(obj)lib$(BOARD).a
 
-COBJS  = $(BOARD).o flash.o ../common/misc.o
+COBJS  = $(BOARD).o flash.o \
+       ../common/misc.o \
+       ../common/esd405ep_nand.o \
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
index 61d1d6c0ce66ab868355261b3d99975e000b025b..dba3ce88840e2f629955a1fd069e48c17eb426b1 100644 (file)
@@ -169,12 +169,6 @@ int misc_init_r (void)
        out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_DUART_RST); /* set reset to low */
        udelay(1000); /* wait 1ms */
 
-       /*
-        * Set NAND-FLASH GPIO signals to default
-        */
-       out32(GPIO0_OR, in32(GPIO0_OR) & ~(CFG_NAND_CLE | CFG_NAND_ALE));
-       out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);
-
        /*
         * Enable interrupts in exar duart mcr[3]
         */
@@ -218,35 +212,5 @@ long int initdram (int board_type)
        mtdcr(memcfga, mem_mb0cf);
        val = mfdcr(memcfgd);
 
-#if 0
-       printf("\nmb0cf=%x\n", val); /* test-only */
-       printf("strap=%x\n", mfdcr(strap)); /* test-only */
-#endif
-
        return (4*1024*1024 << ((val & 0x000e0000) >> 17));
 }
-
-/* ------------------------------------------------------------------------- */
-
-int testdram (void)
-{
-       /* TODO: XXX XXX XXX */
-       printf ("test: 16 MB - ok\n");
-
-       return (0);
-}
-
-/* ------------------------------------------------------------------------- */
-
-#if defined(CONFIG_CMD_NAND)
-#include <linux/mtd/nand_legacy.h>
-extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
-
-void nand_init(void)
-{
-       nand_probe(CFG_NAND_BASE);
-       if (nand_dev_desc[0].ChipID != NAND_ChipID_UNKNOWN) {
-               print_size(nand_dev_desc[0].totlen, "\n");
-       }
-}
-#endif
index c6f7ccde077411b0f4dcb977b242d0b9903ba073..a7fe2e9019ce6316ba047771ac7469b356bcce16 100644 (file)
 #undef CONFIG_BOOTARGS
 
 #undef CONFIG_WATCHDOG                 /* watchdog disabled            */
+
+#if !defined(CONFIG_MPC885ADS)
 #define CONFIG_BZIP2    /* include support for bzip2 compressed images */
+#endif
 
 /*
  * New MPC86xADS and MPC885ADS provide two Ethernet connectivity options:
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
new file mode 100644 (file)
index 0000000..7bc663b
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * Copyright 2006 Freescale Semiconductor
+ * York Sun (yorksun@freescale.com)
+ * Haiying Wang (haiying.wang@freescale.com)
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <command.h>
+#include <i2c.h>
+#include <linux/ctype.h>
+
+#ifdef CFG_ID_EEPROM
+typedef struct {
+       unsigned char id[4];            /* 0x0000 - 0x0003 */
+       unsigned char sn[12];           /* 0x0004 - 0x000F */
+       unsigned char errata[5];        /* 0x0010 - 0x0014 */
+       unsigned char date[7];          /* 0x0015 - 0x001a */
+       unsigned char res_1[37];        /* 0x001b - 0x003f */
+       unsigned char tab_size;         /* 0x0040 */
+       unsigned char tab_flag;         /* 0x0041 */
+       unsigned char mac[8][6];        /* 0x0042 - 0x0071 */
+       unsigned char res_2[126];       /* 0x0072 - 0x00ef */
+       unsigned int crc;               /* 0x00f0 - 0x00f3 crc32 checksum */
+} EEPROM_data;
+
+static EEPROM_data mac_data;
+
+int mac_show(void)
+{
+       int i;
+       unsigned char ethaddr[8][18];
+
+       printf("ID %c%c%c%c\n",
+              mac_data.id[0],
+              mac_data.id[1],
+              mac_data.id[2],
+              mac_data.id[3]);
+       printf("Errata %c%c%c%c%c\n",
+              mac_data.errata[0],
+              mac_data.errata[1],
+              mac_data.errata[2],
+              mac_data.errata[3],
+              mac_data.errata[4]);
+       printf("Date %c%c%c%c%c%c%c\n",
+              mac_data.date[0],
+              mac_data.date[1],
+              mac_data.date[2],
+              mac_data.date[3],
+              mac_data.date[4],
+              mac_data.date[5],
+              mac_data.date[6]);
+       for (i = 0; i < 8; i++) {
+               sprintf((char *)ethaddr[i],
+                       "%02x:%02x:%02x:%02x:%02x:%02x",
+                       mac_data.mac[i][0],
+                       mac_data.mac[i][1],
+                       mac_data.mac[i][2],
+                       mac_data.mac[i][3],
+                       mac_data.mac[i][4],
+                       mac_data.mac[i][5]);
+               printf("MAC %d %s\n", i, ethaddr[i]);
+       }
+
+       setenv("ethaddr",  (char *)ethaddr[0]);
+       setenv("eth1addr", (char *)ethaddr[1]);
+       setenv("eth2addr", (char *)ethaddr[2]);
+       setenv("eth3addr", (char *)ethaddr[3]);
+
+       return 0;
+}
+
+int mac_read(void)
+{
+       int ret, length;
+       unsigned int crc = 0;
+       unsigned char dev = ID_EEPROM_ADDR, *data;
+
+       length = sizeof(EEPROM_data);
+       ret = i2c_read(dev, 0, 1, (unsigned char *)(&mac_data), length);
+       if (ret) {
+               printf("Read failed.\n");
+               return -1;
+       }
+
+       data = (unsigned char *)(&mac_data);
+       printf("Check CRC on reading ...");
+       crc = crc32(crc, data, length - 4);
+       if (crc != mac_data.crc) {
+               printf("CRC checksum is invalid, in EEPROM CRC is %x, calculated CRC is %x\n",
+                    mac_data.crc, crc);
+               return -1;
+       } else {
+               printf("CRC OK\n");
+               mac_show();
+       }
+       return 0;
+}
+
+int mac_prog(void)
+{
+       int ret, i, length;
+       unsigned int crc = 0;
+       unsigned char dev = ID_EEPROM_ADDR, *ptr;
+       unsigned char *eeprom_data = (unsigned char *)(&mac_data);
+
+       for (i = 0; i < sizeof(mac_data.res_1); i++)
+               mac_data.res_1[i] = 0;
+       for (i = 0; i < sizeof(mac_data.res_2); i++)
+               mac_data.res_2[i] = 0;
+       length = sizeof(EEPROM_data);
+       crc = crc32(crc, eeprom_data, length - 4);
+       mac_data.crc = crc;
+       for (i = 0, ptr = eeprom_data; i < length; i += 8, ptr += 8) {
+               ret =
+                   i2c_write(dev, i, 1, ptr,
+                             (length - i) < 8 ? (length - i) : 8);
+               udelay(5000);   /* 5ms write cycle timing */
+               if (ret)
+                       break;
+       }
+       if (ret) {
+               printf("Programming failed.\n");
+               return -1;
+       } else {
+               printf("Programming %d bytes. Reading back ...\n", length);
+               mac_read();
+       }
+       return 0;
+}
+
+int do_mac(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+{
+       int i;
+       char cmd = 's';
+       unsigned long long mac_val;
+
+       if (i2c_probe(ID_EEPROM_ADDR) != 0)
+               return -1;
+
+       if (argc > 1) {
+               cmd = argv[1][0];
+               switch (cmd) {
+               case 'r':       /* display */
+                       mac_read();
+                       break;
+               case 's':       /* save */
+                       mac_prog();
+                       break;
+               case 'i':       /* id */
+                       for (i = 0; i < 4; i++) {
+                               mac_data.id[i] = argv[2][i];
+                       }
+                       break;
+               case 'n':       /* serial number */
+                       for (i = 0; i < 12; i++) {
+                               mac_data.sn[i] = argv[2][i];
+                       }
+                       break;
+               case 'e':       /* errata */
+                       for (i = 0; i < 5; i++) {
+                               mac_data.errata[i] = argv[2][i];
+                       }
+                       break;
+               case 'd':       /* date */
+                       for (i = 0; i < 7; i++) {
+                               mac_data.date[i] = argv[2][i];
+                       }
+                       break;
+               case 'p':       /* number of ports */
+                       mac_data.tab_size =
+                           (unsigned char)simple_strtoul(argv[2], NULL, 16);
+                       break;
+               case '0':       /* mac 0 */
+               case '1':       /* mac 1 */
+               case '2':       /* mac 2 */
+               case '3':       /* mac 3 */
+               case '4':       /* mac 4 */
+               case '5':       /* mac 5 */
+               case '6':       /* mac 6 */
+               case '7':       /* mac 7 */
+                       mac_val = simple_strtoull(argv[2], NULL, 16);
+                       for (i = 0; i < 6; i++) {
+                               mac_data.mac[cmd - '0'][i] =
+                                   *((unsigned char *)
+                                     (((unsigned int)(&mac_val)) + i + 2));
+                       }
+                       break;
+               case 'h':       /* help */
+               default:
+                       printf("Usage:\n%s\n", cmdtp->usage);
+                       break;
+               }
+       } else {
+               mac_show();
+       }
+       return 0;
+}
+
+int mac_read_from_eeprom(void)
+{
+       int length, i;
+       unsigned char dev = ID_EEPROM_ADDR;
+       unsigned char *data;
+       unsigned char ethaddr[4][18];
+       unsigned char enetvar[32];
+       unsigned int crc = 0;
+
+       length = sizeof(EEPROM_data);
+       if (i2c_read(dev, 0, 1, (unsigned char *)(&mac_data), length)) {
+               printf("Read failed.\n");
+               return -1;
+       }
+
+       data = (unsigned char *)(&mac_data);
+       crc = crc32(crc, data, length - 4);
+       if (crc != mac_data.crc) {
+               return -1;
+       } else {
+               for (i = 0; i < 4; i++) {
+                       if (memcmp(&mac_data.mac[i], "\0\0\0\0\0\0", 6)) {
+                               sprintf((char *)ethaddr[i],
+                                       "%02x:%02x:%02x:%02x:%02x:%02x",
+                                       mac_data.mac[i][0],
+                                       mac_data.mac[i][1],
+                                       mac_data.mac[i][2],
+                                       mac_data.mac[i][3],
+                                       mac_data.mac[i][4],
+                                       mac_data.mac[i][5]);
+                               sprintf((char *)enetvar,
+                                       i ? "eth%daddr" : "ethaddr",
+                                       i);
+                               setenv((char *)enetvar, (char *)ethaddr[i]);
+                       }
+               }
+       }
+       return 0;
+}
+#endif /* CFG_ID_EEPROM */
diff --git a/board/freescale/mpc8641hpcn/Makefile b/board/freescale/mpc8641hpcn/Makefile
new file mode 100644 (file)
index 0000000..93b015d
--- /dev/null
@@ -0,0 +1,59 @@
+#
+# (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
+
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+endif
+
+LIB    = $(obj)lib$(BOARD).a
+
+COBJS  := $(BOARD).o \
+               ../common/sys_eeprom.o \
+               ../common/pixis.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)
+
+.PHONY: distclean
+distclean:     clean
+       rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude ($obj).depend
+
+#########################################################################
diff --git a/board/freescale/mpc8641hpcn/config.mk b/board/freescale/mpc8641hpcn/config.mk
new file mode 100644 (file)
index 0000000..f778dcb
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright 2004 Freescale Semiconductor.
+# Modified by Jeff Brown
+#
+# 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
+#
+
+#
+# mpc8641hpcn board
+# default CCSRBAR is at 0xff700000
+# assume U-Boot is less than 0.5MB
+#
+TEXT_BASE = 0xfff00000
+
+PLATFORM_CPPFLAGS += -DCONFIG_MPC86xx=1
+PLATFORM_CPPFLAGS += -DCONFIG_MPC8641=1 -maltivec -mabi=altivec -msoft-float
diff --git a/board/freescale/mpc8641hpcn/init.S b/board/freescale/mpc8641hpcn/init.S
new file mode 100644 (file)
index 0000000..cb21ba6
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * Copyright 2004 Freescale Semiconductor.
+ * Jeff Brown
+ * Srikanth Srinivasan (srikanth.srinivasan@freescale.com)
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <ppc_asm.tmpl>
+#include <ppc_defs.h>
+#include <asm/cache.h>
+#include <asm/mmu.h>
+#include <config.h>
+#include <mpc86xx.h>
+
+/*
+ * 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
+ * 0xc000_0000     0xdfff_ffff     RapidIO                 512M
+ * 0xe200_0000     0xe2ff_ffff     PCI1 IO                 16M
+ * 0xe300_0000     0xe3ff_ffff     PCI2 IO                 16M
+ * 0xf800_0000     0xf80f_ffff     CCSRBAR                 1M
+ * 0xf810_0000     0xf81f_ffff     PIXIS                   1M
+ * 0xfe00_0000     0xffff_ffff     FLASH (boot bank)       32M
+ *
+ * Notes:
+ *    CCSRBAR 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 LAWBAR1 ((CFG_DDR_SDRAM_BASE>>12) & 0xffffff)
+#define LAWAR1 (LAWAR_EN | LAWAR_TRGT_IF_DDR1 | (LAWAR_SIZE & LAWAR_SIZE_256M))
+#else
+#define LAWBAR1 0
+#define LAWAR1  ((LAWAR_TRGT_IF_DDR1 | (LAWAR_SIZE & LAWAR_SIZE_512M)) & ~LAWAR_EN)
+#endif
+
+#define LAWBAR2 ((CFG_PCI1_MEM_BASE>>12) & 0xffffff)
+#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))
+
+/*
+ * 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_PHYS>>12) & 0xffffff)
+#define LAWAR5 (LAWAR_EN | LAWAR_TRGT_IF_PCI1 | (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))
+
+#if !defined(CONFIG_SPD_EEPROM)
+#define LAWBAR8 ((CFG_DDR_SDRAM_BASE>>12) & 0xffffff)
+#define LAWAR8 (LAWAR_EN | LAWAR_TRGT_IF_DDR2 | (LAWAR_SIZE & LAWAR_SIZE_256M))
+#else
+#define LAWBAR8 0
+#define LAWAR8  ((LAWAR_TRGT_IF_DDR2 | (LAWAR_SIZE & LAWAR_SIZE_512M)) & ~LAWAR_EN)
+#endif
+
+#define LAWBAR9 ((CFG_RIO_MEM_PHYS>>12) & 0xfffff)
+#define LAWAR9  (LAWAR_EN | LAWAR_TRGT_IF_RIO | (LAWAR_SIZE & LAWAR_SIZE_512M))
+
+       .section .bootpg, "ax"
+       .globl  law_entry
+law_entry:
+       lis     r7,CFG_CCSRBAR@h
+       ori     r7,r7,CFG_CCSRBAR@l
+
+       addi    r4,r7,0
+       addi    r5,r7,0
+
+       /* Skip LAWAR0, start at LAWAR1 */
+       lis     r6,LAWBAR1@h
+       ori     r6,r6,LAWBAR1@l
+       stwu    r6, 0xc28(r4)
+
+       lis     r6,LAWAR1@h
+       ori     r6,r6,LAWAR1@l
+       stwu    r6, 0xc30(r5)
+
+       /* LAWBAR2, LAWAR2 */
+       lis     r6,LAWBAR2@h
+       ori     r6,r6,LAWBAR2@l
+       stwu    r6, 0x20(r4)
+
+       lis     r6,LAWAR2@h
+       ori     r6,r6,LAWAR2@l
+       stwu    r6, 0x20(r5)
+
+       /* LAWBAR3, LAWAR3 */
+       lis     r6,LAWBAR3@h
+       ori     r6,r6,LAWBAR3@l
+       stwu    r6, 0x20(r4)
+
+       lis     r6,LAWAR3@h
+       ori     r6,r6,LAWAR3@l
+       stwu    r6, 0x20(r5)
+
+       /* LAWBAR4, LAWAR4 */
+       lis     r6,LAWBAR4@h
+       ori     r6,r6,LAWBAR4@l
+       stwu    r6, 0x20(r4)
+
+       lis     r6,LAWAR4@h
+       ori     r6,r6,LAWAR4@l
+       stwu    r6, 0x20(r5)
+       /* LAWBAR5, LAWAR5 */
+       lis     r6,LAWBAR5@h
+       ori     r6,r6,LAWBAR5@l
+       stwu    r6, 0x20(r4)
+
+       lis     r6,LAWAR5@h
+       ori     r6,r6,LAWAR5@l
+       stwu    r6, 0x20(r5)
+
+       /* LAWBAR6, LAWAR6 */
+       lis     r6,LAWBAR6@h
+       ori     r6,r6,LAWBAR6@l
+       stwu    r6, 0x20(r4)
+
+       lis     r6,LAWAR6@h
+       ori     r6,r6,LAWAR6@l
+       stwu    r6, 0x20(r5)
+
+       /* LAWBAR7, LAWAR7 */
+       lis     r6,LAWBAR7@h
+       ori     r6,r6,LAWBAR7@l
+       stwu    r6, 0x20(r4)
+
+       lis     r6,LAWAR7@h
+       ori     r6,r6,LAWAR7@l
+       stwu    r6, 0x20(r5)
+
+       /* LAWBAR8, LAWAR8 */
+       lis     r6,LAWBAR8@h
+       ori     r6,r6,LAWBAR8@l
+       stwu    r6, 0x20(r4)
+
+       lis     r6,LAWAR8@h
+       ori     r6,r6,LAWAR8@l
+       stwu    r6, 0x20(r5)
+
+       /* LAWBAR9, LAWAR9 */
+       lis     r6,LAWBAR9@h
+       ori     r6,r6,LAWBAR9@l
+       stwu    r6, 0x20(r4)
+
+       lis     r6,LAWAR9@h
+       ori     r6,r6,LAWAR9@l
+       stwu    r6, 0x20(r5)
+
+       blr
diff --git a/board/freescale/mpc8641hpcn/mpc8641hpcn.c b/board/freescale/mpc8641hpcn/mpc8641hpcn.c
new file mode 100644 (file)
index 0000000..ffd11cb
--- /dev/null
@@ -0,0 +1,407 @@
+/*
+ * Copyright 2006, 2007 Freescale Semiconductor.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <pci.h>
+#include <asm/processor.h>
+#include <asm/immap_86xx.h>
+#include <asm/immap_fsl_pci.h>
+#include <spd.h>
+#include <asm/io.h>
+
+#if defined(CONFIG_OF_FLAT_TREE)
+#include <ft_build.h>
+extern void ft_cpu_setup(void *blob, bd_t *bd);
+#endif
+
+#include "../common/pixis.h"
+
+#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
+extern void ddr_enable_ecc(unsigned int dram_size);
+#endif
+
+#if defined(CONFIG_SPD_EEPROM)
+#include "spd_sdram.h"
+#endif
+
+void sdram_init(void);
+long int fixed_sdram(void);
+
+
+int board_early_init_f(void)
+{
+       return 0;
+}
+
+int checkboard(void)
+{
+       puts("Board: MPC8641HPCN\n");
+
+       return 0;
+}
+
+
+long int
+initdram(int board_type)
+{
+       long dram_size = 0;
+
+#if defined(CONFIG_SPD_EEPROM)
+       dram_size = spd_sdram();
+#else
+       dram_size = fixed_sdram();
+#endif
+
+#if defined(CFG_RAMBOOT)
+       puts("    DDR: ");
+       return dram_size;
+#endif
+
+#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
+       /*
+        * Initialize and enable DDR ECC.
+        */
+       ddr_enable_ecc(dram_size);
+#endif
+
+       puts("    DDR: ");
+       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;
+
+       puts("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;
+               }
+       }
+
+       puts("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;
+               }
+       }
+
+       puts("SDRAM test passed.\n");
+       return 0;
+}
+#endif
+
+
+#if !defined(CONFIG_SPD_EEPROM)
+/*
+ * Fixed sdram init -- doesn't use serial presence detect.
+ */
+long int
+fixed_sdram(void)
+{
+#if !defined(CFG_RAMBOOT)
+       volatile immap_t *immap = (immap_t *) CFG_IMMR;
+       volatile ccsr_ddr_t *ddr = &immap->im_ddr1;
+
+       ddr->cs0_bnds = CFG_DDR_CS0_BNDS;
+       ddr->cs0_config = CFG_DDR_CS0_CONFIG;
+       ddr->ext_refrec = CFG_DDR_EXT_REFRESH;
+       ddr->timing_cfg_0 = CFG_DDR_TIMING_0;
+       ddr->timing_cfg_1 = CFG_DDR_TIMING_1;
+       ddr->timing_cfg_2 = CFG_DDR_TIMING_2;
+       ddr->sdram_mode_1 = CFG_DDR_MODE_1;
+       ddr->sdram_mode_2 = CFG_DDR_MODE_2;
+       ddr->sdram_interval = CFG_DDR_INTERVAL;
+       ddr->sdram_data_init = CFG_DDR_DATA_INIT;
+       ddr->sdram_clk_cntl = CFG_DDR_CLK_CTRL;
+       ddr->sdram_ocd_cntl = CFG_DDR_OCD_CTRL;
+       ddr->sdram_ocd_status = CFG_DDR_OCD_STATUS;
+
+#if defined (CONFIG_DDR_ECC)
+       ddr->err_disable = 0x0000008D;
+       ddr->err_sbe = 0x00ff0000;
+#endif
+       asm("sync;isync");
+
+       udelay(500);
+
+#if defined (CONFIG_DDR_ECC)
+       /* Enable ECC checking */
+       ddr->sdram_cfg_1 = (CFG_DDR_CONTROL | 0x20000000);
+#else
+       ddr->sdram_cfg_1 = CFG_DDR_CONTROL;
+       ddr->sdram_cfg_2 = CFG_DDR_CONTROL2;
+#endif
+       asm("sync; isync");
+
+       udelay(500);
+#endif
+       return CFG_SDRAM_SIZE * 1024 * 1024;
+}
+#endif /* !defined(CONFIG_SPD_EEPROM) */
+
+
+#if defined(CONFIG_PCI)
+/*
+ * Initialize PCI Devices, report devices found.
+ */
+
+#ifndef CONFIG_PCI_PNP
+static struct pci_config_table pci_fsl86xxads_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 pci1_hose = {
+#ifndef CONFIG_PCI_PNP
+       config_table:pci_mpc86xxcts_config_table
+#endif
+};
+#endif /* CONFIG_PCI */
+
+#ifdef CONFIG_PCI2
+static struct pci_controller pci2_hose;
+#endif /* CONFIG_PCI2 */
+
+int first_free_busno = 0;
+
+
+void pci_init_board(void)
+{
+       volatile immap_t *immap = (immap_t *) CFG_CCSRBAR;
+       volatile ccsr_gur_t *gur = &immap->im_gur;
+       uint devdisr = gur->devdisr;
+       uint io_sel = (gur->pordevsr & MPC86xx_PORDEVSR_IO_SEL) >> 16;
+
+#ifdef CONFIG_PCI1
+{
+       volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CFG_PCI1_ADDR;
+       extern void fsl_pci_init(struct pci_controller *hose);
+       struct pci_controller *hose = &pci1_hose;
+#ifdef DEBUG
+       uint host1_agent = (gur->porbmsr & MPC86xx_PORBMSR_HA) >> 17;
+       uint pex1_agent = (host1_agent == 0) || (host1_agent == 1);
+#endif
+       if ((io_sel == 2 || io_sel == 3 || io_sel == 5
+            || io_sel == 6 || io_sel == 7 || io_sel == 0xF)
+           && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) {
+               debug("PCI-EXPRESS 1: %s \n", pex1_agent ? "Agent" : "Host");
+               debug("0x%08x=0x%08x ", &pci->pme_msg_det, pci->pme_msg_det);
+               if (pci->pme_msg_det) {
+                       pci->pme_msg_det = 0xffffffff;
+                       debug(" with errors.  Clearing.  Now 0x%08x",
+                             pci->pme_msg_det);
+               }
+               debug("\n");
+
+               /* inbound */
+               pci_set_region(hose->regions + 0,
+                              CFG_PCI_MEMORY_BUS,
+                              CFG_PCI_MEMORY_PHYS,
+                              CFG_PCI_MEMORY_SIZE,
+                              PCI_REGION_MEM | PCI_REGION_MEMORY);
+
+               /* outbound memory */
+               pci_set_region(hose->regions + 1,
+                              CFG_PCI1_MEM_BASE,
+                              CFG_PCI1_MEM_PHYS,
+                              CFG_PCI1_MEM_SIZE,
+                              PCI_REGION_MEM);
+
+               /* outbound io */
+               pci_set_region(hose->regions + 2,
+                              CFG_PCI1_IO_BASE,
+                              CFG_PCI1_IO_PHYS,
+                              CFG_PCI1_IO_SIZE,
+                              PCI_REGION_IO);
+
+               hose->region_count = 3;
+
+               hose->first_busno=first_free_busno;
+               pci_setup_indirect(hose, (int) &pci->cfg_addr, (int) &pci->cfg_data);
+
+               fsl_pci_init(hose);
+
+               first_free_busno=hose->last_busno+1;
+               printf ("    PCI-EXPRESS 1 on bus %02x - %02x\n",
+                       hose->first_busno,hose->last_busno);
+
+               /*
+                * Activate ULI1575 legacy chip by performing a fake
+                * memory access.  Needed to make ULI RTC work.
+                */
+               in_be32((unsigned *) ((char *)(CFG_PCI1_MEM_BASE
+                                      + CFG_PCI1_MEM_SIZE - 0x1000000)));
+
+       } else {
+               puts("PCI-EXPRESS 1: Disabled\n");
+       }
+}
+#else
+       puts("PCI-EXPRESS1: Disabled\n");
+#endif /* CONFIG_PCI1 */
+
+#ifdef CONFIG_PCI2
+{
+       volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CFG_PCI2_ADDR;
+       extern void fsl_pci_init(struct pci_controller *hose);
+       struct pci_controller *hose = &pci2_hose;
+
+
+       /* inbound */
+       pci_set_region(hose->regions + 0,
+                      CFG_PCI_MEMORY_BUS,
+                      CFG_PCI_MEMORY_PHYS,
+                      CFG_PCI_MEMORY_SIZE,
+                      PCI_REGION_MEM | PCI_REGION_MEMORY);
+
+       /* outbound memory */
+       pci_set_region(hose->regions + 1,
+                      CFG_PCI2_MEM_BASE,
+                      CFG_PCI2_MEM_PHYS,
+                      CFG_PCI2_MEM_SIZE,
+                      PCI_REGION_MEM);
+
+       /* outbound io */
+       pci_set_region(hose->regions + 2,
+                      CFG_PCI2_IO_BASE,
+                      CFG_PCI2_IO_PHYS,
+                      CFG_PCI2_IO_SIZE,
+                      PCI_REGION_IO);
+
+       hose->region_count = 3;
+
+       hose->first_busno=first_free_busno;
+       pci_setup_indirect(hose, (int) &pci->cfg_addr, (int) &pci->cfg_data);
+
+       fsl_pci_init(hose);
+
+       first_free_busno=hose->last_busno+1;
+       printf ("    PCI-EXPRESS 2 on bus %02x - %02x\n",
+               hose->first_busno,hose->last_busno);
+}
+#else
+       puts("PCI-EXPRESS 2: Disabled\n");
+#endif /* CONFIG_PCI2 */
+
+}
+
+#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP)
+void
+ft_board_setup(void *blob, bd_t *bd)
+{
+       u32 *p;
+       int len;
+
+       ft_cpu_setup(blob, bd);
+
+       p = ft_get_prop(blob, "/memory/reg", &len);
+       if (p != NULL) {
+               *p++ = cpu_to_be32(bd->bi_memstart);
+               *p = cpu_to_be32(bd->bi_memsize);
+       }
+}
+#endif
+
+
+/*
+ * get_board_sys_clk
+ *      Reads the FPGA on board for CONFIG_SYS_CLK_FREQ
+ */
+
+unsigned long
+get_board_sys_clk(ulong dummy)
+{
+       u8 i, go_bit, rd_clks;
+       ulong val = 0;
+
+       go_bit = in8(PIXIS_BASE + PIXIS_VCTL);
+       go_bit &= 0x01;
+
+       rd_clks = in8(PIXIS_BASE + PIXIS_VCFGEN0);
+       rd_clks &= 0x1C;
+
+       /*
+        * Only if both go bit and the SCLK bit in VCFGEN0 are set
+        * should we be using the AUX register. Remember, we also set the
+        * GO bit to boot from the alternate bank on the on-board flash
+        */
+
+       if (go_bit) {
+               if (rd_clks == 0x1c)
+                       i = in8(PIXIS_BASE + PIXIS_AUX);
+               else
+                       i = in8(PIXIS_BASE + PIXIS_SPD);
+       } else {
+               i = in8(PIXIS_BASE + PIXIS_SPD);
+       }
+
+       i &= 0x07;
+
+       switch (i) {
+       case 0:
+               val = 33000000;
+               break;
+       case 1:
+               val = 40000000;
+               break;
+       case 2:
+               val = 50000000;
+               break;
+       case 3:
+               val = 66000000;
+               break;
+       case 4:
+               val = 83000000;
+               break;
+       case 5:
+               val = 100000000;
+               break;
+       case 6:
+               val = 134000000;
+               break;
+       case 7:
+               val = 166000000;
+               break;
+       }
+
+       return val;
+}
diff --git a/board/freescale/mpc8641hpcn/u-boot.lds b/board/freescale/mpc8641hpcn/u-boot.lds
new file mode 100644 (file)
index 0000000..fd16362
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2006, 2007 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
+ */
+
+OUTPUT_ARCH(powerpc)
+
+SECTIONS
+{
+
+  /* Read-only sections, merged into text segment: */
+  .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/mpc86xx/start.o        (.text)
+    board/freescale/mpc8641hpcn/init.o (.bootpg)
+    cpu/mpc86xx/traps.o (.text)
+    cpu/mpc86xx/interrupts.o (.text)
+    cpu/mpc86xx/cpu_init.o (.text)
+    cpu/mpc86xx/cpu.o (.text)
+    cpu/mpc86xx/speed.o (.text)
+    common/dlmalloc.o (.text)
+    lib_generic/crc32.o (.text)
+    lib_ppc/extable.o (.text)
+    lib_generic/zlib.o (.text)
+    drivers/bios_emulator/atibios.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 = .);
+}
diff --git a/board/mpc8641hpcn/Makefile b/board/mpc8641hpcn/Makefile
deleted file mode 100644 (file)
index df56b31..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# (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
-
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../freescale/common)
-endif
-
-LIB    = $(obj)lib$(BOARD).a
-
-COBJS  := $(BOARD).o sys_eeprom.o \
-               ../freescale/common/pixis.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)
-
-.PHONY: distclean
-distclean:     clean
-       rm -f $(LIB) core *.bak .depend
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude ($obj).depend
-
-#########################################################################
diff --git a/board/mpc8641hpcn/config.mk b/board/mpc8641hpcn/config.mk
deleted file mode 100644 (file)
index f778dcb..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2004 Freescale Semiconductor.
-# Modified by Jeff Brown
-#
-# 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
-#
-
-#
-# mpc8641hpcn board
-# default CCSRBAR is at 0xff700000
-# assume U-Boot is less than 0.5MB
-#
-TEXT_BASE = 0xfff00000
-
-PLATFORM_CPPFLAGS += -DCONFIG_MPC86xx=1
-PLATFORM_CPPFLAGS += -DCONFIG_MPC8641=1 -maltivec -mabi=altivec -msoft-float
diff --git a/board/mpc8641hpcn/init.S b/board/mpc8641hpcn/init.S
deleted file mode 100644 (file)
index cb21ba6..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright 2004 Freescale Semiconductor.
- * Jeff Brown
- * Srikanth Srinivasan (srikanth.srinivasan@freescale.com)
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <ppc_asm.tmpl>
-#include <ppc_defs.h>
-#include <asm/cache.h>
-#include <asm/mmu.h>
-#include <config.h>
-#include <mpc86xx.h>
-
-/*
- * 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
- * 0xc000_0000     0xdfff_ffff     RapidIO                 512M
- * 0xe200_0000     0xe2ff_ffff     PCI1 IO                 16M
- * 0xe300_0000     0xe3ff_ffff     PCI2 IO                 16M
- * 0xf800_0000     0xf80f_ffff     CCSRBAR                 1M
- * 0xf810_0000     0xf81f_ffff     PIXIS                   1M
- * 0xfe00_0000     0xffff_ffff     FLASH (boot bank)       32M
- *
- * Notes:
- *    CCSRBAR 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 LAWBAR1 ((CFG_DDR_SDRAM_BASE>>12) & 0xffffff)
-#define LAWAR1 (LAWAR_EN | LAWAR_TRGT_IF_DDR1 | (LAWAR_SIZE & LAWAR_SIZE_256M))
-#else
-#define LAWBAR1 0
-#define LAWAR1  ((LAWAR_TRGT_IF_DDR1 | (LAWAR_SIZE & LAWAR_SIZE_512M)) & ~LAWAR_EN)
-#endif
-
-#define LAWBAR2 ((CFG_PCI1_MEM_BASE>>12) & 0xffffff)
-#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))
-
-/*
- * 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_PHYS>>12) & 0xffffff)
-#define LAWAR5 (LAWAR_EN | LAWAR_TRGT_IF_PCI1 | (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))
-
-#if !defined(CONFIG_SPD_EEPROM)
-#define LAWBAR8 ((CFG_DDR_SDRAM_BASE>>12) & 0xffffff)
-#define LAWAR8 (LAWAR_EN | LAWAR_TRGT_IF_DDR2 | (LAWAR_SIZE & LAWAR_SIZE_256M))
-#else
-#define LAWBAR8 0
-#define LAWAR8  ((LAWAR_TRGT_IF_DDR2 | (LAWAR_SIZE & LAWAR_SIZE_512M)) & ~LAWAR_EN)
-#endif
-
-#define LAWBAR9 ((CFG_RIO_MEM_PHYS>>12) & 0xfffff)
-#define LAWAR9  (LAWAR_EN | LAWAR_TRGT_IF_RIO | (LAWAR_SIZE & LAWAR_SIZE_512M))
-
-       .section .bootpg, "ax"
-       .globl  law_entry
-law_entry:
-       lis     r7,CFG_CCSRBAR@h
-       ori     r7,r7,CFG_CCSRBAR@l
-
-       addi    r4,r7,0
-       addi    r5,r7,0
-
-       /* Skip LAWAR0, start at LAWAR1 */
-       lis     r6,LAWBAR1@h
-       ori     r6,r6,LAWBAR1@l
-       stwu    r6, 0xc28(r4)
-
-       lis     r6,LAWAR1@h
-       ori     r6,r6,LAWAR1@l
-       stwu    r6, 0xc30(r5)
-
-       /* LAWBAR2, LAWAR2 */
-       lis     r6,LAWBAR2@h
-       ori     r6,r6,LAWBAR2@l
-       stwu    r6, 0x20(r4)
-
-       lis     r6,LAWAR2@h
-       ori     r6,r6,LAWAR2@l
-       stwu    r6, 0x20(r5)
-
-       /* LAWBAR3, LAWAR3 */
-       lis     r6,LAWBAR3@h
-       ori     r6,r6,LAWBAR3@l
-       stwu    r6, 0x20(r4)
-
-       lis     r6,LAWAR3@h
-       ori     r6,r6,LAWAR3@l
-       stwu    r6, 0x20(r5)
-
-       /* LAWBAR4, LAWAR4 */
-       lis     r6,LAWBAR4@h
-       ori     r6,r6,LAWBAR4@l
-       stwu    r6, 0x20(r4)
-
-       lis     r6,LAWAR4@h
-       ori     r6,r6,LAWAR4@l
-       stwu    r6, 0x20(r5)
-       /* LAWBAR5, LAWAR5 */
-       lis     r6,LAWBAR5@h
-       ori     r6,r6,LAWBAR5@l
-       stwu    r6, 0x20(r4)
-
-       lis     r6,LAWAR5@h
-       ori     r6,r6,LAWAR5@l
-       stwu    r6, 0x20(r5)
-
-       /* LAWBAR6, LAWAR6 */
-       lis     r6,LAWBAR6@h
-       ori     r6,r6,LAWBAR6@l
-       stwu    r6, 0x20(r4)
-
-       lis     r6,LAWAR6@h
-       ori     r6,r6,LAWAR6@l
-       stwu    r6, 0x20(r5)
-
-       /* LAWBAR7, LAWAR7 */
-       lis     r6,LAWBAR7@h
-       ori     r6,r6,LAWBAR7@l
-       stwu    r6, 0x20(r4)
-
-       lis     r6,LAWAR7@h
-       ori     r6,r6,LAWAR7@l
-       stwu    r6, 0x20(r5)
-
-       /* LAWBAR8, LAWAR8 */
-       lis     r6,LAWBAR8@h
-       ori     r6,r6,LAWBAR8@l
-       stwu    r6, 0x20(r4)
-
-       lis     r6,LAWAR8@h
-       ori     r6,r6,LAWAR8@l
-       stwu    r6, 0x20(r5)
-
-       /* LAWBAR9, LAWAR9 */
-       lis     r6,LAWBAR9@h
-       ori     r6,r6,LAWBAR9@l
-       stwu    r6, 0x20(r4)
-
-       lis     r6,LAWAR9@h
-       ori     r6,r6,LAWAR9@l
-       stwu    r6, 0x20(r5)
-
-       blr
diff --git a/board/mpc8641hpcn/mpc8641hpcn.c b/board/mpc8641hpcn/mpc8641hpcn.c
deleted file mode 100644 (file)
index 1bfbe88..0000000
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * Copyright 2006, 2007 Freescale Semiconductor.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <common.h>
-#include <pci.h>
-#include <asm/processor.h>
-#include <asm/immap_86xx.h>
-#include <asm/immap_fsl_pci.h>
-#include <spd.h>
-#include <asm/io.h>
-
-#if defined(CONFIG_OF_FLAT_TREE)
-#include <ft_build.h>
-extern void ft_cpu_setup(void *blob, bd_t *bd);
-#endif
-
-#include "../freescale/common/pixis.h"
-
-#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
-extern void ddr_enable_ecc(unsigned int dram_size);
-#endif
-
-#if defined(CONFIG_SPD_EEPROM)
-#include "spd_sdram.h"
-#endif
-
-void sdram_init(void);
-long int fixed_sdram(void);
-
-
-int board_early_init_f(void)
-{
-       return 0;
-}
-
-int checkboard(void)
-{
-       puts("Board: MPC8641HPCN\n");
-
-       return 0;
-}
-
-
-long int
-initdram(int board_type)
-{
-       long dram_size = 0;
-
-#if defined(CONFIG_SPD_EEPROM)
-       dram_size = spd_sdram();
-#else
-       dram_size = fixed_sdram();
-#endif
-
-#if defined(CFG_RAMBOOT)
-       puts("    DDR: ");
-       return dram_size;
-#endif
-
-#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
-       /*
-        * Initialize and enable DDR ECC.
-        */
-       ddr_enable_ecc(dram_size);
-#endif
-
-       puts("    DDR: ");
-       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;
-
-       puts("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;
-               }
-       }
-
-       puts("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;
-               }
-       }
-
-       puts("SDRAM test passed.\n");
-       return 0;
-}
-#endif
-
-
-#if !defined(CONFIG_SPD_EEPROM)
-/*
- * Fixed sdram init -- doesn't use serial presence detect.
- */
-long int
-fixed_sdram(void)
-{
-#if !defined(CFG_RAMBOOT)
-       volatile immap_t *immap = (immap_t *) CFG_IMMR;
-       volatile ccsr_ddr_t *ddr = &immap->im_ddr1;
-
-       ddr->cs0_bnds = CFG_DDR_CS0_BNDS;
-       ddr->cs0_config = CFG_DDR_CS0_CONFIG;
-       ddr->ext_refrec = CFG_DDR_EXT_REFRESH;
-       ddr->timing_cfg_0 = CFG_DDR_TIMING_0;
-       ddr->timing_cfg_1 = CFG_DDR_TIMING_1;
-       ddr->timing_cfg_2 = CFG_DDR_TIMING_2;
-       ddr->sdram_mode_1 = CFG_DDR_MODE_1;
-       ddr->sdram_mode_2 = CFG_DDR_MODE_2;
-       ddr->sdram_interval = CFG_DDR_INTERVAL;
-       ddr->sdram_data_init = CFG_DDR_DATA_INIT;
-       ddr->sdram_clk_cntl = CFG_DDR_CLK_CTRL;
-       ddr->sdram_ocd_cntl = CFG_DDR_OCD_CTRL;
-       ddr->sdram_ocd_status = CFG_DDR_OCD_STATUS;
-
-#if defined (CONFIG_DDR_ECC)
-       ddr->err_disable = 0x0000008D;
-       ddr->err_sbe = 0x00ff0000;
-#endif
-       asm("sync;isync");
-
-       udelay(500);
-
-#if defined (CONFIG_DDR_ECC)
-       /* Enable ECC checking */
-       ddr->sdram_cfg_1 = (CFG_DDR_CONTROL | 0x20000000);
-#else
-       ddr->sdram_cfg_1 = CFG_DDR_CONTROL;
-       ddr->sdram_cfg_2 = CFG_DDR_CONTROL2;
-#endif
-       asm("sync; isync");
-
-       udelay(500);
-#endif
-       return CFG_SDRAM_SIZE * 1024 * 1024;
-}
-#endif /* !defined(CONFIG_SPD_EEPROM) */
-
-
-#if defined(CONFIG_PCI)
-/*
- * Initialize PCI Devices, report devices found.
- */
-
-#ifndef CONFIG_PCI_PNP
-static struct pci_config_table pci_fsl86xxads_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 pci1_hose = {
-#ifndef CONFIG_PCI_PNP
-       config_table:pci_mpc86xxcts_config_table
-#endif
-};
-#endif /* CONFIG_PCI */
-
-#ifdef CONFIG_PCI2
-static struct pci_controller pci2_hose;
-#endif /* CONFIG_PCI2 */
-
-int first_free_busno = 0;
-
-
-void pci_init_board(void)
-{
-       volatile immap_t *immap = (immap_t *) CFG_CCSRBAR;
-       volatile ccsr_gur_t *gur = &immap->im_gur;
-       uint devdisr = gur->devdisr;
-       uint io_sel = (gur->pordevsr & MPC86xx_PORDEVSR_IO_SEL) >> 16;
-
-#ifdef CONFIG_PCI1
-{
-       volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CFG_PCI1_ADDR;
-       extern void fsl_pci_init(struct pci_controller *hose);
-       struct pci_controller *hose = &pci1_hose;
-#ifdef DEBUG
-       uint host1_agent = (gur->porbmsr & MPC86xx_PORBMSR_HA) >> 17;
-       uint pex1_agent = (host1_agent == 0) || (host1_agent == 1);
-#endif
-       if ((io_sel == 2 || io_sel == 3 || io_sel == 5
-            || io_sel == 6 || io_sel == 7 || io_sel == 0xF)
-           && !(devdisr & MPC86xx_DEVDISR_PCIEX1)) {
-               debug("PCI-EXPRESS 1: %s \n", pex1_agent ? "Agent" : "Host");
-               debug("0x%08x=0x%08x ", &pci->pme_msg_det, pci->pme_msg_det);
-               if (pci->pme_msg_det) {
-                       pci->pme_msg_det = 0xffffffff;
-                       debug(" with errors.  Clearing.  Now 0x%08x",
-                             pci->pme_msg_det);
-               }
-               debug("\n");
-
-               /* inbound */
-               pci_set_region(hose->regions + 0,
-                              CFG_PCI_MEMORY_BUS,
-                              CFG_PCI_MEMORY_PHYS,
-                              CFG_PCI_MEMORY_SIZE,
-                              PCI_REGION_MEM | PCI_REGION_MEMORY);
-
-               /* outbound memory */
-               pci_set_region(hose->regions + 1,
-                              CFG_PCI1_MEM_BASE,
-                              CFG_PCI1_MEM_PHYS,
-                              CFG_PCI1_MEM_SIZE,
-                              PCI_REGION_MEM);
-
-               /* outbound io */
-               pci_set_region(hose->regions + 2,
-                              CFG_PCI1_IO_BASE,
-                              CFG_PCI1_IO_PHYS,
-                              CFG_PCI1_IO_SIZE,
-                              PCI_REGION_IO);
-
-               hose->region_count = 3;
-
-               hose->first_busno=first_free_busno;
-               pci_setup_indirect(hose, (int) &pci->cfg_addr, (int) &pci->cfg_data);
-
-               fsl_pci_init(hose);
-
-               first_free_busno=hose->last_busno+1;
-               printf ("    PCI-EXPRESS 1 on bus %02x - %02x\n",
-                       hose->first_busno,hose->last_busno);
-
-               /*
-                * Activate ULI1575 legacy chip by performing a fake
-                * memory access.  Needed to make ULI RTC work.
-                */
-               in_be32((unsigned *) ((char *)(CFG_PCI1_MEM_BASE
-                                      + CFG_PCI1_MEM_SIZE - 0x1000000)));
-
-       } else {
-               puts("PCI-EXPRESS 1: Disabled\n");
-       }
-}
-#else
-       puts("PCI-EXPRESS1: Disabled\n");
-#endif /* CONFIG_PCI1 */
-
-#ifdef CONFIG_PCI2
-{
-       volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CFG_PCI2_ADDR;
-       extern void fsl_pci_init(struct pci_controller *hose);
-       struct pci_controller *hose = &pci2_hose;
-
-
-       /* inbound */
-       pci_set_region(hose->regions + 0,
-                      CFG_PCI_MEMORY_BUS,
-                      CFG_PCI_MEMORY_PHYS,
-                      CFG_PCI_MEMORY_SIZE,
-                      PCI_REGION_MEM | PCI_REGION_MEMORY);
-
-       /* outbound memory */
-       pci_set_region(hose->regions + 1,
-                      CFG_PCI2_MEM_BASE,
-                      CFG_PCI2_MEM_PHYS,
-                      CFG_PCI2_MEM_SIZE,
-                      PCI_REGION_MEM);
-
-       /* outbound io */
-       pci_set_region(hose->regions + 2,
-                      CFG_PCI2_IO_BASE,
-                      CFG_PCI2_IO_PHYS,
-                      CFG_PCI2_IO_SIZE,
-                      PCI_REGION_IO);
-
-       hose->region_count = 3;
-
-       hose->first_busno=first_free_busno;
-       pci_setup_indirect(hose, (int) &pci->cfg_addr, (int) &pci->cfg_data);
-
-       fsl_pci_init(hose);
-
-       first_free_busno=hose->last_busno+1;
-       printf ("    PCI-EXPRESS 2 on bus %02x - %02x\n",
-               hose->first_busno,hose->last_busno);
-}
-#else
-       puts("PCI-EXPRESS 2: Disabled\n");
-#endif /* CONFIG_PCI2 */
-
-}
-
-#if defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP)
-void
-ft_board_setup(void *blob, bd_t *bd)
-{
-       u32 *p;
-       int len;
-
-       ft_cpu_setup(blob, bd);
-
-       p = ft_get_prop(blob, "/memory/reg", &len);
-       if (p != NULL) {
-               *p++ = cpu_to_be32(bd->bi_memstart);
-               *p = cpu_to_be32(bd->bi_memsize);
-       }
-}
-#endif
-
-
-/*
- * get_board_sys_clk
- *      Reads the FPGA on board for CONFIG_SYS_CLK_FREQ
- */
-
-unsigned long
-get_board_sys_clk(ulong dummy)
-{
-       u8 i, go_bit, rd_clks;
-       ulong val = 0;
-
-       go_bit = in8(PIXIS_BASE + PIXIS_VCTL);
-       go_bit &= 0x01;
-
-       rd_clks = in8(PIXIS_BASE + PIXIS_VCFGEN0);
-       rd_clks &= 0x1C;
-
-       /*
-        * Only if both go bit and the SCLK bit in VCFGEN0 are set
-        * should we be using the AUX register. Remember, we also set the
-        * GO bit to boot from the alternate bank on the on-board flash
-        */
-
-       if (go_bit) {
-               if (rd_clks == 0x1c)
-                       i = in8(PIXIS_BASE + PIXIS_AUX);
-               else
-                       i = in8(PIXIS_BASE + PIXIS_SPD);
-       } else {
-               i = in8(PIXIS_BASE + PIXIS_SPD);
-       }
-
-       i &= 0x07;
-
-       switch (i) {
-       case 0:
-               val = 33000000;
-               break;
-       case 1:
-               val = 40000000;
-               break;
-       case 2:
-               val = 50000000;
-               break;
-       case 3:
-               val = 66000000;
-               break;
-       case 4:
-               val = 83000000;
-               break;
-       case 5:
-               val = 100000000;
-               break;
-       case 6:
-               val = 134000000;
-               break;
-       case 7:
-               val = 166000000;
-               break;
-       }
-
-       return val;
-}
diff --git a/board/mpc8641hpcn/sys_eeprom.c b/board/mpc8641hpcn/sys_eeprom.c
deleted file mode 100644 (file)
index 7bc663b..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * Copyright 2006 Freescale Semiconductor
- * York Sun (yorksun@freescale.com)
- * Haiying Wang (haiying.wang@freescale.com)
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include <common.h>
-#include <command.h>
-#include <i2c.h>
-#include <linux/ctype.h>
-
-#ifdef CFG_ID_EEPROM
-typedef struct {
-       unsigned char id[4];            /* 0x0000 - 0x0003 */
-       unsigned char sn[12];           /* 0x0004 - 0x000F */
-       unsigned char errata[5];        /* 0x0010 - 0x0014 */
-       unsigned char date[7];          /* 0x0015 - 0x001a */
-       unsigned char res_1[37];        /* 0x001b - 0x003f */
-       unsigned char tab_size;         /* 0x0040 */
-       unsigned char tab_flag;         /* 0x0041 */
-       unsigned char mac[8][6];        /* 0x0042 - 0x0071 */
-       unsigned char res_2[126];       /* 0x0072 - 0x00ef */
-       unsigned int crc;               /* 0x00f0 - 0x00f3 crc32 checksum */
-} EEPROM_data;
-
-static EEPROM_data mac_data;
-
-int mac_show(void)
-{
-       int i;
-       unsigned char ethaddr[8][18];
-
-       printf("ID %c%c%c%c\n",
-              mac_data.id[0],
-              mac_data.id[1],
-              mac_data.id[2],
-              mac_data.id[3]);
-       printf("Errata %c%c%c%c%c\n",
-              mac_data.errata[0],
-              mac_data.errata[1],
-              mac_data.errata[2],
-              mac_data.errata[3],
-              mac_data.errata[4]);
-       printf("Date %c%c%c%c%c%c%c\n",
-              mac_data.date[0],
-              mac_data.date[1],
-              mac_data.date[2],
-              mac_data.date[3],
-              mac_data.date[4],
-              mac_data.date[5],
-              mac_data.date[6]);
-       for (i = 0; i < 8; i++) {
-               sprintf((char *)ethaddr[i],
-                       "%02x:%02x:%02x:%02x:%02x:%02x",
-                       mac_data.mac[i][0],
-                       mac_data.mac[i][1],
-                       mac_data.mac[i][2],
-                       mac_data.mac[i][3],
-                       mac_data.mac[i][4],
-                       mac_data.mac[i][5]);
-               printf("MAC %d %s\n", i, ethaddr[i]);
-       }
-
-       setenv("ethaddr",  (char *)ethaddr[0]);
-       setenv("eth1addr", (char *)ethaddr[1]);
-       setenv("eth2addr", (char *)ethaddr[2]);
-       setenv("eth3addr", (char *)ethaddr[3]);
-
-       return 0;
-}
-
-int mac_read(void)
-{
-       int ret, length;
-       unsigned int crc = 0;
-       unsigned char dev = ID_EEPROM_ADDR, *data;
-
-       length = sizeof(EEPROM_data);
-       ret = i2c_read(dev, 0, 1, (unsigned char *)(&mac_data), length);
-       if (ret) {
-               printf("Read failed.\n");
-               return -1;
-       }
-
-       data = (unsigned char *)(&mac_data);
-       printf("Check CRC on reading ...");
-       crc = crc32(crc, data, length - 4);
-       if (crc != mac_data.crc) {
-               printf("CRC checksum is invalid, in EEPROM CRC is %x, calculated CRC is %x\n",
-                    mac_data.crc, crc);
-               return -1;
-       } else {
-               printf("CRC OK\n");
-               mac_show();
-       }
-       return 0;
-}
-
-int mac_prog(void)
-{
-       int ret, i, length;
-       unsigned int crc = 0;
-       unsigned char dev = ID_EEPROM_ADDR, *ptr;
-       unsigned char *eeprom_data = (unsigned char *)(&mac_data);
-
-       for (i = 0; i < sizeof(mac_data.res_1); i++)
-               mac_data.res_1[i] = 0;
-       for (i = 0; i < sizeof(mac_data.res_2); i++)
-               mac_data.res_2[i] = 0;
-       length = sizeof(EEPROM_data);
-       crc = crc32(crc, eeprom_data, length - 4);
-       mac_data.crc = crc;
-       for (i = 0, ptr = eeprom_data; i < length; i += 8, ptr += 8) {
-               ret =
-                   i2c_write(dev, i, 1, ptr,
-                             (length - i) < 8 ? (length - i) : 8);
-               udelay(5000);   /* 5ms write cycle timing */
-               if (ret)
-                       break;
-       }
-       if (ret) {
-               printf("Programming failed.\n");
-               return -1;
-       } else {
-               printf("Programming %d bytes. Reading back ...\n", length);
-               mac_read();
-       }
-       return 0;
-}
-
-int do_mac(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
-{
-       int i;
-       char cmd = 's';
-       unsigned long long mac_val;
-
-       if (i2c_probe(ID_EEPROM_ADDR) != 0)
-               return -1;
-
-       if (argc > 1) {
-               cmd = argv[1][0];
-               switch (cmd) {
-               case 'r':       /* display */
-                       mac_read();
-                       break;
-               case 's':       /* save */
-                       mac_prog();
-                       break;
-               case 'i':       /* id */
-                       for (i = 0; i < 4; i++) {
-                               mac_data.id[i] = argv[2][i];
-                       }
-                       break;
-               case 'n':       /* serial number */
-                       for (i = 0; i < 12; i++) {
-                               mac_data.sn[i] = argv[2][i];
-                       }
-                       break;
-               case 'e':       /* errata */
-                       for (i = 0; i < 5; i++) {
-                               mac_data.errata[i] = argv[2][i];
-                       }
-                       break;
-               case 'd':       /* date */
-                       for (i = 0; i < 7; i++) {
-                               mac_data.date[i] = argv[2][i];
-                       }
-                       break;
-               case 'p':       /* number of ports */
-                       mac_data.tab_size =
-                           (unsigned char)simple_strtoul(argv[2], NULL, 16);
-                       break;
-               case '0':       /* mac 0 */
-               case '1':       /* mac 1 */
-               case '2':       /* mac 2 */
-               case '3':       /* mac 3 */
-               case '4':       /* mac 4 */
-               case '5':       /* mac 5 */
-               case '6':       /* mac 6 */
-               case '7':       /* mac 7 */
-                       mac_val = simple_strtoull(argv[2], NULL, 16);
-                       for (i = 0; i < 6; i++) {
-                               mac_data.mac[cmd - '0'][i] =
-                                   *((unsigned char *)
-                                     (((unsigned int)(&mac_val)) + i + 2));
-                       }
-                       break;
-               case 'h':       /* help */
-               default:
-                       printf("Usage:\n%s\n", cmdtp->usage);
-                       break;
-               }
-       } else {
-               mac_show();
-       }
-       return 0;
-}
-
-int mac_read_from_eeprom(void)
-{
-       int length, i;
-       unsigned char dev = ID_EEPROM_ADDR;
-       unsigned char *data;
-       unsigned char ethaddr[4][18];
-       unsigned char enetvar[32];
-       unsigned int crc = 0;
-
-       length = sizeof(EEPROM_data);
-       if (i2c_read(dev, 0, 1, (unsigned char *)(&mac_data), length)) {
-               printf("Read failed.\n");
-               return -1;
-       }
-
-       data = (unsigned char *)(&mac_data);
-       crc = crc32(crc, data, length - 4);
-       if (crc != mac_data.crc) {
-               return -1;
-       } else {
-               for (i = 0; i < 4; i++) {
-                       if (memcmp(&mac_data.mac[i], "\0\0\0\0\0\0", 6)) {
-                               sprintf((char *)ethaddr[i],
-                                       "%02x:%02x:%02x:%02x:%02x:%02x",
-                                       mac_data.mac[i][0],
-                                       mac_data.mac[i][1],
-                                       mac_data.mac[i][2],
-                                       mac_data.mac[i][3],
-                                       mac_data.mac[i][4],
-                                       mac_data.mac[i][5]);
-                               sprintf((char *)enetvar,
-                                       i ? "eth%daddr" : "ethaddr",
-                                       i);
-                               setenv((char *)enetvar, (char *)ethaddr[i]);
-                       }
-               }
-       }
-       return 0;
-}
-#endif /* CFG_ID_EEPROM */
diff --git a/board/mpc8641hpcn/u-boot.lds b/board/mpc8641hpcn/u-boot.lds
deleted file mode 100644 (file)
index 5864464..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright 2006, 2007 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
- */
-
-OUTPUT_ARCH(powerpc)
-
-SECTIONS
-{
-
-  /* Read-only sections, merged into text segment: */
-  .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/mpc86xx/start.o        (.text)
-    board/mpc8641hpcn/init.o (.bootpg)
-    cpu/mpc86xx/traps.o (.text)
-    cpu/mpc86xx/interrupts.o (.text)
-    cpu/mpc86xx/cpu_init.o (.text)
-    cpu/mpc86xx/cpu.o (.text)
-    cpu/mpc86xx/speed.o (.text)
-    common/dlmalloc.o (.text)
-    lib_generic/crc32.o (.text)
-    lib_ppc/extable.o (.text)
-    lib_generic/zlib.o (.text)
-    drivers/bios_emulator/atibios.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 8249dceb4e3325b65d116da064c389c66f4c5d3e..bcb927fd1055d61fe4e68f462b1ee43697aec6db 100644 (file)
@@ -924,16 +924,17 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
                initrd_end = 0;
        }
 
+#if defined(CONFIG_OF_LIBFDT)
+
 #ifdef CFG_BOOTMAPSZ
        /*
         * The blob must be within CFG_BOOTMAPSZ,
-        * so we flag it to be copied if it is
+        * so we flag it to be copied if it is not.
         */
        if (of_flat_tree >= (char *)CFG_BOOTMAPSZ)
-               of_data = of_flat_tree;
+               of_data = (ulong)of_flat_tree;
 #endif
 
-#if defined(CONFIG_OF_LIBFDT)
        /* move of_flat_tree if needed */
        if (of_data) {
                int err;
@@ -986,6 +987,15 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
 #endif
 #endif /* CONFIG_OF_LIBFDT */
 #if defined(CONFIG_OF_FLAT_TREE)
+#ifdef CFG_BOOTMAPSZ
+       /*
+        * The blob must be within CFG_BOOTMAPSZ,
+        * so we flag it to be copied if it is not.
+        */
+       if (of_flat_tree >= (char *)CFG_BOOTMAPSZ)
+               of_data = (ulong)of_flat_tree;
+#endif
+
        /* move of_flat_tree if needed */
        if (of_data) {
                ulong of_start, of_len;
index c72612d0d6f3c828271d48ab5b4a053cb121576f..254a7755fcf440ad93d35653e6678e1bf6038da2 100644 (file)
@@ -468,14 +468,31 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand,
                           ulong offset, ulong addr, char *cmd)
 {
        int r;
-       char *ep;
+       char *ep, *s;
        ulong cnt;
        image_header_t *hdr;
+       int jffs2 = 0;
+
+       s = strchr(cmd, '.');
+       if (s != NULL &&
+           (!strcmp(s, ".jffs2") || !strcmp(s, ".e") || !strcmp(s, ".i")))
+               jffs2 = 1;
 
        printf("\nLoading from %s, offset 0x%lx\n", nand->name, offset);
 
        cnt = nand->oobblock;
-       r = nand_read(nand, offset, &cnt, (u_char *) addr);
+       if (jffs2) {
+               nand_read_options_t opts;
+               memset(&opts, 0, sizeof(opts));
+               opts.buffer     = (u_char*) addr;
+               opts.length     = cnt;
+               opts.offset     = offset;
+               opts.quiet      = 1;
+               r = nand_read_opts(nand, &opts);
+       } else {
+               r = nand_read(nand, offset, &cnt, (u_char *) addr);
+       }
+
        if (r) {
                puts("** Read error\n");
                show_boot_progress (-56);
@@ -495,8 +512,18 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand,
        print_image_hdr(hdr);
 
        cnt = (ntohl(hdr->ih_size) + sizeof (image_header_t));
+       if (jffs2) {
+               nand_read_options_t opts;
+               memset(&opts, 0, sizeof(opts));
+               opts.buffer     = (u_char*) addr;
+               opts.length     = cnt;
+               opts.offset     = offset;
+               opts.quiet      = 1;
+               r = nand_read_opts(nand, &opts);
+       } else {
+               r = nand_read(nand, offset, &cnt, (u_char *) addr);
+       }
 
-       r = nand_read(nand, offset, &cnt, (u_char *) addr);
        if (r) {
                puts("** Read error\n");
                show_boot_progress (-58);
@@ -545,7 +572,7 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                        if (argc > 3)
                                goto usage;
                        if (argc == 3)
-                               addr = simple_strtoul(argv[2], NULL, 16);
+                               addr = simple_strtoul(argv[1], NULL, 16);
                        else
                                addr = CFG_LOAD_ADDR;
                        return nand_load_image(cmdtp, &nand_info[dev->id->num],
@@ -604,7 +631,7 @@ usage:
 
 U_BOOT_CMD(nboot, 4, 1, do_nandboot,
        "nboot   - boot from NAND device\n",
-       "[partition] | [[[loadAddr] dev] offset]\n");
+       "[.jffs2] [partition] | [[[loadAddr] dev] offset]\n");
 
 #endif
 
index caaa682a4f3a0e09d4d8a50e91088446468aa319..175d59eb99432ccb36078a766043c0722eb9c2ec 100644 (file)
@@ -46,7 +46,6 @@ struct fdt_header *fdt;
 
 int fdt_chosen(void *fdt, ulong initrd_start, ulong initrd_end, int force)
 {
-       bd_t *bd = gd->bd;
        int   nodeoffset;
        int   err;
        u32   tmp;              /* used to set 32 bit integer properties */
index 4c4bc8d7ba18ee3c5dc1bac212a377e843a0f07d..8f1d8b29d59d3bd35f076ef5f194f0f88d27f6e2 100644 (file)
 *
 ****************************************************************************/
 
-#include "biosemui.h"
+#include <common.h>
 
 #if defined(CONFIG_BIOSEMU)
+
+#include "biosemui.h"
+
 /*------------------------- Global Variables ------------------------------*/
 
 #ifndef __i386__
index 7aa1bfb2eb60e639b57758f0fee3cf39151451d3..70e9ce143b41c4f19a9ca010c56995529452cf79 100644 (file)
 *
 ****************************************************************************/
 
-#include "biosemui.h"
+#include <common.h>
 
 #if defined(CONFIG_BIOSEMU)
+
+#include "biosemui.h"
+
 /*----------------------------- Implementation ----------------------------*/
 
 /****************************************************************************
index 4c3aedf4130796f5f166e2fb6d21f212e67159ea..ccfc872f788bf84fbd2fa3d043befd8e5bf1b675 100644 (file)
 *
 ****************************************************************************/
 
-#include "biosemui.h"
 #include <malloc.h>
+#include <common.h>
 
 #if defined(CONFIG_BIOSEMU)
 
+#include "biosemui.h"
+
 BE_sysEnv _BE_env = {{0}};
 static X86EMU_memFuncs _BE_mem __attribute__((section(".got2"))) = {
        BE_rdb,
index 915739c5b03f8cad664ff123233c0769360accff..5cbcc950183ce3c83c77058b95f830fdcd1a084f 100644 (file)
 *
 ****************************************************************************/
 
-#include "x86emu/x86emui.h"
 #include <stdarg.h>
+#include <common.h>
 
 #if defined(CONFIG_BIOSEMU)
 
+#include "x86emu/x86emui.h"
+
 /*----------------------------- Implementation ----------------------------*/
 
 #ifdef DEBUG
index 879f0a06d17367a7611f5ce6dc1086e36ad1abbb..7a9a1ddbff9a55f36e422e0b326b6ac0623ad3b6 100644 (file)
 *              instruction decoding and accessess of immediate data via IP.  etc.
 *
 ****************************************************************************/
-
-#include "x86emu/x86emui.h"
+#include <common.h>
 
 #if defined(CONFIG_BIOSEMU)
 
+#include "x86emu/x86emui.h"
+
 /*----------------------------- Implementation ----------------------------*/
 
 /****************************************************************************
index d334fb5b1cf311bd2b7922c2682aac03c03fd50b..a77bd9b49243ebc81341eb6732137660793f79ec 100644 (file)
 *
 ****************************************************************************/
 
-#include "x86emu/x86emui.h"
+#include <common.h>
 
 #if defined(CONFIG_BIOSEMU)
 
+#include "x86emu/x86emui.h"
+
 /*----------------------------- Implementation ----------------------------*/
 
 /* constant arrays to do several instructions in just one function */
index 81c0d49a33397d116da4c5dcd19684446741d6fa..d6a210c97364cc4b5ec7242d8e07d01b6e0db568 100644 (file)
 *
 ****************************************************************************/
 
-#include "x86emu/x86emui.h"
+#include <common.h>
 
 #if defined(CONFIG_BIOSEMU)
 
+#include "x86emu/x86emui.h"
+
 /*----------------------------- Implementation ----------------------------*/
 
 /****************************************************************************
index c1152eae341d823f8ce8a1242364f9b21a5079b7..2a254a4e67139c645acee49550f82ce485cb2cdd 100644 (file)
 *
 ****************************************************************************/
 
+#include <common.h>
+
 #define PRIM_OPS_NO_REDEFINE_ASM
-#include "x86emu/x86emui.h"
 
 #if defined(CONFIG_BIOSEMU)
 
+#include "x86emu/x86emui.h"
+
 /*------------------------- Global Variables ------------------------------*/
 
 static u32 x86emu_parity_tab[8] =
index 566389f5862063a51da2e3cd89aa711c13f97033..dd44ff1e738436a74ec9487388dce13e7a83bd0f 100644 (file)
 *
 ****************************************************************************/
 
-#include "x86emu/x86emui.h"
+#include <common.h>
 
 #if defined(CONFIG_BIOSEMU)
 
+#include "x86emu/x86emui.h"
+
 /*------------------------- Global Variables ------------------------------*/
 
 X86EMU_sysEnv _X86EMU_env;     /* Global emulator machine state */
index 075cae66b06eced8ad0ceace2c77c6a4e56080f8..6d7e347fba747124a462edd19866690dbdcece00 100644 (file)
@@ -123,6 +123,7 @@ struct nand_manufacturers nand_manuf_ids[] = {
        {NAND_MFR_NATIONAL, "National"},
        {NAND_MFR_RENESAS, "Renesas"},
        {NAND_MFR_STMICRO, "ST Micro"},
+       {NAND_MFR_MICRON, "Micron"},
        {0x0, "Unknown"}
 };
 #endif
index 89a72798232e87ad6f8c7f6faef531152fe8b4f4..dc2765bb09e6c6e981433f5fd0f6a5c43cc8e450 100644 (file)
@@ -1110,7 +1110,7 @@ static int uec_init(struct eth_device* dev, bd_t *bd)
                if (dev->enetaddr[0] & 0x01) {
                        printf("%s: MacAddress is multcast address\n",
                                 __FUNCTION__);
-                       return -EINVAL;
+                       return 0;
                }
                uec_set_mac_address(uec, dev->enetaddr);
                uec->the_first_run = 1;
@@ -1119,10 +1119,10 @@ static int uec_init(struct eth_device* dev, bd_t *bd)
        err = uec_open(uec, COMM_DIR_RX_AND_TX);
        if (err) {
                printf("%s: cannot enable UEC device\n", dev->name);
-               return err;
+               return 0;
        }
 
-       return 0;
+       return uec->mii_info->link;
 }
 
 static void uec_halt(struct eth_device* dev)
index fd21ed4edc401a2e86504c1a9b3579e676ce26c7..6bca4dc0f333a7a2dc4a703065372a38f8eb87ff 100644 (file)
@@ -65,38 +65,30 @@ struct tsec_info_struct {
  *   FEC_PHYIDX
  */
 static struct tsec_info_struct tsec_info[] = {
-#if defined(CONFIG_TSEC1)
-#if defined(CONFIG_MPC8544DS) || defined(CONFIG_MPC8641HPCN)
-       {TSEC1_PHY_ADDR, TSEC_GIGABIT | TSEC_REDUCED, TSEC1_PHYIDX},
-#else
-       {TSEC1_PHY_ADDR, TSEC_GIGABIT, TSEC1_PHYIDX},
-#endif
+#ifdef CONFIG_TSEC1
+       {TSEC1_PHY_ADDR, TSEC1_FLAGS, TSEC1_PHYIDX},
 #else
        {0, 0, 0},
 #endif
-#if defined(CONFIG_TSEC2)
-#if defined(CONFIG_MPC8641HPCN)
-       {TSEC2_PHY_ADDR, TSEC_GIGABIT | TSEC_REDUCED, TSEC2_PHYIDX},
-#else
-       {TSEC2_PHY_ADDR, TSEC_GIGABIT, TSEC2_PHYIDX},
-#endif
+#ifdef CONFIG_TSEC2
+       {TSEC2_PHY_ADDR, TSEC2_FLAGS, TSEC2_PHYIDX},
 #else
        {0, 0, 0},
 #endif
 #ifdef CONFIG_MPC85XX_FEC
-       {FEC_PHY_ADDR, 0, FEC_PHYIDX},
+       {FEC_PHY_ADDR, FEC_FLAGS, FEC_PHYIDX},
 #else
-#if defined(CONFIG_TSEC3)
-       {TSEC3_PHY_ADDR, TSEC_GIGABIT | TSEC_REDUCED, TSEC3_PHYIDX},
+#ifdef CONFIG_TSEC3
+       {TSEC3_PHY_ADDR, TSEC3_FLAGS, TSEC3_PHYIDX},
 #else
        {0, 0, 0},
 #endif
-#if defined(CONFIG_TSEC4)
-       {TSEC4_PHY_ADDR, TSEC_GIGABIT | TSEC_REDUCED, TSEC4_PHYIDX},
+#ifdef CONFIG_TSEC4
+       {TSEC4_PHY_ADDR, TSEC4_FLAGS, TSEC4_PHYIDX},
 #else
        {0, 0, 0},
-#endif
-#endif
+#endif /* CONFIG_TSEC4 */
+#endif /* CONFIG_MPC85XX_FEC */
 };
 
 #define MAXCONTROLLERS (4)
@@ -355,17 +347,16 @@ uint mii_cr_init(uint mii_reg, struct tsec_private * priv)
 uint mii_parse_sr(uint mii_reg, struct tsec_private * priv)
 {
        /*
-        * Wait if PHY is capable of autonegotiation and autonegotiation
-        * is not complete.
+        * Wait if the link is up, and autonegotiation is in progress
+        * (ie - we're capable and it's not done)
         */
        mii_reg = read_phy_reg(priv, MIIM_STATUS);
-       if ((mii_reg & PHY_BMSR_AUTN_ABLE)
+       if ((mii_reg & MIIM_STATUS_LINK) && (mii_reg & PHY_BMSR_AUTN_ABLE)
            && !(mii_reg & PHY_BMSR_AUTN_COMP)) {
                int i = 0;
 
                puts("Waiting for PHY auto negotiation to complete");
-               while (!((mii_reg & PHY_BMSR_AUTN_COMP)
-                        && (mii_reg & MIIM_STATUS_LINK))) {
+               while (!(mii_reg & PHY_BMSR_AUTN_COMP)) {
                        /*
                         * Timeout reached ?
                         */
@@ -385,7 +376,10 @@ uint mii_parse_sr(uint mii_reg, struct tsec_private * priv)
                priv->link = 1;
                udelay(500000); /* another 500 ms (results in faster booting) */
        } else {
-               priv->link = 1;
+               if (mii_reg & MIIM_STATUS_LINK)
+                       priv->link = 1;
+               else
+                       priv->link = 0;
        }
 
        return 0;
@@ -525,16 +519,13 @@ uint mii_parse_88E1011_psr(uint mii_reg, struct tsec_private * priv)
 
        mii_reg = read_phy_reg(priv, MIIM_88E1011_PHY_STATUS);
 
-       if (!((mii_reg & MIIM_88E1011_PHYSTAT_SPDDONE) &&
-             (mii_reg & MIIM_88E1011_PHYSTAT_LINK))) {
+       if ((mii_reg & MIIM_88E1011_PHYSTAT_LINK) &&
+               !(mii_reg & MIIM_88E1011_PHYSTAT_SPDDONE)) {
                int i = 0;
 
                puts("Waiting for PHY realtime link");
-               while (!((mii_reg & MIIM_88E1011_PHYSTAT_SPDDONE) &&
-                        (mii_reg & MIIM_88E1011_PHYSTAT_LINK))) {
-                       /*
-                        * Timeout reached ?
-                        */
+               while (!(mii_reg & MIIM_88E1011_PHYSTAT_SPDDONE)) {
+                       /* Timeout reached ? */
                        if (i > PHY_AUTONEGOTIATE_TIMEOUT) {
                                puts(" TIMEOUT !\n");
                                priv->link = 0;
@@ -549,6 +540,11 @@ uint mii_parse_88E1011_psr(uint mii_reg, struct tsec_private * priv)
                }
                puts(" done\n");
                udelay(500000); /* another 500 ms (results in faster booting) */
+       } else {
+               if (mii_reg & MIIM_88E1011_PHYSTAT_LINK)
+                       priv->link = 1;
+               else
+                       priv->link = 0;
        }
 
        if (mii_reg & MIIM_88E1011_PHYSTAT_DUPLEX)
index 3d4816f3a99a5d7ac7b1e1a052f03089f69bc677..496fc72da34ff384befb943eeb5f4bbb8661b1fc 100644 (file)
@@ -1596,7 +1596,7 @@ typedef struct ccsr_gur {
        uint    svr;            /* 0xe00a4 - System version register */
        char    res10a[8];
        uint    rstcr;          /* 0xe00b0 - Reset control register */
-#ifdef MPC8568
+#ifdef CONFIG_MPC8568
        char    res10b[76];
        par_io_t qe_par_io[7];  /* 0xe0100 - 0xe01bf */
        char    res10c[3136];
index 9e0ee371c2ce23864e15ab3d0ace114341ff24e7..0718c8574550f54b2f7dd5eab5956fb15a83e6e5 100644 (file)
 #define CONFIG_LOADS_ECHO      1       /* echo on for serial download  */
 #define CFG_LOADS_BAUD_CHANGE  1       /* allow baudrate change        */
 
+#define CONFIG_NET_MULTI       1
+#undef  CONFIG_HAS_ETH1
+
 #define CONFIG_MII             1       /* MII PHY management           */
 #define CONFIG_PHY_ADDR                0       /* PHY address                  */
 #define CONFIG_LXT971_NO_SLEEP  1       /* disable sleep mode in LXT971 */
+#define CONFIG_RESET_PHY_R      1       /* use reset_phy() to disable phy sleep mode */
 
 #define CONFIG_PHY_CLK_FREQ    EMAC_STACR_CLK_66MHZ /* 66 MHz OPB clock*/
 
  * NAND-FLASH stuff
  *-----------------------------------------------------------------------
  */
+#define CFG_NAND_BASE_LIST     { CFG_NAND_BASE }
+#define NAND_MAX_CHIPS          1
+#define CFG_MAX_NAND_DEVICE    1         /* Max number of NAND devices */
+#define NAND_BIG_DELAY_US      25
 
-#define CFG_NAND_LEGACY
-
-#define CFG_MAX_NAND_DEVICE    1       /* Max number of NAND devices           */
-#define SECTORSIZE 512
-
-#define ADDR_COLUMN 1
-#define ADDR_PAGE 2
-#define ADDR_COLUMN_PAGE 3
-
-#define NAND_ChipID_UNKNOWN    0x00
-#define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
-
-#define CFG_NAND_CE  (0x80000000 >> 1) /* our CE is GPIO1 */
-#define CFG_NAND_CLE (0x80000000 >> 2) /* our CLE is GPIO2 */
-#define CFG_NAND_ALE (0x80000000 >> 3) /* our ALE is GPIO3 */
-#define CFG_NAND_RDY (0x80000000 >> 4) /* our RDY is GPIO4 */
-
-#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
-#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
-#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
-#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
-#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
-#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
-#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
-
-#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
-#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
+#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
+#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
+#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
+#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
 
-#define CONFIG_MTD_NAND_VERIFY_WRITE 1  /* verify all writes!!!         */
 #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
 
 /*-----------------------------------------------------------------------
index 08ef9b5da6ba330cd760c0b929526f126e8c2b3d..1fd2b53974b071f7caaf488500e069e4600c5287 100644 (file)
@@ -90,8 +90,6 @@
 #define CONFIG_CMD_EEPROM
 
 
-#define CFG_NAND_LEGACY
-
 #undef CONFIG_WATCHDOG                 /* watchdog disabled            */
 
 #define CONFIG_SDRAM_BANK0     1       /* init onboard SDRAM bank 0    */
  * NAND-FLASH stuff
  *-----------------------------------------------------------------------
  */
-#define CFG_MAX_NAND_DEVICE    1       /* Max number of NAND devices           */
-#define SECTORSIZE 512
-
-#define ADDR_COLUMN 1
-#define ADDR_PAGE 2
-#define ADDR_COLUMN_PAGE 3
-
-#define NAND_ChipID_UNKNOWN    0x00
-#define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
-
-#define CFG_NAND_CE  (0x80000000 >> 1) /* our CE is GPIO1 */
-#define CFG_NAND_CLE (0x80000000 >> 2) /* our CLE is GPIO2 */
-#define CFG_NAND_ALE (0x80000000 >> 3) /* our ALE is GPIO3 */
-#define CFG_NAND_RDY (0x80000000 >> 4) /* our RDY is GPIO4 */
-
-#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
-#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
-#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
-#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
-#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
-#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
-#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
-
-#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
-#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
+#define CFG_NAND_BASE_LIST     { CFG_NAND_BASE }
+#define NAND_MAX_CHIPS          1
+#define CFG_MAX_NAND_DEVICE    1         /* Max number of NAND devices */
+#define NAND_BIG_DELAY_US      25
+
+#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
+#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
+#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
+#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
 
 #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
 
index 0a4e1e9d30d1fd67f224366c78942e8201ce26ff..1b948f6382a2cc6b4119544fda76d98c1b3ea906 100644 (file)
@@ -92,8 +92,6 @@
 
 #define CONFIG_SUPPORT_VFAT
 
-#define CFG_NAND_LEGACY
-
 #undef CONFIG_WATCHDOG                 /* watchdog disabled            */
 
 #define CONFIG_SDRAM_BANK0     1       /* init onboard SDRAM bank 0    */
index ceeba6e122e9368ca1956444adeec04f2e348c40..fb71c5fb040fe89a0182107adb2ad77ee4252de3 100644 (file)
 #define CONFIG_AUTO_UPDATE      1       /* autoupdate via compactflash  */
 #endif
 
-#define CFG_NAND_LEGACY
-
 #undef CONFIG_WATCHDOG                 /* watchdog disabled            */
 
 #define CONFIG_SDRAM_BANK0     1       /* init onboard SDRAM bank 0    */
index 1aefbbac686e3f4b7d5441ac0284902993525229..49943195b72234abc47cd519de3f2df2a86a411d 100644 (file)
 
 #define CONFIG_SUPPORT_VFAT
 
-#define CFG_NAND_LEGACY
-
-
 #undef CONFIG_WATCHDOG                 /* watchdog disabled            */
 
 #define CONFIG_SDRAM_BANK0     1       /* init onboard SDRAM bank 0    */
index e2652e6aa6e130473399f8b16ca6958cb2ac0059..29f9292447871fed426c0d2ee4dba894c66fb7ab 100644 (file)
 
 #undef  CONFIG_AUTO_UPDATE              /* autoupdate via compactflash  */
 
-#define CFG_NAND_LEGACY
-
 #undef CONFIG_WATCHDOG                 /* watchdog disabled            */
 
 #define CONFIG_SDRAM_BANK0     1       /* init onboard SDRAM bank 0    */
index 00f481c4b52d0bc5ba3e0492bd19cb37bc397152..ea8e61a764bf25d25e60de0fc160aac6d75a9d8d 100644 (file)
 #define CONFIG_AUTO_UPDATE      1       /* autoupdate via compactflash  */
 #undef CONFIG_AUTO_UPDATE_SHOW          /* use board show routine       */
 
-#define CFG_NAND_LEGACY
-
 #undef  CONFIG_BZIP2    /* include support for bzip2 compressed images */
 #undef  CONFIG_WATCHDOG                        /* watchdog disabled            */
 
  * NAND-FLASH stuff
  *-----------------------------------------------------------------------
  */
-#define CFG_MAX_NAND_DEVICE    1       /* Max number of NAND devices           */
-#define SECTORSIZE 512
-
-#define ADDR_COLUMN 1
-#define ADDR_PAGE 2
-#define ADDR_COLUMN_PAGE 3
-
-#define NAND_ChipID_UNKNOWN    0x00
-#define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
-
-#define CFG_NAND_CE  (0x80000000 >> 1)  /* our CE is GPIO1 */
-#define CFG_NAND_CLE (0x80000000 >> 2)  /* our CLE is GPIO2 */
-#define CFG_NAND_ALE (0x80000000 >> 3)  /* our ALE is GPIO3 */
-#define CFG_NAND_RDY (0x80000000 >> 4)  /* our RDY is GPIO4 */
-
-#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
-#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
-#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
-#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
-#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
-#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
-#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
-
-#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
-#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
+#define CFG_NAND_BASE_LIST     { CFG_NAND_BASE }
+#define NAND_MAX_CHIPS          1
+#define CFG_MAX_NAND_DEVICE    1         /* Max number of NAND devices */
+#define NAND_BIG_DELAY_US      25
+
+#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
+#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
+#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
+#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
 
 #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
 
index 661b895f9a1a796ec7fade0010ecc537015fe019..ed669c51da6794abc8884de6d2ecdcd650c062f5 100644 (file)
  * NAND-FLASH stuff
  *-----------------------------------------------------------------------
  */
-#define CFG_NAND_LEGACY
-
-#define CFG_MAX_NAND_DEVICE    1       /* Max number of NAND devices           */
-#define SECTORSIZE 512
-
-#define ADDR_COLUMN 1
-#define ADDR_PAGE 2
-#define ADDR_COLUMN_PAGE 3
-
-#define NAND_ChipID_UNKNOWN    0x00
-#define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
-
-#define CFG_NAND_CE  (0x80000000 >> 1) /* our CE is GPIO1 */
-#define CFG_NAND_CLE (0x80000000 >> 2) /* our CLE is GPIO2 */
-#define CFG_NAND_ALE (0x80000000 >> 3) /* our ALE is GPIO3 */
-#define CFG_NAND_RDY (0x80000000 >> 4) /* our RDY is GPIO4 */
-
-#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
-#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
-#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
-#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
-#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
-#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
-#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
-
-#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
-#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
+#define CFG_NAND_BASE_LIST     { CFG_NAND_BASE }
+#define NAND_MAX_CHIPS          1
+#define CFG_MAX_NAND_DEVICE    1         /* Max number of NAND devices */
+#define NAND_BIG_DELAY_US      25
+
+#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
+#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
+#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
+#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
 
 #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
 
index 81db96f4661e79d4cae14a1c9b103f01006c46ab..f92dce541f859d8eeb03e5263afee59cbfa09d5b 100644 (file)
 #define CONFIG_TSEC2_NAME      "TSEC1"
 #define TSEC1_PHY_ADDR                 0x1c
 #define TSEC2_PHY_ADDR                 4
+#define TSEC1_FLAGS                    TSEC_GIGABIT
+#define TSEC2_FLAGS                    TSEC_GIGABIT
 #define TSEC1_PHYIDX                   0
 #define TSEC2_PHYIDX                   0
 
index 1567fcfae32cfca9a1248d38d38fe95ee139611f..10af5f0bc8a7e50114bd7c785b1a4fc583509edc 100644 (file)
 #define TSEC2_PHY_ADDR         1
 #define TSEC1_PHYIDX           0
 #define TSEC2_PHYIDX           0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 
 /* Options are: TSEC[0-1] */
 #define CONFIG_ETHPRIME                "TSEC0"
index 44649d05090b9a2cfeb7b84c6cdc699c26625334..58ee13d3f37b0c7d1b6574b788fe59a02c6e7dd4 100644 (file)
@@ -382,6 +382,7 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CFG_TSEC1_OFFSET       0x24000
 #define TSEC1_PHY_ADDR         0x1c    /* VSC8201 uses address 0x1c */
 #define TSEC1_PHYIDX           0
+#define TSEC1_FLAGS            TSEC_GIGABIT
 #endif
 
 #ifdef CONFIG_TSEC2
@@ -391,6 +392,7 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CONFIG_UNKNOWN_TSEC    /* TSEC2 is proprietary */
 #define TSEC2_PHY_ADDR         4
 #define TSEC2_PHYIDX           0
+#define TSEC2_FLAGS            TSEC_GIGABIT
 #endif
 
 #define CONFIG_ETHPRIME                "Freescale TSEC"
index 5a7c879a53305ad8865da5b5a5be3d77c8de8ef9..b7749926717f38ba2c29da3a6173d00870bbdcb2 100644 (file)
 #define TSEC2_PHY_ADDR         1
 #define TSEC1_PHYIDX           0
 #define TSEC2_PHYIDX           0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 
 
 #if CONFIG_HAS_FEC
 #define CONFIG_MPC85XX_FEC_NAME                "FEC"
 #define FEC_PHY_ADDR           3
 #define FEC_PHYIDX             0
+#define FEC_FLAGS              0
 #endif
 
 /* Options are: TSEC[0-1], FEC */
index 0ce25cf24e74f7ffec61e3ca2e1503d0dc6ad1ac..5c03ac8c95e99bff653f46bdbaea2f54cb15a5dd 100644 (file)
 #define TSEC1_PHYIDX            0
 #define TSEC2_PHYIDX            0
 #define FEC_PHYIDX              0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
+#define FEC_FLAGS              0
+
 /* Options are: TSEC[0-1], FEC */
 #define CONFIG_ETHPRIME                "TSEC0"
 
index 232f1716bcc34edf38df841b1474bc9ab6107958..33a153e3460621c92bec05e33c7cf6eb37d25bd2 100644 (file)
@@ -384,13 +384,12 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_TSEC1_NAME      "TSEC0"
 #define CONFIG_TSEC2   1
 #define CONFIG_TSEC2_NAME      "TSEC1"
-#undef CONFIG_MPC85XX_FEC
 #define TSEC1_PHY_ADDR         0
 #define TSEC2_PHY_ADDR         1
-#define FEC_PHY_ADDR           3
 #define TSEC1_PHYIDX           0
 #define TSEC2_PHYIDX           0
-#define FEC_PHYIDX             0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 
 /* Options are: TSEC[0-1] */
 #define CONFIG_ETHPRIME                "TSEC0"
index 32934e15506540a19b506ff248a1bb05103fd468..78634473317e2df2063bafb81282f3456647c0dc 100644 (file)
@@ -364,15 +364,13 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define CONFIG_TSEC1_NAME      "eTSEC1"
 #define CONFIG_TSEC3   1
 #define CONFIG_TSEC3_NAME      "eTSEC3"
-#undef CONFIG_MPC85XX_FEC
-
-#define CONFIG_TSEC_TBI                1       /* enable internal TBI phy */
-#define CONFIG_SGMII_RISER
-#define TSEC1_SGMII_PHY_ADDR_OFFSET    0x1c    /* sgmii phy base */
 
 #define TSEC1_PHY_ADDR         0
 #define TSEC3_PHY_ADDR         1
 
+#define TSEC1_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC3_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+
 #define TSEC1_PHYIDX           0
 #define TSEC3_PHYIDX           0
 
index cda9fd5c1c78664efe47151fe8e891896e885eab..7345a3e10f029d831bed755601adf209c7162f33 100644 (file)
@@ -447,6 +447,10 @@ extern unsigned long get_clock_freq(void);
 #define TSEC2_PHYIDX           0
 #define TSEC3_PHYIDX           0
 #define TSEC4_PHYIDX           0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
+#define TSEC3_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC4_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
 
 /* Options are: eTSEC[0-3] */
 #define CONFIG_ETHPRIME                "eTSEC0"
index e8fe99aaf13333457dc285da3cd92d5b33bf4caf..48a2663b5c65f289b4e992cbe6229e647e17d230 100644 (file)
@@ -384,13 +384,12 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_TSEC1_NAME      "TSEC0"
 #define CONFIG_TSEC2   1
 #define CONFIG_TSEC2_NAME      "TSEC1"
-#undef CONFIG_MPC85XX_FEC
 #define TSEC1_PHY_ADDR         0
 #define TSEC2_PHY_ADDR         1
-#define FEC_PHY_ADDR           3
 #define TSEC1_PHYIDX           0
 #define TSEC2_PHYIDX           0
-#define FEC_PHYIDX             0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 
 /* Options are: TSEC[0-1] */
 #define CONFIG_ETHPRIME                "TSEC0"
index c10e551e408d2cd01a1c3918d6fd60d226af7bea..da41dadcd27af124edaadaecad7b1c12f6efb484 100644 (file)
 #define CONFIG_TSEC1_NAME      "TSEC0"
 #define CONFIG_TSEC2   1
 #define CONFIG_TSEC2_NAME      "TSEC1"
-#undef CONFIG_MPC85XX_FEC
 #define TSEC1_PHY_ADDR         0
 #define TSEC2_PHY_ADDR         1
 #define TSEC1_PHYIDX           0
 #define TSEC2_PHYIDX           0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 
 /* Options are: TSEC[0-1] */
 #define CONFIG_ETHPRIME                "TSEC0"
index dc9cb1ff54550fc98fd830d433da2f4fa3098f3f..80ccda51f7c781d458d410964d68183ae2844a88 100644 (file)
@@ -35,7 +35,7 @@
 
 #define CONFIG_PCI
 #define CONFIG_TSEC_ENET               /* tsec ethernet support */
-#undef CONFIG_QE                       /* Enable QE */
+#define CONFIG_QE                      /* Enable QE */
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_SPD_EEPROM              /* Use SPD EEPROM for DDR setup*/
 #define CONFIG_DDR_DLL                 /* possible DLL fix needed */
@@ -348,7 +348,7 @@ extern unsigned long get_clock_freq(void);
  */
 #define CONFIG_UEC_ETH
 #ifndef CONFIG_TSEC_ENET
-#define CONFIG_ETHPRIME         "Freescale GETH"
+#define CONFIG_ETHPRIME         "FSL UEC0"
 #endif
 #define CONFIG_PHY_MODE_NEED_CHANGE
 #define CONFIG_eTSEC_MDIO_BUS
@@ -399,9 +399,6 @@ extern unsigned long get_clock_freq(void);
 #define CONFIG_TSEC1_NAME      "eTSEC0"
 #define CONFIG_TSEC2   1
 #define CONFIG_TSEC2_NAME      "eTSEC1"
-#undef  CONFIG_TSEC3
-#undef  CONFIG_TSEC4
-#undef  CONFIG_MPC85XX_FEC
 
 #define TSEC1_PHY_ADDR         2
 #define TSEC2_PHY_ADDR         3
@@ -409,7 +406,10 @@ extern unsigned long get_clock_freq(void);
 #define TSEC1_PHYIDX           0
 #define TSEC2_PHYIDX           0
 
-/* Options are: eTSEC[0-3] */
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
+
+/* Options are: eTSEC[0-1] */
 #define CONFIG_ETHPRIME                "eTSEC0"
 
 #endif /* CONFIG_TSEC_ENET */
index 64dcbd010934d062f17b2677fb020e6ecfaa41f8..e912331f31c309a06c13ec66d40efabcb1455bcb 100644 (file)
@@ -417,6 +417,10 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #define TSEC2_PHYIDX           0
 #define TSEC3_PHYIDX           0
 #define TSEC4_PHYIDX           0
+#define TSEC1_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC2_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC3_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
+#define TSEC4_FLAGS            (TSEC_GIGABIT | TSEC_REDUCED)
 
 #define CONFIG_ETHPRIME                "eTSEC1"
 
index 54703731af7467fe673ca1f3e87fa1dcca138f70..4acbcd5e1ca7d2e59028ce7e98e50c807675c78a 100644 (file)
@@ -96,7 +96,6 @@
 #define CONFIG_SUPPORT_VFAT
 
 #define CONFIG_AUTO_UPDATE      1       /* autoupdate via compactflash  */
-#define CONFIG_AUTO_UPDATE_SHOW 1       /* use board show routine       */
 
 #undef CONFIG_WATCHDOG                 /* watchdog disabled            */
 
  * NAND-FLASH stuff
  *-----------------------------------------------------------------------
  */
-#define CFG_NAND_LEGACY
+#define CFG_NAND_BASE_LIST     { CFG_NAND_BASE }
+#define NAND_MAX_CHIPS          1
+#define CFG_MAX_NAND_DEVICE    1         /* Max number of NAND devices */
+#define NAND_BIG_DELAY_US      25
 
-#define CFG_MAX_NAND_DEVICE    1       /* Max number of NAND devices           */
-#define SECTORSIZE 512
-
-#define ADDR_COLUMN 1
-#define ADDR_PAGE 2
-#define ADDR_COLUMN_PAGE 3
-
-#define NAND_ChipID_UNKNOWN    0x00
-#define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
-
-#define CFG_NAND_CE  (0x80000000 >> 1) /* our CE is GPIO1 */
-#define CFG_NAND_CLE (0x80000000 >> 2) /* our CLE is GPIO2 */
-#define CFG_NAND_ALE (0x80000000 >> 3) /* our ALE is GPIO3 */
-#define CFG_NAND_RDY (0x80000000 >> 4) /* our RDY is GPIO4 */
-
-#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
-#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
-#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
-#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
-#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
-#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
-#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
-
-#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
-#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
+#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
+#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
+#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
+#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
 
 #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
 
 
 #define CFG_FLASH_EMPTY_INFO           /* print 'E' for empty sector on flinfo */
 
-#if 0 /* test-only */
-#define CFG_JFFS2_FIRST_BANK   0           /* use for JFFS2 */
-#define CFG_JFFS2_NUM_BANKS    1           /* ! second bank contains U-Boot */
-#endif
-
 /*-----------------------------------------------------------------------
  * Start addresses for the final memory configuration
  * (Set up by the startup code)
 #define CFG_ENV_SIZE           0x700   /* 2048 bytes may be used for env vars*/
                                   /* total size of a CAT24WC16 is 2048 bytes */
 
-#define CFG_NVRAM_BASE_ADDR    0xF0000500              /* NVRAM base address   */
-#define CFG_NVRAM_SIZE         242                     /* NVRAM size           */
-
 /*-----------------------------------------------------------------------
  * I2C EEPROM (CAT24WC16) for environment
  */
 #define CFG_I2C_SLAVE          0x7F
 
 #define CFG_I2C_EEPROM_ADDR    0x50    /* EEPROM CAT24WC08             */
-#if 1 /* test-only */
+
 /* CAT24WC08/16... */
 #define CFG_I2C_EEPROM_ADDR_LEN 1      /* Bytes of address             */
 /* mask of address bits that overflow into the "EEPROM chip address"   */
 #define CFG_EEPROM_PAGE_WRITE_BITS 4   /* The Catalyst CAT24WC08 has   */
                                        /* 16 byte page write mode using*/
                                        /* last 4 bits of the address   */
-#else
-/* CAT24WC32/64... */
-#define CFG_I2C_EEPROM_ADDR_LEN 2      /* Bytes of address             */
-/* mask of address bits that overflow into the "EEPROM chip address"   */
-#define CFG_I2C_EEPROM_ADDR_OVERFLOW   0x01
-#define CFG_EEPROM_PAGE_WRITE_BITS 5   /* The Catalyst CAT24WC32 has   */
-                                       /* 32 byte page write mode using*/
-                                       /* last 5 bits of the address   */
-#endif
 #define CFG_EEPROM_PAGE_WRITE_DELAY_MS 10   /* and takes up to 10 msec */
 #define CFG_EEPROM_PAGE_WRITE_ENABLE
 
index dbf94228ae658fb09cbe08f83f5014a0579fe209..93090b981c3e80425856f864b32796e75180e050 100644 (file)
 #define TSEC2_PHY_ADDR         1
 #define TSEC1_PHYIDX           0
 #define TSEC2_PHYIDX           0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 
 #define CONFIG_MPC85XX_FEC     1
 #define CONFIG_MPC85XX_FEC_NAME                "FEC"
 #define FEC_PHY_ADDR           3
 #define FEC_PHYIDX             0
+#define FEC_FLAGS              0
 
 /* Options are: TSEC[0-1] */
 #define CONFIG_ETHPRIME                "TSEC0"
index 6bdfa5d8f1ff175807e1c64c7697fd582e72726f..6105747c70e4c3d9f4be9a1c51c53c33e4e93595 100644 (file)
 #define CONFIG_TSEC1_NAME      "TSEC0"
 #define CONFIG_TSEC2   1
 #define CONFIG_TSEC2_NAME      "TSEC1"
-#undef CONFIG_MPC85XX_FEC
 #define TSEC1_PHY_ADDR         0
 #define TSEC2_PHY_ADDR         1
 #define TSEC1_PHYIDX           0
 #define TSEC2_PHYIDX           0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 
 #endif  /* CONFIG_TSEC_ENET */
 
index 661712b227b9e2ff7144b43cbd5818b18d20ea34..91c1694f2caca6b29a574f731fcb71ca28372281 100644 (file)
@@ -253,6 +253,8 @@ extern int tqm834x_num_flash_banks;
 #define TSEC2_PHY_ADDR                 1
 #define TSEC1_PHYIDX                   0
 #define TSEC2_PHYIDX                   0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 
 /* Options are: TSEC[0-1] */
 #define CONFIG_ETHPRIME                        "TSEC0"
index d5ce3ba7169932d9c64df0c3a22068a4f473f72c..cb9bf5492950eb89e186b95704cc9d3534af0177 100644 (file)
 #define TSEC2_PHY_ADDR         1
 #define TSEC1_PHYIDX           0
 #define TSEC2_PHYIDX           0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 #define FEC_PHY_ADDR           3
 #define FEC_PHYIDX             0
+#define FEC_FLAGS              0
 #define CONFIG_HAS_ETH1
 #define CONFIG_HAS_ETH2
 
index 34f0ebdcfa2607b53ba27531bc2967a5e303f0ff..3880ec74765326b00233b77fbc47b149a1da7354 100644 (file)
  * NAND-FLASH stuff
  *-----------------------------------------------------------------------
  */
-#define CFG_NAND_LEGACY
-
-#define CFG_MAX_NAND_DEVICE    1       /* Max number of NAND devices           */
-#define SECTORSIZE 512
-
-#define ADDR_COLUMN 1
-#define ADDR_PAGE 2
-#define ADDR_COLUMN_PAGE 3
-
-#define NAND_ChipID_UNKNOWN    0x00
-#define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
-
-#define CFG_NAND_CE  (0x80000000 >> 1) /* our CE is GPIO1 */
-#define CFG_NAND_CLE (0x80000000 >> 2) /* our CLE is GPIO2 */
-#define CFG_NAND_ALE (0x80000000 >> 3) /* our ALE is GPIO3 */
-#define CFG_NAND_RDY (0x80000000 >> 4) /* our RDY is GPIO4 */
-
-#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
-#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
-#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
-#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
-#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
-#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
-#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
-
-#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
-#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
+#define CFG_NAND_BASE_LIST     { CFG_NAND_BASE }
+#define NAND_MAX_CHIPS          1
+#define CFG_MAX_NAND_DEVICE    1         /* Max number of NAND devices */
+#define NAND_BIG_DELAY_US      25
+
+#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
+#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
+#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
+#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
 
 #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
 
index c1b3da863edab700e15e57e03a5e0fd3c0e98455..656784aa0cc03766d00614cc07470301da8d3f2d 100644 (file)
  * NAND-FLASH stuff
  *-----------------------------------------------------------------------
  */
-#define CFG_NAND_LEGACY
-
-#define CFG_MAX_NAND_DEVICE    1       /* Max number of NAND devices           */
-#define SECTORSIZE 512
-
-#define ADDR_COLUMN 1
-#define ADDR_PAGE 2
-#define ADDR_COLUMN_PAGE 3
-
-#define NAND_ChipID_UNKNOWN    0x00
-#define NAND_MAX_FLOORS 1
-#define NAND_MAX_CHIPS 1
-
-#define CFG_NAND_CE  (0x80000000 >> 1) /* our CE is GPIO1 */
-#define CFG_NAND_CLE (0x80000000 >> 2) /* our CLE is GPIO2 */
-#define CFG_NAND_ALE (0x80000000 >> 3) /* our ALE is GPIO3 */
-#define CFG_NAND_RDY (0x80000000 >> 4) /* our RDY is GPIO4 */
-
-#define NAND_DISABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CE);} while(0)
-#define NAND_ENABLE_CE(nand) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CE);} while(0)
-#define NAND_CTL_CLRALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_ALE);} while(0)
-#define NAND_CTL_SETALE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_ALE);} while(0)
-#define NAND_CTL_CLRCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) & ~CFG_NAND_CLE);} while(0)
-#define NAND_CTL_SETCLE(nandptr) do { out32(GPIO0_OR, in32(GPIO0_OR) | CFG_NAND_CLE);} while(0)
-#define NAND_WAIT_READY(nand) while (!(in32(GPIO0_IR) & CFG_NAND_RDY))
-
-#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)(d); } while(0)
-#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
-#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
-
-#define CONFIG_MTD_NAND_VERIFY_WRITE 1  /* verify all writes!!!         */
+#define CFG_NAND_BASE_LIST     { CFG_NAND_BASE }
+#define NAND_MAX_CHIPS          1
+#define CFG_MAX_NAND_DEVICE    1         /* Max number of NAND devices */
+#define NAND_BIG_DELAY_US      25
+
+#define CFG_NAND_CE             (0x80000000 >> 1)   /* our CE is GPIO1  */
+#define CFG_NAND_RDY            (0x80000000 >> 4)   /* our RDY is GPIO4 */
+#define CFG_NAND_CLE            (0x80000000 >> 2)   /* our CLE is GPIO2 */
+#define CFG_NAND_ALE            (0x80000000 >> 3)   /* our ALE is GPIO3 */
+
 #define CFG_NAND_SKIP_BAD_DOT_I      1  /* ".i" read skips bad blocks   */
 
 /*-----------------------------------------------------------------------
index 1831bef0de11ad91e490437b791bcdbc04be52dd..aa515ea6148eac6d24f18f251c2111fba2a2227d 100644 (file)
 #define TSEC2_PHY_ADDR         0x1a
 #define TSEC1_PHYIDX           0
 #define TSEC2_PHYIDX           0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 
 /* Options are: TSEC[0-1] */
 #define CONFIG_ETHPRIME                "TSEC0"
index 68d31ca1dbc3562afb4790bd16fa47a16f592ab8..760b754e6c5f91dcec9a7069b98f19a96a5edcca 100644 (file)
 #define TSEC2_PHYIDX           0
 #define TSEC3_PHYIDX           0
 #define TSEC4_PHYIDX           0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
+#define TSEC3_FLAGS            TSEC_GIGABIT
+#define TSEC4_FLAGS            TSEC_GIGABIT
 
 #define CFG_TBIPA_VALUE        0x1e    /* Set TBI address not to conflict with TSEC1_PHY_ADDR */
 
 #define CFG_LOAD_ADDR  0x2000000       /* default load address */
 #define CFG_PROMPT     "=> "           /* Monitor Command Prompt */
 
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
     #define CFG_CBSIZE 1024            /* Console I/O Buffer Size */
 #else
     #define CFG_CBSIZE 256             /* Console I/O Buffer Size */
 /* Cache Configuration */
 #define CFG_DCACHE_SIZE                32768
 #define CFG_CACHELINE_SIZE     32
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
 #define CFG_CACHELINE_SHIFT    5       /*log base 2 of the above value*/
 #endif
 
 #define BOOTFLAG_COLD  0x01            /* Normal Power-On: Boot from FLASH */
 #define BOOTFLAG_WARM  0x02            /* Software reboot */
 
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_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
index 1f41cf7699e0ac4dac768d677790251c9a518754..43b185bee6f1feae744152635cc158813588e852 100644 (file)
 #define CONFIG_TSEC1_NAME      "TSEC0"
 #define CONFIG_TSEC2   1
 #define CONFIG_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 TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 #define CONFIG_ETHPRIME                "TSEC0"
 
 #elif defined(CONFIG_ETHER_ON_FCC)     /* CPM FCC Ethernet */
index 55e2c8da20dcffc1c5e2aa2bc64c707615675f54..3dae27ac11b54a635e094487c135625af5443d9f 100644 (file)
 #define CONFIG_TSEC1_NAME      "TSEC0"
 #define CONFIG_TSEC2   1
 #define CONFIG_TSEC2_NAME      "TSEC1"
-#define CONFIG_MPS85XX_FEC
 
 #define TSEC1_PHY_ADDR         2
 #define TSEC2_PHY_ADDR         4
 #define TSEC1_PHYIDX           0
 #define TSEC2_PHYIDX           0
+#define TSEC1_FLAGS            TSEC_GIGABIT
+#define TSEC2_FLAGS            TSEC_GIGABIT
 #define CONFIG_ETHPRIME                "TSEC0"
 
 #elif defined(CONFIG_ETHER_ON_FCC)     /* CPM FCC Ethernet */
index 4b485643a1760997ceb380f3e69f09c0344651a5..49ff80fd3aa86e0e632d61b95fe3987995589f2b 100644 (file)
@@ -348,6 +348,7 @@ struct nand_chip {
 #define NAND_MFR_NATIONAL      0x8f
 #define NAND_MFR_RENESAS       0x07
 #define NAND_MFR_STMICRO       0x20
+#define NAND_MFR_MICRON                0x2c
 
 /**
  * struct nand_flash_dev - NAND Flash Device ID Structure
index 23493f7e9841122d683d074445ecb98348ca17b4..3c0752ea12add98ca4c67e736b09434ea684fc78 100644 (file)
@@ -32,6 +32,7 @@ typedef struct mtd_info nand_info_t;
 
 extern int nand_curr_device;
 extern nand_info_t nand_info[];
+extern void nand_init(void);
 
 static inline int nand_read(nand_info_t *info, ulong ofs, ulong *len, u_char *buf)
 {
index 888ec987cfcb24edecfb3fea028802acceb557bc..d6db91c05841a450cdd51a5360121d8e4cdbf93a 100644 (file)
@@ -614,4 +614,4 @@ static void parse_multicast_oack(char *pkt, int len)
 
 #endif /* Multicast TFTP */
 
-#endif /* CFG_CMD_NET */
+#endif