summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2008-07-31 09:02:03 +0200
committerWolfgang Denk <wd@denx.de>2008-07-31 09:02:03 +0200
commit861931c30bdb0cfbecf6c4f944bd221be572f010 (patch)
tree10293bb00535450730971b9f517ece8f3a4fafd5 /include
parent1ca9950b46c0aded14c80f728f6238625d723a19 (diff)
parentba17540844897505b12f310f6a13ff0ab6df2e51 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-avr32
Diffstat (limited to 'include')
-rw-r--r--include/asm-avr32/io.h2
-rw-r--r--include/asm-avr32/sysreg.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/include/asm-avr32/io.h b/include/asm-avr32/io.h
index d030c262a58..06e52b137f5 100644
--- a/include/asm-avr32/io.h
+++ b/include/asm-avr32/io.h
@@ -22,6 +22,8 @@
#ifndef __ASM_AVR32_IO_H
#define __ASM_AVR32_IO_H
+#include <asm/types.h>
+
#ifdef __KERNEL__
/*
diff --git a/include/asm-avr32/sysreg.h b/include/asm-avr32/sysreg.h
index 72ad49e5e2d..4f6970448b8 100644
--- a/include/asm-avr32/sysreg.h
+++ b/include/asm-avr32/sysreg.h
@@ -273,7 +273,9 @@
| SYSREG_BF(name,value))
/* Register access macros */
-#define sysreg_read(reg) __builtin_mfsr(SYSREG_##reg)
-#define sysreg_write(reg, value) __builtin_mtsr(SYSREG_##reg, value)
+#define sysreg_read(reg) \
+ ((unsigned long)__builtin_mfsr(SYSREG_##reg))
+#define sysreg_write(reg, value) \
+ __builtin_mtsr(SYSREG_##reg, value)
#endif /* __ASM_AVR32_SYSREG_H__ */