aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/mmu.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 02:16:42 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 02:16:42 -0400
commitd7cdc9e8ac82c43fdcd4fde6b5b53d2dcba7f707 (patch)
tree2489b1831a1b5818af0927e4d3c8933bf7d05f31 /include/asm-sh/mmu.h
parent26ff6c11ef38e08990c1e417c299246e6ab18ff7 (diff)
sh: ioremap() overhaul.
ioremap() overhaul. Add support for transparent PMB mapping, get rid of p3_ioremap(), etc. Also drop ioremap() and iounmap() routines from the machvec, as everyone can use the generic ioremap() API instead. For PCI memory apertures and other special cases, use the pci_iomap() API, as boards are already required to get the mapping right there. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/mmu.h')
-rw-r--r--include/asm-sh/mmu.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/asm-sh/mmu.h b/include/asm-sh/mmu.h
index 91c884634276..ec09589fa6ca 100644
--- a/include/asm-sh/mmu.h
+++ b/include/asm-sh/mmu.h
@@ -50,6 +50,8 @@ typedef unsigned long mm_context_t;
50 50
51#define PMB_NO_ENTRY (-1) 51#define PMB_NO_ENTRY (-1)
52 52
53struct pmb_entry;
54
53struct pmb_entry { 55struct pmb_entry {
54 unsigned long vpn; 56 unsigned long vpn;
55 unsigned long ppn; 57 unsigned long ppn;
@@ -60,16 +62,23 @@ struct pmb_entry {
60 * PMB_NO_ENTRY to search for a free one 62 * PMB_NO_ENTRY to search for a free one
61 */ 63 */
62 int entry; 64 int entry;
65
66 struct pmb_entry *next;
67 /* Adjacent entry link for contiguous multi-entry mappings */
68 struct pmb_entry *link;
63}; 69};
64 70
65/* arch/sh/mm/pmb.c */ 71/* arch/sh/mm/pmb.c */
66int __set_pmb_entry(unsigned long vpn, unsigned long ppn, 72int __set_pmb_entry(unsigned long vpn, unsigned long ppn,
67 unsigned long flags, int *entry); 73 unsigned long flags, int *entry);
68void set_pmb_entry(struct pmb_entry *pmbe); 74int set_pmb_entry(struct pmb_entry *pmbe);
69void clear_pmb_entry(struct pmb_entry *pmbe); 75void clear_pmb_entry(struct pmb_entry *pmbe);
70struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn, 76struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
71 unsigned long flags); 77 unsigned long flags);
72void pmb_free(struct pmb_entry *pmbe); 78void pmb_free(struct pmb_entry *pmbe);
79long pmb_remap(unsigned long virt, unsigned long phys,
80 unsigned long size, unsigned long flags);
81void pmb_unmap(unsigned long addr);
73 82
74#endif /* __MMU_H */ 83#endif /* __MMU_H */
75 84