summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2013-02-14 17:35:49 -0800
committerGabe Black <gabeblack@chromium.org>2013-02-15 06:52:01 +0100
commit8deb5c6e0fde0b326881c7684056fe9ec4f310e9 (patch)
tree94f65dcea6ac0a85a4bd256284e6b5ea329fbd32 /payloads/libpayload
parent1a29c1e7665c22476b74d469952d7e689d475cdf (diff)
libpayload: Use the same type for 32 bit data in readl as in uint32_t.
The compiler gets mad when the types are equivalent size but not necessarily interchangeable because of strict aliasing checks. Since uint32_t is likely to be used when trying to read 32 bit data, it makes sense for them to be the compatible. Signed-off-by: Gabe Black <gabeblack@google.com> Change-Id: If73d794866055dc026fc06d6268e692adac0f835 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: http://review.coreboot.org/2411 Tested-by: build bot (Jenkins) Reviewed-by: Gabe Black <gabeblack@chromium.org>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/include/armv7/arch/io.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/payloads/libpayload/include/armv7/arch/io.h b/payloads/libpayload/include/armv7/arch/io.h
index e71e1dd7c8..807dc1d2fb 100644
--- a/payloads/libpayload/include/armv7/arch/io.h
+++ b/payloads/libpayload/include/armv7/arch/io.h
@@ -33,10 +33,10 @@
#define readb(_a) (*(volatile unsigned char *) (_a))
#define readw(_a) (*(volatile unsigned short *) (_a))
-#define readl(_a) (*(volatile unsigned long *) (_a))
+#define readl(_a) (*(volatile unsigned int *) (_a))
#define writeb(_v, _a) (*(volatile unsigned char *) (_a) = (_v))
#define writew(_v, _a) (*(volatile unsigned short *) (_a) = (_v))
-#define writel(_v, _a) (*(volatile unsigned long *) (_a) = (_v))
+#define writel(_v, _a) (*(volatile unsigned int *) (_a) = (_v))
#endif