summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNishanth Menon2015-09-11 18:27:46 -0500
committerNishanth Menon2015-10-01 22:55:52 -0500
commitf264aace97349a985fc8fe478124360d23212c60 (patch)
treea4ee710a003281a7713fb547f17259a2579280d7
parent69c1aa309fec775992298c2e7e35463ee31e8b87 (diff)
downloadks2-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.h9
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);
63void _skern_123_init(void); 63void _skern_123_init(void);
64void *skern_123_init(void); 64void *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 */