From 3e38691e8f7aa0d9b498d76c7279ddec6e4946f3 Mon Sep 17 00:00:00 2001 From: wdenk Date: Sat, 5 Apr 2003 00:53:31 +0000 Subject: * Patch by Arun Dharankar, 4 Apr 2003: Add IDMA example code (tested on 8260 only) * Add support for Purple Board (MIPS64 5Kc) * Add support for MIPS64 5Kc CPUs * Fix missing setting of "loadaddr" and "bootfile" on ARM and MIPS * Patch by Denis Peter, 04 Apr 2003: - update MIP405-4 board * Patches by Denis Peter, 03 April 2003: - fix PCI IRQs on MPL boards - fix two more un-relocated pointer problems * Fix behaviour of "run" command: - print error message iv variable does not exist - terminate processing of arguments in case of error * Patches by Peter Figuli, 10 Mar 2003 - Add support for BTUART on PXA platform - Add support for WEP EP250 (PXA) board * Fix flash problems on INCA-IP; add tool to allow bruning images to flash using a BDI2000 * Implement fix for I2C Edge Conditions problem for all boards that use the bit-banging driver (common/soft_i2c.c) * Add patches by Robert Schwebel, 31 Mar 2003: - csb226 board: bring in sync with innokom/memsetup.S - csb226 board: fix MDREFR handling - misc doc fixes / extensions - innokom board: cleanup, MDREFR fix in memsetup.S, config update - add BOOT_PROGRESS to armlinux.c --- common/cmd_date.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'common/cmd_date.c') diff --git a/common/cmd_date.c b/common/cmd_date.c index 1472e3f1a..2139cebf8 100644 --- a/common/cmd_date.c +++ b/common/cmd_date.c @@ -34,10 +34,13 @@ const char *weekdays[] = { "Sun", "Mon", "Tues", "Wednes", "Thurs", "Fri", "Satur", }; +#define RELOC(a) ((typeof(a))((unsigned long)(a) + gd->reloc_off)) + int mk_date (char *, struct rtc_time *); int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { + DECLARE_GLOBAL_DATA_PTR; struct rtc_time tm; int rcode = 0; @@ -64,7 +67,7 @@ int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) printf ("Date: %4d-%02d-%02d (%sday) Time: %2d:%02d:%02d\n", tm.tm_year, tm.tm_mon, tm.tm_mday, (tm.tm_wday<0 || tm.tm_wday>6) ? - "unknown " : weekdays[tm.tm_wday], + "unknown " : RELOC(weekdays[tm.tm_wday]), tm.tm_hour, tm.tm_min, tm.tm_sec); return 0; -- cgit v1.2.3