diff options
author | Heiko Schocher <hs@pollux.denx.de> | 2006-04-20 12:38:41 +0200 |
---|---|---|
committer | Heiko Schocher <hs@pollux.denx.de> | 2006-04-20 12:38:41 +0200 |
commit | 60e270a4903b3379d6859418d99aeef1d0d0cdff (patch) | |
tree | 48a033782d7f641ffd75f2be076da5b8d513254e /cpu/nios2/sysid.c | |
parent | 9acb626fc145e7327f94fd77f927dce08dd978a8 (diff) |
Fix I/O Macros and mini-app stubs for Nios-II
Patch by Scott McNutt 11, Aug 2005
-Fix asm/io.h macros
-Eliminate use of CACHE_BYPASS in cpu code
-Eliminate assembler warnings
-Fix mini-app stubs and force no small data
Diffstat (limited to 'cpu/nios2/sysid.c')
-rw-r--r-- | cpu/nios2/sysid.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cpu/nios2/sysid.c b/cpu/nios2/sysid.c index 2b7a569cc50..b5a29593ea6 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); } |