summaryrefslogtreecommitdiffstats
path: root/include/asm-sh/mmu.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 15:08:07 +0900
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 15:08:07 +0900
commit0c7b1df69c62209db19d1279dd882b37c04c5c2f (patch)
tree48e8f95b2ec02173ad2e930325e21e4509a08d19 /include/asm-sh/mmu.h
parenta09749dd86e9e93de10f12ab4ce4e90815b5650a (diff)
downloadlinux-0c7b1df69c62209db19d1279dd882b37c04c5c2f.tar.gz
linux-0c7b1df69c62209db19d1279dd882b37c04c5c2f.tar.bz2
linux-0c7b1df69c62209db19d1279dd882b37c04c5c2f.zip
sh: SH-4A Privileged Space Mapping Buffer (PMB) support.
Add support for 32-bit physical addressing through the SH-4A Privileged Space Mapping Buffer (PMB). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/mmu.h')
-rw-r--r--include/asm-sh/mmu.h48
1 files changed, 47 insertions, 1 deletions
diff --git a/include/asm-sh/mmu.h b/include/asm-sh/mmu.h
index 72f07be6117f..91c884634276 100644
--- a/include/asm-sh/mmu.h
+++ b/include/asm-sh/mmu.h
@@ -25,5 +25,51 @@ typedef struct {
typedef unsigned long mm_context_t;
#endif /* CONFIG_MMU */
-#endif /* __MMH_H */
+
+/*
+ * Privileged Space Mapping Buffer (PMB) definitions
+ */
+#define PMB_PASCR 0xff000070
+#define PMB_IRMCR 0xff000078
+
+#define PMB_ADDR 0xf6100000
+#define PMB_DATA 0xf7100000
+#define PMB_ENTRY_MAX 16
+#define PMB_E_MASK 0x0000000f
+#define PMB_E_SHIFT 8
+
+#define PMB_SZ_16M 0x00000000
+#define PMB_SZ_64M 0x00000010
+#define PMB_SZ_128M 0x00000080
+#define PMB_SZ_512M 0x00000090
+#define PMB_SZ_MASK PMB_SZ_512M
+#define PMB_C 0x00000008
+#define PMB_WT 0x00000001
+#define PMB_UB 0x00000200
+#define PMB_V 0x00000100
+
+#define PMB_NO_ENTRY (-1)
+
+struct pmb_entry {
+ unsigned long vpn;
+ unsigned long ppn;
+ unsigned long flags;
+
+ /*
+ * 0 .. NR_PMB_ENTRIES for specific entry selection, or
+ * PMB_NO_ENTRY to search for a free one
+ */
+ int entry;
+};
+
+/* arch/sh/mm/pmb.c */
+int __set_pmb_entry(unsigned long vpn, unsigned long ppn,
+ unsigned long flags, int *entry);
+void set_pmb_entry(struct pmb_entry *pmbe);
+void clear_pmb_entry(struct pmb_entry *pmbe);
+struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
+ unsigned long flags);
+void pmb_free(struct pmb_entry *pmbe);
+
+#endif /* __MMU_H */