summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG12
-rw-r--r--MAINTAINERS2
-rw-r--r--Makefile2
-rw-r--r--README1
-rw-r--r--board/amcc/acadia/config.mk2
-rw-r--r--board/amcc/yosemite/yosemite.c23
-rw-r--r--board/atmel/at91cap9adk/Makefile2
-rw-r--r--board/atmel/at91cap9adk/at91cap9adk.c4
-rw-r--r--board/atmel/at91cap9adk/led.c2
-rw-r--r--board/atmel/at91cap9adk/nand.c2
-rw-r--r--board/atmel/at91cap9adk/partition.c2
-rw-r--r--board/atmel/at91cap9adk/u-boot.lds2
-rw-r--r--board/atmel/at91rm9200dk/partition.c2
-rw-r--r--board/atmel/at91sam9260ek/Makefile2
-rw-r--r--board/atmel/at91sam9260ek/at91sam9260ek.c4
-rw-r--r--board/atmel/at91sam9260ek/led.c2
-rw-r--r--board/atmel/at91sam9260ek/nand.c2
-rw-r--r--board/atmel/at91sam9260ek/partition.c2
-rw-r--r--board/atmel/at91sam9260ek/u-boot.lds2
-rw-r--r--board/freescale/mpc8548cds/mpc8548cds.c7
-rw-r--r--board/mx31ads/lowlevel_init.S2
-rw-r--r--board/qemu-mips/README6
-rw-r--r--board/qemu-mips/qemu-mips.c2
-rw-r--r--common/cmd_bootm.c11
-rw-r--r--common/cmd_ide.c4
-rw-r--r--common/cmd_log.c8
-rw-r--r--common/image.c4
-rw-r--r--common/main.c33
-rw-r--r--cpu/74xx_7xx/cache.S21
-rw-r--r--cpu/arm1136/mx31/generic.c4
-rw-r--r--cpu/arm920t/s3c24x0/usb.c2
-rw-r--r--cpu/arm926ejs/at91sam9/Makefile2
-rw-r--r--cpu/arm926ejs/at91sam9/ether.c2
-rw-r--r--cpu/arm926ejs/at91sam9/lowlevel_init.S2
-rw-r--r--cpu/arm926ejs/at91sam9/timer.c2
-rw-r--r--cpu/arm926ejs/at91sam9/usb.c2
-rw-r--r--cpu/mips/cache.S6
-rw-r--r--cpu/mpc86xx/cache.S2
-rw-r--r--cpu/ppc4xx/fdt.c26
-rw-r--r--cpu/ppc4xx/speed.c2
-rw-r--r--disk/part.c92
-rw-r--r--doc/README.nand-boot-ppc4402
-rw-r--r--drivers/net/smc911x.c2
-rw-r--r--include/.gitignore4
-rw-r--r--include/asm-arm/arch-at91sam9/at91_pio.h2
-rw-r--r--include/asm-arm/arch-at91sam9/at91_pit.h5
-rw-r--r--include/asm-arm/arch-at91sam9/at91_pmc.h2
-rw-r--r--include/asm-arm/arch-at91sam9/at91_rstc.h5
-rw-r--r--include/asm-arm/arch-at91sam9/at91_spi.h2
-rw-r--r--include/asm-arm/arch-at91sam9/at91cap9.h2
-rw-r--r--include/asm-arm/arch-at91sam9/at91cap9_matrix.h2
-rw-r--r--include/asm-arm/arch-at91sam9/at91sam9260.h2
-rw-r--r--include/asm-arm/arch-at91sam9/at91sam9260_matrix.h4
-rw-r--r--include/asm-arm/arch-at91sam9/at91sam926x_mc.h140
-rw-r--r--include/asm-arm/arch-at91sam9/at91sam9_smc.h76
-rw-r--r--include/asm-arm/arch-at91sam9/clk.h2
-rw-r--r--include/asm-arm/arch-at91sam9/gpio.h2
-rw-r--r--include/asm-arm/arch-at91sam9/hardware.h2
-rw-r--r--include/asm-arm/arch-at91sam9/io.h2
-rw-r--r--include/asm-arm/arch-at91sam9/memory-map.h2
-rw-r--r--include/asm-arm/arch-mx31/mx31.h6
-rw-r--r--include/asm-arm/dma-mapping.h2
-rw-r--r--include/configs/acadia.h21
-rw-r--r--include/configs/at91cap9adk.h2
-rw-r--r--include/configs/at91sam9260ek.h2
-rw-r--r--include/configs/bamboo.h6
-rw-r--r--include/configs/bubinga.h5
-rw-r--r--include/configs/ebony.h6
-rw-r--r--include/configs/katmai.h2
-rw-r--r--include/configs/kilauea.h2
-rw-r--r--include/configs/luan.h5
-rw-r--r--include/configs/ml401.h21
-rw-r--r--include/configs/mx31ads.h4
-rw-r--r--include/configs/ocotea.h5
-rw-r--r--include/configs/taihu.h5
-rw-r--r--include/configs/taishan.h5
-rw-r--r--include/configs/walnut.h6
-rw-r--r--include/configs/xupv2p.h21
-rw-r--r--include/configs/yosemite.h6
-rw-r--r--include/configs/yucca.h4
-rw-r--r--include/logbuff.h1
-rw-r--r--lib_generic/crc32.c2
-rw-r--r--lib_ppc/board.c16
-rw-r--r--tools/env/Makefile2
-rw-r--r--tools/env/fw_env.c21
-rw-r--r--tools/env/fw_env.h4
-rw-r--r--tools/env/fw_env_main.c25
87 files changed, 458 insertions, 323 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 5d21db1b2db..6aadcca38c0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6477,7 +6477,7 @@ Date: Mon Mar 3 11:57:23 2008 +0000
Originally pointed out by Laurent Pinchart <laurent.pinchart@tbox.biz>,
see http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/22846
- Signed-off-by: Bernhard Nemec <bnemec <at> ganssloser.com>
+ Signed-off-by: Bernhard Nemec <bnemec@ganssloser.com>
commit 84d0c2f1e39caff58bf765a7ab7c72da23c25ec8
Author: Kim B. Heino <Kim.Heino@bluegiga.com>
@@ -7707,7 +7707,7 @@ Date: Mon Feb 18 14:01:56 2008 -0600
86xx: Convert sbc8641d to use libfdt.
This is the proper fix for a missing closing brace in the function
- ft_cpu_setup() noticed by joe.hamman <at> embeddedspecialties.com.
+ ft_cpu_setup() noticed by joe.hamman@embeddedspecialties.com.
The ft_cpu_setup() function in mpc8641hpcn.c should have been
removed earlier as it was under the obsolete CONFIG_OF_FLAT_TREE,
but was missed. Only, the sbc8641d was nominally still using it.
@@ -8102,7 +8102,7 @@ Date: Fri Feb 22 11:40:50 2008 +0000
We already have a vendor subdir for Atmel, so we should use it.
- Signed-off-by: Haavard Skinnemoen <hskinnemoen <at> atmel.com>
+ Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
commit 6d0943a6be99977d6d853d51749e9963d68eb192
Author: Andreas Engel <andreas.engel@ericsson.com>
@@ -8152,8 +8152,8 @@ Date: Thu Jan 3 21:15:56 2008 +0000
AT91CAP9 support : MACB changes
- Signed-off-by: Stelian Pop <stelian <at> popies.net>
- Acked-by: Haavard Skinnemoen <hskinnemoen <at> atmel.com>
+ Signed-off-by: Stelian Pop <stelian@popies.net>
+ Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
commit 6afcabf11d7321850f4feaadfee841488ace54c5
Author: Stelian Pop <stelian@popies.net>
@@ -8169,7 +8169,7 @@ Date: Wed Jan 30 21:15:54 2008 +0000
AT91CAP9 support : cpu/ files
- Signed-off-by: Stelian Pop <stelian <at> popies.net>
+ Signed-off-by: Stelian Pop <stelian@popies.net>
commit fa506a926cec348805143576c941f8e61b333cc0
Author: Stelian Pop <stelian@popies.net>
diff --git a/MAINTAINERS b/MAINTAINERS
index 58f833c1491..ac7572cfc17 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -607,7 +607,7 @@ Thomas Lange <thomas@corelatus.se>
dbau1x00 MIPS32 Au1000
gth2 MIPS32 Au1000
-Vlad Lungu <vlad@comsys.ro>
+Vlad Lungu <vlad.lungu@windriver.com>
qemu_mips MIPS32
#########################################################################
diff --git a/Makefile b/Makefile
index 167a71741c8..6783fec407c 100644
--- a/Makefile
+++ b/Makefile
@@ -424,7 +424,7 @@ $(obj)System.map: $(obj)u-boot
# This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
# the dep file is only include in this top level makefile to determine when
# to regenerate the autoconf.mk file.
-$(obj)include/autoconf.mk: $(obj)include/config.h $(VERSION_FILE)
+$(obj)include/autoconf.mk: $(obj)include/config.h
@$(XECHO) Generating include/autoconf.mk ; \
set -e ; \
: Generate the dependancies ; \
diff --git a/README b/README
index 5e2bca41c1a..f14fb7bad2a 100644
--- a/README
+++ b/README
@@ -623,7 +623,6 @@ The following options need to be configured:
CONFIG_CMD_SPI * SPI serial bus support
CONFIG_CMD_USB * USB support
CONFIG_CMD_VFD * VFD support (TRAB)
- CONFIG_CMD_BSP * Board SPecific functions
CONFIG_CMD_CDP * Cisco Discover Protocol support
CONFIG_CMD_FSL * Microblaze FSL support
diff --git a/board/amcc/acadia/config.mk b/board/amcc/acadia/config.mk
index af5a46c2a5d..290415c9d03 100644
--- a/board/amcc/acadia/config.mk
+++ b/board/amcc/acadia/config.mk
@@ -28,7 +28,7 @@
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
ifndef TEXT_BASE
-TEXT_BASE = 0xFFFC0000
+TEXT_BASE = 0xFFF80000
endif
ifeq ($(debug),1)
diff --git a/board/amcc/yosemite/yosemite.c b/board/amcc/yosemite/yosemite.c
index 6ec922ab007..212fab8d08e 100644
--- a/board/amcc/yosemite/yosemite.c
+++ b/board/amcc/yosemite/yosemite.c
@@ -26,6 +26,8 @@
#include <asm/processor.h>
#include <asm/io.h>
#include <spd_sdram.h>
+#include <libfdt.h>
+#include <fdt_support.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -554,3 +556,24 @@ void board_reset(void)
/* give reset to BCSR */
*(unsigned char *)(CFG_BCSR_BASE | 0x06) = 0x09;
}
+
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup(void *blob, bd_t *bd)
+{
+ u32 val[4];
+ int rc;
+
+ ft_cpu_setup(blob, bd);
+
+ /* Fixup NOR mapping */
+ val[0] = 0; /* chip select number */
+ val[1] = 0; /* always 0 */
+ val[2] = gd->bd->bi_flashstart;
+ val[3] = gd->bd->bi_flashsize;
+ rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges",
+ val, sizeof(val), 1);
+ if (rc)
+ printf("Unable to update property NOR mapping, err=%s\n",
+ fdt_strerror(rc));
+}
+#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
diff --git a/board/atmel/at91cap9adk/Makefile b/board/atmel/at91cap9adk/Makefile
index 6b4b4b035e4..e33af76c025 100644
--- a/board/atmel/at91cap9adk/Makefile
+++ b/board/atmel/at91cap9adk/Makefile
@@ -1,6 +1,6 @@
#
# (C) Copyright 2003-2008
-# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
diff --git a/board/atmel/at91cap9adk/at91cap9adk.c b/board/atmel/at91cap9adk/at91cap9adk.c
index 24861ba49de..5de52b9197e 100644
--- a/board/atmel/at91cap9adk/at91cap9adk.c
+++ b/board/atmel/at91cap9adk/at91cap9adk.c
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
@@ -25,7 +25,7 @@
#include <common.h>
#include <asm/arch/at91cap9.h>
#include <asm/arch/at91cap9_matrix.h>
-#include <asm/arch/at91sam926x_mc.h>
+#include <asm/arch/at91sam9_smc.h>
#include <asm/arch/at91_pmc.h>
#include <asm/arch/at91_rstc.h>
#include <asm/arch/gpio.h>
diff --git a/board/atmel/at91cap9adk/led.c b/board/atmel/at91cap9adk/led.c
index 04de1392047..a137c2a9525 100644
--- a/board/atmel/at91cap9adk/led.c
+++ b/board/atmel/at91cap9adk/led.c
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
diff --git a/board/atmel/at91cap9adk/nand.c b/board/atmel/at91cap9adk/nand.c
index c72b0244bd3..28091a4226f 100644
--- a/board/atmel/at91cap9adk/nand.c
+++ b/board/atmel/at91cap9adk/nand.c
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas
diff --git a/board/atmel/at91cap9adk/partition.c b/board/atmel/at91cap9adk/partition.c
index 3bffd71a78e..eb1a724ab1f 100644
--- a/board/atmel/at91cap9adk/partition.c
+++ b/board/atmel/at91cap9adk/partition.c
@@ -1,4 +1,6 @@
/*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <ulf@atmel.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
diff --git a/board/atmel/at91cap9adk/u-boot.lds b/board/atmel/at91cap9adk/u-boot.lds
index 05a6d83d565..996f401f0b9 100644
--- a/board/atmel/at91cap9adk/u-boot.lds
+++ b/board/atmel/at91cap9adk/u-boot.lds
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <gj <at> denx.de>
+ * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
*
* See file CREDITS for list of people who contributed to this
* project.
diff --git a/board/atmel/at91rm9200dk/partition.c b/board/atmel/at91rm9200dk/partition.c
index a8a5fe6aa6f..975be174647 100644
--- a/board/atmel/at91rm9200dk/partition.c
+++ b/board/atmel/at91rm9200dk/partition.c
@@ -1,4 +1,6 @@
/*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <ulf@atmel.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
diff --git a/board/atmel/at91sam9260ek/Makefile b/board/atmel/at91sam9260ek/Makefile
index defc0851931..e6e4082c73b 100644
--- a/board/atmel/at91sam9260ek/Makefile
+++ b/board/atmel/at91sam9260ek/Makefile
@@ -1,6 +1,6 @@
#
# (C) Copyright 2003-2008
-# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c
index a55468e30d0..21479acab4b 100644
--- a/board/atmel/at91sam9260ek/at91sam9260ek.c
+++ b/board/atmel/at91sam9260ek/at91sam9260ek.c
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
@@ -25,7 +25,7 @@
#include <common.h>
#include <asm/arch/at91sam9260.h>
#include <asm/arch/at91sam9260_matrix.h>
-#include <asm/arch/at91sam926x_mc.h>
+#include <asm/arch/at91sam9_smc.h>
#include <asm/arch/at91_pmc.h>
#include <asm/arch/at91_rstc.h>
#include <asm/arch/gpio.h>
diff --git a/board/atmel/at91sam9260ek/led.c b/board/atmel/at91sam9260ek/led.c
index 4c53742e50e..ddc375f267a 100644
--- a/board/atmel/at91sam9260ek/led.c
+++ b/board/atmel/at91sam9260ek/led.c
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
diff --git a/board/atmel/at91sam9260ek/nand.c b/board/atmel/at91sam9260ek/nand.c
index abb788afe7b..7c1e6abd9a3 100644
--- a/board/atmel/at91sam9260ek/nand.c
+++ b/board/atmel/at91sam9260ek/nand.c
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas
diff --git a/board/atmel/at91sam9260ek/partition.c b/board/atmel/at91sam9260ek/partition.c
index 389fb2c5c91..557d6954f46 100644
--- a/board/atmel/at91sam9260ek/partition.c
+++ b/board/atmel/at91sam9260ek/partition.c
@@ -1,4 +1,6 @@
/*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <ulf@atmel.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
diff --git a/board/atmel/at91sam9260ek/u-boot.lds b/board/atmel/at91sam9260ek/u-boot.lds
index 05a6d83d565..996f401f0b9 100644
--- a/board/atmel/at91sam9260ek/u-boot.lds
+++ b/board/atmel/at91sam9260ek/u-boot.lds
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <gj <at> denx.de>
+ * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
*
* See file CREDITS for list of people who contributed to this
* project.
diff --git a/board/freescale/mpc8548cds/mpc8548cds.c b/board/freescale/mpc8548cds/mpc8548cds.c
index dc39fbe8dc5..efe2a3a3def 100644
--- a/board/freescale/mpc8548cds/mpc8548cds.c
+++ b/board/freescale/mpc8548cds/mpc8548cds.c
@@ -59,6 +59,7 @@ int checkboard (void)
uint pci_slot = get_pci_slot ();
uint cpu_board_rev = get_cpu_board_revision ();
+ uint svr;
printf ("Board: CDS Version 0x%02x, PCI Slot %d\n",
get_board_version (), pci_slot);
@@ -71,12 +72,16 @@ int checkboard (void)
*/
local_bus_init ();
+ svr = get_svr();
+
/*
* Fix CPU2 errata: A core hang possible while executing a
* msync instruction and a snoopable transaction from an I/O
* master tagged to make quick forward progress is present.
+ * Fixed in Silicon Rev.2.1
*/
- ecm->eebpcr |= (1 << 16);
+ if (!(SVR_MAJ(svr) >= 2 && SVR_MIN(svr) >= 1))
+ ecm->eebpcr |= (1 << 16);
/*
* Hack TSEC 3 and 4 IO voltages.
diff --git a/board/mx31ads/lowlevel_init.S b/board/mx31ads/lowlevel_init.S
index 099a7ca81b2..e16605836be 100644
--- a/board/mx31ads/lowlevel_init.S
+++ b/board/mx31ads/lowlevel_init.S
@@ -220,7 +220,7 @@ lowlevel_init:
mov r1, #CS4_BASE
ldrh r1, [r1, #0x2]
/* Is 27MHz switch set? */
- ands r1, r1, #0x16
+ ands r1, r1, #0x10
/* 532-133-66.5 */
ldr r0, =CCM_BASE
diff --git a/board/qemu-mips/README b/board/qemu-mips/README
index 39570b13dba..4c1f8edc9b6 100644
--- a/board/qemu-mips/README
+++ b/board/qemu-mips/README
@@ -1,4 +1,4 @@
-By Vlad Lungu vlad@comsys.ro 2007-Oct-01
+By Vlad Lungu vlad.lungu@windriver.com 2007-Oct-01
----------------------------------------
Qemu is a full system emulator. See
@@ -9,3 +9,7 @@ Limitations & comments
Supports the "-m mips" configuration of qemu: serial,NE2000,IDE.
Support is big endian only for now (or at least this is what I tested).
Derived from au1x00 with a lot of things cut out.
+
+Supports emulated flash (patch Jean-Christophe PLAGNIOL-VILLARD) with
+recent qemu versions. When using emulated flash, launch with
+-pflash <filename> and erase mips_bios.bin.
diff --git a/board/qemu-mips/qemu-mips.c b/board/qemu-mips/qemu-mips.c
index a6ad7b9ab35..68690743d68 100644
--- a/board/qemu-mips/qemu-mips.c
+++ b/board/qemu-mips/qemu-mips.c
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007
- * Vlad Lungu vlad@comsys.ro
+ * Vlad Lungu vlad.lungu@windriver.com
*
* See file CREDITS for list of people who contributed to this
* project.
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 44f6b9f6ea8..0d67132363c 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -433,17 +433,6 @@ static int fit_check_kernel (const void *fit, int os_noffset, int verify)
}
show_boot_progress (105);
-#ifdef CONFIG_LOGBUFFER
-#ifndef CONFIG_ALT_LB_ADDR
- kbd=gd->bd;
- /* Prevent initrd from overwriting logbuffer */
- if (initrd_high < (kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD))
- initrd_high = kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD;
- debug ("## Logbuffer at 0x%08lX ", kbd->bi_memsize-LOGBUFF_LEN);
-#else
- debug ("## Logbuffer at 0x%08lX ", CONFIG_ALT_LB_ADDR);
-#endif
-#endif
if (!fit_image_check_target_arch (fit, os_noffset)) {
puts ("Unsupported Architecture\n");
show_boot_progress (-105);
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index ead7e10d66b..cac99d5fe76 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -52,10 +52,6 @@
# include <status_led.h>
#endif
-#ifndef __PPC__
-#include <asm/io.h>
-#endif
-
#ifdef CONFIG_IDE_8xx_DIRECT
DECLARE_GLOBAL_DATA_PTR;
#endif
diff --git a/common/cmd_log.c b/common/cmd_log.c
index b9f9ba03428..8e04941d610 100644
--- a/common/cmd_log.c
+++ b/common/cmd_log.c
@@ -66,6 +66,12 @@ static logbuff_t *log;
#endif
static char *lbuf;
+unsigned long __logbuffer_base(void)
+{
+ return CFG_SDRAM_BASE + gd->bd->bi_memsize - LOGBUFF_LEN;
+}
+unsigned long logbuffer_base (void) __attribute__((weak, alias("__logbuffer_base")));
+
void logbuff_init_ptrs (void)
{
unsigned long tag, post_word;
@@ -75,7 +81,7 @@ void logbuff_init_ptrs (void)
log = (logbuff_t *)CONFIG_ALT_LH_ADDR;
lbuf = (char *)CONFIG_ALT_LB_ADDR;
#else
- log = (logbuff_t *)(gd->bd->bi_memsize-LOGBUFF_LEN) - 1;
+ log = (logbuff_t *)(logbuffer_base ()) - 1;
lbuf = (char *)log->buf;
#endif
diff --git a/common/image.c b/common/image.c
index 4a024d4dfb3..f7faf504d42 100644
--- a/common/image.c
+++ b/common/image.c
@@ -93,6 +93,7 @@ static table_entry_t uimage_arch[] = {
{ IH_ARCH_MIPS64, "mips64", "MIPS 64 Bit", },
{ IH_ARCH_NIOS, "nios", "NIOS", },
{ IH_ARCH_NIOS2, "nios2", "NIOS II", },
+ { IH_ARCH_PPC, "powerpc", "PowerPC", },
{ IH_ARCH_PPC, "ppc", "PowerPC", },
{ IH_ARCH_S390, "s390", "IBM S390", },
{ IH_ARCH_SH, "sh", "SuperH", },
@@ -1021,6 +1022,9 @@ int boot_ramdisk_high (struct lmb *lmb, ulong rd_data, ulong rd_len,
initrd_high = ~0;
}
+ /* Prevent initrd from overwriting logbuffer */
+ lmb_reserve(lmb, logbuffer_base() - LOGBUFF_OVERHEAD, LOGBUFF_RESERVE);
+
debug ("## initrd_high = 0x%08lx, copy_to_ram = %d\n",
initrd_high, initrd_copy_to_ram);
diff --git a/common/main.c b/common/main.c
index 21e7afab61f..a17b60b3aa9 100644
--- a/common/main.c
+++ b/common/main.c
@@ -40,7 +40,7 @@
#include <post.h>
-#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST)
+#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST) || defined(CONFIG_CMDLINE_EDITING)
DECLARE_GLOBAL_DATA_PTR;
#endif
@@ -67,11 +67,9 @@ static int abortboot(int);
char console_buffer[CFG_CBSIZE]; /* console I/O buffer */
-#ifndef CONFIG_CMDLINE_EDITING
static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen);
static char erase_seq[] = "\b \b"; /* erase sequence */
static char tab_seq[] = " "; /* used to expand TABs */
-#endif /* CONFIG_CMDLINE_EDITING */
#ifdef CONFIG_BOOT_RETRY_TIME
static uint64_t endtime = 0; /* must be set, default is instant timeout */
@@ -947,11 +945,26 @@ int readline_into_buffer (const char *const prompt, char * buffer)
initted = 1;
}
- puts (prompt);
- rc = cread_line(prompt, p, &len);
- return rc < 0 ? rc : len;
-#else
+ /*
+ * History uses a global array which is not
+ * writable until after relocation to RAM.
+ * Revert to non-history version if still
+ * running from flash.
+ */
+ if (gd->flags & GD_FLG_RELOC) {
+ if (!initted) {
+ hist_init();
+ initted = 1;
+ }
+
+ puts (prompt);
+
+ rc = cread_line(prompt, p, &len);
+ return rc < 0 ? rc : len;
+
+ } else {
+#endif /* CONFIG_CMDLINE_EDITING */
char * p_buf = p;
int n = 0; /* buffer index */
int plen = 0; /* prompt length */
@@ -1047,12 +1060,13 @@ int readline_into_buffer (const char *const prompt, char * buffer)
}
}
}
-#endif /* CONFIG_CMDLINE_EDITING */
+#ifdef CONFIG_CMDLINE_EDITING
+ }
+#endif
}
/****************************************************************************/
-#ifndef CONFIG_CMDLINE_EDITING
static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen)
{
char *s;
@@ -1082,7 +1096,6 @@ static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen)
(*np)--;
return (p);
}
-#endif /* CONFIG_CMDLINE_EDITING */
/****************************************************************************/
diff --git a/cpu/74xx_7xx/cache.S b/cpu/74xx_7xx/cache.S
index a793d799d1b..3a745cbe031 100644
--- a/cpu/74xx_7xx/cache.S
+++ b/cpu/74xx_7xx/cache.S
@@ -329,14 +329,28 @@ _GLOBAL(dcache_status)
blr
/*
- * Invalidate L2 cache using L2I and polling L2IP
+ * Invalidate L2 cache using L2I and polling L2IP or L2I
*/
_GLOBAL(l2cache_invalidate)
sync
+ mfspr r3, l2cr
oris r3, r3, L2CR_L2I@h
sync
mtspr l2cr, r3
sync
+ mfspr r3, PVR
+ sync
+ rlwinm r3, r3, 16,16,31
+ cmpli 0,r3,0x8000 /* 7451, 7441 */
+ beq 0,inv_7450
+ cmpli 0,r3,0x8001 /* 7455, 7445 */
+ beq 0,inv_7450
+ cmpli 0,r3,0x8002 /* 7457, 7447 */
+ beq 0,inv_7450
+ cmpli 0,r3,0x8003 /* 7447A */
+ beq 0,inv_7450
+ cmpli 0,r3,0x8004 /* 7448 */
+ beq 0,inv_7450
invl2:
mfspr r3, l2cr
andi. r3, r3, L2CR_L2IP
@@ -348,6 +362,11 @@ invl2:
mtspr l2cr, r3
sync
blr
+inv_7450:
+ mfspr r3, l2cr
+ andis. r3, r3, L2CR_L2I@h
+ bne inv_7450
+ blr
/*
* Enable L2 cache
diff --git a/cpu/arm1136/mx31/generic.c b/cpu/arm1136/mx31/generic.c
index 16b2cf1364d..29c08c105f1 100644
--- a/cpu/arm1136/mx31/generic.c
+++ b/cpu/arm1136/mx31/generic.c
@@ -39,7 +39,7 @@ static u32 mx31_decode_pll(u32 reg, u32 infreq)
(mfd * pd)) << 10;
}
-u32 mx31_get_mpl_dpdgck_clk(void)
+static u32 mx31_get_mpl_dpdgck_clk(void)
{
u32 infreq;
@@ -51,7 +51,7 @@ u32 mx31_get_mpl_dpdgck_clk(void)
return mx31_decode_pll(__REG(CCM_MPCTL), infreq);
}
-u32 mx31_get_mcu_main_clk(void)
+static u32 mx31_get_mcu_main_clk(void)
{
/* For now we assume mpl_dpdgck_clk == mcu_main_clk
* which should be correct for most boards
diff --git a/cpu/arm920t/s3c24x0/usb.c b/cpu/arm920t/s3c24x0/usb.c
index ef5d5bf71b1..421ebb4373f 100644
--- a/cpu/arm920t/s3c24x0/usb.c
+++ b/cpu/arm920t/s3c24x0/usb.c
@@ -69,4 +69,4 @@ int usb_cpu_init_fail (void)
}
# endif /* defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) */
-#endif /* defined(CONFIG_USB_OHCI) && defined(CFG_USB_OHCI_CPU_INIT) */
+#endif /* defined(CONFIG_USB_OHCI_NEW) && defined(CFG_USB_OHCI_CPU_INIT) */
diff --git a/cpu/arm926ejs/at91sam9/Makefile b/cpu/arm926ejs/at91sam9/Makefile
index 203abc28e14..44cde1a9c31 100644
--- a/cpu/arm926ejs/at91sam9/Makefile
+++ b/cpu/arm926ejs/at91sam9/Makefile
@@ -1,6 +1,6 @@
#
# (C) Copyright 2000-2008
-# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
diff --git a/cpu/arm926ejs/at91sam9/ether.c b/cpu/arm926ejs/at91sam9/ether.c
index e4f56012aa1..7e11fe4d8eb 100644
--- a/cpu/arm926ejs/at91sam9/ether.c
+++ b/cpu/arm926ejs/at91sam9/ether.c
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
diff --git a/cpu/arm926ejs/at91sam9/lowlevel_init.S b/cpu/arm926ejs/at91sam9/lowlevel_init.S
index 40a3f6aaef6..ec6ad5da18c 100644
--- a/cpu/arm926ejs/at91sam9/lowlevel_init.S
+++ b/cpu/arm926ejs/at91sam9/lowlevel_init.S
@@ -2,7 +2,7 @@
* AT91CAP9/SAM9 setup stuff
*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
diff --git a/cpu/arm926ejs/at91sam9/timer.c b/cpu/arm926ejs/at91sam9/timer.c
index 4e794662865..c79ec7e7ae1 100644
--- a/cpu/arm926ejs/at91sam9/timer.c
+++ b/cpu/arm926ejs/at91sam9/timer.c
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
diff --git a/cpu/arm926ejs/at91sam9/usb.c b/cpu/arm926ejs/at91sam9/usb.c
index d678897dc71..441349df3af 100644
--- a/cpu/arm926ejs/at91sam9/usb.c
+++ b/cpu/arm926ejs/at91sam9/usb.c
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2006
- * DENX Software Engineering <mk <at> denx.de>
+ * DENX Software Engineering <mk@denx.de>
*
* See file CREDITS for list of people who contributed to this
* project.
diff --git a/cpu/mips/cache.S b/cpu/mips/cache.S
index 428d251bf12..1b0efc34a7c 100644
--- a/cpu/mips/cache.S
+++ b/cpu/mips/cache.S
@@ -240,14 +240,16 @@ NESTED(mips_cache_reset, 0, ra)
*/
move a1, t2
move a2, t4
- bal mips_init_icache
+ PTR_LA t7, mips_init_icache
+ jalr t7
/*
* then initialize D-cache.
*/
move a1, t3
move a2, t5
- bal mips_init_dcache
+ PTR_LA t7, mips_init_dcache
+ jalr t7
jr RA
END(mips_cache_reset)
diff --git a/cpu/mpc86xx/cache.S b/cpu/mpc86xx/cache.S
index f316b3ec13f..2e4ea0239f1 100644
--- a/cpu/mpc86xx/cache.S
+++ b/cpu/mpc86xx/cache.S
@@ -338,7 +338,7 @@ _GLOBAL(l2cache_invalidate)
invl2:
mfspr r3, l2cr
- andi. r3, r3, L2CR_L2I@h
+ andis. r3, r3, L2CR_L2I@h
bne invl2
blr
diff --git a/cpu/ppc4xx/fdt.c b/cpu/ppc4xx/fdt.c
index 02dece0c0ff..ccc73d5d64e 100644
--- a/cpu/ppc4xx/fdt.c
+++ b/cpu/ppc4xx/fdt.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2007
+ * (C) Copyright 2007-2008
* Stefan Roese, DENX Software Engineering, sr@denx.de.
*
* See file CREDITS for list of people who contributed to this
@@ -27,7 +27,7 @@
#include <asm/cache.h>
#include <ppc4xx.h>
-#if defined(CONFIG_OF_LIBFDT)
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
#include <libfdt.h>
#include <libfdt_env.h>
#include <fdt_support.h>
@@ -35,6 +35,26 @@
DECLARE_GLOBAL_DATA_PTR;
+void __ft_board_setup(void *blob, bd_t *bd)
+{
+ u32 val[4];
+ int rc;
+
+ ft_cpu_setup(blob, bd);
+
+ /* Fixup NOR mapping */
+ val[0] = 0; /* chip select number */
+ val[1] = 0; /* always 0 */
+ val[2] = gd->bd->bi_flashstart;
+ val[3] = gd->bd->bi_flashsize;
+ rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges",
+ val, sizeof(val), 1);
+ if (rc)
+ printf("Unable to update property NOR mapping, err=%s\n",
+ fdt_strerror(rc));
+}
+void ft_board_setup(void *blob, bd_t *bd) __attribute__((weak, alias("__ft_board_setup")));
+
/*
* Fixup all PCIe nodes by setting the device_type property
* to "pci-endpoint" instead is "pci" for endpoint ports.
@@ -109,4 +129,4 @@ void ft_cpu_setup(void *blob, bd_t *bd)
*/
fdt_pcie_setup(blob);
}
-#endif /* CONFIG_OF_LIBFDT */
+#endif /* CONFIG_OF_LIBFDT && CONFIG_OF_BOARD_SETUP */
diff --git a/cpu/ppc4xx/speed.c b/cpu/ppc4xx/speed.c
index 05b42fec977..8b4e64a19cb 100644
--- a/cpu/ppc4xx/speed.c
+++ b/cpu/ppc4xx/speed.c
@@ -238,7 +238,7 @@ static u8 pll_fbdv_multi_bits[] = {
/* values for: 101 - 200 */
0x78, 0xf1, 0x62, 0xc5, 0x0a, 0x94, 0x28, 0xd0, 0x21, 0xc3,
0x06, 0x8c, 0x18, 0xb0, 0x60, 0xc1, 0x02, 0x84, 0x08, 0x90,
- 0x20, 0xc0, 0x01, 0x83, 0x77, 0xff, 0x1f, 0xbf, 0x7f, 0xfe,
+ 0x20, 0xc0, 0x01, 0x83, 0x07, 0x8f, 0x1f, 0xbf, 0x7f, 0xfe,
0x7d, 0xfa, 0x75, 0xea, 0x55, 0xaa, 0x54, 0xa9, 0x53, 0xa6,
0x4c, 0x99, 0x33, 0xe7, 0x4e, 0x9d, 0x3b, 0xf7, 0x6e, 0xdd,
0x3a, 0xf4, 0x69, 0xd2, 0x25, 0xcb, 0x16, 0xac, 0x58, 0xb1,
diff --git a/disk/part.c b/disk/part.c
index 3c71208a12b..316e2547399 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -109,44 +109,45 @@ void dev_print (block_dev_desc_t *dev_desc)
lbaint_t lba512;
#endif
- if (dev_desc->type==DEV_TYPE_UNKNOWN) {
- puts ("not available\n");
- return;
- }
- if (dev_desc->if_type==IF_TYPE_SCSI) {
- printf ("(%d:%d) ", dev_desc->target,dev_desc->lun);
- }
- if (dev_desc->if_type==IF_TYPE_IDE) {
- printf ("Model: %s Firm: %s Ser#: %s\n",
+ switch (dev_desc->type) {
+ case IF_TYPE_SCSI:
+ printf ("(%d:%d) Vendor: %s Prod.: %s Rev: %s\n",
+ dev_desc->target,dev_desc->lun,
dev_desc->vendor,
- dev_desc->revision,
- dev_desc->product);
- }
- if (dev_desc->if_type==IF_TYPE_SATA) {
+ dev_desc->product,
+ dev_desc->revision);
+ break;
+ case IF_TYPE_IDE:
+ case IF_TYPE_SATA:
printf ("Model: %s Firm: %s Ser#: %s\n",
dev_desc->vendor,
dev_desc->revision,
dev_desc->product);
- } else {
- printf ("Vendor: %s Prod.: %s Rev: %s\n",
- dev_desc->vendor,
- dev_desc->product,
- dev_desc->revision);
+ break;
+ case DEV_TYPE_UNKNOWN:
+ default:
+ puts ("not available\n");
+ return;
}
puts (" Type: ");
if (dev_desc->removable)
puts ("Removable ");
switch (dev_desc->type & 0x1F) {
- case DEV_TYPE_HARDDISK: puts ("Hard Disk");
- break;
- case DEV_TYPE_CDROM: puts ("CD ROM");
- break;
- case DEV_TYPE_OPDISK: puts ("Optical Device");
- break;
- case DEV_TYPE_TAPE: puts ("Tape");
- break;
- default: printf ("# %02X #", dev_desc->type & 0x1F);
- break;
+ case DEV_TYPE_HARDDISK:
+ puts ("Hard Disk");
+ break;
+ case DEV_TYPE_CDROM:
+ puts ("CD ROM");
+ break;
+ case DEV_TYPE_OPDISK:
+ puts ("Optical Device");
+ break;
+ case DEV_TYPE_TAPE:
+ puts ("Tape");
+ break;
+ default:
+ printf ("# %02X #", dev_desc->type & 0x1F);
+ break;
}
puts ("\n");
if ((dev_desc->lba * dev_desc->blksz)>0L) {
@@ -281,20 +282,27 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc)
{
puts ("\nPartition Map for ");
switch (dev_desc->if_type) {
- case IF_TYPE_IDE: puts ("IDE");
- break;
- case IF_TYPE_SATA: puts ("SATA");
- break;
- case IF_TYPE_SCSI: puts ("SCSI");
- break;
- case IF_TYPE_ATAPI: puts ("ATAPI");
- break;
- case IF_TYPE_USB: puts ("USB");
- break;
- case IF_TYPE_DOC: puts ("DOC");
- break;
- default: puts ("UNKNOWN");
- break;
+ case IF_TYPE_IDE:
+ puts ("IDE");
+ break;
+ case IF_TYPE_SATA:
+ puts ("SATA");
+ break;
+ case IF_TYPE_SCSI:
+ puts ("SCSI");
+ break;
+ case IF_TYPE_ATAPI:
+ puts ("ATAPI");
+ break;
+ case IF_TYPE_USB:
+ puts ("USB");
+ break;
+ case IF_TYPE_DOC:
+ puts ("DOC");
+ break;
+ default:
+ puts ("UNKNOWN");
+ break;
}
printf (" device %d -- Partition Type: %s\n\n",
dev_desc->dev, type);
diff --git a/doc/README.nand-boot-ppc440 b/doc/README.nand-boot-ppc440
index a1c1d8c4447..1e9c102644b 100644
--- a/doc/README.nand-boot-ppc440
+++ b/doc/README.nand-boot-ppc440
@@ -9,7 +9,7 @@ The PPC440EP(x)/GR(x) cpu's can boot directly from NAND FLASH,
completely without NOR FLASH. This can be done by using the NAND
boot feature of the 440 NAND flash controller (NDFC).
-Here a short desciption of the different boot stages:
+Here a short description of the different boot stages:
a) IPL (Initial Program Loader, integrated inside CPU)
------------------------------------------------------
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index d22c8895da6..c17dcf43717 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -1,7 +1,7 @@
/*
* SMSC LAN9[12]1[567] Network driver
*
- * (c) 2007 Pengutronix, Sascha Hauer <s.hauer <at> pengutronix.de>
+ * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
*
* See file CREDITS for list of people who contributed to this
* project.
diff --git a/include/.gitignore b/include/.gitignore
index 03a533ced4c..ef7dd5fc8a2 100644
--- a/include/.gitignore
+++ b/include/.gitignore
@@ -1,7 +1,7 @@
/autoconf.mk*
/asm
-/asm-blackfin/arch
-/asm-ppc/arch
+/asm-*/arch
+/asm-*/proc
/bmp_logo.h
/config.h
/config.mk
diff --git a/include/asm-arm/arch-at91sam9/at91_pio.h b/include/asm-arm/arch-at91sam9/at91_pio.h
index 84c3866d309..f6ce1f924ef 100644
--- a/include/asm-arm/arch-at91sam9/at91_pio.h
+++ b/include/asm-arm/arch-at91sam9/at91_pio.h
@@ -1,5 +1,5 @@
/*
- * include/asm-arm/arch-at91/at91_pio.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91_pio.h]
*
* Copyright (C) 2005 Ivan Kokshaysky
* Copyright (C) SAN People
diff --git a/include/asm-arm/arch-at91sam9/at91_pit.h b/include/asm-arm/arch-at91sam9/at91_pit.h
index 5026325a5ae..94dd242a5fb 100644
--- a/include/asm-arm/arch-at91sam9/at91_pit.h
+++ b/include/asm-arm/arch-at91sam9/at91_pit.h
@@ -1,5 +1,8 @@
/*
- * include/asm-arm/arch-at91/at91_pit.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91_pit.h]
+ *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
*
* Periodic Interval Timer (PIT) - System peripherals regsters.
* Based on AT91SAM9261 datasheet revision D.
diff --git a/include/asm-arm/arch-at91sam9/at91_pmc.h b/include/asm-arm/arch-at91sam9/at91_pmc.h
index 52cd8e5dabc..103be869998 100644
--- a/include/asm-arm/arch-at91sam9/at91_pmc.h
+++ b/include/asm-arm/arch-at91sam9/at91_pmc.h
@@ -1,5 +1,5 @@
/*
- * include/asm-arm/arch-at91/at91_pmc.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91_pmc.h]
*
* Copyright (C) 2005 Ivan Kokshaysky
* Copyright (C) SAN People
diff --git a/include/asm-arm/arch-at91sam9/at91_rstc.h b/include/asm-arm/arch-at91sam9/at91_rstc.h
index fb8d1618a23..e49caef9218 100644
--- a/include/asm-arm/arch-at91sam9/at91_rstc.h
+++ b/include/asm-arm/arch-at91sam9/at91_rstc.h
@@ -1,5 +1,8 @@
/*
- * include/asm-arm/arch-at91/at91_rstc.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91_rstc.h]
+ *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
*
* Reset Controller (RSTC) - System peripherals regsters.
* Based on AT91SAM9261 datasheet revision D.
diff --git a/include/asm-arm/arch-at91sam9/at91_spi.h b/include/asm-arm/arch-at91sam9/at91_spi.h
index aaad92621c8..30643c60920 100644
--- a/include/asm-arm/arch-at91sam9/at91_spi.h
+++ b/include/asm-arm/arch-at91sam9/at91_spi.h
@@ -1,5 +1,5 @@
/*
- * include/asm-arm/arch-at91/at91_spi.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91_spi.h]
*
* Copyright (C) 2005 Ivan Kokshaysky
* Copyright (C) SAN People
diff --git a/include/asm-arm/arch-at91sam9/at91cap9.h b/include/asm-arm/arch-at91sam9/at91cap9.h
index e16909c641d..d1b33a069a9 100644
--- a/include/asm-arm/arch-at91sam9/at91cap9.h
+++ b/include/asm-arm/arch-at91sam9/at91cap9.h
@@ -1,5 +1,5 @@
/*
- * include/asm-arm/arch-at91/at91cap9.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91cap9.h]
*
* Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com>
* Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com>
diff --git a/include/asm-arm/arch-at91sam9/at91cap9_matrix.h b/include/asm-arm/arch-at91sam9/at91cap9_matrix.h
index a641686b6c3..22b7e9b8f4b 100644
--- a/include/asm-arm/arch-at91sam9/at91cap9_matrix.h
+++ b/include/asm-arm/arch-at91sam9/at91cap9_matrix.h
@@ -1,5 +1,5 @@
/*
- * include/asm-arm/arch-at91/at91cap9_matrix.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91cap9_matrix.h]
*
* Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com>
* Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com>
diff --git a/include/asm-arm/arch-at91sam9/at91sam9260.h b/include/asm-arm/arch-at91sam9/at91sam9260.h
index 1bf45989b5f..920a7f3c9ff 100644
--- a/include/asm-arm/arch-at91sam9/at91sam9260.h
+++ b/include/asm-arm/arch-at91sam9/at91sam9260.h
@@ -1,5 +1,5 @@
/*
- * include/asm-arm/arch-at91/at91sam9260.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9260.h]
*
* (C) 2006 Andrew Victor
*
diff --git a/include/asm-arm/arch-at91sam9/at91sam9260_matrix.h b/include/asm-arm/arch-at91sam9/at91sam9260_matrix.h
index a8e9fec6c73..f8b023d9327 100644
--- a/include/asm-arm/arch-at91sam9/at91sam9260_matrix.h
+++ b/include/asm-arm/arch-at91sam9/at91sam9260_matrix.h
@@ -1,5 +1,7 @@
/*
- * include/asm-arm/arch-at91/at91sam9260_matrix.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9260_matrix.h]
+ *
+ * Copyright (C) 2007 Atmel Corporation.
*
* Memory Controllers (MATRIX, EBI) - System peripherals registers.
* Based on AT91SAM9260 datasheet revision B.
diff --git a/include/asm-arm/arch-at91sam9/at91sam926x_mc.h b/include/asm-arm/arch-at91sam9/at91sam926x_mc.h
deleted file mode 100644
index 041138f809d..00000000000
--- a/include/asm-arm/arch-at91sam9/at91sam926x_mc.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * include/asm-arm/arch-at91/at91sam926x_mc.h
- *
- * Memory Controllers (SMC, SDRAMC) - System peripherals registers.
- * Based on AT91SAM9261 datasheet revision D.
- *
- * 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.
- */
-
-#ifndef AT91SAM926x_MC_H
-#define AT91SAM926x_MC_H
-
-/* SDRAM Controller (SDRAMC) registers */
-#define AT91_SDRAMC_MR (AT91_SDRAMC + 0x00) /* SDRAM Controller Mode Register */
-#define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */
-#define AT91_SDRAMC_MODE_NORMAL 0
-#define AT91_SDRAMC_MODE_NOP 1
-#define AT91_SDRAMC_MODE_PRECHARGE 2
-#define AT91_SDRAMC_MODE_LMR 3
-#define AT91_SDRAMC_MODE_REFRESH 4
-#define AT91_SDRAMC_MODE_EXT_LMR 5
-#define AT91_SDRAMC_MODE_DEEP 6
-
-#define AT91_SDRAMC_TR (AT91_SDRAMC + 0x04) /* SDRAM Controller Refresh Timer Register */
-#define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Counter */
-
-#define AT91_SDRAMC_CR (AT91_SDRAMC + 0x08) /* SDRAM Controller Configuration Register */
-#define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */
-#define AT91_SDRAMC_NC_8 (0 << 0)
-#define AT91_SDRAMC_NC_9 (1 << 0)
-#define AT91_SDRAMC_NC_10 (2 << 0)
-#define AT91_SDRAMC_NC_11 (3 << 0)
-#define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */
-#define AT91_SDRAMC_NR_11 (0 << 2)
-#define AT91_SDRAMC_NR_12 (1 << 2)
-#define AT91_SDRAMC_NR_13 (2 << 2)
-#define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */
-#define AT91_SDRAMC_NB_2 (0 << 4)
-#define AT91_SDRAMC_NB_4 (1 << 4)
-#define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */
-#define AT91_SDRAMC_CAS_1 (1 << 5)
-#define AT91_SDRAMC_CAS_2 (2 << 5)
-#define AT91_SDRAMC_CAS_3 (3 << 5)
-#define AT91_SDRAMC_DBW (1 << 7) /* Data Bus Width */
-#define AT91_SDRAMC_DBW_32 (0 << 7)
-#define AT91_SDRAMC_DBW_16 (1 << 7)
-#define AT91_SDRAMC_TWR (0xf << 8) /* Write Recovery Delay */
-#define AT91_SDRAMC_TRC (0xf << 12) /* Row Cycle Delay */
-#define AT91_SDRAMC_TRP (0xf << 16) /* Row Precharge Delay */
-#define AT91_SDRAMC_TRCD (0xf << 20) /* Row to Column Delay */
-#define AT91_SDRAMC_TRAS (0xf << 24) /* Active to Precharge Delay */
-#define AT91_SDRAMC_TXSR (0xf << 28) /* Exit Self Refresh to Active Delay */
-
-#define AT91_SDRAMC_LPR (AT91_SDRAMC + 0x10) /* SDRAM Controller Low Power Register */
-#define AT91_SDRAMC_LPCB (3 << 0) /* Low-power Configurations */
-#define AT91_SDRAMC_LPCB_DISABLE 0
-#define AT91_SDRAMC_LPCB_SELF_REFRESH 1
-#define AT91_SDRAMC_LPCB_POWER_DOWN 2
-#define AT91_SDRAMC_LPCB_DEEP_POWER_DOWN 3
-#define AT91_SDRAMC_PASR (7 << 4) /* Partial Array Self Refresh */
-#define AT91_SDRAMC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */
-#define AT91_SDRAMC_DS (3 << 10) /* Drive Strenght */
-#define AT91_SDRAMC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */
-#define AT91_SDRAMC_TIMEOUT_0_CLK_CYCLES (0 << 12)
-#define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12)
-#define AT91_SDRAMC_TIMEOUT_128_CLK_CYCLES (2 << 12)
-
-#define AT91_SDRAMC_IER (AT91_SDRAMC + 0x14) /* SDRAM Controller Interrupt Enable Register */
-#define AT91_SDRAMC_IDR (AT91_SDRAMC + 0x18) /* SDRAM Controller Interrupt Disable Register */
-#define AT91_SDRAMC_IMR (AT91_SDRAMC + 0x1C) /* SDRAM Controller Interrupt Mask Register */
-#define AT91_SDRAMC_ISR (AT91_SDRAMC + 0x20) /* SDRAM Controller Interrupt Status Register */
-#define AT91_SDRAMC_RES (1 << 0) /* Refresh Error Status */
-
-#define AT91_SDRAMC_MDR (AT91_SDRAMC + 0x24) /* SDRAM Memory Device Register */
-#define AT91_SDRAMC_MD (3 << 0) /* Memory Device Type */
-#define AT91_SDRAMC_MD_SDRAM 0
-#define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1
-
-/* Static Memory Controller (SMC) registers */
-#define AT91_SMC_SETUP(n) (AT91_SMC + 0x00 + ((n)*0x10)) /* Setup Register for CS n */
-#define AT91_SMC_NWESETUP (0x3f << 0) /* NWE Setup Length */
-#define AT91_SMC_NWESETUP_(x) ((x) << 0)
-#define AT91_SMC_NCS_WRSETUP (0x3f << 8) /* NCS Setup Length in Write Access */
-#define AT91_SMC_NCS_WRSETUP_(x) ((x) << 8)
-#define AT91_SMC_NRDSETUP (0x3f << 16) /* NRD Setup Length */
-#define AT91_SMC_NRDSETUP_(x) ((x) << 16)
-#define AT91_SMC_NCS_RDSETUP (0x3f << 24) /* NCS Setup Length in Read Access */
-#define AT91_SMC_NCS_RDSETUP_(x) ((x) << 24)
-
-#define AT91_SMC_PULSE(n) (AT91_SMC + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */
-#define AT91_SMC_NWEPULSE (0x7f << 0) /* NWE Pulse Length */
-#define AT91_SMC_NWEPULSE_(x) ((x) << 0)
-#define AT91_SMC_NCS_WRPULSE (0x7f << 8) /* NCS Pulse Length in Write Access */
-#define AT91_SMC_NCS_WRPULSE_(x)((x) << 8)
-#define AT91_SMC_NRDPULSE (0x7f << 16) /* NRD Pulse Length */
-#define AT91_SMC_NRDPULSE_(x) ((x) << 16)
-#define AT91_SMC_NCS_RDPULSE (0x7f << 24) /* NCS Pulse Length in Read Access */
-#define AT91_SMC_NCS_RDPULSE_(x)((x) << 24)
-
-#define AT91_SMC_CYCLE(n) (AT91_SMC + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */
-#define AT91_SMC_NWECYCLE (0x1ff << 0 ) /* Total Write Cycle Length */
-#define AT91_SMC_NWECYCLE_(x) ((x) << 0)
-#define AT91_SMC_NRDCYCLE (0x1ff << 16) /* Total Read Cycle Length */
-#define AT91_SMC_NRDCYCLE_(x) ((x) << 16)
-
-#define AT91_SMC_MODE(n) (AT91_SMC + 0x0c + ((n)*0x10)) /* Mode Register for CS n */
-#define AT91_SMC_READMODE (1 << 0) /* Read Mode */
-#define AT91_SMC_WRITEMODE (1 << 1) /* Write Mode */
-#define AT91_SMC_EXNWMODE (3 << 4) /* NWAIT Mode */
-#define AT91_SMC_EXNWMODE_DISABLE (0 << 4)
-#define AT91_SMC_EXNWMODE_FROZEN (2 << 4)
-#define AT91_SMC_EXNWMODE_READY (3 << 4)
-#define AT91_SMC_BAT (1 << 8) /* Byte Access Type */
-#define AT91_SMC_BAT_SELECT (0 << 8)
-#define AT91_SMC_BAT_WRITE (1 << 8)
-#define AT91_SMC_DBW (3 << 12) /* Data Bus Width */
-#define AT91_SMC_DBW_8 (0 << 12)
-#define AT91_SMC_DBW_16 (1 << 12)
-#define AT91_SMC_DBW_32 (2 << 12)
-#define AT91_SMC_TDF (0xf << 16) /* Data Float Time. */
-#define AT91_SMC_TDF_(x) ((x) << 16)
-#define AT91_SMC_TDFMODE (1 << 20) /* TDF Optimization - Enabled */
-#define AT91_SMC_PMEN (1 << 24) /* Page Mode Enabled */
-#define AT91_SMC_PS (3 << 28) /* Page Size */
-#define AT91_SMC_PS_4 (0 << 28)
-#define AT91_SMC_PS_8 (1 << 28)
-#define AT91_SMC_PS_16 (2 << 28)
-#define AT91_SMC_PS_32 (3 << 28)
-
-#if defined(AT91_SMC1) /* The AT91SAM9263 has 2 Static Memory contollers */
-#define AT91_SMC1_SETUP(n) (AT91_SMC1 + 0x00 + ((n)*0x10)) /* Setup Register for CS n */
-#define AT91_SMC1_PULSE(n) (AT91_SMC1 + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */
-#define AT91_SMC1_CYCLE(n) (AT91_SMC1 + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */
-#define AT91_SMC1_MODE(n) (AT91_SMC1 + 0x0c + ((n)*0x10)) /* Mode Register for CS n */
-#endif
-
-#endif
diff --git a/include/asm-arm/arch-at91sam9/at91sam9_smc.h b/include/asm-arm/arch-at91sam9/at91sam9_smc.h
new file mode 100644
index 00000000000..d64511b36dd
--- /dev/null
+++ b/include/asm-arm/arch-at91sam9/at91sam9_smc.h
@@ -0,0 +1,76 @@
+/*
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9_smc.h]
+ *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
+ *
+ * Static Memory Controllers (SMC) - System peripherals registers.
+ * Based on AT91SAM9261 datasheet revision D.
+ *
+ * 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.
+ */
+
+#ifndef AT91SAM9_SMC_H
+#define AT91SAM9_SMC_H
+
+#define AT91_SMC_SETUP(n) (AT91_SMC + 0x00 + ((n)*0x10)) /* Setup Register for CS n */
+#define AT91_SMC_NWESETUP (0x3f << 0) /* NWE Setup Length */
+#define AT91_SMC_NWESETUP_(x) ((x) << 0)
+#define AT91_SMC_NCS_WRSETUP (0x3f << 8) /* NCS Setup Length in Write Access */
+#define AT91_SMC_NCS_WRSETUP_(x) ((x) << 8)
+#define AT91_SMC_NRDSETUP (0x3f << 16) /* NRD Setup Length */
+#define AT91_SMC_NRDSETUP_(x) ((x) << 16)
+#define AT91_SMC_NCS_RDSETUP (0x3f << 24) /* NCS Setup Length in Read Access */
+#define AT91_SMC_NCS_RDSETUP_(x) ((x) << 24)
+
+#define AT91_SMC_PULSE(n) (AT91_SMC + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */
+#define AT91_SMC_NWEPULSE (0x7f << 0) /* NWE Pulse Length */
+#define AT91_SMC_NWEPULSE_(x) ((x) << 0)
+#define AT91_SMC_NCS_WRPULSE (0x7f << 8) /* NCS Pulse Length in Write Access */
+#define AT91_SMC_NCS_WRPULSE_(x)((x) << 8)
+#define AT91_SMC_NRDPULSE (0x7f << 16) /* NRD Pulse Length */
+#define AT91_SMC_NRDPULSE_(x) ((x) << 16)
+#define AT91_SMC_NCS_RDPULSE (0x7f << 24) /* NCS Pulse Length in Read Access */
+#define AT91_SMC_NCS_RDPULSE_(x)((x) << 24)
+
+#define AT91_SMC_CYCLE(n) (AT91_SMC + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */
+#define AT91_SMC_NWECYCLE (0x1ff << 0 ) /* Total Write Cycle Length */
+#define AT91_SMC_NWECYCLE_(x) ((x) << 0)
+#define AT91_SMC_NRDCYCLE (0x1ff << 16) /* Total Read Cycle Length */
+#define AT91_SMC_NRDCYCLE_(x) ((x) << 16)
+
+#define AT91_SMC_MODE(n) (AT91_SMC + 0x0c + ((n)*0x10)) /* Mode Register for CS n */
+#define AT91_SMC_READMODE (1 << 0) /* Read Mode */
+#define AT91_SMC_WRITEMODE (1 << 1) /* Write Mode */
+#define AT91_SMC_EXNWMODE (3 << 4) /* NWAIT Mode */
+#define AT91_SMC_EXNWMODE_DISABLE (0 << 4)
+#define AT91_SMC_EXNWMODE_FROZEN (2 << 4)
+#define AT91_SMC_EXNWMODE_READY (3 << 4)
+#define AT91_SMC_BAT (1 << 8) /* Byte Access Type */
+#define AT91_SMC_BAT_SELECT (0 << 8)
+#define AT91_SMC_BAT_WRITE (1 << 8)
+#define AT91_SMC_DBW (3 << 12) /* Data Bus Width */
+#define AT91_SMC_DBW_8 (0 << 12)
+#define AT91_SMC_DBW_16 (1 << 12)
+#define AT91_SMC_DBW_32 (2 << 12)
+#define AT91_SMC_TDF (0xf << 16) /* Data Float Time. */
+#define AT91_SMC_TDF_(x) ((x) << 16)
+#define AT91_SMC_TDFMODE (1 << 20) /* TDF Optimization - Enabled */
+#define AT91_SMC_PMEN (1 << 24) /* Page Mode Enabled */
+#define AT91_SMC_PS (3 << 28) /* Page Size */
+#define AT91_SMC_PS_4 (0 << 28)
+#define AT91_SMC_PS_8 (1 << 28)
+#define AT91_SMC_PS_16 (2 << 28)
+#define AT91_SMC_PS_32 (3 << 28)
+
+#if defined(AT91_SMC1) /* The AT91SAM9263 has 2 Static Memory contollers */
+#define AT91_SMC1_SETUP(n) (AT91_SMC1 + 0x00 + ((n)*0x10)) /* Setup Register for CS n */
+#define AT91_SMC1_PULSE(n) (AT91_SMC1 + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */
+#define AT91_SMC1_CYCLE(n) (AT91_SMC1 + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */
+#define AT91_SMC1_MODE(n) (AT91_SMC1 + 0x0c + ((n)*0x10)) /* Mode Register for CS n */
+#endif
+
+#endif
diff --git a/include/asm-arm/arch-at91sam9/clk.h b/include/asm-arm/arch-at91sam9/clk.h
index 86da9a6e099..f67b4356d9b 100644
--- a/include/asm-arm/arch-at91sam9/clk.h
+++ b/include/asm-arm/arch-at91sam9/clk.h
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
diff --git a/include/asm-arm/arch-at91sam9/gpio.h b/include/asm-arm/arch-at91sam9/gpio.h
index 2500eae2a4a..c157e107e14 100644
--- a/include/asm-arm/arch-at91sam9/gpio.h
+++ b/include/asm-arm/arch-at91sam9/gpio.h
@@ -1,5 +1,5 @@
/*
- * include/asm-arm/arch-at91/gpio.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/gpio.h]
*
* Copyright (C) 2005 HP Labs
*
diff --git a/include/asm-arm/arch-at91sam9/hardware.h b/include/asm-arm/arch-at91sam9/hardware.h
index 80b334f36e3..d2fe45388b3 100644
--- a/include/asm-arm/arch-at91sam9/hardware.h
+++ b/include/asm-arm/arch-at91sam9/hardware.h
@@ -1,5 +1,5 @@
/*
- * include/asm-arm/arch-at91/hardware.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/hardware.h]
*
* Copyright (C) 2003 SAN People
* Copyright (C) 2003 ATMEL
diff --git a/include/asm-arm/arch-at91sam9/io.h b/include/asm-arm/arch-at91sam9/io.h
index be9e9abe569..f09b2df0e31 100644
--- a/include/asm-arm/arch-at91sam9/io.h
+++ b/include/asm-arm/arch-at91sam9/io.h
@@ -1,5 +1,5 @@
/*
- * include/asm-arm/arch-at91/io.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/io.h]
*
* Copyright (C) 2003 SAN People
*
diff --git a/include/asm-arm/arch-at91sam9/memory-map.h b/include/asm-arm/arch-at91sam9/memory-map.h
index da988224617..8015dad6a9c 100644
--- a/include/asm-arm/arch-at91sam9/memory-map.h
+++ b/include/asm-arm/arch-at91sam9/memory-map.h
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
diff --git a/include/asm-arm/arch-mx31/mx31.h b/include/asm-arm/arch-mx31/mx31.h
index f89a401bbcf..0552c27ce65 100644
--- a/include/asm-arm/arch-mx31/mx31.h
+++ b/include/asm-arm/arch-mx31/mx31.h
@@ -24,9 +24,7 @@
#ifndef __ASM_ARCH_MX31_H
#define __ASM_ARCH_MX31_H
-u32 mx31_get_mpl_dpdgck_clk(void);
-u32 mx31_get_mcu_main_clk(void);
-u32 mx31_get_ipg_clk(void);
-void mx31_gpio_mux(unsigned long mode);
+extern u32 mx31_get_ipg_clk(void);
+extern void mx31_gpio_mux(unsigned long mode);
#endif /* __ASM_ARCH_MX31_H */
diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h
index 8054f62b060..501ce0e6805 100644
--- a/include/asm-arm/dma-mapping.h
+++ b/include/asm-arm/dma-mapping.h
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
diff --git a/include/configs/acadia.h b/include/configs/acadia.h
index 3cd5ad62c02..bbf726dc625 100644
--- a/include/configs/acadia.h
+++ b/include/configs/acadia.h
@@ -59,16 +59,16 @@
* Base addresses -- Note these are effective addresses where the
* actual resources get mapped (not physical addresses)
*----------------------------------------------------------------------*/
-#define CFG_MONITOR_LEN (256 * 1024)/* Reserve 256 kB for Monitor */
-#define CFG_MALLOC_LEN (512 * 1024)/* Reserve 512 kB for malloc() */
-
#define CFG_SDRAM_BASE 0x00000000
#define CFG_FLASH_BASE 0xfe000000
-#define CFG_MONITOR_BASE TEXT_BASE
#define CFG_CPLD_BASE 0x80000000
#define CFG_NAND_ADDR 0xd0000000
#define CFG_USB_HOST 0xef603000 /* USB OHCI 1.1 controller */
+#define CFG_MONITOR_BASE TEXT_BASE
+#define CFG_MONITOR_LEN (0xFFFFFFFF - CFG_MONITOR_BASE + 1)
+#define CFG_MALLOC_LEN (512 * 1024)/* Reserve 512 kB for malloc() */
+
/*-----------------------------------------------------------------------
* Initial RAM & stack pointer
*----------------------------------------------------------------------*/
@@ -237,6 +237,7 @@
#define CONFIG_PHY_ADDR 0 /* PHY address */
#define CONFIG_NET_MULTI 1
#define CFG_RX_ETH_BUFFER 16 /* # of rx buffers & descriptors*/
+#define CONFIG_HAS_ETH0 1
#define CONFIG_NETCONSOLE /* include NetConsole support */
@@ -246,6 +247,9 @@
#undef CONFIG_BOOTARGS
+#define xstr(s) str(s)
+#define str(s) #s
+
#define CONFIG_EXTRA_ENV_SETTINGS \
"netdev=eth0\0" \
"hostname=acadia\0" \
@@ -268,8 +272,9 @@
"ramdisk_addr=fff20000\0" \
"initrd_high=30000000\0" \
"load=tftp 200000 acadia/u-boot.bin\0" \
- "update=protect off fffc0000 ffffffff;era fffc0000 ffffffff;" \
- "cp.b ${fileaddr} fffc0000 ${filesize};" \
+ "update=protect off " xstr(CFG_MONITOR_BASE) " FFFFFFFF;" \
+ "era " xstr(CFG_MONITOR_BASE) " FFFFFFFF;" \
+ "cp.b ${fileaddr} " xstr(CFG_MONITOR_BASE) " ${filesize};" \
"setenv filesize;saveenv\0" \
"upd=run load update\0" \
"nload=tftp 200000 acadia/u-boot-nand.bin\0" \
@@ -501,4 +506,8 @@
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_OF_BOARD_SETUP 1
+
#endif /* __CONFIG_H */
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index dab21d0c0a0..c891fa80ed4 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* Configuation settings for the AT91CAP9ADK board.
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 96d1b8dff3a..41c418f9aba 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* Configuation settings for the AT91SAM9260EK board.
diff --git a/include/configs/bamboo.h b/include/configs/bamboo.h
index 4ea040bc228..2f0df8ad2d0 100644
--- a/include/configs/bamboo.h
+++ b/include/configs/bamboo.h
@@ -291,6 +291,7 @@
#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
#define CFG_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
+#define CONFIG_HAS_ETH0
#define CONFIG_MII 1 /* MII PHY management */
#define CONFIG_PHY_ADDR 0 /* PHY address, See schematics */
#define CONFIG_PHY1_ADDR 1
@@ -426,4 +427,9 @@
#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
+
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_OF_BOARD_SETUP 1
+
#endif /* __CONFIG_H */
diff --git a/include/configs/bubinga.h b/include/configs/bubinga.h
index 784e7c0f8b3..cbd74a0d8db 100644
--- a/include/configs/bubinga.h
+++ b/include/configs/bubinga.h
@@ -128,6 +128,7 @@
#define CONFIG_MII 1 /* MII PHY management */
#define CONFIG_PHY_ADDR 1 /* PHY address */
+#define CONFIG_HAS_ETH0
#define CONFIG_HAS_ETH1
#define CONFIG_PHY1_ADDR 2 /* EMAC1 PHY address */
#define CONFIG_NET_MULTI 1
@@ -435,4 +436,8 @@
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_OF_BOARD_SETUP 1
+
#endif /* __CONFIG_H */
diff --git a/include/configs/ebony.h b/include/configs/ebony.h
index 88fd7caa7a3..ba68fd4b967 100644
--- a/include/configs/ebony.h
+++ b/include/configs/ebony.h
@@ -201,6 +201,7 @@
#define CONFIG_MII 1 /* MII PHY management */
#define CONFIG_PHY_ADDR 8 /* PHY address */
+#define CONFIG_HAS_ETH0
#define CONFIG_HAS_ETH1
#define CONFIG_PHY1_ADDR 9 /* EMAC1 PHY address */
#define CONFIG_NET_MULTI 1
@@ -306,4 +307,9 @@
#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
+
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_OF_BOARD_SETUP 1
+
#endif /* __CONFIG_H */
diff --git a/include/configs/katmai.h b/include/configs/katmai.h
index d2f6b1021a3..cce883fd85f 100644
--- a/include/configs/katmai.h
+++ b/include/configs/katmai.h
@@ -79,7 +79,7 @@
#define CFG_ACE_BASE 0xfe000000 /* Xilinx ACE controller - Compact Flash */
#define CFG_MONITOR_BASE TEXT_BASE
-#define CFG_MONITOR_LEN (0xFFFFFFFF - CFG_MONITOR_LEN + 1)
+#define CFG_MONITOR_LEN (0xFFFFFFFF - CFG_MONITOR_BASE + 1)
#define CFG_MALLOC_LEN (512 * 1024) /* Reserve 512 kB for malloc */
/*-----------------------------------------------------------------------
diff --git a/include/configs/kilauea.h b/include/configs/kilauea.h
index f4cf42c3116..57cc90a6de7 100644
--- a/include/configs/kilauea.h
+++ b/include/configs/kilauea.h
@@ -490,7 +490,7 @@
* Some Kilauea stuff..., mainly fpga registers
*/
#define CFG_FPGA_REG_BASE CFG_FPGA_BASE
-#define CFG_FPGA_FIFO_BASE (in32(CFG_FPGA_BASE) | (1 << 11))
+#define CFG_FPGA_FIFO_BASE (in32(CFG_FPGA_BASE) | (1 << 10))
/* interrupt */
#define CFG_FPGA_SLIC0_R_DPRAM_INT 0x80000000
diff --git a/include/configs/luan.h b/include/configs/luan.h
index af237d9be0b..37151d31fdd 100644
--- a/include/configs/luan.h
+++ b/include/configs/luan.h
@@ -195,6 +195,7 @@
#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
#define CFG_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
+#define CONFIG_HAS_ETH0
#define CONFIG_MII 1 /* MII PHY management */
#define CONFIG_PHY_ADDR 1
#define CONFIG_CIS8201_PHY 1 /* Enable 'special' RGMII mode for Cicada phy */
@@ -306,4 +307,8 @@
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_OF_BOARD_SETUP 1
+
#endif /* __CONFIG_H */
diff --git a/include/configs/ml401.h b/include/configs/ml401.h
index 360e2e11d2a..7e0df870191 100644
--- a/include/configs/ml401.h
+++ b/include/configs/ml401.h
@@ -56,9 +56,11 @@
/* ethernet */
#ifdef XILINX_EMAC_BASEADDR
#define CONFIG_XILINX_EMAC 1
+#define CFG_ENET
#else
#ifdef XILINX_EMACLITE_BASEADDR
#define CONFIG_XILINX_EMACLITE 1
+#define CFG_ENET
#endif
#endif
#undef ET_DEBUG
@@ -70,18 +72,28 @@
#endif
/* interrupt controller */
+#ifdef XILINX_INTC_BASEADDR
#define CFG_INTC_0 1
#define CFG_INTC_0_ADDR XILINX_INTC_BASEADDR
#define CFG_INTC_0_NUM XILINX_INTC_NUM_INTR_INPUTS
+#endif
/* timer */
+#ifdef XILINX_TIMER_BASEADDR
+#if (XILINX_TIMER_IRQ != -1)
#define CFG_TIMER_0 1
#define CFG_TIMER_0_ADDR XILINX_TIMER_BASEADDR
#define CFG_TIMER_0_IRQ XILINX_TIMER_IRQ
#define FREQUENCE XILINX_CLOCK_FREQ
#define CFG_TIMER_0_PRELOAD ( FREQUENCE/1000 )
+#endif
+#else
+#ifdef XILINX_CLOCK_FREQ
#define CONFIG_XILINX_CLOCK_FREQ XILINX_CLOCK_FREQ
-
+#else
+#error BAD CLOCK FREQ
+#endif
+#endif
/* FSL */
/* #define CFG_FSL_2 */
/* #define FSL_INTR_2 1 */
@@ -195,7 +207,12 @@
#define CONFIG_CMD_CACHE
#define CONFIG_CMD_IRQ
#define CONFIG_CMD_MFSL
-#define CONFIG_CMD_PING
+
+#ifndef CFG_ENET
+ #undef CONFIG_CMD_NET
+#else
+ #define CONFIG_CMD_PING
+#endif
#if defined(CONFIG_SYSTEMACE)
#define CONFIG_CMD_EXT2
diff --git a/include/configs/mx31ads.h b/include/configs/mx31ads.h
index 7614b95019d..2ea48a6da9a 100644
--- a/include/configs/mx31ads.h
+++ b/include/configs/mx31ads.h
@@ -28,7 +28,7 @@
#define CONFIG_ARM1136 1 /* This is an arm1136 CPU core */
#define CONFIG_MX31 1 /* in a mx31 */
#define CONFIG_MX31_HCLK_FREQ 26000000 /* RedBoot says 26MHz */
-#define CONFIG_MX31_CLK32 32000
+#define CONFIG_MX31_CLK32 32768
#define CONFIG_DISPLAY_CPUINFO
#define CONFIG_DISPLAY_BOARDINFO
@@ -139,7 +139,7 @@
#define CFG_LOAD_ADDR CONFIG_LOADADDR
-#define CFG_HZ 32000
+#define CFG_HZ CONFIG_MX31_CLK32 /* use 32kHz clock as source */
#define CONFIG_CMDLINE_EDITING 1
diff --git a/include/configs/ocotea.h b/include/configs/ocotea.h
index 5a6eb4a37d4..be2b3ec7efd 100644
--- a/include/configs/ocotea.h
+++ b/include/configs/ocotea.h
@@ -330,4 +330,9 @@
#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
+
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_OF_BOARD_SETUP 1
+
#endif /* __CONFIG_H */
diff --git a/include/configs/taihu.h b/include/configs/taihu.h
index 7db973676ba..8a1ff1acba4 100644
--- a/include/configs/taihu.h
+++ b/include/configs/taihu.h
@@ -114,6 +114,7 @@
#define CONFIG_MII 1 /* MII PHY management */
#define CONFIG_PHY_ADDR 0x14 /* PHY address */
+#define CONFIG_HAS_ETH0
#define CONFIG_HAS_ETH1
#define CONFIG_PHY1_ADDR 0x10 /* EMAC1 PHY address */
#define CONFIG_NET_MULTI 1
@@ -433,4 +434,8 @@ unsigned char spi_read(void);
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_OF_BOARD_SETUP 1
+
#endif /* __CONFIG_H */
diff --git a/include/configs/taishan.h b/include/configs/taishan.h
index 851a7ad40ae..1879d385220 100644
--- a/include/configs/taishan.h
+++ b/include/configs/taishan.h
@@ -331,4 +331,9 @@
#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
+
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_OF_BOARD_SETUP 1
+
#endif /* __CONFIG_H */
diff --git a/include/configs/walnut.h b/include/configs/walnut.h
index f6e99aca777..adc420b9ade 100644
--- a/include/configs/walnut.h
+++ b/include/configs/walnut.h
@@ -92,6 +92,7 @@
#define CONFIG_PHY_ADDR 1 /* PHY address */
#define CFG_RX_ETH_BUFFER 16 /* use 16 rx buffer on 405 emac */
+#define CONFIG_HAS_ETH0 1
#define CONFIG_NETCONSOLE /* include NetConsole support */
#define CONFIG_NET_MULTI /* needed for NetConsole */
@@ -346,4 +347,9 @@
#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
+
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_OF_BOARD_SETUP 1
+
#endif /* __CONFIG_H */
diff --git a/include/configs/xupv2p.h b/include/configs/xupv2p.h
index 30fb303c961..c738567a5f4 100644
--- a/include/configs/xupv2p.h
+++ b/include/configs/xupv2p.h
@@ -63,9 +63,11 @@
/* ethernet */
#ifdef XILINX_EMAC_BASEADDR
#define CONFIG_XILINX_EMAC 1
+#define CFG_ENET
#else
#ifdef XILINX_EMACLITE_BASEADDR
#define CONFIG_XILINX_EMACLITE 1
+#define CFG_ENET
#endif
#endif
#undef ET_DEBUG
@@ -77,18 +79,28 @@
#endif
/* interrupt controller */
+#ifdef XILINX_INTC_BASEADDR
#define CFG_INTC_0 1
#define CFG_INTC_0_ADDR XILINX_INTC_BASEADDR
#define CFG_INTC_0_NUM XILINX_INTC_NUM_INTR_INPUTS
+#endif
/* timer */
+#ifdef XILINX_TIMER_BASEADDR
+#if (XILINX_TIMER_IRQ != -1)
#define CFG_TIMER_0 1
#define CFG_TIMER_0_ADDR XILINX_TIMER_BASEADDR
#define CFG_TIMER_0_IRQ XILINX_TIMER_IRQ
#define FREQUENCE XILINX_CLOCK_FREQ
#define CFG_TIMER_0_PRELOAD ( FREQUENCE/1000 )
+#endif
+#else
+#ifdef XILINX_CLOCK_FREQ
#define CONFIG_XILINX_CLOCK_FREQ XILINX_CLOCK_FREQ
-
+#else
+#error BAD CLOCK FREQ
+#endif
+#endif
/*
* memory layout - Example
* TEXT_BASE = 0x3600_0000;
@@ -162,7 +174,12 @@
#define CONFIG_CMD_ASKENV
#define CONFIG_CMD_CACHE
#define CONFIG_CMD_IRQ
-#define CONFIG_CMD_PING
+
+#ifndef CFG_ENET
+ #undef CONFIG_CMD_NET
+#else
+ #define CONFIG_CMD_PING
+#endif
#ifdef XILINX_SYSACE_BASEADDR
#define CONFIG_CMD_EXT2
diff --git a/include/configs/yosemite.h b/include/configs/yosemite.h
index c9323f60740..f22e79824cd 100644
--- a/include/configs/yosemite.h
+++ b/include/configs/yosemite.h
@@ -139,7 +139,6 @@
#define CFG_KBYTES_SDRAM (128 * 1024) /* 128MB */
#define CFG_SDRAM_BANKS (2)
-
/*-----------------------------------------------------------------------
* I2C
*----------------------------------------------------------------------*/
@@ -227,6 +226,7 @@
#define CONFIG_MII 1 /* MII PHY management */
#define CONFIG_NET_MULTI 1 /* required for netconsole */
#define CONFIG_PHY1_ADDR 3
+#define CONFIG_HAS_ETH0 1 /* add support for "ethaddr" */
#define CONFIG_HAS_ETH1 1 /* add support for "eth1addr" */
#define CONFIG_PHY_ADDR 1 /* PHY address, See schematics */
@@ -383,4 +383,8 @@
#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
#endif
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_OF_BOARD_SETUP 1
+
#endif /* __CONFIG_H */
diff --git a/include/configs/yucca.h b/include/configs/yucca.h
index 1e3571eb4dc..6f9d3e3c6f3 100644
--- a/include/configs/yucca.h
+++ b/include/configs/yucca.h
@@ -541,4 +541,8 @@
/*---------------------------------------------------------------------------*/
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT 1
+#define CONFIG_OF_BOARD_SETUP 1
+
#endif /* __CONFIG_H */
diff --git a/include/logbuff.h b/include/logbuff.h
index d4157290538..f117c66e37f 100644
--- a/include/logbuff.h
+++ b/include/logbuff.h
@@ -60,6 +60,7 @@ int drv_logbuff_init (void);
void logbuff_init_ptrs (void);
void logbuff_log(char *msg);
void logbuff_reset (void);
+unsigned long logbuffer_base (void);
#endif /* CONFIG_LOGBUFFER */
diff --git a/lib_generic/crc32.c b/lib_generic/crc32.c
index 64f66ed6fb1..83d1d1d3a0d 100644
--- a/lib_generic/crc32.c
+++ b/lib_generic/crc32.c
@@ -14,7 +14,9 @@
#include <stdint.h>
#endif
+#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
#include <watchdog.h>
+#endif
#include "zlib.h"
#define local static
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 1b8a8721a3e..bc49ea1284b 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -398,6 +398,11 @@ ulong get_effective_memsize(void)
************************************************************************
*/
+unsigned long logbuffer_base(void)
+{
+ return CFG_SDRAM_BASE + get_effective_memsize() - LOGBUFF_LEN;
+}
+
void board_init_f (ulong bootflag)
{
bd_t *bd;
@@ -453,18 +458,7 @@ void board_init_f (ulong bootflag)
*/
gd->ram_size -= CFG_MEM_TOP_HIDE;
-#ifndef CONFIG_MAX_MEM_MAPPED
-#define CONFIG_MAX_MEM_MAPPED (256 << 20)
-#endif
-
-#ifndef CONFIG_VERY_BIG_RAM
addr = CFG_SDRAM_BASE + get_effective_memsize();
-#else
- /* only allow stack below 256M */
- addr = CFG_SDRAM_BASE +
- (gd->ram_size > CONFIG_MAX_MEM_MAPPED) ?
- CONFIG_MAX_MEM_MAPPED : get_effective_memsize();
-#endif
#ifdef CONFIG_LOGBUFFER
#ifndef CONFIG_ALT_LB_ADDR
diff --git a/tools/env/Makefile b/tools/env/Makefile
index ea2d5b5a01b..9629ee58ef1 100644
--- a/tools/env/Makefile
+++ b/tools/env/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
SRCS := $(obj)crc32.c fw_env.c fw_env_main.c
HEADERS := fw_env.h
-CPPFLAGS := -Wall -DUSE_HOSTCC
+CPPFLAGS := -Wall -DUSE_HOSTCC -I$(SRCTREE)/include
ifeq ($(MTD_VERSION),old)
CPPFLAGS += -DMTD_OLD
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index e083a5b11eb..b8bca91c38d 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2000-2003
+ * (C) Copyright 2000-2008
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
@@ -209,13 +209,14 @@ char *fw_getenv (char *name)
* Print the current definition of one, or more, or all
* environment variables
*/
-void fw_printenv (int argc, char *argv[])
+int fw_printenv (int argc, char *argv[])
{
char *env, *nxt;
int i, n_flag;
+ int rc = 0;
if (env_init ())
- return;
+ return (-1);
if (argc == 1) { /* Print all env variables */
for (env = environment.data; *env; env = nxt + 1) {
@@ -223,13 +224,13 @@ void fw_printenv (int argc, char *argv[])
if (nxt >= &environment.data[ENV_SIZE]) {
fprintf (stderr, "## Error: "
"environment not terminated\n");
- return;
+ return (-1);
}
}
printf ("%s\n", env);
}
- return;
+ return (0);
}
if (strcmp (argv[1], "-n") == 0) {
@@ -239,7 +240,7 @@ void fw_printenv (int argc, char *argv[])
if (argc != 2) {
fprintf (stderr, "## Error: "
"`-n' option requires exactly one argument\n");
- return;
+ return (-1);
}
} else {
n_flag = 0;
@@ -255,7 +256,7 @@ void fw_printenv (int argc, char *argv[])
if (nxt >= &environment.data[ENV_SIZE]) {
fprintf (stderr, "## Error: "
"environment not terminated\n");
- return;
+ return (-1);
}
}
val = envmatch (name, env);
@@ -268,9 +269,13 @@ void fw_printenv (int argc, char *argv[])
break;
}
}
- if (!val)
+ if (!val) {
fprintf (stderr, "## Error: \"%s\" not defined\n", name);
+ rc = -1;
+ }
}
+
+ return (rc);
}
/*
diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
index 58607ded5a4..248f58c4a00 100644
--- a/tools/env/fw_env.h
+++ b/tools/env/fw_env.h
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2002
+ * (C) Copyright 2002-2008
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
@@ -47,7 +47,7 @@
"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \
"bootm"
-extern void fw_printenv(int argc, char *argv[]);
+extern int fw_printenv(int argc, char *argv[]);
extern char *fw_getenv (char *name);
extern int fw_setenv (int argc, char *argv[]);
diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c
index 696e30efda4..7f631c4494b 100644
--- a/tools/env/fw_env_main.c
+++ b/tools/env/fw_env_main.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2000
+ * (C) Copyright 2000-2008
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
@@ -25,15 +25,16 @@
* Command line user interface to firmware (=U-Boot) environment.
*
* Implements:
- * fw_printenv [ name ... ]
- * - prints the values of the environment variables
- * "name", or the whole environment if no names are
- * specified
+ * fw_printenv [[ -n name ] | [ name ... ]]
+ * - prints the value of a single environment variable
+ * "name", the ``name=value'' pairs of one or more
+ * environment variables "name", or the whole
+ * environment if no names are specified.
* fw_setenv name [ value ... ]
* - If a name without any values is given, the variable
* with this name is deleted from the environment;
* otherwise, all "value" arguments are concatenated,
- * separated by sinlge blank characters, and the
+ * separated by single blank characters, and the
* resulting string is assigned to the environment
* variable "name"
*/
@@ -58,16 +59,18 @@ main(int argc, char *argv[])
if (strcmp(cmdname, CMD_PRINTENV) == 0) {
- fw_printenv (argc, argv);
+ if (fw_printenv (argc, argv) != 0)
+ return (EXIT_FAILURE);
- return (EXIT_SUCCESS);
+ return (EXIT_SUCCESS);
} else if (strcmp(cmdname, CMD_SETENV) == 0) {
- if (fw_setenv (argc, argv) != 0)
- return (EXIT_FAILURE);
+ if (fw_setenv (argc, argv) != 0)
+ return (EXIT_FAILURE);
+
+ return (EXIT_SUCCESS);
- return (EXIT_SUCCESS);
}
fprintf (stderr,