summaryrefslogtreecommitdiff
path: root/cpu/nios2/sysid.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-06-10 01:36:27 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-06-10 01:36:27 +0200
commit9d4d3e3833ca7f4dada190ddcb3fea1da9bb9b5b (patch)
tree2e48d77afa769a4515101e4ce4ef2c6ba48cbeff /cpu/nios2/sysid.c
parent5d7022b0418b3aab977ac51dbfd179c296ae442e (diff)
parent9cc833783206efd25b4655aa451ce81e5cc28fc2 (diff)
downloadu-boot-imx-9d4d3e3833ca7f4dada190ddcb3fea1da9bb9b5b.zip
u-boot-imx-9d4d3e3833ca7f4dada190ddcb3fea1da9bb9b5b.tar.gz
u-boot-imx-9d4d3e3833ca7f4dada190ddcb3fea1da9bb9b5b.tar.bz2
Merge with http://www.psyent.com/git/uboot (NIOS2 - Scott McNutt)
Diffstat (limited to 'cpu/nios2/sysid.c')
-rw-r--r--cpu/nios2/sysid.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/cpu/nios2/sysid.c b/cpu/nios2/sysid.c
index 2b7a569..b5a2959 100644
--- a/cpu/nios2/sysid.c
+++ b/cpu/nios2/sysid.c
@@ -26,20 +26,21 @@
#if defined (CFG_NIOS_SYSID_BASE)
#include <command.h>
-#include <nios2.h>
+#include <asm/io.h>
#include <nios2-io.h>
#include <linux/time.h>
void display_sysid (void)
{
- struct nios_sysid_t *sysid =
- (struct nios_sysid_t *)CACHE_BYPASS(CFG_NIOS_SYSID_BASE);
+ struct nios_sysid_t *sysid = (struct nios_sysid_t *)CFG_NIOS_SYSID_BASE;
struct tm t;
char asc[32];
+ time_t stamp;
- localtime_r ((time_t *)&sysid->timestamp, &t);
+ stamp = readl (&sysid->timestamp);
+ localtime_r (&stamp, &t);
asctime_r (&t, asc);
- printf ("SYSID : %08x, %s", sysid->id, asc);
+ printf ("SYSID : %08x, %s", readl (&sysid->id), asc);
}