diff options
author | Nishanth Menon | 2015-09-11 18:27:46 -0500 |
---|---|---|
committer | Nishanth Menon | 2015-10-01 22:55:52 -0500 |
commit | f264aace97349a985fc8fe478124360d23212c60 (patch) | |
tree | a4ee710a003281a7713fb547f17259a2579280d7 | |
parent | 69c1aa309fec775992298c2e7e35463ee31e8b87 (diff) | |
download | ks2-boot-monitor-f264aace97349a985fc8fe478124360d23212c60.tar.gz ks2-boot-monitor-f264aace97349a985fc8fe478124360d23212c60.tar.xz ks2-boot-monitor-f264aace97349a985fc8fe478124360d23212c60.zip |
sec: skern: Add basic register accessors
Simple register accessors to allow for consistent register access
functions as necessary. Add a basic barrier routine for serialization
where necessary.
NOTE: there is a bunch of cleanups needed through out the code to
ensure proper usage of accessors. we will get there eventually.
Signed-off-by: Nishanth Menon <nm@ti.com>
-rw-r--r-- | sec/skernel.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sec/skernel.h b/sec/skernel.h index 845cb4e55a66..bf3c459558c5 100644 --- a/sec/skernel.h +++ b/sec/skernel.h | |||
@@ -63,4 +63,13 @@ int skern_command(int cmd, const struct regs *regs); | |||
63 | void _skern_123_init(void); | 63 | void _skern_123_init(void); |
64 | void *skern_123_init(void); | 64 | void *skern_123_init(void); |
65 | 65 | ||
66 | #define readl(a) (*(volatile unsigned int *)((a))) | ||
67 | #define writel(v, a) (*(volatile unsigned int *)((a)) = (v)) | ||
68 | #define readw(a) (*(volatile unsigned short *)((a))) | ||
69 | #define writew(v, a) (*(volatile unsigned short *)((a)) = (v)) | ||
70 | #define readb(a) (*(volatile unsigned char *)((a))) | ||
71 | #define writeb(v, a) (*(volatile unsigned char *)((a)) = (v)) | ||
72 | #define barrier() __asm__ __volatile__("" : : : "memory") | ||
73 | |||
74 | |||
66 | #endif /* __SKERN_H */ | 75 | #endif /* __SKERN_H */ |