[POWERPC] 8xx: Remove unused m8xx_cpm_hostalloc/free/dump()
authorJochen Friedrich <jochen@scram.de>
Thu, 24 Jan 2008 15:16:03 +0000 (16:16 +0100)
committerKumar Gala <galak@kernel.crashing.org>
Mon, 28 Jan 2008 14:30:59 +0000 (08:30 -0600)
m8xx_cpm_hostalloc is still defined in commproc.c, but no users are left
in the kernel tree. m8xx_cpm_hostfree and m8xx_cpm_hostdump are only
defined in the headers. Remove this dead code.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/sysdev/commproc.c
arch/ppc/8xx_io/commproc.c
include/asm-powerpc/commproc.h
include/asm-ppc/commproc.h

index 621bc6c1d4083601dcbfc24ebefdddb8c8e519f0..818d4b03f4e3934e0eba7a0addcee2e847e2c219 100644 (file)
@@ -48,8 +48,6 @@
 #ifndef CONFIG_PPC_CPM_NEW_BINDING
 static void m8xx_cpm_dpinit(void);
 #endif
-static uint host_buffer; /* One page of host buffer */
-static uint host_end;    /* end + 1 */
 cpm8xx_t __iomem *cpmp;  /* Pointer to comm processor space */
 immap_t __iomem *mpc8xx_immr;
 static cpic8xx_t __iomem *cpic_reg;
@@ -268,41 +266,6 @@ out:
 }
 EXPORT_SYMBOL(cpm_command);
 
-/* We used to do this earlier, but have to postpone as long as possible
- * to ensure the kernel VM is now running.
- */
-static void
-alloc_host_memory(void)
-{
-       dma_addr_t      physaddr;
-
-       /* Set the host page for allocation.
-       */
-       host_buffer = (uint)dma_alloc_coherent(NULL, PAGE_SIZE, &physaddr,
-                       GFP_KERNEL);
-       host_end = host_buffer + PAGE_SIZE;
-}
-
-/* We also own one page of host buffer space for the allocation of
- * UART "fifos" and the like.
- */
-uint
-m8xx_cpm_hostalloc(uint size)
-{
-       uint    retloc;
-
-       if (host_buffer == 0)
-               alloc_host_memory();
-
-       if ((host_buffer + size) >= host_end)
-               return(0);
-
-       retloc = host_buffer;
-       host_buffer += size;
-
-       return(retloc);
-}
-
 /* Set a baud rate generator.  This needs lots of work.  There are
  * four BRGs, any of which can be wired to any channel.
  * The internal baud rate clock is the system clock divided by 16.
index 9da880be4dc0f408df58f39c1424b0eee31117f4..3f93af83b5140210d928f3ba57a73a698d4ec82b 100644 (file)
@@ -55,8 +55,6 @@
 })
 
 static void m8xx_cpm_dpinit(void);
-static uint    host_buffer;    /* One page of host buffer */
-static uint    host_end;       /* end + 1 */
 cpm8xx_t       *cpmp;          /* Pointer to comm processor space */
 
 /* CPM interrupt vector functions.
@@ -68,7 +66,6 @@ struct        cpm_action {
 static struct  cpm_action cpm_vecs[CPMVEC_NR];
 static irqreturn_t cpm_interrupt(int irq, void * dev);
 static irqreturn_t cpm_error_interrupt(int irq, void *dev);
-static void    alloc_host_memory(void);
 /* Define a table of names to identify CPM interrupt handlers in
  * /proc/interrupts.
  */
@@ -158,21 +155,6 @@ m8xx_cpm_reset(void)
        cpmp = (cpm8xx_t *)commproc;
 }
 
-/* We used to do this earlier, but have to postpone as long as possible
- * to ensure the kernel VM is now running.
- */
-static void
-alloc_host_memory(void)
-{
-       dma_addr_t      physaddr;
-
-       /* Set the host page for allocation.
-       */
-       host_buffer = (uint)dma_alloc_coherent(NULL, PAGE_SIZE, &physaddr,
-                       GFP_KERNEL);
-       host_end = host_buffer + PAGE_SIZE;
-}
-
 /* This is called during init_IRQ.  We used to do it above, but this
  * was too early since init_IRQ was not yet called.
  */
@@ -319,26 +301,6 @@ cpm_free_handler(int cpm_vec)
        cpm_vecs[cpm_vec].dev_id = NULL;
 }
 
-/* We also own one page of host buffer space for the allocation of
- * UART "fifos" and the like.
- */
-uint
-m8xx_cpm_hostalloc(uint size)
-{
-       uint    retloc;
-
-       if (host_buffer == 0)
-               alloc_host_memory();
-
-       if ((host_buffer + size) >= host_end)
-               return(0);
-
-       retloc = host_buffer;
-       host_buffer += size;
-
-       return(retloc);
-}
-
 /* Set a baud rate generator.  This needs lots of work.  There are
  * four BRGs, any of which can be wired to any channel.
  * The internal baud rate clock is the system clock divided by 16.
index 9e3b8648648c485fa5edd836c83e0095461516e5..97575219ea8b1a02ebd63bc2da6597df780956ba 100644 (file)
@@ -87,10 +87,6 @@ extern uint cpm_dpram_phys(u8* addr);
 
 extern void cpm_setbrg(uint brg, uint rate);
 
-extern uint m8xx_cpm_hostalloc(uint size);
-extern int  m8xx_cpm_hostfree(uint start);
-extern void m8xx_cpm_hostdump(void);
-
 extern void cpm_load_patch(cpm8xx_t *cp);
 
 /* Buffer descriptors used by many of the CPM protocols.
index 462abb185f07b8e9b34eb0356e9f5a8c3330559f..5418d6de17370f8fd2e40ff46e9f54c429d0f7fa 100644 (file)
@@ -75,10 +75,6 @@ extern void *cpm_dpram_addr(unsigned long offset);
 extern uint cpm_dpram_phys(u8* addr);
 extern void cpm_setbrg(uint brg, uint rate);
 
-extern uint m8xx_cpm_hostalloc(uint size);
-extern int  m8xx_cpm_hostfree(uint start);
-extern void m8xx_cpm_hostdump(void);
-
 extern void cpm_load_patch(volatile immap_t *immr);
 
 /* Buffer descriptors used by many of the CPM protocols.
This page took 0.031735 seconds and 5 git commands to generate.