MIPS/jazzdma: remove the unused vdma_remap function
authorChristoph Hellwig <hch@lst.de>
Mon, 17 Aug 2020 17:31:25 +0000 (19:31 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 11 Sep 2020 06:13:49 +0000 (08:13 +0200)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/jazzdma.h
arch/mips/jazz/jazzdma.c

index d13f940022d5f930ebdfb720e9fd7ba58b633602..c831da7fa89803ff434b7441944d316c3c9aedc0 100644 (file)
@@ -10,8 +10,6 @@
  */
 extern unsigned long vdma_alloc(unsigned long paddr, unsigned long size);
 extern int vdma_free(unsigned long laddr);
-extern int vdma_remap(unsigned long laddr, unsigned long paddr,
-                     unsigned long size);
 extern unsigned long vdma_phys2log(unsigned long paddr);
 extern unsigned long vdma_log2phys(unsigned long laddr);
 extern void vdma_stats(void);          /* for debugging only */
index 014773f0bfcd74d06e235842edce18dcbc4b79df..fe40dbed04c1d6279acc94a54db567a7e0885cab 100644 (file)
@@ -209,76 +209,6 @@ int vdma_free(unsigned long laddr)
 
 EXPORT_SYMBOL(vdma_free);
 
-/*
- * Map certain page(s) to another physical address.
- * Caller must have allocated the page(s) before.
- */
-int vdma_remap(unsigned long laddr, unsigned long paddr, unsigned long size)
-{
-       int first, pages;
-
-       if (laddr > 0xffffff) {
-               if (vdma_debug)
-                       printk
-                           ("vdma_map: Invalid logical address: %08lx\n",
-                            laddr);
-               return -EINVAL; /* invalid logical address */
-       }
-       if (paddr > 0x1fffffff) {
-               if (vdma_debug)
-                       printk
-                           ("vdma_map: Invalid physical address: %08lx\n",
-                            paddr);
-               return -EINVAL; /* invalid physical address */
-       }
-
-       pages = (((paddr & (VDMA_PAGESIZE - 1)) + size) >> 12) + 1;
-       first = laddr >> 12;
-       if (vdma_debug)
-               printk("vdma_remap: first=%x, pages=%x\n", first, pages);
-       if (first + pages > VDMA_PGTBL_ENTRIES) {
-               if (vdma_debug)
-                       printk("vdma_alloc: Invalid size: %08lx\n", size);
-               return -EINVAL;
-       }
-
-       paddr &= ~(VDMA_PAGESIZE - 1);
-       while (pages > 0 && first < VDMA_PGTBL_ENTRIES) {
-               if (pgtbl[first].owner != laddr) {
-                       if (vdma_debug)
-                               printk("Trying to remap other's pages.\n");
-                       return -EPERM;  /* not owner */
-               }
-               pgtbl[first].frame = paddr;
-               paddr += VDMA_PAGESIZE;
-               first++;
-               pages--;
-       }
-
-       /*
-        * Update translation table
-        */
-       r4030_write_reg32(JAZZ_R4030_TRSTBL_INV, 0);
-
-       if (vdma_debug > 2) {
-               int i;
-               pages = (((paddr & (VDMA_PAGESIZE - 1)) + size) >> 12) + 1;
-               first = laddr >> 12;
-               printk("LADDR: ");
-               for (i = first; i < first + pages; i++)
-                       printk("%08x ", i << 12);
-               printk("\nPADDR: ");
-               for (i = first; i < first + pages; i++)
-                       printk("%08x ", pgtbl[i].frame);
-               printk("\nOWNER: ");
-               for (i = first; i < first + pages; i++)
-                       printk("%08x ", pgtbl[i].owner);
-               printk("\n");
-       }
-
-       return 0;
-}
-
 /*
  * Translate a physical address to a logical address.
  * This will return the logical address of the first