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>
diff --git a/include/asm-sh/mmu.h b/include/asm-sh/mmu.h
index 91c8846..ec09589 100644
--- a/include/asm-sh/mmu.h
+++ b/include/asm-sh/mmu.h
@@ -50,6 +50,8 @@
 
 #define PMB_NO_ENTRY		(-1)
 
+struct pmb_entry;
+
 struct pmb_entry {
 	unsigned long vpn;
 	unsigned long ppn;
@@ -60,16 +62,23 @@
 	 * PMB_NO_ENTRY to search for a free one
 	 */
 	int entry;
+
+	struct pmb_entry *next;
+	/* Adjacent entry link for contiguous multi-entry mappings */
+	struct pmb_entry *link;
 };
 
 /* 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);
+int 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);
+long pmb_remap(unsigned long virt, unsigned long phys,
+	       unsigned long size, unsigned long flags);
+void pmb_unmap(unsigned long addr);
 
 #endif /* __MMU_H */