aboutsummaryrefslogtreecommitdiff
path: root/include/asm-powerpc/cpm.h
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2007-09-28 14:06:16 -0500
committerKumar Gala <galak@kernel.crashing.org>2007-10-04 15:47:05 -0500
commit15f8c604a79c4840ed76eecf3af5d88b7c1dee9e (patch)
treed86815bc2daf835fee081ee7dac92cef8784f6a3 /include/asm-powerpc/cpm.h
parent3c5df5c26ed17828760945d59653a2e22e3fb63f (diff)
[POWERPC] cpm: Describe multi-user ram in its own device node.
The way the current CPM binding describes available multi-user (a.k.a. dual-ported) RAM doesn't work well when there are multiple free regions, and it doesn't work at all if the region doesn't begin at the start of the muram area (as the hardware needs to be programmed with offsets into this area). The latter situation can happen with SMC UARTs on CPM2, as its parameter RAM is relocatable, u-boot puts it at zero, and the kernel doesn't support moving it. It is now described with a muram node, similar to QE. The current CPM binding is sufficiently recent (i.e. never appeared in an official release) that compatibility with existing device trees is not an issue. The code supporting the new binding is shared between cpm1 and cpm2, rather than remain separated. QE should be able to use this code as well, once minor fixes are made to its device trees. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'include/asm-powerpc/cpm.h')
-rw-r--r--include/asm-powerpc/cpm.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-powerpc/cpm.h b/include/asm-powerpc/cpm.h
new file mode 100644
index 00000000000..48df9f330e7
--- /dev/null
+++ b/include/asm-powerpc/cpm.h
@@ -0,0 +1,14 @@
+#ifndef __CPM_H
+#define __CPM_H
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+
+int cpm_muram_init(void);
+unsigned long cpm_muram_alloc(unsigned long size, unsigned long align);
+int cpm_muram_free(unsigned long offset);
+unsigned long cpm_muram_alloc_fixed(unsigned long offset, unsigned long size);
+void __iomem *cpm_muram_addr(unsigned long offset);
+dma_addr_t cpm_muram_dma(void __iomem *addr);
+
+#endif