aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2011-01-01 07:53:08 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-03 01:19:38 -0500
commit743ceeed277c77a7e6751649ad0c4fa42af8063b (patch)
tree05744af2c4382e19e367530f472fc6986d73d6a4 /arch/sparc
parentbce5feeab418fb1df9ce1c3fcc14f0aacf740208 (diff)
sparc: drop prom/devmap.c
None of the functions was used. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/oplib_32.h12
-rw-r--r--arch/sparc/prom/Makefile1
-rw-r--r--arch/sparc/prom/devmap.c53
3 files changed, 0 insertions, 66 deletions
diff --git a/arch/sparc/include/asm/oplib_32.h b/arch/sparc/include/asm/oplib_32.h
index 9e5c64084b86..31d2249d326b 100644
--- a/arch/sparc/include/asm/oplib_32.h
+++ b/arch/sparc/include/asm/oplib_32.h
@@ -48,18 +48,6 @@ extern void prom_init(struct linux_romvec *rom_ptr);
48/* Boot argument acquisition, returns the boot command line string. */ 48/* Boot argument acquisition, returns the boot command line string. */
49extern char *prom_getbootargs(void); 49extern char *prom_getbootargs(void);
50 50
51/* Device utilities. */
52
53/* Map and unmap devices in IO space at virtual addresses. Note that the
54 * virtual address you pass is a request and the prom may put your mappings
55 * somewhere else, so check your return value as that is where your new
56 * mappings really are!
57 *
58 * Another note, these are only available on V2 or higher proms!
59 */
60extern char *prom_mapio(char *virt_hint, int io_space, unsigned int phys_addr, unsigned int num_bytes);
61extern void prom_unmapio(char *virt_addr, unsigned int num_bytes);
62
63/* Miscellaneous routines, don't really fit in any category per se. */ 51/* Miscellaneous routines, don't really fit in any category per se. */
64 52
65/* Reboot the machine with the command line passed. */ 53/* Reboot the machine with the command line passed. */
diff --git a/arch/sparc/prom/Makefile b/arch/sparc/prom/Makefile
index 816c0fa12dc0..113e6302a6ec 100644
--- a/arch/sparc/prom/Makefile
+++ b/arch/sparc/prom/Makefile
@@ -5,7 +5,6 @@ asflags := -ansi
5ccflags := -Werror 5ccflags := -Werror
6 6
7lib-y := bootstr_$(BITS).o 7lib-y := bootstr_$(BITS).o
8lib-$(CONFIG_SPARC32) += devmap.o
9lib-y += init_$(BITS).o 8lib-y += init_$(BITS).o
10lib-$(CONFIG_SPARC32) += memory.o 9lib-$(CONFIG_SPARC32) += memory.o
11lib-y += misc_$(BITS).o 10lib-y += misc_$(BITS).o
diff --git a/arch/sparc/prom/devmap.c b/arch/sparc/prom/devmap.c
deleted file mode 100644
index 46157d2aba0d..000000000000
--- a/arch/sparc/prom/devmap.c
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * promdevmap.c: Map device/IO areas to virtual addresses.
3 *
4 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
5 */
6
7#include <linux/types.h>
8#include <linux/kernel.h>
9#include <linux/sched.h>
10
11#include <asm/openprom.h>
12#include <asm/oplib.h>
13
14extern void restore_current(void);
15
16/* Just like the routines in palloc.c, these should not be used
17 * by the kernel at all. Bootloader facility mainly. And again,
18 * this is only available on V2 proms and above.
19 */
20
21/* Map physical device address 'paddr' in IO space 'ios' of size
22 * 'num_bytes' to a virtual address, with 'vhint' being a hint to
23 * the prom as to where you would prefer the mapping. We return
24 * where the prom actually mapped it.
25 */
26char *
27prom_mapio(char *vhint, int ios, unsigned int paddr, unsigned int num_bytes)
28{
29 unsigned long flags;
30 char *ret;
31
32 spin_lock_irqsave(&prom_lock, flags);
33 if((num_bytes == 0) || (paddr == 0)) ret = (char *) 0x0;
34 else
35 ret = (*(romvec->pv_v2devops.v2_dumb_mmap))(vhint, ios, paddr,
36 num_bytes);
37 restore_current();
38 spin_unlock_irqrestore(&prom_lock, flags);
39 return ret;
40}
41
42/* Unmap an IO/device area that was mapped using the above routine. */
43void
44prom_unmapio(char *vaddr, unsigned int num_bytes)
45{
46 unsigned long flags;
47
48 if(num_bytes == 0x0) return;
49 spin_lock_irqsave(&prom_lock, flags);
50 (*(romvec->pv_v2devops.v2_dumb_munmap))(vaddr, num_bytes);
51 restore_current();
52 spin_unlock_irqrestore(&prom_lock, flags);
53}