U-Boot
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
December 2008
- 172 participants
- 485 discussions
When running `strings` on really long strings, the stack tends to get
smashed due to printf(). Switch to puts() instead since we're only passing
the data through.
Signed-off-by: Mike Frysinger <vapier(a)gentoo.org>
---
common/cmd_strings.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/common/cmd_strings.c b/common/cmd_strings.c
index db54f29..7d05cf8 100644
--- a/common/cmd_strings.c
+++ b/common/cmd_strings.c
@@ -29,7 +29,8 @@ int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
char *addr = start_addr;
do {
- printf("%s\n", addr);
+ puts(addr);
+ puts("\n");
addr += strlen(addr) + 1;
} while (addr[0] && addr < last_addr);
--
1.6.0.3
3
3

[U-Boot] [PATCH 4/4]v2: Use new CONFIG_SYS_VXWORKS parameters for Netstal boards
by Niklaus Giger 07 Dec '08
by Niklaus Giger 07 Dec '08
07 Dec '08
Signed-off-by: Niklaus Giger <niklaus.giger(a)member.fsf.org>
---
include/configs/netstal-common.h | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/include/configs/netstal-common.h b/include/configs/netstal-common.h
index 1fa4b00..7f2b015 100644
--- a/include/configs/netstal-common.h
+++ b/include/configs/netstal-common.h
@@ -201,8 +201,9 @@
#define CONFIG_ETHADDR 00:60:13:00:00:00 /* Netstal Machines AG MAC */
#define CONFIG_OVERWRITE_ETHADDR_ONCE
-#define CONFIG_SYS_TFTP_LOADADDR 0x01000000
-
+#define CONFIG_SYS_TFTP_LOADADDR 0x01000000
+#define CONFIG_SYS_VXWORKS_ADD_PARAMS "u=dpu pw=netstal8752"
+#define CONFIG_SYS_VXWORKS_SERVERNAME "c"
/*
* General common environment variables shared by all boards produced by Netstal Maschinen
*/
@@ -222,19 +223,17 @@
"fdt_addr_r=800000\0" \
"hostname=" xstr(CONFIG_HOSTNAME) "\0" \
"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0" \
- "load=tftp 200000 " xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \
- "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;" \
- "era " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;" \
- "cp.b ${fileaddr} " xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize};" \
- "setenv filesize\0" \
- "upd=run load update\0" \
- "vx_rom=" xstr(CONFIG_HOSTNAME) "/" \
- xstr(CONFIG_HOSTNAME) "_vx_rom\0" \
- "vx=tftp " xstr(CONFIG_SYS_TFTP_LOADADDR) " ${vx_rom};run vxargs;" \
- "bootvx\0" \
- "vxargs=setenv bootargs emac(0,0)c:${vx_rom} e=${ipaddr}" \
- " h=${serverip} u=dpu pw=netstal8752 " \
- "tn=" xstr(CONFIG_HOSTNAME) " f=0x3008\0" \
+ "uload=tftp " xstr(CONFIG_SYS_TFTP_LOADADDR) " " \
+ xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \
+ "vx_rom=" xstr(CONFIG_HOSTNAME) "/" \
+ xstr(CONFIG_HOSTNAME) "_vx_rom\0" \
+ "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;"\
+ "era " xstr(CONFIG_SYS_MONITOR_BASE) " FFFFFFFF;" \
+ "cp.b ${fileaddr} "xstr(CONFIG_SYS_MONITOR_BASE) \
+ " ${filesize}; setenv filesize\0" \
+ "upd=run uload update\0" \
+ "vx=setenv bootfile ${vx_rom}; tftp " \
+ xstr(CONFIG_SYS_TFTP_LOADADDR) "; bootvx\0" \
CONFIG_NETSTAL_DEF_ENV_ROOTPATH
/*
--
1.6.0.2
2
1

07 Dec '08
The following improvements are made and tested on my HCUx boards:
README
- document bootvx and CONFIG_SYS_VXWORKS parameters
vxworks.h
- add new vxworks.h with some default definitions
cmd_elf.c
- fix size too small by one in sprintf
- changed old (pre 2004) device name ibmEmac to emac
- boot device may be overriden in board config
- servername may be defined in board config
- additional parameters may be defined in board config
- fixed some line wrappings
- replaced redundant MAX define by max
netstal-common.h
use new CONFIG_SYS_VXWORKS parameters
Signed-off-by: Niklaus Giger <niklaus.giger(a)member.fsf.org>
---
README | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/README b/README
index ebee20f..10c2cec 100644
--- a/README
+++ b/README
@@ -379,6 +379,24 @@ The following options need to be configured:
This define fills in the correct boot CPU in the boot
param header, the default value is zero if undefined.
+- vxWorks boot parameters:
+
+ bootvx constructs a valid bootline using the following
+ environments variables: bootfile, ipaddr, serverip, hostname.
+ It loads the vxWorks image pointed bootfile.
+
+ CONFIG_SYS_VXWORKS_BOOT_DEVICE - The vxworks device name
+ CONFIG_SYS_VXWORKS_MAC_PTR - Ethernet 6 byte MA -address
+ CONFIG_SYS_VXWORKS_SERVERNAME - Name of the server
+ CONFIG_SYS_VXWORKS_BOOT_ADDR - Address of boot parameters
+
+ CONFIG_SYS_VXWORKS_ADD_PARAMS
+
+ Add it at the end of the bootline. E.g "u=username pw=secret"
+
+ Note: If a "bootargs" environment is defined, it will overwride
+ the defaults discussed just above.
+
- Serial Ports:
CONFIG_PL010_SERIAL
--
1.6.0.2
2
1

07 Dec '08
Allow tqm8xx.c to cleanly compile when CONFIG_LCD_INFO is
defined and remove unneeded version.h from lcd.c
Signed-off-by: Peter Tyser <ptyser(a)xes-inc.com>
---
I noticed this when adding timestamp.h to tqm8xx.c.
The "Update U-Boot's build timestamp on every compile"
patch should be applied first.
It looks like neither tqm8xx.c or lwmon.c would
compile if CONFIG_LCD_INFO_BELOW_LOGO were defined since
6b59e03e0237a40a2305ea385defdfd92000978b FWIW.
board/tqc/tqm8xx/tqm8xx.c | 3 +++
common/lcd.c | 1 -
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/board/tqc/tqm8xx/tqm8xx.c b/board/tqc/tqm8xx/tqm8xx.c
index 8424804..1a71591 100644
--- a/board/tqc/tqm8xx/tqm8xx.c
+++ b/board/tqc/tqm8xx/tqm8xx.c
@@ -570,10 +570,13 @@ void ide_led (uchar led, uchar status)
#ifdef CONFIG_LCD_INFO
#include <lcd.h>
+#include <version.h>
#include <timestamp.h>
void lcd_show_board_info(void)
{
+ char temp[32];
+
lcd_printf ("%s (%s - %s)\n", U_BOOT_VERSION, U_BOOT_DATE, U_BOOT_TIME);
lcd_printf ("(C) 2008 DENX Software Engineering GmbH\n");
lcd_printf (" Wolfgang DENK, wd(a)denx.de\n");
diff --git a/common/lcd.c b/common/lcd.c
index 31bb190..ae79051 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -32,7 +32,6 @@
#include <config.h>
#include <common.h>
#include <command.h>
-#include <version.h>
#include <stdarg.h>
#include <linux/types.h>
#include <devices.h>
--
1.6.0.2.GIT
2
3

06 Dec '08
Use the GNU 'date' command to auto-generate a new U-Boot
timestamp on every compile.
Signed-off-by: Peter Tyser <ptyser(a)xes-inc.com>
---
Changes since v1:
* Split up U_BOOT_DATE define (date and time) into
U_BOOT_DATE (day, month, year) and U_BOOT_TIME (time of day)
defines
* Updated all architetures/boards
Changes since v2:
* Placed U_BOOT_DATE and U_BOOT_TIME defines in
timestamp_autogenerated.h.
* Added include/timestamp.h
Changes since v3:
* rebased on TOT
* removed 2 whitespace violations
Changes since v4:
* Simplified timestamp_autogenerated.h creation
* Made timestamp.h and version.h dependent on VIDEO_INFO for
cpu/mpc8xx/video.c
Makefile | 17 +++++++++++------
board/bmw/bmw.c | 4 ++--
board/eXalion/eXalion.c | 3 ++-
board/lwmon/lwmon.c | 3 ++-
board/mousse/mousse.c | 3 ++-
board/netstar/eeprom.c | 3 ++-
board/sandburst/karef/karef.c | 6 ++++--
board/sandburst/metrobox/metrobox.c | 6 ++++--
board/tqc/tqm8xx/tqm8xx.c | 3 ++-
board/trab/trab_fkt.c | 3 ++-
board/voiceblue/eeprom.c | 3 ++-
cpu/74xx_7xx/start.S | 3 ++-
cpu/leon2/start.S | 3 ++-
cpu/leon3/start.S | 3 ++-
cpu/mcf5227x/start.S | 3 ++-
cpu/mcf523x/start.S | 3 ++-
cpu/mcf52x2/start.S | 3 ++-
cpu/mcf532x/start.S | 3 ++-
cpu/mcf5445x/start.S | 3 ++-
cpu/mcf547x_8x/start.S | 3 ++-
cpu/mpc512x/start.S | 3 ++-
cpu/mpc5xx/start.S | 3 ++-
cpu/mpc5xxx/start.S | 3 ++-
cpu/mpc8220/start.S | 3 ++-
cpu/mpc824x/start.S | 3 ++-
cpu/mpc8260/start.S | 3 ++-
cpu/mpc83xx/start.S | 3 ++-
cpu/mpc85xx/start.S | 3 ++-
cpu/mpc86xx/start.S | 3 ++-
cpu/mpc8xx/start.S | 3 ++-
cpu/mpc8xx/video.c | 6 +++++-
cpu/nios/start.S | 3 ++-
cpu/nios2/start.S | 3 ++-
cpu/ppc4xx/start.S | 3 ++-
include/.gitignore | 1 +
include/configs/NETPHONE.h | 2 +-
include/configs/NETTA.h | 2 +-
include/configs/NETTA2.h | 2 +-
include/timestamp.h | 30 ++++++++++++++++++++++++++++++
lib_arm/board.c | 3 ++-
lib_avr32/board.c | 3 ++-
lib_blackfin/board.c | 3 ++-
lib_i386/board.c | 3 ++-
lib_microblaze/board.c | 3 ++-
lib_mips/board.c | 3 ++-
lib_sh/board.c | 3 ++-
net/net.c | 3 +++
47 files changed, 135 insertions(+), 52 deletions(-)
create mode 100644 include/timestamp.h
diff --git a/Makefile b/Makefile
index d6abb4d..f999a21 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@ U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
else
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)
endif
+TIMESTAMP_FILE = $(obj)include/timestamp_autogenerated.h
VERSION_FILE = $(obj)include/version_autogenerated.h
HOSTARCH := $(shell uname -m | \
@@ -259,7 +260,7 @@ LIBS += api/libapi.a
LIBS += post/libpost.a
LIBS := $(addprefix $(obj),$(LIBS))
-.PHONY : $(LIBS) $(VERSION_FILE)
+.PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE)
LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
@@ -351,13 +352,13 @@ $(SUBDIRS): depend $(obj)include/autoconf.mk
$(LDSCRIPT): depend $(obj)include/autoconf.mk
$(MAKE) -C $(dir $@) $(notdir $@)
-$(NAND_SPL): $(VERSION_FILE) $(obj)include/autoconf.mk
+$(NAND_SPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
$(MAKE) -C nand_spl/board/$(BOARDDIR) all
$(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
-$(ONENAND_IPL): $(VERSION_FILE) $(obj)include/autoconf.mk
+$(ONENAND_IPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
$(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
@@ -370,6 +371,10 @@ $(VERSION_FILE):
) > $@.tmp
@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
+$(TIMESTAMP_FILE):
+ @date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
+ @date +'#define U_BOOT_TIME "%T"' >> $@
+
gdbtools:
$(MAKE) -C tools/gdb all || exit 1
@@ -379,7 +384,7 @@ updater:
env:
$(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1
-depend dep: $(VERSION_FILE)
+depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE)
for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done
TAG_SUBDIRS += include
@@ -460,7 +465,7 @@ sinclude $(obj)include/autoconf.mk.dep
else # !config.mk
all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
$(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \
-$(SUBDIRS) $(VERSION_FILE) gdbtools updater env depend \
+$(SUBDIRS) $(TIMESTAMP_FILE) $(VERSION_FILE) gdbtools updater env depend \
dep tags ctags etags cscope $(obj)System.map:
@echo "System not configured - see README" >&2
@ exit 1
@@ -3240,7 +3245,7 @@ clean:
@rm -f $(obj)include/bmp_logo.h
@rm -f $(obj)nand_spl/{u-boot-spl,u-boot-spl.map,System.map}
@rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl-2k.bin,ipl-4k.bin,ipl.map}
- @rm -f $(obj)api_examples/demo $(VERSION_FILE)
+ @rm -f $(obj)api_examples/demo $(TIMESTAMP_FILE) $(VERSION_FILE)
@find $(OBJTREE) -type f \
\( -name 'core' -o -name '*.bak' -o -name '*~' \
-o -name '*.o' -o -name '*.a' \) -print \
diff --git a/board/bmw/bmw.c b/board/bmw/bmw.c
index b629c38..41ce14f 100644
--- a/board/bmw/bmw.c
+++ b/board/bmw/bmw.c
@@ -28,7 +28,7 @@
#include <malloc.h>
#include <devices.h>
#include <net.h>
-#include <version.h>
+#include <timestamp.h>
#include <dtt.h>
#include <mpc824x.h>
#include <asm/processor.h>
@@ -45,7 +45,7 @@ int checkboard(void)
char buf[32];
puts ("Board: BMW MPC8245/KAHLUA2 - CHRP (MAP B)\n");
- printf("Built: %s at %s\n", __DATE__ , __TIME__ );
+ printf("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
/* printf("MPLD: Revision %d\n", SYS_REVID_GET()); */
printf("Local Bus at %s MHz\n", strmhz(buf, busfreq));
return 0;
diff --git a/board/eXalion/eXalion.c b/board/eXalion/eXalion.c
index 34538c4..c17498f 100644
--- a/board/eXalion/eXalion.c
+++ b/board/eXalion/eXalion.c
@@ -31,6 +31,7 @@
#include <pci.h>
#include <ide.h>
#include <netdev.h>
+#include <timestamp.h>
#include "piix_pci.h"
#include "eXalion.h"
@@ -40,7 +41,7 @@ int checkboard (void)
char buf[32];
printf ("Board: eXalion MPC824x - CHRP (MAP B)\n");
- printf ("Built: %s at %s\n", __DATE__, __TIME__);
+ printf ("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
printf ("Local Bus: %s MHz\n", strmhz (buf, busfreq));
return 0;
diff --git a/board/lwmon/lwmon.c b/board/lwmon/lwmon.c
index 9e57246..b20ce7f 100644
--- a/board/lwmon/lwmon.c
+++ b/board/lwmon/lwmon.c
@@ -762,12 +762,13 @@ static uchar *key_match (uchar *kbd_data)
#ifdef CONFIG_LCD_INFO
#include <lcd.h>
#include <version.h>
+#include <timestamp.h>
void lcd_show_board_info(void)
{
char temp[32];
- lcd_printf ("%s (%s - %s)\n", U_BOOT_VERSION, __DATE__, __TIME__);
+ lcd_printf ("%s (%s - %s)\n", U_BOOT_VERSION, U_BOOT_DATE, U_BOOT_TIME);
lcd_printf ("(C) 2008 DENX Software Engineering GmbH\n");
lcd_printf (" Wolfgang DENK, wd(a)denx.de\n");
#ifdef CONFIG_LCD_INFO_BELOW_LOGO
diff --git a/board/mousse/mousse.c b/board/mousse/mousse.c
index 6a12b57..bd8d1c6 100644
--- a/board/mousse/mousse.c
+++ b/board/mousse/mousse.c
@@ -30,6 +30,7 @@
#include <mpc824x.h>
#include <netdev.h>
#include <asm/processor.h>
+#include <timestamp.h>
#include "mousse.h"
#include "m48t59y.h"
@@ -42,7 +43,7 @@ int checkboard (void)
char buf[32];
puts ("Board: MOUSSE MPC8240/KAHLUA - CHRP (MAP B)\n");
- printf ("Built: %s at %s\n", __DATE__, __TIME__);
+ printf ("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
printf ("MPLD: Revision %d\n", SYS_REVID_GET ());
printf ("Local Bus: %s MHz\n", strmhz (buf, busfreq));
diff --git a/board/netstar/eeprom.c b/board/netstar/eeprom.c
index 0de594b..5806128 100644
--- a/board/netstar/eeprom.c
+++ b/board/netstar/eeprom.c
@@ -26,6 +26,7 @@
#include <common.h>
#include <exports.h>
+#include <timestamp.h>
#include "../drivers/net/smc91111.h"
#define SMC_BASE_ADDRESS CONFIG_SMC91111_BASE
@@ -173,7 +174,7 @@ int eeprom(int argc, char *argv[])
/* Print help message */
if (argv[1][1] == 'h') {
printf("VoiceBlue EEPROM writer\n");
- printf("Built: %s at %s\n", __DATE__ , __TIME__ );
+ printf("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
printf("Usage:\n\t<mac_address> [<element_1>] [<...>]\n");
return 0;
}
diff --git a/board/sandburst/karef/karef.c b/board/sandburst/karef/karef.c
index 7909d34..8d97a9c 100644
--- a/board/sandburst/karef/karef.c
+++ b/board/sandburst/karef/karef.c
@@ -26,6 +26,7 @@
#include <command.h>
#include "karef.h"
#include "karef_version.h"
+#include <timestamp.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <spd_sdram.h>
@@ -299,7 +300,7 @@ int checkboard (void)
"Serial Number: %d\n", sernum);
printf ("%s\n", KAREF_U_BOOT_REL_STR);
- printf ("Built %s %s by %s\n", __DATE__, __TIME__, BUILDUSER);
+ printf ("Built %s %s by %s\n", U_BOOT_DATE, U_BOOT_TIME, BUILDUSER);
if (sbcommon_get_master()) {
printf("Slot 0 - Master\nSlave board");
if (sbcommon_secondary_present())
@@ -366,7 +367,8 @@ int misc_init_r (void)
setenv("ubrelver", KAREF_U_BOOT_REL_STR);
memset(envstr, 0, 255);
- sprintf (envstr, "Built %s %s by %s", __DATE__, __TIME__, BUILDUSER);
+ sprintf (envstr, "Built %s %s by %s",
+ U_BOOT_DATE, U_BOOT_TIME, BUILDUSER);
setenv("bldstr", envstr);
saveenv();
diff --git a/board/sandburst/metrobox/metrobox.c b/board/sandburst/metrobox/metrobox.c
index c3c4459..19302dc 100644
--- a/board/sandburst/metrobox/metrobox.c
+++ b/board/sandburst/metrobox/metrobox.c
@@ -25,6 +25,7 @@
#include <command.h>
#include "metrobox.h"
#include "metrobox_version.h"
+#include <timestamp.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <spd_sdram.h>
@@ -270,7 +271,7 @@ int checkboard (void)
printf ("Board: Sandburst Corporation MetroBox Serial Number: %d\n", sernum);
printf ("%s\n", METROBOX_U_BOOT_REL_STR);
- printf ("Built %s %s by %s\n", __DATE__, __TIME__, BUILDUSER);
+ printf ("Built %s %s by %s\n", U_BOOT_DATE, U_BOOT_TIME, BUILDUSER);
if (sbcommon_get_master()) {
printf("Slot 0 - Master\nSlave board");
if (sbcommon_secondary_present())
@@ -335,7 +336,8 @@ int misc_init_r (void)
setenv("ubrelver", METROBOX_U_BOOT_REL_STR);
memset(envstr, 0, 255);
- sprintf (envstr, "Built %s %s by %s", __DATE__, __TIME__, BUILDUSER);
+ sprintf (envstr, "Built %s %s by %s",
+ U_BOOT_DATE, U_BOOT_TIME, BUILDUSER);
setenv("bldstr", envstr);
saveenv();
diff --git a/board/tqc/tqm8xx/tqm8xx.c b/board/tqc/tqm8xx/tqm8xx.c
index 928afed..8424804 100644
--- a/board/tqc/tqm8xx/tqm8xx.c
+++ b/board/tqc/tqm8xx/tqm8xx.c
@@ -570,10 +570,11 @@ void ide_led (uchar led, uchar status)
#ifdef CONFIG_LCD_INFO
#include <lcd.h>
+#include <timestamp.h>
void lcd_show_board_info(void)
{
- lcd_printf ("%s (%s - %s)\n", U_BOOT_VERSION, __DATE__, __TIME__);
+ lcd_printf ("%s (%s - %s)\n", U_BOOT_VERSION, U_BOOT_DATE, U_BOOT_TIME);
lcd_printf ("(C) 2008 DENX Software Engineering GmbH\n");
lcd_printf (" Wolfgang DENK, wd(a)denx.de\n");
#ifdef CONFIG_LCD_INFO_BELOW_LOGO
diff --git a/board/trab/trab_fkt.c b/board/trab/trab_fkt.c
index 7273ef9..93b9490 100644
--- a/board/trab/trab_fkt.c
+++ b/board/trab/trab_fkt.c
@@ -25,6 +25,7 @@
#include <common.h>
#include <exports.h>
+#include <timestamp.h>
#include <s3c2400.h>
#include "tsc2000.h"
#include "rs485.h"
@@ -296,7 +297,7 @@ int trab_fkt (int argc, char *argv[])
int do_info (void)
{
printf ("Stand-alone application for TRAB board function test\n");
- printf ("Built: %s at %s\n", __DATE__ , __TIME__ );
+ printf ("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
return 0;
}
diff --git a/board/voiceblue/eeprom.c b/board/voiceblue/eeprom.c
index d8ea6e5..f01597a 100644
--- a/board/voiceblue/eeprom.c
+++ b/board/voiceblue/eeprom.c
@@ -26,6 +26,7 @@
#include <common.h>
#include <exports.h>
+#include <timestamp.h>
#include "../drivers/net/smc91111.h"
#define SMC_BASE_ADDRESS CONFIG_SMC91111_BASE
@@ -169,7 +170,7 @@ int eeprom(int argc, char *argv[])
/* Print help message */
if (argv[1][1] == 'h') {
printf("VoiceBlue EEPROM writer\n");
- printf("Built: %s at %s\n", __DATE__ , __TIME__ );
+ printf("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
printf("Usage:\n\t<mac_address> [<element_1>] [<...>]\n");
return 0;
}
diff --git a/cpu/74xx_7xx/start.S b/cpu/74xx_7xx/start.S
index b5484e3..792cd30 100644
--- a/cpu/74xx_7xx/start.S
+++ b/cpu/74xx_7xx/start.S
@@ -34,6 +34,7 @@
*/
#include <config.h>
#include <74xx_7xx.h>
+#include <timestamp.h>
#include <version.h>
#include <ppc_asm.tmpl>
@@ -87,7 +88,7 @@
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
. = EXC_OFF_SYS_RESET
diff --git a/cpu/leon2/start.S b/cpu/leon2/start.S
index 9b5d83e..b1f1eb5 100644
--- a/cpu/leon2/start.S
+++ b/cpu/leon2/start.S
@@ -27,6 +27,7 @@
#include <asm/psr.h>
#include <asm/stack.h>
#include <asm/leon.h>
+#include <timestamp.h>
#include <version.h>
/* Entry for traps which jump to a programmer-specified trap handler. */
@@ -199,7 +200,7 @@ _trap_table:
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
.section ".text"
diff --git a/cpu/leon3/start.S b/cpu/leon3/start.S
index 7afe10e..bd634bd 100644
--- a/cpu/leon3/start.S
+++ b/cpu/leon3/start.S
@@ -27,6 +27,7 @@
#include <asm/psr.h>
#include <asm/stack.h>
#include <asm/leon.h>
+#include <timestamp.h>
#include <version.h>
/* Entry for traps which jump to a programmer-specified trap handler. */
@@ -200,7 +201,7 @@ _trap_table:
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
.section ".text"
diff --git a/cpu/mcf5227x/start.S b/cpu/mcf5227x/start.S
index becaab7..43e7006 100644
--- a/cpu/mcf5227x/start.S
+++ b/cpu/mcf5227x/start.S
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include <timestamp.h>
#include "version.h"
#ifndef CONFIG_IDENT_STRING
@@ -352,6 +353,6 @@ dcache_status:
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
.align 4
diff --git a/cpu/mcf523x/start.S b/cpu/mcf523x/start.S
index b70b83b..d44da37 100644
--- a/cpu/mcf523x/start.S
+++ b/cpu/mcf523x/start.S
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include <timestamp.h>
#include "version.h"
#ifndef CONFIG_IDENT_STRING
@@ -336,6 +337,6 @@ dcache_status:
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
.align 4
diff --git a/cpu/mcf52x2/start.S b/cpu/mcf52x2/start.S
index da45bcb..ba6b884 100644
--- a/cpu/mcf52x2/start.S
+++ b/cpu/mcf52x2/start.S
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include <timestamp.h>
#include "version.h"
#ifndef CONFIG_IDENT_STRING
@@ -474,6 +475,6 @@ dcache_status:
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
.align 4
diff --git a/cpu/mcf532x/start.S b/cpu/mcf532x/start.S
index 7a3eb5f..3f92912 100644
--- a/cpu/mcf532x/start.S
+++ b/cpu/mcf532x/start.S
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include <timestamp.h>
#include "version.h"
#ifndef CONFIG_IDENT_STRING
@@ -331,6 +332,6 @@ dcache_status:
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
.align 4
diff --git a/cpu/mcf5445x/start.S b/cpu/mcf5445x/start.S
index 61e43ff..d5a7f93 100644
--- a/cpu/mcf5445x/start.S
+++ b/cpu/mcf5445x/start.S
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include <timestamp.h>
#include "version.h"
#ifndef CONFIG_IDENT_STRING
@@ -627,6 +628,6 @@ dcache_status:
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
.align 4
diff --git a/cpu/mcf547x_8x/start.S b/cpu/mcf547x_8x/start.S
index 41fc694..94ef14b 100644
--- a/cpu/mcf547x_8x/start.S
+++ b/cpu/mcf547x_8x/start.S
@@ -22,6 +22,7 @@
*/
#include <config.h>
+#include <timestamp.h>
#include "version.h"
#ifndef CONFIG_IDENT_STRING
@@ -357,6 +358,6 @@ dcache_status:
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
.align 4
diff --git a/cpu/mpc512x/start.S b/cpu/mpc512x/start.S
index 26f3c52..360682d 100644
--- a/cpu/mpc512x/start.S
+++ b/cpu/mpc512x/start.S
@@ -31,6 +31,7 @@
#include <config.h>
#include <mpc512x.h>
+#include <timestamp.h>
#include <version.h>
#define CONFIG_521X 1 /* needed for Linux kernel header files*/
@@ -85,7 +86,7 @@
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii " ", CONFIG_IDENT_STRING, "\0"
/*
diff --git a/cpu/mpc5xx/start.S b/cpu/mpc5xx/start.S
index f2ffe84..106935c 100644
--- a/cpu/mpc5xx/start.S
+++ b/cpu/mpc5xx/start.S
@@ -32,6 +32,7 @@
#include <config.h>
#include <mpc5xx.h>
+#include <timestamp.h>
#include <version.h>
#define CONFIG_5xx 1 /* needed for Linux kernel header files */
@@ -80,7 +81,7 @@
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
. = EXC_OFF_SYS_RESET
diff --git a/cpu/mpc5xxx/start.S b/cpu/mpc5xxx/start.S
index defe77d..6b1162a 100644
--- a/cpu/mpc5xxx/start.S
+++ b/cpu/mpc5xxx/start.S
@@ -27,6 +27,7 @@
*/
#include <config.h>
#include <mpc5xxx.h>
+#include <timestamp.h>
#include <version.h>
#define CONFIG_MPC5xxx 1 /* needed for Linux kernel header files */
@@ -78,7 +79,7 @@
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
/*
diff --git a/cpu/mpc8220/start.S b/cpu/mpc8220/start.S
index 373be2c..3abc619 100644
--- a/cpu/mpc8220/start.S
+++ b/cpu/mpc8220/start.S
@@ -27,6 +27,7 @@
*/
#include <config.h>
#include <mpc8220.h>
+#include <timestamp.h>
#include <version.h>
#define _LINUX_CONFIG_H 1 /* avoid reading Linux autoconf.h file */
@@ -77,7 +78,7 @@
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
/*
diff --git a/cpu/mpc824x/start.S b/cpu/mpc824x/start.S
index b5d7eb1..39325cd 100644
--- a/cpu/mpc824x/start.S
+++ b/cpu/mpc824x/start.S
@@ -39,6 +39,7 @@
*/
#include <config.h>
#include <mpc824x.h>
+#include <timestamp.h>
#include <version.h>
#define _LINUX_CONFIG_H 1 /* avoid reading Linux autoconf.h file */
@@ -90,7 +91,7 @@
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
. = EXC_OFF_SYS_RESET
diff --git a/cpu/mpc8260/start.S b/cpu/mpc8260/start.S
index da0c516..379f2fb 100644
--- a/cpu/mpc8260/start.S
+++ b/cpu/mpc8260/start.S
@@ -27,6 +27,7 @@
*/
#include <config.h>
#include <mpc8260.h>
+#include <timestamp.h>
#include <version.h>
#define CONFIG_8260 1 /* needed for Linux kernel header files */
@@ -85,7 +86,7 @@
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
/*
diff --git a/cpu/mpc83xx/start.S b/cpu/mpc83xx/start.S
index cd566b2..792b2c8 100644
--- a/cpu/mpc83xx/start.S
+++ b/cpu/mpc83xx/start.S
@@ -29,6 +29,7 @@
#include <config.h>
#include <mpc83xx.h>
+#include <timestamp.h>
#include <version.h>
#define CONFIG_83XX 1 /* needed for Linux kernel header files*/
@@ -105,7 +106,7 @@
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii " ", CONFIG_IDENT_STRING, "\0"
diff --git a/cpu/mpc85xx/start.S b/cpu/mpc85xx/start.S
index 651ff1c..8fa0ff7 100644
--- a/cpu/mpc85xx/start.S
+++ b/cpu/mpc85xx/start.S
@@ -30,6 +30,7 @@
#include <config.h>
#include <mpc85xx.h>
+#include <timestamp.h>
#include <version.h>
#define _LINUX_CONFIG_H 1 /* avoid reading Linux autoconf.h file */
@@ -274,7 +275,7 @@ _start:
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
.align 4
diff --git a/cpu/mpc86xx/start.S b/cpu/mpc86xx/start.S
index 75e4317..1b3d740 100644
--- a/cpu/mpc86xx/start.S
+++ b/cpu/mpc86xx/start.S
@@ -32,6 +32,7 @@
*/
#include <config.h>
#include <mpc86xx.h>
+#include <timestamp.h>
#include <version.h>
#include <ppc_asm.tmpl>
@@ -76,7 +77,7 @@
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
. = EXC_OFF_SYS_RESET
diff --git a/cpu/mpc8xx/start.S b/cpu/mpc8xx/start.S
index 7b75660..45c902e 100644
--- a/cpu/mpc8xx/start.S
+++ b/cpu/mpc8xx/start.S
@@ -39,6 +39,7 @@
*/
#include <config.h>
#include <mpc8xx.h>
+#include <timestamp.h>
#include <version.h>
#define CONFIG_8xx 1 /* needed for Linux kernel header files */
@@ -87,7 +88,7 @@
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
. = EXC_OFF_SYS_RESET
diff --git a/cpu/mpc8xx/video.c b/cpu/mpc8xx/video.c
index 2e6a22a..5479644 100644
--- a/cpu/mpc8xx/video.c
+++ b/cpu/mpc8xx/video.c
@@ -32,7 +32,10 @@
#include <stdarg.h>
#include <common.h>
#include <config.h>
+#ifdef VIDEO_INFO
#include <version.h>
+#include <timestamp.h>
+#endif
#include <i2c.h>
#include <linux/types.h>
#include <devices.h>
@@ -1174,7 +1177,8 @@ static void *video_logo (void)
easylogo_plot (VIDEO_LOGO_ADDR, screen, width, 0, 0);
#ifdef VIDEO_INFO
- sprintf (info, "%s (%s - %s) ", U_BOOT_VERSION, __DATE__, __TIME__);
+ sprintf (info, "%s (%s - %s) ",
+ U_BOOT_VERSION, U_BOOT_DATE, U_BOOT_TIME);
video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, info);
sprintf (info, "(C) 2002 DENX Software Engineering");
diff --git a/cpu/nios/start.S b/cpu/nios/start.S
index 5d15e8d..3578a04 100644
--- a/cpu/nios/start.S
+++ b/cpu/nios/start.S
@@ -23,6 +23,7 @@
#include <config.h>
+#include <timestamp.h>
#include <version.h>
#if !defined(CONFIG_IDENT_STRING)
@@ -233,5 +234,5 @@ dly_clks:
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
diff --git a/cpu/nios2/start.S b/cpu/nios2/start.S
index ea41435..31cd5b0 100644
--- a/cpu/nios2/start.S
+++ b/cpu/nios2/start.S
@@ -23,6 +23,7 @@
#include <config.h>
+#include <timestamp.h>
#include <version.h>
/*************************************************************************
@@ -212,5 +213,5 @@ dly_clks:
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
diff --git a/cpu/ppc4xx/start.S b/cpu/ppc4xx/start.S
index 882ef21..2fb4d8b 100644
--- a/cpu/ppc4xx/start.S
+++ b/cpu/ppc4xx/start.S
@@ -63,6 +63,7 @@
*/
#include <config.h>
#include <ppc4xx.h>
+#include <timestamp.h>
#include <version.h>
#define _LINUX_CONFIG_H 1 /* avoid reading Linux autoconf.h file */
@@ -509,7 +510,7 @@ rsttlb: tlbwe r0,r1,0x0000 /* Invalidate all entries (V=0)*/
.globl version_string
version_string:
.ascii U_BOOT_VERSION
- .ascii " (", __DATE__, " - ", __TIME__, ")"
+ .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
.ascii CONFIG_IDENT_STRING, "\0"
. = EXC_OFF_SYS_RESET
diff --git a/include/.gitignore b/include/.gitignore
index ef7dd5f..4481412 100644
--- a/include/.gitignore
+++ b/include/.gitignore
@@ -5,4 +5,5 @@
/bmp_logo.h
/config.h
/config.mk
+/timestamp_autogenerated.h
/version_autogenerated.h
diff --git a/include/configs/NETPHONE.h b/include/configs/NETPHONE.h
index a147aff..34de947 100644
--- a/include/configs/NETPHONE.h
+++ b/include/configs/NETPHONE.h
@@ -799,7 +799,7 @@ typedef unsigned int led_id_t;
#define CONFIG_CDP_DEVICE_ID_PREFIX "NP" /* netphone */
#define CONFIG_CDP_PORT_ID "eth%d"
#define CONFIG_CDP_CAPABILITIES 0x00000010
-#define CONFIG_CDP_VERSION "u-boot" " " __DATE__ " " __TIME__
+#define CONFIG_CDP_VERSION "u-boot" " " U_BOOT_DATE " " U_BOOT_TIME
#define CONFIG_CDP_PLATFORM "Intracom NetPhone"
#define CONFIG_CDP_TRIGGER 0x20020001
#define CONFIG_CDP_POWER_CONSUMPTION 4300 /* 90 mA @ 48V */
diff --git a/include/configs/NETTA.h b/include/configs/NETTA.h
index 63810b3..004b3c8 100644
--- a/include/configs/NETTA.h
+++ b/include/configs/NETTA.h
@@ -775,7 +775,7 @@
#define CONFIG_CDP_DEVICE_ID_PREFIX "NT" /* netta */
#define CONFIG_CDP_PORT_ID "eth%d"
#define CONFIG_CDP_CAPABILITIES 0x00000010
-#define CONFIG_CDP_VERSION "u-boot 1.0" " " __DATE__ " " __TIME__
+#define CONFIG_CDP_VERSION "u-boot 1.0" " " U_BOOT_DATE " " U_BOOT_TIME
#define CONFIG_CDP_PLATFORM "Intracom NetTA"
#define CONFIG_CDP_TRIGGER 0x20020001
#define CONFIG_CDP_POWER_CONSUMPTION 4300 /* 90 mA @ 48V */
diff --git a/include/configs/NETTA2.h b/include/configs/NETTA2.h
index 61c5547..70995fa 100644
--- a/include/configs/NETTA2.h
+++ b/include/configs/NETTA2.h
@@ -750,7 +750,7 @@ typedef unsigned int led_id_t;
#define CONFIG_CDP_DEVICE_ID_PREFIX "NT" /* netta2 */
#define CONFIG_CDP_PORT_ID "eth%d"
#define CONFIG_CDP_CAPABILITIES 0x00000010
-#define CONFIG_CDP_VERSION "u-boot" " " __DATE__ " " __TIME__
+#define CONFIG_CDP_VERSION "u-boot" " " U_BOOT_DATE " " U_BOOT_TIME
#define CONFIG_CDP_PLATFORM "Intracom NetTA2"
#define CONFIG_CDP_TRIGGER 0x20020001
#define CONFIG_CDP_POWER_CONSUMPTION 4300 /* 90 mA @ 48V */
diff --git a/include/timestamp.h b/include/timestamp.h
new file mode 100644
index 0000000..b2f4cf4
--- /dev/null
+++ b/include/timestamp.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2008 Extreme Engineering Solutions, 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
+ */
+
+#ifndef __TIMESTAMP_H__
+#define __TIMESTAMP_H__
+
+#ifndef DO_DEPS_ONLY
+#include "timestamp_autogenerated.h"
+#endif
+
+#endif /* __TIMESTAMP_H__ */
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 4ba1f5e..2358beb 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -42,6 +42,7 @@
#include <command.h>
#include <malloc.h>
#include <devices.h>
+#include <timestamp.h>
#include <version.h>
#include <net.h>
#include <serial.h>
@@ -69,7 +70,7 @@ extern void dataflash_print_info(void);
#endif
const char version_string[] =
- U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")"CONFIG_IDENT_STRING;
+ U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")"CONFIG_IDENT_STRING;
#ifdef CONFIG_DRIVER_CS8900
extern void cs8900_get_enetaddr (uchar * addr);
diff --git a/lib_avr32/board.c b/lib_avr32/board.c
index 8771de9..2a98bd4 100644
--- a/lib_avr32/board.c
+++ b/lib_avr32/board.c
@@ -23,6 +23,7 @@
#include <command.h>
#include <malloc.h>
#include <devices.h>
+#include <timestamp.h>
#include <version.h>
#include <net.h>
@@ -36,7 +37,7 @@
DECLARE_GLOBAL_DATA_PTR;
const char version_string[] =
- U_BOOT_VERSION " (" __DATE__ " - " __TIME__ ") " CONFIG_IDENT_STRING;
+ U_BOOT_VERSION " ("U_BOOT_DATE" - "U_BOOT_TIME") " CONFIG_IDENT_STRING;
unsigned long monitor_flash_len;
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c
index ba57392..5f7d50d 100644
--- a/lib_blackfin/board.c
+++ b/lib_blackfin/board.c
@@ -16,6 +16,7 @@
#include <i2c.h>
#include <malloc.h>
#include <net.h>
+#include <timestamp.h>
#include <version.h>
#include <asm/cplb.h>
@@ -32,7 +33,7 @@ int post_flag;
DECLARE_GLOBAL_DATA_PTR;
-const char version_string[] = U_BOOT_VERSION " (" __DATE__ " - " __TIME__ ")";
+const char version_string[] = U_BOOT_VERSION " ("U_BOOT_DATE" - "U_BOOT_TIME")";
__attribute__((always_inline))
static inline void serial_early_puts(const char *s)
diff --git a/lib_i386/board.c b/lib_i386/board.c
index 659f9a2..1734f86 100644
--- a/lib_i386/board.c
+++ b/lib_i386/board.c
@@ -32,6 +32,7 @@
#include <watchdog.h>
#include <command.h>
#include <devices.h>
+#include <timestamp.h>
#include <version.h>
#include <malloc.h>
#include <net.h>
@@ -70,7 +71,7 @@ ulong i386boot_bios_size = (ulong)&_i386boot_bios_size; /* size of BIOS
const char version_string[] =
- U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")";
+ U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")";
/*
diff --git a/lib_microblaze/board.c b/lib_microblaze/board.c
index cd61918..250972c 100644
--- a/lib_microblaze/board.c
+++ b/lib_microblaze/board.c
@@ -27,12 +27,13 @@
#include <common.h>
#include <command.h>
#include <malloc.h>
+#include <timestamp.h>
#include <version.h>
#include <watchdog.h>
DECLARE_GLOBAL_DATA_PTR;
-const char version_string[] = U_BOOT_VERSION " (" __DATE__ " - " __TIME__ ")";
+const char version_string[] = U_BOOT_VERSION " ("U_BOOT_DATE" - "U_BOOT_TIME")";
#ifdef CONFIG_SYS_GPIO_0
extern int gpio_init (void);
diff --git a/lib_mips/board.c b/lib_mips/board.c
index 77e1cc8..9c997f1 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -25,6 +25,7 @@
#include <command.h>
#include <malloc.h>
#include <devices.h>
+#include <timestamp.h>
#include <version.h>
#include <net.h>
#include <environment.h>
@@ -53,7 +54,7 @@ extern ulong uboot_end;
ulong monitor_flash_len;
const char version_string[] =
- U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")";
+ U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")";
static char *failed = "*** failed ***\n";
diff --git a/lib_sh/board.c b/lib_sh/board.c
index b6be22e..d4cc85c 100644
--- a/lib_sh/board.c
+++ b/lib_sh/board.c
@@ -22,6 +22,7 @@
#include <command.h>
#include <malloc.h>
#include <devices.h>
+#include <timestamp.h>
#include <version.h>
#include <watchdog.h>
#include <net.h>
@@ -33,7 +34,7 @@ extern int board_init(void);
extern int dram_init(void);
extern int timer_init(void);
-const char version_string[] = U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")";
+const char version_string[] = U_BOOT_VERSION" ("U_BOOT_DATE" - "U_BOOT_TIME")";
unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;
diff --git a/net/net.c b/net/net.c
index 77e83b5..e9754e4 100644
--- a/net/net.c
+++ b/net/net.c
@@ -89,6 +89,9 @@
#if defined(CONFIG_CMD_SNTP)
#include "sntp.h"
#endif
+#if defined(CONFIG_CDP_VERSION)
+#include <timestamp.h>
+#endif
#if defined(CONFIG_CMD_NET)
--
1.6.0.2.GIT
2
2

06 Dec '08
Currently the arm926ejs tree has the armv4 option set during compilation.
This flag does not belong here because a arm926 CPU is always a armv5 CPU.
Signed-off-by: Remy Bohmer <linux(a)bohmer.net>
---
cpu/arm926ejs/at91/config.mk | 1 -
cpu/arm926ejs/config.mk | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
Index: u-boot-usb.new/cpu/arm926ejs/at91/config.mk
===================================================================
--- u-boot-usb.new.orig/cpu/arm926ejs/at91/config.mk 2008-12-04 21:59:20.000000000 +0100
+++ u-boot-usb.new/cpu/arm926ejs/at91/config.mk 2008-12-04 22:01:24.000000000 +0100
@@ -1,3 +1,2 @@
-PLATFORM_CPPFLAGS += -march=armv5te
PLATFORM_CPPFLAGS += $(call cc-option,-mtune=arm926ejs,)
LDSCRIPT := $(SRCTREE)/cpu/arm926ejs/at91/u-boot.lds
Index: u-boot-usb.new/cpu/arm926ejs/config.mk
===================================================================
--- u-boot-usb.new.orig/cpu/arm926ejs/config.mk 2008-12-04 21:59:20.000000000 +0100
+++ u-boot-usb.new/cpu/arm926ejs/config.mk 2008-12-04 22:01:24.000000000 +0100
@@ -24,7 +24,7 @@
PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
-msoft-float
-PLATFORM_CPPFLAGS += -march=armv4
+PLATFORM_CPPFLAGS += -march=armv5te
# =========================================================================
#
# Supply options according to compiler version
--
2
1

[U-Boot] [PATCH-OMAP3 0/2] OMAP3: Add support for OMAP3 based Pandora board
by Grazvydas Ignotas 06 Dec '08
by Grazvydas Ignotas 06 Dec '08
06 Dec '08
Pandora is open handheld gaming console, which uses Texas
Instruments OMAP 3530 SoC. More information can be found
at http://openpandora.org/.
The following two patches are to be applied on
u-boot-arm/omap3 branch, and should match style currently
used there.
3
5
Hi,
this patch adds support for Toradex' "Colibri PXA300" module. I had to
modify the AX88796 driver a bit to make it work, but that goes in a
different patch.
Also, the board code does not support NAND yet. I'll implement the code
from Oliver Ford soon.
Signed-off-by: Daniel Mack <daniel(a)caiaq.de>
diff --git a/MAKEALL b/MAKEALL
index dbed268..868205f 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -554,6 +554,7 @@ LIST_at91=" \
LIST_pxa=" \
cerf250 \
+ colibri_pxa300 \
cradle \
csb226 \
delta \
diff --git a/Makefile b/Makefile
index befb608..ee94d17 100644
--- a/Makefile
+++ b/Makefile
@@ -2804,6 +2804,9 @@ actux4_config : unconfig
cerf250_config : unconfig
@$(MKCONFIG) $(@:_config=) arm pxa cerf250
+colibri_pxa300_config: unconfig
+ @$(MKCONFIG) $(@:_config=) arm pxa colibri_pxa300
+
cradle_config : unconfig
@$(MKCONFIG) $(@:_config=) arm pxa cradle
diff --git a/board/colibri_pxa300/Makefile b/board/colibri_pxa300/Makefile
new file mode 100644
index 0000000..2fa3fb9
--- /dev/null
+++ b/board/colibri_pxa300/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd(a)denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = $(obj)lib$(BOARD).a
+
+COBJS := colibri_pxa300.o
+SOBJS := lowlevel_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) $(SOBJS)
+
+clean:
+ rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+ rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/colibri_pxa300/colibri_pxa300.c b/board/colibri_pxa300/colibri_pxa300.c
new file mode 100644
index 0000000..2c2b0d7
--- /dev/null
+++ b/board/colibri_pxa300/colibri_pxa300.c
@@ -0,0 +1,61 @@
+/*
+ * (C) Copyright 2008
+ * Daniel Mack, caiaq GbR <daniel(a)caiaq.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 <common.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+int board_init (void)
+{
+ /* arch number for linux kernel */
+ gd->bd->bi_arch_number = MACH_TYPE_COLIBRI300;
+
+ /* adress of boot parameters */
+ gd->bd->bi_boot_params = 0xa0000100;
+
+ return 0;
+}
+
+int board_late_init(void)
+{
+ setenv("stdout", "serial");
+ setenv("stderr", "serial");
+ return 0;
+}
+
+int dram_init (void)
+{
+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+ gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+ gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+ gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
+ gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
+ gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
+ gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
+ return 0;
+}
diff --git a/board/colibri_pxa300/config.mk b/board/colibri_pxa300/config.mk
new file mode 100644
index 0000000..350ff3d
--- /dev/null
+++ b/board/colibri_pxa300/config.mk
@@ -0,0 +1,2 @@
+TEXT_BASE = 0x81000000
+
diff --git a/board/colibri_pxa300/lowlevel_init.S b/board/colibri_pxa300/lowlevel_init.S
new file mode 100644
index 0000000..23155ab
--- /dev/null
+++ b/board/colibri_pxa300/lowlevel_init.S
@@ -0,0 +1,97 @@
+/*
+ * 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 <config.h>
+#include <version.h>
+#include <asm/arch/pxa-regs.h>
+
+/* There is no memory init here since U-Boot was booted from DRAM
+ already. You need to implement a first-stage bootloader to setup
+ the RAM controller and load contents from NAND if needed. */
+
+.globl lowlevel_init
+lowlevel_init:
+
+ /* Configure GPIO pins for UART1 / altFn 1 */
+ ldr r0, =0x40E10600 @ GPIO99 FFRXD
+ ldr r1, =0x801
+ str r1, [r0]
+
+ ldr r0, =0x40E10604 @ GPIO100 FFTXD
+ ldr r1, =0x801
+ str r1, [r0]
+
+ ldr r0, =0x40E10608 @ GPIO101 FFCTS
+ ldr r1, =0x801
+ str r1, [r0]
+
+ ldr r0, =0x40E10630 @ GPIO111 FFRTS
+ ldr r1, =0x801
+ str r1, [r0]
+
+ ldr r0, =0x40E10610 @ GPIO103 FFDTR
+ ldr r1, =0x801
+ str r1, [r0]
+
+ ldr r0, =0x40E10618 @ GPIO105 FFDSR
+ ldr r1, =0x801
+ str r1, [r0]
+
+ ldr r0, =0x40E1060c @ GPIO102 FFDCD
+ ldr r1, =0x801
+ str r1, [r0]
+
+ ldr r0, =0x40E10614 @ GPIO104 FFRI
+ ldr r1, =0x801
+ str r1, [r0]
+
+ /* CS2 @GPIO1 */
+ ldr r0, =0x40E100b8
+ ldr r1, =0x1
+ str r1, [r0]
+
+ /* configure SRAM controller for ethernet chip */
+
+ /* MSC1: SRAM, 16bit */
+ ldr r0, =MSC1
+ ldr r1, =0x00000779
+ str r1, [r0]
+
+ /* SXCNFG: enable CS2 for static memory */
+ ldr r0, =SXCNFG
+ ldr r1, =0x00880008
+ str r1, [r0]
+
+ /* MEMCLKCFG: set clock speed for SRAM */
+ ldr r0, =MEMCLKCFG
+ ldr r1, =0x00030003
+ str r1, [r0]
+
+ /* CSADRCFG2: interface type 'SRAM / async flash',
+ byte address split 16 */
+ ldr r0, =CSADRCFG2
+ ldr r1, =0x0032C809
+ str r1, [r0]
+
+ /* enable clocks for NAND and static memory */
+ ldr r0, =CKENA
+ ldr r1, [r0]
+ orr r1, r1, #(CKENA_4_NAND | CKENA_9_SMC)
+ str r1, [r0]
+
+ mov pc, lr
+
diff --git a/board/colibri_pxa300/u-boot.lds b/board/colibri_pxa300/u-boot.lds
new file mode 100644
index 0000000..7cf9fdf
--- /dev/null
+++ b/board/colibri_pxa300/u-boot.lds
@@ -0,0 +1,56 @@
+/*
+ * (C) Copyright 2000
+ * Wolfgang Denk, DENX Software Engineering, wd(a)denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+ . = 0x00000000;
+
+ . = ALIGN(4);
+ .text :
+ {
+ cpu/pxa/start.o (.text)
+ *(.text)
+ }
+
+ . = ALIGN(4);
+ .rodata : { *(.rodata) }
+
+ . = ALIGN(4);
+ .data : { *(.data) }
+
+ . = ALIGN(4);
+ .got : { *(.got) }
+
+ . = .;
+ __u_boot_cmd_start = .;
+ .u_boot_cmd : { *(.u_boot_cmd) }
+ __u_boot_cmd_end = .;
+
+ . = ALIGN(4);
+ __bss_start = .;
+ .bss (NOLOAD) : { *(.bss) . = ALIGN(4); }
+ _end = .;
+}
diff --git a/include/configs/colibri_pxa300.h b/include/configs/colibri_pxa300.h
new file mode 100644
index 0000000..f589337
--- /dev/null
+++ b/include/configs/colibri_pxa300.h
@@ -0,0 +1,173 @@
+/*
+ * (C) Copyright 2008
+ * Daniel Mack <daniel(a)caiaq.de>
+ *
+ * Based on configuation settings for the Zylonite board.
+ *
+ * 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
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Configuration Options
+ * (easy to change)
+ */
+#define CONFIG_CPU_MONAHANS 1 /* Intel Monahans CPU */
+#define CONFIG_COLIBRI_PXA300 1 /* Colibri PXA300 board */
+
+#undef BOARD_LATE_INIT
+#undef CONFIG_SKIP_RELOCATE_UBOOT
+#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
+#undef CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_SYS_SKIP_DRAM_SCRUB
+
+/*
+ * Environment settings
+ */
+#define CONFIG_ENV_IS_NOWHERE 1
+#define CONFIG_ENV_OFFSET 0x40000
+#define CONFIG_ENV_OFFSET_REDUND 0x44000
+#define CONFIG_ENV_SIZE 0x4000
+
+#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024)
+#define CONFIG_SYS_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
+
+/*
+ * select serial console configuration
+ */
+#define CONFIG_FFUART 1
+
+/* allow to overwrite serial and ethaddr */
+#define CONFIG_ENV_OVERWRITE
+#define CONFIG_BAUDRATE 115200
+
+/*
+ * BOOTP options
+ */
+#define CONFIG_BOOTP_BOOTFILESIZE
+#define CONFIG_BOOTP_BOOTPATH
+#define CONFIG_BOOTP_GATEWAY
+#define CONFIG_BOOTP_HOSTNAME
+
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_ENV
+#undef CONFIG_CMD_IMLS
+
+#define CONFIG_BOOTDELAY -1
+#define CONFIG_NETMASK 255.255.255.0
+#define CONFIG_IPADDR 192.168.1.52
+#define CONFIG_SERVERIP 192.168.1.51
+#define CONFIG_BOOTCOMMAND "bootm 80000"
+#define CONFIG_BOOTARGS "console=ttyS0,115200"
+#define CONFIG_TIMESTAMP
+#define CONFIG_EXTRA_ENV_SETTINGS "ethaddr=08:00:3e:26:0a:5b"
+
+/*
+ * Kernel boot tags
+ */
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_SETUP_MEMORY_TAGS
+
+#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
+
+/*
+ * Hardware drivers
+ */
+#if defined(CONFIG_CMD_NET)
+/* AX88696L Support(NE2000 base chip) */
+#define CONFIG_DRIVER_AX88796L
+#define CONFIG_DRIVER_NE2000_BASE 0x10000000
+#define CONFIG_NE2000_NOPROM
+#endif
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_HUSH_PARSER 1
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
+
+#define CONFIG_SYS_LONGHELP /* undef to save memory */
+#ifdef CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT "$ " /* Monitor Command Prompt */
+#else
+#define CONFIG_SYS_PROMPT "=> " /* Monitor Command Prompt */
+#endif
+#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
+#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
+#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
+#define CONFIG_SYS_DEVICE_NULLDEV 1
+
+#define CONFIG_SYS_MEMTEST_START 0x80200000 /* memtest works on */
+#define CONFIG_SYS_MEMTEST_END 0x80400000 /* 4 ... 8 MB in DRAM */
+
+#undef CONFIG_SYS_CLKS_IN_HZ /* everything, incl board info, in Hz */
+
+#define CONFIG_SYS_HZ 3250000 /* incrementer freq: 3.25 MHz */
+
+/* Monahans Core Frequency */
+#define CONFIG_SYS_MONAHANS_RUN_MODE_OSC_RATIO 8 /* valid values: 8, 16, 24, 31 */
+#define CONFIG_SYS_MONAHANS_TURBO_RUN_MODE_RATIO 1 /* valid values: 1, 2 */
+
+ /* valid baudrates */
+#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
+
+/*
+ * Stack sizes
+ *
+ * The stack sizes are set up in start.S using the settings below
+ */
+#define CONFIG_STACKSIZE (128*1024) /* regular stack */
+#ifdef CONFIG_USE_IRQ
+#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
+#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
+#endif
+
+/*
+ * Physical Memory Map
+ */
+#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
+#define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */
+#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */
+#define PHYS_SDRAM_2 0xa4000000 /* SDRAM Bank #2 */
+#define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 MB */
+#define PHYS_SDRAM_3 0xa8000000 /* SDRAM Bank #3 */
+#define PHYS_SDRAM_3_SIZE 0x00000000 /* 0 MB */
+#define PHYS_SDRAM_4 0xac000000 /* SDRAM Bank #4 */
+#define PHYS_SDRAM_4_SIZE 0x00000000 /* 0 MB */
+
+#define CONFIG_SYS_DRAM_BASE 0xa0200000 /* at CS0 */
+#define CONFIG_SYS_DRAM_SIZE 0x04000000 /* 64 MB Ram */
+
+#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_DRAM_BASE + 0x8000) /* default load address */
+#define CONFIG_SYS_NO_FLASH 1
+
+#endif /* __CONFIG_H */
+
2
2

06 Dec '08
Enable "hush" command parser and set default environment to boot from MMC if
a bootable card is present, otherwise boot from NAND.
Signed-off-by: Steve Sakoman <sakoman(a)gmail.com>
Signed-off-by: Dirk Behme <dirk.behme(a)googlemail.com>
---
* This patch applies on top of last 6 pending OMAP3 patches (in this order):
http://lists.denx.de/pipermail/u-boot/2008-November/043771.html
http://lists.denx.de/pipermail/u-boot/2008-November/043898.html
http://lists.denx.de/pipermail/u-boot/2008-November/043899.html
http://lists.denx.de/pipermail/u-boot/2008-November/044026.html
http://lists.denx.de/pipermail/u-boot/2008-November/044027.html
http://lists.denx.de/pipermail/u-boot/2008-December/044292.html
* Compile tested for Beagle, Overo, Panora and EVM. Boot tested on Beagle.
include/configs/omap3_beagle.h | 47 ++++++++++++++++++++++++++++++++--------
include/configs/omap3_evm.h | 41 ++++++++++++++++++++++++++++------
include/configs/omap3_overo.h | 46 ++++++++++++++++++++++++++++++++-------
include/configs/omap3_pandora.h | 45 ++++++++++++++++++++++++++++++++------
4 files changed, 148 insertions(+), 31 deletions(-)
Index: u-boot-arm/include/configs/omap3_beagle.h
===================================================================
--- u-boot-arm.orig/include/configs/omap3_beagle.h
+++ u-boot-arm/include/configs/omap3_beagle.h
@@ -159,16 +159,43 @@
/* Environment information */
#define CONFIG_BOOTDELAY 10
-#define CONFIG_BOOTCOMMAND "nand read 80200000 280000 400000 ; " \
- "bootm 80200000"
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "loadaddr=0x82000000\0" \
+ "console=ttyS2,115200n8\0" \
+ "videomode=1024x768@60,vxres=1024,vyres=768\0" \
+ "videospec=omapfb:vram:2M,vram:4M\0" \
+ "mmcargs=setenv bootargs console=${console} " \
+ "video=${videospec},mode:${videomode} " \
+ "root=/dev/mmcblk0p2 rw " \
+ "rootfstype=ext3 rootwait\0" \
+ "nandargs=setenv bootargs console=${console} " \
+ "video=${videospec},mode:${videomode} " \
+ "root=/dev/mtdblock4 rw " \
+ "rootfstype=jffs2\0" \
+ "loadbootscript=fatload mmc 0 ${loadaddr} boot.script\0" \
+ "bootscript=echo Running bootscript from mmc ...; " \
+ "autoscr ${loadaddr}\0" \
+ "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
+ "mmcboot=echo Booting from mmc ...; " \
+ "run mmcargs; " \
+ "bootm ${loadaddr}\0" \
+ "nandboot=echo Booting from nand ...; " \
+ "run nandargs; " \
+ "nand read ${loadaddr} 280000 400000; " \
+ "bootm ${loadaddr}\0" \
+
+#define CONFIG_BOOTCOMMAND \
+ "if mmcinit; then " \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "else " \
+ "if run loaduimage; then " \
+ "run mmcboot; " \
+ "else run nandboot; " \
+ "fi; " \
+ "fi; " \
+ "else run nandboot; fi"
-#define CONFIG_BOOTARGS "setenv bootargs console=ttyS2," \
- "115200n8 noinitrd " \
- "root=/dev/mtdblock4 " \
- "rw rootfstype=jffs2"
-
-#define CONFIG_NETMASK 255.255.254.0
-#define CONFIG_BOOTFILE "uImage"
#define CONFIG_AUTO_COMPLETE 1
/*
* Miscellaneous configurable options
@@ -176,6 +203,8 @@
#define V_PROMPT "OMAP3 beagleboard.org # "
#define CONFIG_SYS_LONGHELP /* undef to save memory */
+#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
#define CONFIG_SYS_PROMPT V_PROMPT
#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
/* Print Buffer Size */
Index: u-boot-arm/include/configs/omap3_evm.h
===================================================================
--- u-boot-arm.orig/include/configs/omap3_evm.h
+++ u-boot-arm/include/configs/omap3_evm.h
@@ -165,14 +165,39 @@
/* Environment information */
#define CONFIG_BOOTDELAY 10
-#define CONFIG_BOOTCOMMAND "onenand read 80200000 280000 400000 ; " \
- "bootm 80200000"
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "loadaddr=0x82000000\0" \
+ "console=ttyS2,115200n8\0" \
+ "mmcargs=setenv bootargs console=${console} " \
+ "root=/dev/mmcblk0p2 rw " \
+ "rootfstype=ext3 rootwait\0" \
+ "nandargs=setenv bootargs console=${console} " \
+ "root=/dev/mtdblock4 rw " \
+ "rootfstype=jffs2\0" \
+ "loadbootscript=fatload mmc 0 ${loadaddr} boot.script\0" \
+ "bootscript=echo Running bootscript from mmc ...; " \
+ "autoscr ${loadaddr}\0" \
+ "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
+ "mmcboot=echo Booting from mmc ...; " \
+ "run mmcargs; " \
+ "bootm ${loadaddr}\0" \
+ "nandboot=echo Booting from nand ...; " \
+ "run nandargs; " \
+ "onenand read ${loadaddr} 280000 400000; " \
+ "bootm ${loadaddr}\0" \
+
+#define CONFIG_BOOTCOMMAND \
+ "if mmcinit; then " \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "else " \
+ "if run loaduimage; then " \
+ "run mmcboot; " \
+ "else run nandboot; " \
+ "fi; " \
+ "fi; " \
+ "else run nandboot; fi"
-#define CONFIG_BOOTARGS "setenv bootargs console=ttyS2,115200n8 noinitrd " \
- "root=/dev/mtdblock4 rw rootfstype=jffs2"
-
-#define CONFIG_NETMASK 255.255.254.0
-#define CONFIG_BOOTFILE "uImage"
#define CONFIG_AUTO_COMPLETE 1
/*
* Miscellaneous configurable options
@@ -180,6 +205,8 @@
#define V_PROMPT "OMAP3_EVM # "
#define CONFIG_SYS_LONGHELP /* undef to save memory */
+#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
#define CONFIG_SYS_PROMPT V_PROMPT
#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
/* Print Buffer Size */
Index: u-boot-arm/include/configs/omap3_overo.h
===================================================================
--- u-boot-arm.orig/include/configs/omap3_overo.h
+++ u-boot-arm/include/configs/omap3_overo.h
@@ -151,15 +151,43 @@
/* Environment information */
#define CONFIG_BOOTDELAY 5
-#define CONFIG_BOOTCOMMAND "mmcinit; fatload mmc 0 82000000 uImage; "\
- "bootm 82000000"
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "loadaddr=0x82000000\0" \
+ "console=ttyS2,115200n8\0" \
+ "videomode=1024x768@60,vxres=1024,vyres=768\0" \
+ "videospec=omapfb:vram:2M,vram:4M\0" \
+ "mmcargs=setenv bootargs console=${console} " \
+ "video=${videospec},mode:${videomode} " \
+ "root=/dev/mmcblk0p2 rw " \
+ "rootfstype=ext3 rootwait\0" \
+ "nandargs=setenv bootargs console=${console} " \
+ "video=${videospec},mode:${videomode} " \
+ "root=/dev/mtdblock4 rw " \
+ "rootfstype=jffs2\0" \
+ "loadbootscript=fatload mmc 0 ${loadaddr} boot.script\0" \
+ "bootscript=echo Running bootscript from mmc ...; " \
+ "autoscr ${loadaddr}\0" \
+ "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
+ "mmcboot=echo Booting from mmc ...; " \
+ "run mmcargs; " \
+ "bootm ${loadaddr}\0" \
+ "nandboot=echo Booting from nand ...; " \
+ "run nandargs; " \
+ "nand read ${loadaddr} 280000 400000; " \
+ "bootm ${loadaddr}\0" \
+
+#define CONFIG_BOOTCOMMAND \
+ "if mmcinit; then " \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "else " \
+ "if run loaduimage; then " \
+ "run mmcboot; " \
+ "else run nandboot; " \
+ "fi; " \
+ "fi; " \
+ "else run nandboot; fi"
-#define CONFIG_BOOTARGS "setenv bootargs console=ttyS2,115200n8 " \
- "root=/dev/mmcblk0p2 rw rootfstype=ext3 " \
- "rootwait"
-
-#define CONFIG_NETMASK 255.255.254.0
-#define CONFIG_BOOTFILE "uImage"
#define CONFIG_AUTO_COMPLETE 1
/*
* Miscellaneous configurable options
@@ -167,6 +195,8 @@
#define V_PROMPT "Overo # "
#define CONFIG_SYS_LONGHELP /* undef to save memory */
+#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
#define CONFIG_SYS_PROMPT V_PROMPT
#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
/* Print Buffer Size */
Index: u-boot-arm/include/configs/omap3_pandora.h
===================================================================
--- u-boot-arm.orig/include/configs/omap3_pandora.h
+++ u-boot-arm/include/configs/omap3_pandora.h
@@ -151,14 +151,43 @@
/* Environment information */
#define CONFIG_BOOTDELAY 1
-#define CONFIG_BOOTCOMMAND "nand read 80200000 280000 400000 ; " \
- "bootm 80200000"
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "loadaddr=0x82000000\0" \
+ "console=ttyS0,115200n8\0" \
+ "videomode=1024x768@60,vxres=1024,vyres=768\0" \
+ "videospec=omapfb:vram:2M,vram:4M\0" \
+ "mmcargs=setenv bootargs console=${console} " \
+ "video=${videospec},mode:${videomode} " \
+ "root=/dev/mmcblk0p2 rw " \
+ "rootfstype=ext3 rootwait\0" \
+ "nandargs=setenv bootargs console=${console} " \
+ "video=${videospec},mode:${videomode} " \
+ "root=/dev/mtdblock4 rw " \
+ "rootfstype=jffs2\0" \
+ "loadbootscript=fatload mmc 0 ${loadaddr} boot.script\0" \
+ "bootscript=echo Running bootscript from mmc ...; " \
+ "autoscr ${loadaddr}\0" \
+ "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \
+ "mmcboot=echo Booting from mmc ...; " \
+ "run mmcargs; " \
+ "bootm ${loadaddr}\0" \
+ "nandboot=echo Booting from nand ...; " \
+ "run nandargs; " \
+ "nand read ${loadaddr} 280000 400000; " \
+ "bootm ${loadaddr}\0" \
+
+#define CONFIG_BOOTCOMMAND \
+ "if mmcinit; then " \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "else " \
+ "if run loaduimage; then " \
+ "run mmcboot; " \
+ "else run nandboot; " \
+ "fi; " \
+ "fi; " \
+ "else run nandboot; fi"
-#define CONFIG_BOOTARGS "console=ttyS0,115200n8 noinitrd " \
- "root=/dev/mtdblock4 rw rootfstype=jffs2"
-
-#define CONFIG_NETMASK 255.255.254.0
-#define CONFIG_BOOTFILE "uImage"
#define CONFIG_AUTO_COMPLETE 1
/*
* Miscellaneous configurable options
@@ -166,6 +195,8 @@
#define V_PROMPT "Pandora # "
#define CONFIG_SYS_LONGHELP /* undef to save memory */
+#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
#define CONFIG_SYS_PROMPT V_PROMPT
#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
/* Print Buffer Size */
3
2

[U-Boot] [PATCH-OMAP3 2/2] OMAP3: Convert register access to structure style, part #2
by Dirk Behme 06 Dec '08
by Dirk Behme 06 Dec '08
06 Dec '08
Convert register access to structure style, part #2.
No functional change.
Signed-off-by: Jason Kridner <jkridner(a)gmail.com>
Signed-off-by: Dirk Behme <dirk.behme(a)googlemail.com>
---
board/omap3/beagle/beagle.c | 16 +----
board/omap3/evm/evm.c | 39 +++++-------
board/omap3/overo/overo.c | 16 +----
board/omap3/pandora/pandora.c | 21 +++---
cpu/arm_cortexa8/omap3/interrupts.c | 10 +--
cpu/arm_cortexa8/omap3/mem.c | 105 +++++++++++++++++----------------
cpu/arm_cortexa8/omap3/sys_info.c | 22 +++---
cpu/arm_cortexa8/omap3/syslib.c | 11 +--
drivers/mtd/nand/omap_gpmc.c | 47 +++++++-------
include/asm-arm/arch-omap3/mem.h | 9 +-
include/asm-arm/arch-omap3/omap3.h | 22 +++++-
include/asm-arm/arch-omap3/sys_proto.h | 4 -
include/configs/omap3_beagle.h | 17 +++--
include/configs/omap3_evm.h | 18 +++--
include/configs/omap3_overo.h | 17 +++--
include/configs/omap3_pandora.h | 17 +++--
16 files changed, 204 insertions(+), 187 deletions(-)
Index: u-boot-arm/cpu/arm_cortexa8/omap3/interrupts.c
===================================================================
--- u-boot-arm.orig/cpu/arm_cortexa8/omap3/interrupts.c
+++ u-boot-arm/cpu/arm_cortexa8/omap3/interrupts.c
@@ -167,16 +167,16 @@ void do_irq(struct pt_regs *pt_regs)
static ulong timestamp;
static ulong lastinc;
-static u32 *timer_base = (u32 *)CONFIG_SYS_TIMERBASE;
+static gptimer_t *timer_base = (gptimer_t *)CONFIG_SYS_TIMERBASE;
/* nothing really to do with interrupts, just starts up a counter. */
int interrupt_init(void)
{
/* start the counter ticking up, reload value on overflow */
- writel(TIMER_LOAD_VAL, timer_base + OFFS(TLDR));
+ writel(TIMER_LOAD_VAL, &timer_base->tldr);
/* enable timer */
writel((CONFIG_SYS_PVT << 2) | TCLR_PRE | TCLR_AR | TCLR_ST,
- timer_base + OFFS(TCLR));
+ &timer_base->tclr);
reset_timer_masked(); /* init the timestamp and lastinc value */
@@ -232,13 +232,13 @@ void udelay(unsigned long usec)
void reset_timer_masked(void)
{
/* reset time, capture current incrementer value time */
- lastinc = readl(timer_base + OFFS(TCRR));
+ lastinc = readl(&timer_base->tcrr);
timestamp = 0; /* start "advancing" time stamp from 0 */
}
ulong get_timer_masked(void)
{
- ulong now = readl(timer_base + OFFS(TCRR)); /* current tick value */
+ ulong now = readl(&timer_base->tcrr); /* current tick value */
if (now >= lastinc) /* normal mode (non roll) */
/* move stamp fordward with absoulte diff ticks */
Index: u-boot-arm/drivers/mtd/nand/omap_gpmc.c
===================================================================
--- u-boot-arm.orig/drivers/mtd/nand/omap_gpmc.c
+++ u-boot-arm/drivers/mtd/nand/omap_gpmc.c
@@ -30,8 +30,8 @@
#include <nand.h>
static uint8_t cs;
-static uint32_t *gpmc_base = (uint32_t *)GPMC_BASE;
-static uint32_t *gpmc_cs_base;
+static gpmc_t *gpmc_base = (gpmc_t *)GPMC_BASE;
+static gpmc_csx_t *gpmc_cs_base;
static struct nand_ecclayout hw_nand_oob = GPMC_NAND_HW_ECC_LAYOUT;
/*
@@ -49,13 +49,13 @@ static void omap_nand_hwcontrol(struct m
*/
switch (ctrl) {
case NAND_CTRL_CHANGE | NAND_CTRL_CLE:
- this->IO_ADDR_W = gpmc_cs_base + OFFS(GPMC_NAND_CMD);
+ this->IO_ADDR_W = (void __iomem *)&gpmc_cs_base->nand_cmd;
break;
case NAND_CTRL_CHANGE | NAND_CTRL_ALE:
- this->IO_ADDR_W = gpmc_cs_base + OFFS(GPMC_NAND_ADR);
+ this->IO_ADDR_W = (void __iomem *)&gpmc_cs_base->nand_adr;
break;
case NAND_CTRL_CHANGE | NAND_NCE:
- this->IO_ADDR_W = gpmc_cs_base + OFFS(GPMC_NAND_DAT);
+ this->IO_ADDR_W = (void __iomem *)&gpmc_cs_base->nand_dat;
break;
}
@@ -75,9 +75,8 @@ static void omap_hwecc_init(struct nand_
* Init ECC Control Register
* Clear all ECC | Enable Reg1
*/
- writel(ECCCLEAR | ECCRESULTREG1, gpmc_base + OFFS(GPMC_ECC_CONTROL));
- writel(ECCSIZE1 | ECCSIZE0 | ECCSIZE0SEL,
- gpmc_base + OFFS(GPMC_ECC_SIZE_CONFIG));
+ writel(ECCCLEAR | ECCRESULTREG1, &gpmc_base->ecc_control);
+ writel(ECCSIZE1 | ECCSIZE0 | ECCSIZE0SEL, &gpmc_base->ecc_size_config);
}
/*
@@ -109,7 +108,7 @@ static uint32_t gen_true_ecc(uint8_t *ec
* @return 0 if data is OK or corrected, else returns -1
*/
static int omap_correct_data(struct mtd_info *mtd, uint8_t *dat,
- uint8_t *read_ecc, uint8_t *calc_ecc)
+ uint8_t *read_ecc, uint8_t *calc_ecc)
{
uint32_t orig_ecc, new_ecc, res, hm;
uint16_t parity_bits, byte;
@@ -175,12 +174,12 @@ static int omap_correct_data(struct mtd_
* @ecc_code: ecc_code buffer
*/
static int omap_calculate_ecc(struct mtd_info *mtd, const uint8_t *dat,
- uint8_t *ecc_code)
+ uint8_t *ecc_code)
{
u_int32_t val;
/* Start Reading from HW ECC1_Result = 0x200 */
- val = readl(gpmc_base + OFFS(GPMC_ECC1_RESULT));
+ val = readl(&gpmc_base->ecc1_result);
ecc_code[0] = val & 0xFF;
ecc_code[1] = (val >> 16) & 0xFF;
@@ -190,7 +189,7 @@ static int omap_calculate_ecc(struct mtd
* Stop reading anymore ECC vals and clear old results
* enable will be called if more reads are required
*/
- writel(0x000, gpmc_base + OFFS(GPMC_ECC_CONFIG));
+ writel(0x000, &gpmc_base->ecc_config);
return 0;
}
@@ -209,17 +208,17 @@ static void omap_enable_hwecc(struct mtd
case NAND_ECC_READ:
case NAND_ECC_WRITE:
/* Clear the ecc result registers, select ecc reg as 1 */
- writel(ECCCLEAR | ECCRESULTREG1,
- gpmc_base + OFFS(GPMC_ECC_CONTROL));
+ writel(ECCCLEAR | ECCRESULTREG1, &gpmc_base->ecc_control);
+
/*
* Size 0 = 0xFF, Size1 is 0xFF - both are 512 bytes
* tell all regs to generate size0 sized regs
* we just have a single ECC engine for all CS
*/
writel(ECCSIZE1 | ECCSIZE0 | ECCSIZE0SEL,
- gpmc_base + OFFS(GPMC_ECC_SIZE_CONFIG));
+ &gpmc_base->ecc_size_config);
val = (dev_width << 7) | (cs << 1) | (0x1);
- writel(val, gpmc_base + OFFS(GPMC_ECC_CONFIG));
+ writel(val, &gpmc_base->ecc_config);
break;
default:
printf("Error: Unrecognized Mode[%d]!\n", mode);
@@ -318,10 +317,10 @@ int board_nand_init(struct nand_chip *na
* Each GPMC set for a single CS is at offset 0x30
* - already remapped for us
*/
- gpmc_cs_base = (void __iomem *)(GPMC_CONFIG_CS0_BASE +
- (cs * GPMC_CONFIG_WIDTH));
+ gpmc_cs_base = (gpmc_csx_t *)(GPMC_CONFIG_CS0_BASE +
+ (cs * GPMC_CONFIG_WIDTH));
/* Check if NAND type is set */
- if ((readl(gpmc_cs_base + OFFS(GPMC_CONFIG1)) & 0xC00) ==
+ if ((readl(&gpmc_cs_base->config1) & 0xC00) ==
0x800) {
/* Found it!! */
break;
@@ -330,17 +329,17 @@ int board_nand_init(struct nand_chip *na
}
if (cs >= GPMC_MAX_CS) {
printf("NAND: Unable to find NAND settings in "
- "GPMC Configuration - quitting\n");
+ "GPMC Configuration - quitting\n");
return -ENODEV;
}
- gpmc_config = readl(gpmc_base + OFFS(GPMC_CONFIG));
+ gpmc_config = readl(&gpmc_base->config);
/* Disable Write protect */
gpmc_config |= 0x10;
- writel(gpmc_config, gpmc_base + OFFS(GPMC_CONFIG));
+ writel(gpmc_config, &gpmc_base->config);
- nand->IO_ADDR_R = gpmc_cs_base + OFFS(GPMC_NAND_DAT);
- nand->IO_ADDR_W = gpmc_cs_base + OFFS(GPMC_NAND_CMD);
+ nand->IO_ADDR_R = (void __iomem *)&gpmc_cs_base->nand_dat;
+ nand->IO_ADDR_W = (void __iomem *)&gpmc_cs_base->nand_cmd;
nand->cmd_ctrl = omap_nand_hwcontrol;
nand->options = NAND_NO_PADDING | NAND_CACHEPRG | NAND_NO_AUTOINCR |
Index: u-boot-arm/cpu/arm_cortexa8/omap3/sys_info.c
===================================================================
--- u-boot-arm.orig/cpu/arm_cortexa8/omap3/sys_info.c
+++ u-boot-arm/cpu/arm_cortexa8/omap3/sys_info.c
@@ -32,9 +32,9 @@
#include <i2c.h>
extern omap3_sysinfo sysinfo;
-static u32 *gpmc_base = (u32 *)GPMC_BASE;
-static u32 *sdrc_base = (u32 *)OMAP34XX_SDRC_BASE;
-static u32 *ctrl_base = (u32 *)OMAP34XX_CTRL_BASE;
+static gpmc_csx_t *gpmc_cs_base = (gpmc_csx_t *)GPMC_CONFIG_CS0_BASE;
+static sdrc_t *sdrc_base = (sdrc_t *)OMAP34XX_SDRC_BASE;
+static ctrl_t *ctrl_base = (ctrl_t *)OMAP34XX_CTRL_BASE;
/******************************************
* get_cpu_rev(void) - extract version info
@@ -61,8 +61,7 @@ u32 get_cpu_rev(void)
****************************************************/
u32 is_mem_sdr(void)
{
- if (readl(sdrc_base + OFFS(SDRC_MR_0 + SDRC_CS0_OSET)) ==
- SDP_SDRC_MR_0_SDR)
+ if (readl(&sdrc_base->cs[CS0].mr) == SDP_SDRC_MR_0_SDR)
return 1;
return 0;
}
@@ -70,12 +69,12 @@ u32 is_mem_sdr(void)
/***********************************************************************
* get_cs0_size() - get size of chip select 0/1
************************************************************************/
-u32 get_sdr_cs_size(u32 offset)
+u32 get_sdr_cs_size(u32 cs)
{
u32 size;
/* get ram size field */
- size = readl(sdrc_base + OFFS(SDRC_MCFG_0 + offset)) >> 8;
+ size = readl(&sdrc_base->cs[cs].mcfg) >> 8;
size &= 0x3FF; /* remove unwanted bits */
size *= SZ_2M; /* find size in MB */
return size;
@@ -91,7 +90,7 @@ u32 get_sdr_cs_offset(u32 cs)
if (!cs)
return 0;
- offset = readl(sdrc_base + OFFS(SDRC_CS_CFG));
+ offset = readl(&sdrc_base->cs_cfg);
offset = (offset & 15) << 27 | (offset & 0x30) >> 17;
return offset;
@@ -129,7 +128,7 @@ u32 get_gpmc0_base(void)
{
u32 b;
- b = readl(gpmc_base + OFFS(GPMC_CONFIG7));
+ b = readl(&gpmc_cs_base->config7);
b &= 0x1F; /* keep base [5:0] */
b = b << 24; /* ret 0x0b000000 */
return b;
@@ -243,7 +242,7 @@ u32 is_running_in_sdram(void)
***************************************************************/
u32 get_boot_type(void)
{
- return (readl(ctrl_base + OFFS(CONTROL_STATUS)) & SYSBOOT_MASK);
+ return (readl(&ctrl_base->status) & SYSBOOT_MASK);
}
/*************************************************************
@@ -251,6 +250,5 @@ u32 get_boot_type(void)
*************************************************************/
u32 get_device_type(void)
{
- return ((readl(ctrl_base + OFFS(CONTROL_STATUS)) &
- (DEVICE_MASK)) >> 8);
+ return ((readl(&ctrl_base->status) & (DEVICE_MASK)) >> 8);
}
Index: u-boot-arm/cpu/arm_cortexa8/omap3/mem.c
===================================================================
--- u-boot-arm.orig/cpu/arm_cortexa8/omap3/mem.c
+++ u-boot-arm/cpu/arm_cortexa8/omap3/mem.c
@@ -76,7 +76,8 @@ static u32 gpmc_m_nand[GPMC_MAX_REG] = {
M_NAND_GPMC_CONFIG6, 0
};
-u32 *nand_cs_base;
+gpmc_csx_t *nand_cs_base;
+gpmc_t *gpmc_cfg_base;
#if defined(CONFIG_ENV_IS_IN_NAND)
#define GPMC_CS 0
@@ -96,7 +97,7 @@ static u32 gpmc_onenand[GPMC_MAX_REG] =
ONENAND_GPMC_CONFIG6, 0
};
-u32 *onenand_cs_base;
+gpmc_csx_t *onenand_cs_base;
#if defined(CONFIG_ENV_IS_IN_ONENAND)
#define GPMC_CS 0
@@ -106,7 +107,7 @@ u32 *onenand_cs_base;
#endif
-static u32 *sdrc_base = (u32 *)OMAP34XX_SDRC_BASE;
+static sdrc_t *sdrc_base = (sdrc_t *)OMAP34XX_SDRC_BASE;
/**************************************************************************
* make_cs1_contiguous() - for es2 and above remap cs1 behind cs0 to allow
@@ -118,11 +119,11 @@ void make_cs1_contiguous(void)
{
u32 size, a_add_low, a_add_high;
- size = get_sdr_cs_size(SDRC_CS0_OSET);
+ size = get_sdr_cs_size(CS0);
size /= SZ_32M; /* find size to offset CS1 */
a_add_high = (size & 3) << 8; /* set up low field */
a_add_low = (size & 0x3C) >> 2; /* set up high field */
- writel((a_add_high | a_add_low), sdrc_base + OFFS(SDRC_CS_CFG));
+ writel((a_add_high | a_add_low), &sdrc_base->cs_cfg);
}
@@ -158,7 +159,7 @@ u32 mem_ok(u32 cs)
void sdrc_init(void)
{
/* only init up first bank here */
- do_sdrc_init(SDRC_CS0_OSET, EARLY_INIT);
+ do_sdrc_init(CS0, EARLY_INIT);
}
/*************************************************************************
@@ -167,70 +168,73 @@ void sdrc_init(void)
* -optimal settings can be placed here, or redone after i2c
* inspection of board info
*
- * - code called ones in C-Stack only context for CS0 and a possible 2nd
+ * - code called once in C-Stack only context for CS0 and a possible 2nd
* time depending on memory configuration from stack+global context
**************************************************************************/
-void do_sdrc_init(u32 offset, u32 early)
+void do_sdrc_init(u32 cs, u32 early)
{
- u32 actim_offs = offset? 0x28: 0;
+ sdrc_actim_t *sdrc_actim_base;
+
+ if(cs)
+ sdrc_actim_base = (sdrc_actim_t *)SDRC_ACTIM_CTRL1_BASE;
+ else
+ sdrc_actim_base = (sdrc_actim_t *)SDRC_ACTIM_CTRL0_BASE;
if (early) {
/* reset sdrc controller */
- writel(SOFTRESET, sdrc_base + OFFS(SDRC_SYSCONFIG));
- wait_on_value(RESETDONE, RESETDONE, SDRC_STATUS_REG, 12000000);
- writel(0, sdrc_base + OFFS(SDRC_SYSCONFIG));
+ writel(SOFTRESET, &sdrc_base->sysconfig);
+ wait_on_value(RESETDONE, RESETDONE, &sdrc_base->status,
+ 12000000);
+ writel(0, &sdrc_base->sysconfig);
/* setup sdrc to ball mux */
- writel(SDP_SDRC_SHARING, sdrc_base + OFFS(SDRC_SHARING));
+ writel(SDP_SDRC_SHARING, &sdrc_base->sharing);
/* Disable Power Down of CKE cuz of 1 CKE on combo part */
- writel(SRFRONRESET | PAGEPOLICY_HIGH,
- sdrc_base + OFFS(SDRC_POWER));
+ writel(SRFRONRESET | PAGEPOLICY_HIGH, &sdrc_base->power);
- writel(ENADLL | DLLPHASE_90, sdrc_base + OFFS(SDRC_DLLA_CTRL));
+ writel(ENADLL | DLLPHASE_90, &sdrc_base->dlla_ctrl);
sdelay(0x20000);
}
writel(RASWIDTH_13BITS | CASWIDTH_10BITS | ADDRMUXLEGACY |
RAMSIZE_128 | BANKALLOCATION | B32NOT16 | B32NOT16 |
- DEEPPD | DDR_SDRAM, sdrc_base + OFFS(SDRC_MCFG_0 + offset));
- writel(ARCV | ARE_ARCV_1, sdrc_base + OFFS(SDRC_RFR_CTRL + offset));
- writel(V_ACTIMA_165, sdrc_base +
- OFFS(SDRC_ACTIM_CTRLA_0 + actim_offs));
- writel(V_ACTIMB_165, sdrc_base +
- OFFS(SDRC_ACTIM_CTRLB_0 + actim_offs));
-
- writel(CMD_NOP, sdrc_base + OFFS(SDRC_MANUAL_0 + offset));
- writel(CMD_PRECHARGE, sdrc_base + OFFS(SDRC_MANUAL_0 + offset));
- writel(CMD_AUTOREFRESH, sdrc_base + OFFS(SDRC_MANUAL_0 + offset));
- writel(CMD_AUTOREFRESH, sdrc_base + OFFS(SDRC_MANUAL_0 + offset));
+ DEEPPD | DDR_SDRAM, &sdrc_base->cs[cs].mcfg);
+ writel(ARCV | ARE_ARCV_1, &sdrc_base->cs[cs].rfr_ctrl);
+ writel(V_ACTIMA_165, &sdrc_actim_base->ctrla);
+ writel(V_ACTIMB_165, &sdrc_actim_base->ctrlb);
+
+ writel(CMD_NOP, &sdrc_base ->cs[cs].manual);
+ writel(CMD_PRECHARGE, &sdrc_base->cs[cs].manual);
+ writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual);
+ writel(CMD_AUTOREFRESH, &sdrc_base->cs[cs].manual);
/*
* CAS latency 3, Write Burst = Read Burst, Serial Mode,
* Burst length = 4
*/
- writel(CASL3 | BURSTLENGTH4, sdrc_base + OFFS(SDRC_MR_0 + offset));
+ writel(CASL3 | BURSTLENGTH4, &sdrc_base->cs[cs].mr);
- if (!mem_ok(offset))
- writel(0, sdrc_base + OFFS(SDRC_MCFG_0 + offset));
+ if (!mem_ok(cs))
+ writel(0, &sdrc_base->cs[cs].mcfg);
}
-void enable_gpmc_config(u32 *gpmc_config, u32 *gpmc_cs_base, u32 base,
+void enable_gpmc_config(u32 *gpmc_config, gpmc_csx_t *gpmc_cs_base, u32 base,
u32 size)
{
- writel(0, gpmc_cs_base + OFFS(GPMC_CONFIG7));
+ writel(0, &gpmc_cs_base->config7);
sdelay(1000);
/* Delay for settling */
- writel(gpmc_config[0], gpmc_cs_base + OFFS(GPMC_CONFIG1));
- writel(gpmc_config[1], gpmc_cs_base + OFFS(GPMC_CONFIG2));
- writel(gpmc_config[2], gpmc_cs_base + OFFS(GPMC_CONFIG3));
- writel(gpmc_config[3], gpmc_cs_base + OFFS(GPMC_CONFIG4));
- writel(gpmc_config[4], gpmc_cs_base + OFFS(GPMC_CONFIG5));
- writel(gpmc_config[5], gpmc_cs_base + OFFS(GPMC_CONFIG6));
+ writel(gpmc_config[0], &gpmc_cs_base->config1);
+ writel(gpmc_config[1], &gpmc_cs_base->config2);
+ writel(gpmc_config[2], &gpmc_cs_base->config3);
+ writel(gpmc_config[3], &gpmc_cs_base->config4);
+ writel(gpmc_config[4], &gpmc_cs_base->config5);
+ writel(gpmc_config[5], &gpmc_cs_base->config6);
/* Enable the config */
writel((((size & 0xF) << 8) | ((base >> 24) & 0x3F) |
- (1 << 6)), gpmc_cs_base + OFFS(GPMC_CONFIG7));
+ (1 << 6)), &gpmc_cs_base->config7);
sdelay(2000);
}
@@ -243,8 +247,8 @@ void gpmc_init(void)
{
/* putting a blanket check on GPMC based on ZeBu for now */
u32 *gpmc_config = NULL;
- u32 *gpmc_base = (u32 *)GPMC_BASE;
- u32 *gpmc_cs_base = (u32 *)GPMC_CONFIG_CS0_BASE;
+ gpmc_t *gpmc_base = (gpmc_t *)GPMC_BASE;
+ gpmc_csx_t *gpmc_cs_base = (gpmc_csx_t *)GPMC_CONFIG_CS0_BASE;
u32 base = 0;
u32 size = 0;
u32 f_off = CONFIG_SYS_MONITOR_LEN;
@@ -252,24 +256,25 @@ void gpmc_init(void)
u32 config = 0;
/* global settings */
- writel(0, gpmc_base + OFFS(GPMC_IRQENABLE)); /* isr's sources masked */
- writel(0, gpmc_base + OFFS(GPMC_TIMEOUT_CONTROL));/* timeout disable */
+ writel(0, &gpmc_base->irqenable); /* isr's sources masked */
+ writel(0, &gpmc_base->timeout_control);/* timeout disable */
- config = readl(gpmc_base + OFFS(GPMC_CONFIG));
+ config = readl(&gpmc_base->config);
config &= (~0xf00);
- writel(config, gpmc_base + OFFS(GPMC_CONFIG));
+ writel(config, &gpmc_base->config);
/*
* Disable the GPMC0 config set by ROM code
* It conflicts with our MPDB (both at 0x08000000)
*/
- writel(0, gpmc_cs_base + OFFS(GPMC_CONFIG7));
+ writel(0, &gpmc_cs_base->config7);
sdelay(1000);
#if defined(CONFIG_CMD_NAND) /* CS 0 */
gpmc_config = gpmc_m_nand;
- nand_cs_base = (u32 *)(GPMC_CONFIG_CS0_BASE +
- (GPMC_CS * GPMC_CONFIG_WIDTH));
+ gpmc_cfg_base = gpmc_base;
+ nand_cs_base = (gpmc_csx_t *)(GPMC_CONFIG_CS0_BASE +
+ (GPMC_CS * GPMC_CONFIG_WIDTH));
base = PISMO1_NAND_BASE;
size = PISMO1_NAND_SIZE;
enable_gpmc_config(gpmc_config, nand_cs_base, base, size);
@@ -287,8 +292,8 @@ void gpmc_init(void)
#if defined(CONFIG_CMD_ONENAND)
gpmc_config = gpmc_onenand;
- onenand_cs_base = (u32 *)(GPMC_CONFIG_CS0_BASE +
- (GPMC_CS * GPMC_CONFIG_WIDTH));
+ onenand_cs_base = (gpmc_csx_t *)(GPMC_CONFIG_CS0_BASE +
+ (GPMC_CS * GPMC_CONFIG_WIDTH));
base = PISMO1_ONEN_BASE;
size = PISMO1_ONEN_SIZE;
enable_gpmc_config(gpmc_config, onenand_cs_base, base, size);
Index: u-boot-arm/board/omap3/evm/evm.c
===================================================================
--- u-boot-arm.orig/board/omap3/evm/evm.c
+++ u-boot-arm/board/omap3/evm/evm.c
@@ -89,38 +89,35 @@ void set_muxconf_regs(void)
*****************************************************************************/
static void setup_net_chip(void)
{
- unsigned int *gpio3_base = (unsigned int *)OMAP34XX_GPIO3_BASE;
- unsigned int *gpmc_cs6_base = (unsigned int *)GPMC_CONFIG_CS6_BASE;
- unsigned short *ctrl_base = (unsigned short *)OMAP34XX_CTRL_BASE;
+ gpio_t *gpio3_base = (gpio_t *)OMAP34XX_GPIO3_BASE;
+ gpmc_csx_t *gpmc_cs6_base = (gpmc_csx_t *)GPMC_CONFIG_CS6_BASE;
+ ctrl_t *ctrl_base = (ctrl_t *)OMAP34XX_CTRL_BASE;
/* Configure GPMC registers */
- writel(NET_GPMC_CONFIG1, gpmc_cs6_base + OFFS(GPMC_CONFIG1));
- writel(NET_GPMC_CONFIG2, gpmc_cs6_base + OFFS(GPMC_CONFIG2));
- writel(NET_GPMC_CONFIG3, gpmc_cs6_base + OFFS(GPMC_CONFIG3));
- writel(NET_GPMC_CONFIG4, gpmc_cs6_base + OFFS(GPMC_CONFIG4));
- writel(NET_GPMC_CONFIG5, gpmc_cs6_base + OFFS(GPMC_CONFIG5));
- writel(NET_GPMC_CONFIG6, gpmc_cs6_base + OFFS(GPMC_CONFIG6));
- writel(NET_GPMC_CONFIG7, gpmc_cs6_base + OFFS(GPMC_CONFIG7));
+ writel(NET_GPMC_CONFIG1, &gpmc_cs6_base->config1);
+ writel(NET_GPMC_CONFIG2, &gpmc_cs6_base->config2);
+ writel(NET_GPMC_CONFIG3, &gpmc_cs6_base->config3);
+ writel(NET_GPMC_CONFIG4, &gpmc_cs6_base->config4);
+ writel(NET_GPMC_CONFIG5, &gpmc_cs6_base->config5);
+ writel(NET_GPMC_CONFIG6, &gpmc_cs6_base->config6);
+ writel(NET_GPMC_CONFIG7, &gpmc_cs6_base->config7);
/* Enable off mode for NWE in PADCONF_GPMC_NWE register */
- writew(readw(ctrl_base + (CONTROL_PADCONF_GPMC_NWE >> 1)) | 0x0E00,
- ctrl_base + (CONTROL_PADCONF_GPMC_NWE >> 1));
+ writew(readw(&ctrl_base ->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
/* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */
- writew(readw(ctrl_base + (CONTROL_PADCONF_GPMC_NOE >> 1)) | 0x0E00,
- ctrl_base + (CONTROL_PADCONF_GPMC_NOE >> 1));
+ writew(readw(&ctrl_base->gpmc_noe) | 0x0E00, &ctrl_base->gpmc_noe);
/* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */
- writew(readw(ctrl_base + (CONTROL_PADCONF_GPMC_NADV_ALE >> 1)) | 0x0E00,
- ctrl_base + (CONTROL_PADCONF_GPMC_NADV_ALE >> 1));
+ writew(readw(&ctrl_base->gpmc_nadv_ale) | 0x0E00,
+ &ctrl_base->gpmc_nadv_ale);
/* Make GPIO 64 as output pin */
- writel(readl(gpio3_base + OFFS(GPIO_OE)) & ~(GPIO0),
- gpio3_base + OFFS(GPIO_OE));
+ writel(readl(&gpio3_base->oe) & ~(GPIO0), &gpio3_base->oe);
/* Now send a pulse on the GPIO pin */
- writel(GPIO0, gpio3_base + OFFS(GPIO_SETDATAOUT));
+ writel(GPIO0, &gpio3_base->setdataout);
udelay(1);
- writel(GPIO0, gpio3_base + OFFS(GPIO_CLEARDATAOUT));
+ writel(GPIO0, &gpio3_base->cleardataout);
udelay(1);
- writel(GPIO0, gpio3_base + OFFS(GPIO_SETDATAOUT));
+ writel(GPIO0, &gpio3_base->setdataout);
}
Index: u-boot-arm/include/configs/omap3_beagle.h
===================================================================
--- u-boot-arm.orig/include/configs/omap3_beagle.h
+++ u-boot-arm/include/configs/omap3_beagle.h
@@ -285,7 +285,8 @@
#define ENV_IS_VARIABLE 1
#ifndef __ASSEMBLY__
-extern unsigned int *nand_cs_base;
+extern gpmc_csx_t *nand_cs_base;
+extern gpmc_t *gpmc_cfg_base;
extern unsigned int boot_flash_base;
extern volatile unsigned int boot_flash_env_addr;
extern unsigned int boot_flash_off;
@@ -295,15 +296,17 @@ extern unsigned int boot_flash_type;
#define WRITE_NAND_COMMAND(d, adr)\
- writel(d, (nand_cs_base + OFFS(GPMC_NAND_CMD)))
+ writel(d, &nand_cs_base->nand_cmd)
#define WRITE_NAND_ADDRESS(d, adr)\
- writel(d, (nand_cs_base + OFFS(GPMC_NAND_ADR)))
-#define WRITE_NAND(d, adr) writew(d, (nand_cs_base + OFFS(GPMC_NAND_DAT)))
-#define READ_NAND(adr) readl((nand_cs_base + OFFS(GPMC_NAND_DAT)))
+ writel(d, &nand_cs_base->nand_adr)
+#define WRITE_NAND(d, adr) writew(d, &nand_cs_base->nand_dat)
+#define READ_NAND(adr) readl(&nand_cs_base->nand_dat)
/* Other NAND Access APIs */
-#define NAND_WP_OFF() do {readl(GPMC_CONFIG_REG) |= GPMC_CONFIG_WP; } while (0)
-#define NAND_WP_ON() do {readl(GPMC_CONFIG_REG) &= ~GPMC_CONFIG_WP; } while (0)
+#define NAND_WP_OFF() do {readl(&gpmc_cfg_base->config) |= GPMC_CONFIG_WP; } \
+ while (0)
+#define NAND_WP_ON() do {readl(&gpmc_cfg_base->config) &= ~GPMC_CONFIG_WP; } \
+ while (0)
#define NAND_DISABLE_CE(nand)
#define NAND_ENABLE_CE(nand)
#define NAND_WAIT_READY(nand) udelay(10)
Index: u-boot-arm/include/configs/omap3_evm.h
===================================================================
--- u-boot-arm.orig/include/configs/omap3_evm.h
+++ u-boot-arm/include/configs/omap3_evm.h
@@ -290,7 +290,8 @@
#define ENV_IS_VARIABLE 1
#ifndef __ASSEMBLY__
-extern unsigned int *nand_cs_base;
+extern gpmc_csx_t *nand_cs_base;
+extern gpmc_t *gpmc_cfg_base;
extern unsigned int boot_flash_base;
extern volatile unsigned int boot_flash_env_addr;
extern unsigned int boot_flash_off;
@@ -300,20 +301,21 @@ extern unsigned int boot_flash_type;
#define WRITE_NAND_COMMAND(d, adr)\
- writel(d, (nand_cs_base + OFFS(GPMC_NAND_CMD)))
+ writel(d, &nand_cs_base->nand_cmd)
#define WRITE_NAND_ADDRESS(d, adr)\
- writel(d, (nand_cs_base + OFFS(GPMC_NAND_ADR)))
-#define WRITE_NAND(d, adr) writel(d, (nand_cs_base + OFFS(GPMC_NAND_DAT)))
-#define READ_NAND(adr) readl((nand_cs_base + OFFS(GPMC_NAND_DAT)))
+ writel(d, &nand_cs_base->nand_adr)
+#define WRITE_NAND(d, adr) writew(d, &nand_cs_base->nand_dat)
+#define READ_NAND(adr) readl(&nand_cs_base->nand_dat)
/* Other NAND Access APIs */
-#define NAND_WP_OFF() do {readl(GPMC_CONFIG_REG) |= GPMC_CONFIG_WP; } while (0)
-#define NAND_WP_ON() do {readl(GPMC_CONFIG_REG) &= ~GPMC_CONFIG_WP; } while (0)
+#define NAND_WP_OFF() do {readl(&gpmc_cfg_base->config) |= GPMC_CONFIG_WP; } \
+ while (0)
+#define NAND_WP_ON() do {readl(&gpmc_cfg_base->config) &= ~GPMC_CONFIG_WP; } \
+ while (0)
#define NAND_DISABLE_CE(nand)
#define NAND_ENABLE_CE(nand)
#define NAND_WAIT_READY(nand) udelay(10)
-
/*----------------------------------------------------------------------------
* SMSC9115 Ethernet from SMSC9118 family
*----------------------------------------------------------------------------
Index: u-boot-arm/include/configs/omap3_overo.h
===================================================================
--- u-boot-arm.orig/include/configs/omap3_overo.h
+++ u-boot-arm/include/configs/omap3_overo.h
@@ -277,7 +277,8 @@
#define ENV_IS_VARIABLE 1
#ifndef __ASSEMBLY__
-extern unsigned int *nand_cs_base;
+extern gpmc_csx_t *nand_cs_base;
+extern gpmc_t *gpmc_cfg_base;
extern unsigned int boot_flash_base;
extern volatile unsigned int boot_flash_env_addr;
extern unsigned int boot_flash_off;
@@ -287,15 +288,17 @@ extern unsigned int boot_flash_type;
#define WRITE_NAND_COMMAND(d, adr)\
- writel(d, (nand_cs_base + OFFS(GPMC_NAND_CMD)))
+ writel(d, &nand_cs_base->nand_cmd)
#define WRITE_NAND_ADDRESS(d, adr)\
- writel(d, (nand_cs_base + OFFS(GPMC_NAND_ADR)))
-#define WRITE_NAND(d, adr) writel(d, (nand_cs_base + OFFS(GPMC_NAND_DAT)))
-#define READ_NAND(adr) readl((nand_cs_base + OFFS(GPMC_NAND_DAT)))
+ writel(d, &nand_cs_base->nand_adr)
+#define WRITE_NAND(d, adr) writew(d, &nand_cs_base->nand_dat)
+#define READ_NAND(adr) readl(&nand_cs_base->nand_dat)
/* Other NAND Access APIs */
-#define NAND_WP_OFF() do {readl(GPMC_CONFIG_REG) |= GPMC_CONFIG_WP; } while (0)
-#define NAND_WP_ON() do {readl(GPMC_CONFIG_REG) &= ~GPMC_CONFIG_WP; } while (0)
+#define NAND_WP_OFF() do {readl(&gpmc_cfg_base->config) |= GPMC_CONFIG_WP; } \
+ while (0)
+#define NAND_WP_ON() do {readl(&gpmc_cfg_base->config) &= ~GPMC_CONFIG_WP; } \
+ while (0)
#define NAND_DISABLE_CE(nand)
#define NAND_ENABLE_CE(nand)
#define NAND_WAIT_READY(nand) udelay(10)
Index: u-boot-arm/include/configs/omap3_pandora.h
===================================================================
--- u-boot-arm.orig/include/configs/omap3_pandora.h
+++ u-boot-arm/include/configs/omap3_pandora.h
@@ -276,7 +276,8 @@
#define ENV_IS_VARIABLE 1
#ifndef __ASSEMBLY__
-extern unsigned int *nand_cs_base;
+extern gpmc_csx_t *nand_cs_base;
+extern gpmc_t *gpmc_cfg_base;
extern unsigned int boot_flash_base;
extern volatile unsigned int boot_flash_env_addr;
extern unsigned int boot_flash_off;
@@ -286,15 +287,17 @@ extern unsigned int boot_flash_type;
#define WRITE_NAND_COMMAND(d, adr)\
- writel(d, (nand_cs_base + OFFS(GPMC_NAND_CMD)))
+ writel(d, &nand_cs_base->nand_cmd)
#define WRITE_NAND_ADDRESS(d, adr)\
- writel(d, (nand_cs_base + OFFS(GPMC_NAND_ADR)))
-#define WRITE_NAND(d, adr) writew(d, (nand_cs_base + OFFS(GPMC_NAND_DAT)))
-#define READ_NAND(adr) readl((nand_cs_base + OFFS(GPMC_NAND_DAT)))
+ writel(d, &nand_cs_base->nand_adr)
+#define WRITE_NAND(d, adr) writew(d, &nand_cs_base->nand_dat)
+#define READ_NAND(adr) readl(&nand_cs_base->nand_dat)
/* Other NAND Access APIs */
-#define NAND_WP_OFF() do {readl(GPMC_CONFIG_REG) |= GPMC_CONFIG_WP; } while (0)
-#define NAND_WP_ON() do {readl(GPMC_CONFIG_REG) &= ~GPMC_CONFIG_WP; } while (0)
+#define NAND_WP_OFF() do {readl(&gpmc_cfg_base->config) |= GPMC_CONFIG_WP; } \
+ while (0)
+#define NAND_WP_ON() do {readl(&gpmc_cfg_base->config) &= ~GPMC_CONFIG_WP; } \
+ while (0)
#define NAND_DISABLE_CE(nand)
#define NAND_ENABLE_CE(nand)
#define NAND_WAIT_READY(nand) udelay(10)
Index: u-boot-arm/include/asm-arm/arch-omap3/omap3.h
===================================================================
--- u-boot-arm.orig/include/asm-arm/arch-omap3/omap3.h
+++ u-boot-arm/include/asm-arm/arch-omap3/omap3.h
@@ -75,7 +75,15 @@
/* 32KTIMER */
#define SYNC_32KTIMER_BASE 0x48320000
-#define S32K_CR 0x10
+
+#ifndef __ASSEMBLY__
+
+typedef struct s32ktimer {
+ unsigned char res[0x10];
+ unsigned int s32k_cr; /* 0x10 */
+} s32ktimer_t;
+
+#endif /* __ASSEMBLY__ */
/* OMAP3 GPIO registers */
#define OMAP34XX_GPIO1_BASE 0x48310000
@@ -85,9 +93,15 @@
#define OMAP34XX_GPIO5_BASE 0x49056000
#define OMAP34XX_GPIO6_BASE 0x49058000
-#define GPIO_OE 0x34
-#define GPIO_CLEARDATAOUT 0x90
-#define GPIO_SETDATAOUT 0x94
+#ifndef __ASSEMBLY__
+typedef struct gpio {
+ unsigned char res1[0x34];
+ unsigned int oe; /* 0x34 */
+ unsigned char res2[0x58];
+ unsigned int cleardataout; /* 0x90 */
+ unsigned int setdataout; /* 0x94 */
+} gpio_t;
+#endif /* __ASSEMBLY__ */
#define GPIO0 (0x1 << 0)
#define GPIO1 (0x1 << 1)
Index: u-boot-arm/include/asm-arm/arch-omap3/mem.h
===================================================================
--- u-boot-arm.orig/include/asm-arm/arch-omap3/mem.h
+++ u-boot-arm/include/asm-arm/arch-omap3/mem.h
@@ -25,18 +25,19 @@
#ifndef _MEM_H_
#define _MEM_H_
-#define SDRC_CS0_OSET 0x0
-#define SDRC_CS1_OSET 0x30 /* mirror CS1 regs appear offset 0x30 from CS0 */
+//#define SDRC_CS0_OSET 0x0
+//#define SDRC_CS1_OSET 0x30 /* mirror CS1 regs appear offset 0x30 from CS0 */
-#ifndef __ASSEMBLY__
+#define CS0 0x0
+#define CS1 0x1 /* mirror CS1 regs appear offset 0x30 from CS0 */
+#ifndef __ASSEMBLY__
typedef enum {
STACKED = 0,
IP_DDR = 1,
COMBO_DDR = 2,
IP_SDR = 3,
} mem_t;
-
#endif /* __ASSEMBLY__ */
#define EARLY_INIT 1
Index: u-boot-arm/board/omap3/beagle/beagle.c
===================================================================
--- u-boot-arm.orig/board/omap3/beagle/beagle.c
+++ u-boot-arm/board/omap3/beagle/beagle.c
@@ -62,8 +62,8 @@ int misc_init_r(void)
{
unsigned char byte;
- unsigned int *gpio5_base = (unsigned int *)OMAP34XX_GPIO5_BASE;
- unsigned int *gpio6_base = (unsigned int *)OMAP34XX_GPIO6_BASE;
+ gpio_t *gpio5_base = (gpio_t *)OMAP34XX_GPIO5_BASE;
+ gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
#ifdef CONFIG_DRIVER_OMAP34XX_I2C
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
@@ -97,18 +97,14 @@ int misc_init_r(void)
i2c_write(PWRMGT_ADDR_ID3, LEDEN, 1, &byte, 1);
/* Configure GPIOs to output */
- writel(~((GPIO10) | GPIO9 | GPIO3 | GPIO2),
- gpio6_base + OFFS(GPIO_OE));
+ writel(~((GPIO10) | GPIO9 | GPIO3 | GPIO2), &gpio6_base->oe);
writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
- GPIO15 | GPIO14 | GPIO13 | GPIO12),
- gpio5_base + OFFS(GPIO_OE));
+ GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe);
/* Set GPIOs */
- writel(GPIO10 | GPIO9 | GPIO3 | GPIO2,
- gpio6_base + OFFS(GPIO_SETDATAOUT));
+ writel(GPIO10 | GPIO9 | GPIO3 | GPIO2, &gpio6_base->setdataout);
writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
- GPIO15 | GPIO14 | GPIO13 | GPIO12,
- gpio5_base + OFFS(GPIO_SETDATAOUT));
+ GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout);
return 0;
}
Index: u-boot-arm/board/omap3/overo/overo.c
===================================================================
--- u-boot-arm.orig/board/omap3/overo/overo.c
+++ u-boot-arm/board/omap3/overo/overo.c
@@ -61,8 +61,8 @@ int misc_init_r(void)
{
unsigned char byte;
- unsigned int *gpio5_base = (unsigned int *)OMAP34XX_GPIO5_BASE;
- unsigned int *gpio6_base = (unsigned int *)OMAP34XX_GPIO6_BASE;
+ gpio_t *gpio5_base = (gpio_t *)OMAP34XX_GPIO5_BASE;
+ gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
#ifdef CONFIG_DRIVER_OMAP34XX_I2C
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
@@ -102,18 +102,14 @@ int misc_init_r(void)
i2c_write(PWRMGT_ADDR_ID3, LEDEN, 1, &byte, 1);
/* Configure GPIOs to output */
- writel(~((GPIO10) | GPIO9 | GPIO3 | GPIO2),
- gpio6_base + OFFS(GPIO_OE));
+ writel(~((GPIO10) | GPIO9 | GPIO3 | GPIO2), &gpio6_base->oe);
writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
- GPIO15 | GPIO14 | GPIO13 | GPIO12),
- gpio5_base + OFFS(GPIO_OE));
+ GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe);
/* Set GPIOs */
- writel(GPIO10 | GPIO9 | GPIO3 | GPIO2,
- gpio6_base + OFFS(GPIO_SETDATAOUT));
+ writel(GPIO10 | GPIO9 | GPIO3 | GPIO2, &gpio6_base->setdataout);
writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
- GPIO15 | GPIO14 | GPIO13 | GPIO12,
- gpio5_base + OFFS(GPIO_SETDATAOUT));
+ GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout);
return 0;
}
Index: u-boot-arm/board/omap3/pandora/pandora.c
===================================================================
--- u-boot-arm.orig/board/omap3/pandora/pandora.c
+++ u-boot-arm/board/omap3/pandora/pandora.c
@@ -61,10 +61,10 @@ int misc_init_r(void)
{
unsigned char byte;
- unsigned int *gpio1_base = (unsigned int *)OMAP34XX_GPIO1_BASE;
- unsigned int *gpio4_base = (unsigned int *)OMAP34XX_GPIO4_BASE;
- unsigned int *gpio5_base = (unsigned int *)OMAP34XX_GPIO5_BASE;
- unsigned int *gpio6_base = (unsigned int *)OMAP34XX_GPIO6_BASE;
+ gpio_t *gpio1_base = (gpio_t *)OMAP34XX_GPIO1_BASE;
+ gpio_t *gpio4_base = (gpio_t *)OMAP34XX_GPIO4_BASE;
+ gpio_t *gpio5_base = (gpio_t *)OMAP34XX_GPIO5_BASE;
+ gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
#ifdef CONFIG_DRIVER_OMAP34XX_I2C
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
@@ -98,16 +98,15 @@ int misc_init_r(void)
i2c_write(PWRMGT_ADDR_ID3, LEDEN, 1, &byte, 1);
/* Configure GPIOs to output */
- writel(~(GPIO14 | GPIO15 | GPIO16 | GPIO23),
- gpio1_base + OFFS(GPIO_OE));
- writel(~GPIO22, gpio4_base + OFFS(GPIO_OE)); /* 118 */
+ writel(~(GPIO14 | GPIO15 | GPIO16 | GPIO23), &gpio1_base->oe);
+ writel(~GPIO22, &gpio4_base->oe); /* 118 */
writel(~(GPIO0 | GPIO1 | GPIO28 | GPIO29 | GPIO30 | GPIO31),
- gpio5_base + OFFS(GPIO_OE)); /* 128, 129, 156-159 */
- writel(~GPIO4, gpio6_base + OFFS(GPIO_OE)); /* 164 */
+ &gpio5_base->oe); /* 128, 129, 156-159 */
+ writel(~GPIO4, &gpio6_base->oe); /* 164 */
/* Set GPIOs */
- writel(GPIO28, gpio5_base + OFFS(GPIO_SETDATAOUT));
- writel(GPIO4, gpio6_base + OFFS(GPIO_SETDATAOUT));
+ writel(GPIO28, &gpio5_base->setdataout);
+ writel(GPIO4, &gpio6_base->setdataout);
return 0;
}
Index: u-boot-arm/cpu/arm_cortexa8/omap3/syslib.c
===================================================================
--- u-boot-arm.orig/cpu/arm_cortexa8/omap3/syslib.c
+++ u-boot-arm/cpu/arm_cortexa8/omap3/syslib.c
@@ -43,26 +43,27 @@ void sdelay(unsigned long loops)
/*****************************************************************
* sr32 - clear & set a value in a bit range for a 32 bit address
*****************************************************************/
-void sr32(u32 addr, u32 start_bit, u32 num_bits, u32 value)
+void sr32(void *addr, u32 start_bit, u32 num_bits, u32 value)
{
u32 tmp, msk = 0;
msk = 1 << num_bits;
--msk;
- tmp = readl(addr) & ~(msk << start_bit);
+ tmp = readl((u32)addr) & ~(msk << start_bit);
tmp |= value << start_bit;
- writel(tmp, addr);
+ writel(tmp, (u32)addr);
}
/*********************************************************************
* wait_on_value() - common routine to allow waiting for changes in
* volatile regs.
*********************************************************************/
-u32 wait_on_value(u32 read_bit_mask, u32 match_value, u32 read_addr, u32 bound)
+u32 wait_on_value(u32 read_bit_mask, u32 match_value, void *read_addr,
+ u32 bound)
{
u32 i = 0, val;
do {
++i;
- val = readl(read_addr) & read_bit_mask;
+ val = readl((u32)read_addr) & read_bit_mask;
if (val == match_value)
return 1;
if (i == bound)
Index: u-boot-arm/include/asm-arm/arch-omap3/sys_proto.h
===================================================================
--- u-boot-arm.orig/include/asm-arm/arch-omap3/sys_proto.h
+++ u-boot-arm/include/asm-arm/arch-omap3/sys_proto.h
@@ -61,8 +61,8 @@ void setup_auxcr(void);
void try_unlock_memory(void);
u32 get_boot_type(void);
void v7_flush_dcache_all(u32);
-void sr32(u32, u32, u32, u32);
-u32 wait_on_value(u32, u32, u32, u32);
+void sr32(void *, u32, u32, u32);
+u32 wait_on_value(u32, u32, void *, u32);
void sdelay(unsigned long);
void make_cs1_contiguous(void);
void omap_nand_switch_ecc(int);
2
1