aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/sram.h
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-10-29 13:54:06 -0700
committerTony Lindgren <tony@atomide.com>2012-10-31 10:14:13 -0700
commitbf027ca13738b1548910351952c3fe9b63263a9a (patch)
tree546f201d9ad7c5dc7b3597c88ea9a6ed8647de30 /arch/arm/plat-omap/include/plat/sram.h
parentARM: OMAP1: usb: fix sparse warnings (diff)
downloadlinux-dev-bf027ca13738b1548910351952c3fe9b63263a9a.tar.xz
linux-dev-bf027ca13738b1548910351952c3fe9b63263a9a.zip
ARM: OMAP: Split sram.h to local headers and minimal shared header
Most of the defines are specific to omap1 and omap2+, and should be in the local headers. Only minimal function prototypes need to be shared. As discussed on linux-arm-kernel, we want to avoid relative includes for the arch/arm/*omap* shared code: http://www.spinics.net/lists/linux-omap/msg80520.html So this patch re-adds a minimal plat/sram.h. The new plat/sram.h must not be included from drivers, that will break build for omap2+ CONFIG_MULTIPLATFORM. Note that this patch temporarily adds two more relative includes; Those will be removed in the following patch. Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/sram.h')
-rw-r--r--arch/arm/plat-omap/include/plat/sram.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/sram.h b/arch/arm/plat-omap/include/plat/sram.h
new file mode 100644
index 000000000000..c60025a45ee1
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/sram.h
@@ -0,0 +1,12 @@
+int omap_sram_init(void);
+
+extern void *omap_sram_push_address(unsigned long size);
+
+/* Macro to push a function to the internal SRAM, using the fncpy API */
+#define omap_sram_push(funcp, size) ({ \
+ typeof(&(funcp)) _res = NULL; \
+ void *_sram_address = omap_sram_push_address(size); \
+ if (_sram_address) \
+ _res = fncpy(_sram_address, &(funcp), size); \
+ _res; \
+})