summaryrefslogtreecommitdiff
path: root/cpu/nios2/sysid.c
diff options
context:
space:
mode:
authorScott McNutt <smcnutt@psyent.com>2006-06-08 11:59:57 -0400
committerScott McNutt <smcnutt@psyent.com>2006-06-08 11:59:57 -0400
commitc2ced000f4f18361feb36ea257fabbb46913e1d4 (patch)
tree6ba42fa4c9b37b96491846e8e807f351bc5202e1 /cpu/nios2/sysid.c
parente461a24113c66747510b07930a83b0d84171a559 (diff)
downloadu-boot-imx-c2ced000f4f18361feb36ea257fabbb46913e1d4.zip
u-boot-imx-c2ced000f4f18361feb36ea257fabbb46913e1d4.tar.gz
u-boot-imx-c2ced000f4f18361feb36ea257fabbb46913e1d4.tar.bz2
Nios II - Fix I/O Macros and mini-app stubs
-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 Patch by Scott McNutt, 08 Jun 2006
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);
}